Java Code Examples for net.minecraft.tileentity.TileEntity#receiveClientEvent()
The following examples show how to use
net.minecraft.tileentity.TileEntity#receiveClientEvent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenBlock.java From OpenModsLib with MIT License | 6 votes |
@SuppressWarnings("deprecation") // TODO review @Override public boolean eventReceived(IBlockState state, World world, BlockPos blockPos, int eventId, int eventParam) { if (eventId < 0 && !world.isRemote) { switch (eventId) { case EVENT_ADDED: return onBlockAddedNextTick(world, blockPos, state); } return false; } if (hasTileEntity) { super.eventReceived(state, world, blockPos, eventId, eventParam); TileEntity te = world.getTileEntity(blockPos); return te != null? te.receiveClientEvent(eventId, eventParam) : false; } else { return super.eventReceived(state, world, blockPos, eventId, eventParam); } }
Example 2
Source File: BlockBabyChest.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
@Override public boolean onBlockEventReceived(World pWorld, int pX, int pY, int pZ, int pEventId, int pEventData) { super.onBlockEventReceived(pWorld, pX, pY, pZ, pEventId, pEventData); TileEntity tileentity = pWorld.getTileEntity(pX, pY, pZ); return tileentity != null && tileentity.receiveClientEvent(pEventId, pEventData); }
Example 3
Source File: BlockHelm.java From archimedes-ships with MIT License | 5 votes |
@Override public boolean onBlockEventReceived(World world, int x, int y, int z, int p_149696_5_, int p_149696_6_) { super.onBlockEventReceived(world, x, y, z, p_149696_5_, p_149696_6_); TileEntity tileentity = world.getTileEntity(x, y, z); return tileentity != null && tileentity.receiveClientEvent(p_149696_5_, p_149696_6_); }
Example 4
Source File: BlockEnderStorage.java From EnderStorage with MIT License | 4 votes |
@Override public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int eventID, int eventParam) { super.eventReceived(state, worldIn, pos, eventID, eventParam); TileEntity tileentity = worldIn.getTileEntity(pos); return tileentity != null && tileentity.receiveClientEvent(eventID, eventParam); }
Example 5
Source File: BlockContainerPL.java From Production-Line with MIT License | 4 votes |
@Override public boolean eventReceived(IBlockState state, World world, BlockPos pos, int id, int param) { super.eventReceived(state, world, pos, id, param); TileEntity tileentity = world.getTileEntity(pos); return tileentity != null && tileentity.receiveClientEvent(id, param); }