本文整理匯總了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);
}