mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 23:45:57 +00:00
Ton of null fixes
This commit is contained in:
132 files changed
+403
-325
No files matched your search
@@ -41,9 +41,9 @@ public class PacketDodge implements IMessage {
|
||||
|
||||
IInventory baublesInv = BaublesApi.getBaubles(player);
|
||||
ItemStack ringStack = baublesInv.getStackInSlot(1);
|
||||
if(ringStack == null || !(ringStack.getItem() instanceof ItemDodgeRing)) {
|
||||
if(ringStack.isEmpty() || !(ringStack.getItem() instanceof ItemDodgeRing)) {
|
||||
ringStack = baublesInv.getStackInSlot(2);
|
||||
if(ringStack == null || !(ringStack.getItem() instanceof ItemDodgeRing))
|
||||
if(ringStack.isEmpty() || !(ringStack.getItem() instanceof ItemDodgeRing))
|
||||
ctx.getServerHandler().disconnect("Invalid Dodge Packet");
|
||||
}
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ public class PacketJump implements IMessage {
|
||||
IInventory baublesInv = BaublesApi.getBaubles(player);
|
||||
ItemStack amuletStack = baublesInv.getStackInSlot(0);
|
||||
|
||||
if(amuletStack != null && amuletStack.getItem() instanceof CloudPendantShim) {
|
||||
if(!amuletStack.isEmpty() && amuletStack.getItem() instanceof CloudPendantShim) {
|
||||
player.addExhaustion(0.3F);
|
||||
player.fallDistance = 0;
|
||||
|
||||
ItemStack belt = BaublesApi.getBaubles(player).getStackInSlot(3);
|
||||
|
||||
if(belt != null && belt.getItem() instanceof ItemTravelBelt)
|
||||
if(!belt.isEmpty() && belt.getItem() instanceof ItemTravelBelt)
|
||||
player.fallDistance = -((ItemTravelBelt) belt.getItem()).fallBuffer * ((CloudPendantShim) amuletStack.getItem()).getMaxAllowedJumps();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user