本文整理汇总了Java中net.minecraft.network.play.server.S35PacketUpdateTileEntity.func_148857_g方法的典型用法代码示例。如果您正苦于以下问题:Java S35PacketUpdateTileEntity.func_148857_g方法的具体用法?Java S35PacketUpdateTileEntity.func_148857_g怎么用?Java S35PacketUpdateTileEntity.func_148857_g使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.play.server.S35PacketUpdateTileEntity
的用法示例。
在下文中一共展示了S35PacketUpdateTileEntity.func_148857_g方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) {
if (!this.worldObj.isRemote) {
return;
}
final NBTTagCompound tags = pkt.func_148857_g();
if (tags.hasKey("d")) {
if (tags.getByte("d") != this.rotation) {
this.worldObj.markBlockForUpdate(this.x(), this.y(), this.z());
}
this.rotation = tags.getByte("d");
}
if (tags.hasKey("s")) {
this.playSound = tags.getBoolean("s");
Sounds.refresh();
}
}
示例2: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity pkt) {
super.onDataPacket(net, pkt);
final NBTTagCompound tag = pkt.func_148857_g();
if (tag.hasKey("Filter")) {
this.filter = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("Filter"));
}
else {
this.filter = null;
}
}
示例3: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@Override
public void onDataPacket(NetworkManager manager, S35PacketUpdateTileEntity packet) {
NBTTagCompound tagCompound = packet.func_148857_g();
StationNameCN = tagCompound.getString("StationNameCN");
StationNameEN = tagCompound.getString("StationNameEN");
LeftStations = tagCompound.getString("LeftStations");
RightStations = tagCompound.getString("RightStations");
}
示例4: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
NBTTagCompound tag = pkt.func_148857_g();
readFromNBT(tag);
}
示例5: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@Override
public void onDataPacket(NetworkManager manager, S35PacketUpdateTileEntity packet) {
NBTTagCompound tagCompound = packet.func_148857_g();
fromNBT(tagCompound);
}
示例6: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@Override
public void onDataPacket(NetworkManager manager, S35PacketUpdateTileEntity packet) {
NBTTagCompound tagCompound = packet.func_148857_g();
}
示例7: onDataPacket
import net.minecraft.network.play.server.S35PacketUpdateTileEntity; //导入方法依赖的package包/类
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
NBTTagCompound tagCompound = pkt.func_148857_g();
yaw = tagCompound.getFloat("yaw");
target = tagCompound.getFloat("target");
}