本文整理汇总了Java中net.minecraft.tileentity.TileEntity.receiveClientEvent方法的典型用法代码示例。如果您正苦于以下问题:Java TileEntity.receiveClientEvent方法的具体用法?Java TileEntity.receiveClientEvent怎么用?Java TileEntity.receiveClientEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.tileentity.TileEntity
的用法示例。
在下文中一共展示了TileEntity.receiveClientEvent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: eventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
* Called on server when World#addBlockEvent is called. If server returns true, then also called on the client. On
* the Server, this may perform additional changes to the world, like pistons replacing the block with an extended
* base. On the client, the update may involve replacing tile entities or effects such as sounds or particles
*/
@Override
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param) {
super.eventReceived(state, worldIn, pos, id, param);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity != null && tileentity.receiveClientEvent(id, param);
}
示例2: eventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
* Called on both Client and Server when World#addBlockEvent is called. On the Server, this may perform additional
* changes to the world, like pistons replacing the block with an extended base. On the client, the update may
* involve replacing tile entities, playing sounds, or performing other visual actions to reflect the server side
* changes.
*/
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param)
{
super.eventReceived(state, worldIn, pos, id, param);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity == null ? false : tileentity.receiveClientEvent(id, param);
}
示例3: onBlockEventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
/**
* Called on both Client and Server when World#addBlockEvent is called
*/
public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
{
super.onBlockEventReceived(worldIn, pos, state, eventID, eventParam);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity == null ? false : tileentity.receiveClientEvent(eventID, eventParam);
}
示例4: eventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
@Override
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param)
{
super.eventReceived(state, worldIn, pos, id, param);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity != null && tileentity.receiveClientEvent(id, param);
}
示例5: eventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
@Override
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int eventId, int eventParam) {
super.eventReceived(state, worldIn, pos, eventId, eventParam);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity == null ? false : tileentity.receiveClientEvent(eventId, eventParam);
}
示例6: eventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
@Override
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param) {
super.eventReceived(state, worldIn, pos, id, param);
TileEntity tileentity = worldIn.getTileEntity(pos);
return tileentity == null ? false : tileentity.receiveClientEvent(id, param);
}
示例7: onBlockEventReceived
import net.minecraft.tileentity.TileEntity; //导入方法依赖的package包/类
@Override
public boolean onBlockEventReceived(World w, int x, int y, int z, int i, int i0) {
super.onBlockEventReceived(w, x, y, z, i, i0);
TileEntity tileentity = w.getTileEntity(x, y, z);
return tileentity == null ? false : tileentity.receiveClientEvent(i, i0);
}