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
|
@ -17,6 +17,8 @@ import net.minecraft.util.text.ITextComponent;
|
|||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.InvWrapper;
|
||||
|
@ -102,6 +104,7 @@ public class TileInventory extends TileEntity implements IInventory
|
|||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt)
|
||||
{
|
||||
super.onDataPacket(net, pkt);
|
||||
|
@ -114,6 +117,12 @@ public class TileInventory extends TileEntity implements IInventory
|
|||
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