本文整理汇总了Java中net.minecraft.item.ItemDye.func_150918_a方法的典型用法代码示例。如果您正苦于以下问题:Java ItemDye.func_150918_a方法的具体用法?Java ItemDye.func_150918_a怎么用?Java ItemDye.func_150918_a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.item.ItemDye
的用法示例。
在下文中一共展示了ItemDye.func_150918_a方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDataPacket
import net.minecraft.item.ItemDye; //导入方法依赖的package包/类
@Override
/**
* Called when you receive a TileEntityData packet for the location this
* TileEntity is currently in. On the client, the NetworkManager will always
* be the remote server. On the server, it will be whomever is responsible for
* sending the packet.
*
* @param net The NetworkManager the packet originated from
* @param pkt The data packet
*/
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
World world = getWorldObj();
if (world.isRemote) {
boolean wasEnriched = hasAttribute(ATTR_FERTILIZER);
super.onDataPacket(net, pkt);
/*
* The server doesn't send particle spawn packets, so it
* has to be handled client-side.
*
* This spawns the fertilization effect as seen when growing
* saplings or crops with bonemeal.
*/
if (!wasEnriched && hasAttribute(ATTR_FERTILIZER)) {
ItemDye.func_150918_a(world, xCoord, yCoord, zCoord, 15);
}
}
}