當前位置: 首頁>>代碼示例>>Java>>正文


Java TileEntity.receiveClientEvent方法代碼示例

本文整理匯總了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);
}
 
開發者ID:canitzp,項目名稱:Metalworks,代碼行數:12,代碼來源:BlockContainerBase.java

示例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);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:13,代碼來源:BlockContainer.java

示例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);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:10,代碼來源:BlockRedstoneComparator.java

示例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);
}
 
開發者ID:cubex2,項目名稱:morefurnaces,代碼行數:8,代碼來源:BlockMoreFurnaces.java

示例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);
}
 
開發者ID:astronautlabs,項目名稱:rezolve,代碼行數:7,代碼來源:TileBlockBase.java

示例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);
}
 
開發者ID:trigg,項目名稱:Firma,代碼行數:7,代碼來源:OreBlock.java

示例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);
}
 
開發者ID:TominoCZ,項目名稱:PAYDAY,代碼行數:7,代碼來源:LobbyBlock.java


注:本文中的net.minecraft.tileentity.TileEntity.receiveClientEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。