mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-10-26 14:23:57 +00:00
Fix alveary inventory drops on chunk unload (#134)
This commit is contained in:
1 parent
0bd9a7978a
commit
f2e85073d3
1 file changed
+8
-2
@@ -111,6 +111,14 @@ public class AlvearyController extends RectangularMultiblockControllerBase
|
||||
this.readFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachBlock(IMultiblockComponent part, boolean chunkUnloading) {
|
||||
if (!chunkUnloading) {
|
||||
inventory.dumpInventoryIntoWorld(this.worldObj, part.getCoordinates());
|
||||
}
|
||||
super.detachBlock(part, chunkUnloading);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBlockAdded(IMultiblockComponent newPart) {
|
||||
if (newPart instanceof IAlvearyComponent) {
|
||||
@@ -159,8 +167,6 @@ public class AlvearyController extends RectangularMultiblockControllerBase
|
||||
activeComponents.remove(oldPart);
|
||||
}
|
||||
}
|
||||
|
||||
inventory.dumpInventoryIntoWorld(this.worldObj, oldPart.getCoordinates());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user