Mystical Agriculture

Mystical Agriculture

86M Downloads

Minor optimization to Growth Accelerator

ouroborus opened this issue ยท 0 comments

commented

I was looking through the code and ran across this line in the Growth Accelerator code. It creates an Iterable<BlockPos> containing positions relative to the block in question. The code then goes on to check this list for IGrowable and IPlantable blocks. The requested list of positions starts with pos.add(0, 0, 0) but this is always going to be the Growth Accelerator block and so will never be a block of interest. The optimization, of course, is to change this to pos.add(0, 1, 0). (It might be taken further by making it pos.add(0, 2, 0) but that assumes that there are no plants that could grow when placed directly on Growth Accelerator blocks.)