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