use new baubles packetsync constructor. bump baubles dep. Closes #2509

This commit is contained in:
Vincent Lee committed 2018-01-17 00:47:06 -06:00
1 parent 4ff5b6f7ca
commit c8f183c08c
3 files changed
+7 -5

No files matched your search

@@ -10,8 +10,8 @@
*/
package vazkii.botania.client.gui.box;
import baubles.api.BaublesApi;
import baubles.api.IBauble;
import baubles.api.cap.BaublesCapabilities;
import baubles.api.cap.IBaublesItemHandler;
import baubles.common.container.SlotBauble;
import net.minecraft.entity.player.EntityPlayer;
@@ -40,7 +40,7 @@ public class ContainerBaubleBox extends Container {
IInventory playerInv = player.inventory;
baubleBoxInv = boxInv;
baubles = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
baubles = BaublesApi.getBaublesHandler(player);
addSlotToContainer(new SlotBauble(player, baubles, 0, 8, 8 + 0 * 18));
addSlotToContainer(new SlotBauble(player, baubles, 1, 8, 8 + 1 * 18));
@@ -257,10 +257,12 @@ public class InternalMethodHandler extends DummyMethodHandler {
return block instanceof BlockModFlower || block instanceof BlockFloatingFlower || block instanceof ISpecialFlower;
}
// todo use our own sync packet or use the autosync system
@Override
public void sendBaubleUpdatePacket(EntityPlayer player, int slot) {
if(player instanceof EntityPlayerMP)
PacketHandler.INSTANCE.sendTo(new PacketSync(player, slot), (EntityPlayerMP) player);
if(player instanceof EntityPlayerMP) {
PacketHandler.INSTANCE.sendTo(new PacketSync(player, slot, BaublesApi.getBaublesHandler(player).getStackInSlot(slot)), (EntityPlayerMP) player);
}
}
@Override
@@ -17,7 +17,7 @@ public final class LibMisc {
public static final String MOD_NAME = "Botania";
public static final String BUILD = "GRADLE:BUILD";
public static final String VERSION = "GRADLE:VERSION-" + BUILD;
public static final String DEPENDENCIES = "required-after:baubles;after:thaumcraft";
public static final String DEPENDENCIES = "required-after:baubles@[1.5.2,);after:thaumcraft";
// Network Contants
public static final String NETWORK_CHANNEL = MOD_ID;