mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-26 14:53:21 +00:00
- NodeManipulator: Multiblock fixxes
- NodeManipulationResults: init - moved node-related stuff to node package
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user