diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
2 files changed, 8 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java index c9f2d493ab..a8603849b8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/treefarm/TreeGenerator.java @@ -133,7 +133,8 @@ public class TreeGenerator { public FakeWorld getWorld() { FakeWorld aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); if (aWorld == null) { - aWorld = (this.mFakeWorld.set(mCurrentGeneratorIteration, new FakeWorld(200))); + this.mFakeWorld.set(mCurrentGeneratorIteration, new FakeWorld(200)); + aWorld = this.mFakeWorld.get(mCurrentGeneratorIteration); } return aWorld; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index 5968ea189c..23ab9afd61 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -49,6 +49,11 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase mCryoFuelName = mFuelStack.getLocalizedName(); mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings2Misc, 15); mHatchName = ItemUtils.getLocalizedNameOfBlock(GregTech_API.sBlockMachines, 967); + + if (mTreeData == null) { + mTreeData = new TreeGenerator(); + } + } public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { @@ -219,10 +224,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase } @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - if (mTreeData == null) { - mTreeData = new TreeGenerator(); - } + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (mTreeData != null) { //this.getBaseMetaTileEntity().enableWorking(); } |