Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
@Override
public Packet getDescriptionPacket()
{
super.getDescriptionPacket();
NBTTagCompound nbt = new NBTTagCompound();
this.writeToNBT(nbt);
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
super.onDataPacket(net, pkt);
this.readFromNBT(pkt.func_148857_g());
}
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); // Makes the server call getDescriptionPacket for a full data sync
markDirty(); // Marks the chunk as dirty, so that it is saved properly on changes. Not required for the sync specifically, but usually goes alongside the former.
Ну, вызываю раз в 5 тиков в onUpdate тайла, но методы не срабатывают, щас попробую ещё раз.Oldestkon написал(а):Пытайся повнимательнее читать статьи.
http://www.minecraftforge.net/wiki/Tile_Entity_Synchronization
[merge_posts_bbcode]Добавлено: 19.05.2016 15:03:11[/merge_posts_bbcode]Код:worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); // Makes the server call getDescriptionPacket for a full data sync markDirty(); // Marks the chunk as dirty, so that it is saved properly on changes. Not required for the sync specifically, but usually goes alongside the former.
Хм, странно. Ты точно там вызываешь? Должны помочь. У меня работало на этом принципе.