Implement missing data syncing methods

Fix MRS not syncing data immediately.
This commit is contained in:
Nicholas Ignoffo 2016-09-07 17:12:25 -07:00
parent f4feb07e47
commit 4d331aa758
10 changed files with 186 additions and 0 deletions

View file

@ -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)
{