use of net.mcft.copy.betterstorage.network.packet.PacketBackpackHasItems in project BetterStorage by copygirl.
the class ItemBackpack method updateHasItems.
public static void updateHasItems(EntityLivingBase entity, PropertiesBackpack backpackData) {
if (entity.worldObj.isRemote || !(entity instanceof EntityPlayer))
return;
EntityPlayer player = (EntityPlayer) entity;
boolean hasItems = ((backpackData.contents != null) && !StackUtils.isEmpty(backpackData.contents));
if (backpackData.hasItems == hasItems)
return;
BetterStorage.networkChannel.sendTo(new PacketBackpackHasItems(hasItems), player);
backpackData.hasItems = hasItems;
}
Aggregations