mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Replace IInventory baubles with IItemHandler where appropriate
This commit is contained in:
22 files changed
+60
-51
No files matched your search
@@ -19,6 +19,7 @@ import net.minecraft.util.SoundCategory;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import vazkii.botania.api.sound.BotaniaSoundEvents;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemDodgeRing;
|
||||
@@ -39,7 +40,7 @@ public class PacketDodge implements IMessage {
|
||||
player.mcServer.addScheduledTask(() -> {
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.dash, SoundCategory.PLAYERS, 1F, 1F);
|
||||
|
||||
IInventory baublesInv = BaublesApi.getBaubles(player);
|
||||
IItemHandler baublesInv = BaublesApi.getBaublesHandler(player);
|
||||
ItemStack ringStack = baublesInv.getStackInSlot(1);
|
||||
if(ringStack.isEmpty() || !(ringStack.getItem() instanceof ItemDodgeRing)) {
|
||||
ringStack = baublesInv.getStackInSlot(2);
|
||||
|
||||
Reference in new issue
Block a user