[1.95b] BUG+FIX TileEntityCrop.reset() does not reset growth within a stage

  • Background: TileEntityCrop's reset method removes the plant in the block, preparing it for planting another crop or being overgrown by weeds. This is triggered by any of several events: Picking (left-click), trampling, and being replaced by another crop (including weed growth).


    Observed behaviour: New crops and weeds will sometimes grow to stage 2 much faster than anticipated when they appear in a crop block that used to contain another plant, sometimes appearing to have skipped stage 1 entirely.


    Expected behaviour: New crops and weeds should take (approximately) the same amount of time whether the crop block is old or new, provided it has the same growth characteristics (fertilizer, etc.).


    Underlying cause: TileEntityCrop.reset() does not alter growthPoints, so pre-stage growth is carried over from one crop to the next. If you switch from a slow-growth crop to a fast-growth one, this can cause growthPoints to be high enough that the crop immediately grows to stage 2.


    Fix: Set growthPoints to 0 in TileEntityCrop.reset().