Implement missing data syncing methods
Fix MRS not syncing data immediately.
This commit is contained in:
parent
f4feb07e47
commit
4d331aa758
10 changed files with 186 additions and 0 deletions
|
@ -11,6 +11,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@NoArgsConstructor
|
||||
public class TilePhantomBlock extends TileEntity implements ITickable
|
||||
|
@ -58,6 +60,7 @@ public class TilePhantomBlock extends TileEntity implements ITickable
|
|||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt)
|
||||
{
|
||||
super.onDataPacket(net, pkt);
|
||||
|
@ -70,6 +73,12 @@ public class TilePhantomBlock extends TileEntity implements ITickable
|
|||
return writeToNBT(new NBTTagCompound());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleUpdateTag(NBTTagCompound tag)
|
||||
{
|
||||
readFromNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue