- NodeManipulator: Multiblock fixxes

- NodeManipulationResults: init
- moved node-related stuff to node package
This commit is contained in:
HellFirePvP committed 2015-10-28 17:05:48 +01:00
1 parent 0d59f9b90a
commit 3241ac6b5c
17 files changed
+213 -36

No files matched your search

@@ -3,6 +3,7 @@ package makeo.gadomancy.common.events;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import makeo.gadomancy.common.Gadomancy;
import makeo.gadomancy.common.blocks.tiles.TileNodeManipulator;
import makeo.gadomancy.common.blocks.tiles.TileStickyJar;
import makeo.gadomancy.common.registration.RegisteredBlocks;
import makeo.gadomancy.common.registration.RegisteredIntegrations;
@@ -102,6 +103,19 @@ public class EventHandlerWorld {
}
}
@SubscribeEvent
public void onBreak(BlockEvent.BreakEvent event) {
if(!event.world.isRemote) {
if(event.block == RegisteredBlocks.blockNodeManipulator) {
TileEntity te = event.world.getTileEntity(event.x, event.y, event.z);
if(te != null && te instanceof TileNodeManipulator) {
if(((TileNodeManipulator) te).isInMultiblock())
((TileNodeManipulator) te).breakMultiblock();
}
}
}
}
@SubscribeEvent(priority = EventPriority.LOWEST)
public void on(PlayerInteractEvent e) {
if (!e.world.isRemote && e.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK