diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index c88cd14f1..01e0e87ac 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -38,7 +38,6 @@ import com.simibubi.create.foundation.data.CreateRegistrate; import com.tterrag.registrate.util.entry.ItemEntry; import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraft.item.Rarity; import net.minecraft.tags.Tag; @@ -229,12 +228,6 @@ public class AllItems { .register(); } - // Helper - - public static boolean typeOf(ItemEntry entry, ItemStack stack) { - return stack != null && stack.getItem() == entry.get(); - } - // Load this class public static void register() {} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java index cf916a304..511bee84a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java @@ -173,7 +173,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT if (!(te instanceof MechanicalCrafterTileEntity)) return ActionResultType.PASS; MechanicalCrafterTileEntity crafter = (MechanicalCrafterTileEntity) te; - boolean wrenched = AllItems.typeOf(AllItems.WRENCH, heldItem); + boolean wrenched = AllItems.WRENCH.isIn(heldItem); if (hit.getFace() == state.get(HORIZONTAL_FACING)) { @@ -186,7 +186,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT if (worldIn.isRemote) return ActionResultType.SUCCESS; - if (AllItems.typeOf(AllItems.CRAFTER_SLOT_COVER, heldItem)) { + if (AllItems.CRAFTER_SLOT_COVER.isIn(heldItem)) { if (crafter.covered) return ActionResultType.PASS; crafter.covered = true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java index 222fbbbd3..d0d378320 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java @@ -85,7 +85,7 @@ public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE iterator = entries.keySet() .iterator(); iterator.hasNext();) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java index 339268081..3b1b599ae 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java @@ -49,7 +49,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements ItemStack heldItem = player.getHeldItem(handIn); boolean isSlimeBall = heldItem.getItem() - .isIn(Tags.Items.SLIMEBALLS) || AllItems.typeOf(AllItems.SUPER_GLUE, heldItem); + .isIn(Tags.Items.SLIMEBALLS) || AllItems.SUPER_GLUE.isIn(heldItem); BooleanProperty affectedSide = getGlueableSide(state, hit.getFace()); if (affectedSide == null) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java index 46e6a13b1..ba638028b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java @@ -63,7 +63,7 @@ public class SuperGlueHandler { public static void glueInOffHandAppliesOnBlockPlace(EntityPlaceEvent event, BlockPos pos, PlayerEntity placer) { ItemStack itemstack = placer.getHeldItemOffhand(); - if (!AllItems.typeOf(AllItems.SUPER_GLUE, itemstack)) + if (!AllItems.SUPER_GLUE.isIn(itemstack)) return; double distance = placer.getAttribute(PlayerEntity.REACH_DISTANCE) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java index 925e6ab0c..eb7ca86cc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java @@ -1,7 +1,5 @@ package com.simibubi.create.content.contraptions.components.structureMovement.glue; -import static com.simibubi.create.AllItems.typeOf; - import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack.Entry; import com.mojang.blaze3d.vertex.IVertexBuilder; @@ -54,8 +52,8 @@ public class SuperGlueRenderer extends EntityRenderer { PlayerEntity player = Minecraft.getInstance().player; boolean visible = isVisible(entity); - boolean holdingGlue = typeOf(AllItems.SUPER_GLUE, player.getHeldItemMainhand()) - || typeOf(AllItems.SUPER_GLUE, player.getHeldItemOffhand()); + boolean holdingGlue = AllItems.SUPER_GLUE.isIn(player.getHeldItemMainhand()) + || AllItems.SUPER_GLUE.isIn(player.getHeldItemOffhand()); if (!visible && !holdingGlue) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java index 8845e0b33..ad7b991bb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java @@ -185,7 +185,7 @@ public class MinecartContraptionItem extends Item { return; ItemStack wrench = player.getHeldItem(event.getHand()); - if (!AllItems.typeOf(AllItems.WRENCH, wrench)) + if (!AllItems.WRENCH.isIn(wrench)) return; if (entity instanceof ContraptionEntity) entity = entity.getRidingEntity(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java index 71b705383..710c76388 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java @@ -51,7 +51,7 @@ public class GoggleOverlayRenderer { List tooltip = new ArrayList<>(); - if (goggleInformation && AllItems.typeOf(AllItems.GOGGLES, goggles)) { + if (goggleInformation && AllItems.GOGGLES.isIn(goggles)) { IHaveGoggleInformation gte = (IHaveGoggleInformation) te; if (!gte.addToGoggleTooltip(tooltip, mc.player.isSneaking())) goggleInformation = false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java index f2d21064e..3f917e6be 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java @@ -41,7 +41,7 @@ public class GogglesItem extends Item { public static boolean canSeeParticles(PlayerEntity player) { for (ItemStack itemStack : player.getArmorInventoryList()) - if (AllItems.typeOf(AllItems.GOGGLES, itemStack)) + if (AllItems.GOGGLES.isIn(itemStack)) return true; return false; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java index 6c9edacce..e41581447 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java @@ -80,7 +80,7 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { ItemStack held = player.getHeldItemMainhand(); - if (AllItems.typeOf(AllItems.WRENCH, held)) + if (AllItems.WRENCH.isIn(held)) return ActionResultType.PASS; if (held.getItem() instanceof BlockItem) { BlockItem blockItem = (BlockItem) held.getItem(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java index c317c00ce..f6d0428b9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/item/BeltConnectorHandler.java @@ -39,7 +39,7 @@ public class BeltConnectorHandler { for (Hand hand : Hand.values()) { ItemStack heldItem = player.getHeldItem(hand); - if (!AllItems.typeOf(AllItems.BELT_CONNECTOR, heldItem)) + if (!AllItems.BELT_CONNECTOR.isIn(heldItem)) continue; if (!heldItem.hasTag()) continue; diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java index fe5a6f0ef..f3efe5f37 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java @@ -1,7 +1,5 @@ package com.simibubi.create.content.curiosities.symmetry; -import static com.simibubi.create.AllItems.typeOf; - import java.util.Random; import com.mojang.blaze3d.matrix.MatrixStack; @@ -77,7 +75,7 @@ public class SymmetryHandler { PlayerInventory inv = player.inventory; for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { if (!inv.getStackInSlot(i) - .isEmpty() && typeOf(AllItems.WAND_OF_SYMMETRY, inv.getStackInSlot(i))) { + .isEmpty() && AllItems.WAND_OF_SYMMETRY.isIn(inv.getStackInSlot(i))) { SymmetryWandItem.remove(player.world, inv.getStackInSlot(i), player, event.getPos()); } } @@ -91,7 +89,7 @@ public class SymmetryHandler { for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { ItemStack stackInSlot = player.inventory.getStackInSlot(i); - if (!typeOf(AllItems.WAND_OF_SYMMETRY, stackInSlot)) + if (!AllItems.WAND_OF_SYMMETRY.isIn(stackInSlot)) continue; if (!SymmetryWandItem.isEnabled(stackInSlot)) continue; @@ -155,7 +153,7 @@ public class SymmetryHandler { for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { ItemStack stackInSlot = player.inventory.getStackInSlot(i); - if (stackInSlot != null && typeOf(AllItems.WAND_OF_SYMMETRY, stackInSlot) + if (stackInSlot != null && AllItems.WAND_OF_SYMMETRY.isIn(stackInSlot) && SymmetryWandItem.isEnabled(stackInSlot)) { SymmetryMirror mirror = SymmetryWandItem.getMirror(stackInSlot); diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java index 3b95a6ca3..da83b5d1e 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java @@ -60,7 +60,7 @@ public class DeforesterItem extends AxeItem { @SubscribeEvent public static void onBlockDestroyed(BlockEvent.BreakEvent event) { ItemStack heldItemMainhand = event.getPlayer().getHeldItemMainhand(); - if (!AllItems.typeOf(AllItems.DEFORESTER, heldItemMainhand)) + if (!AllItems.DEFORESTER.isIn(heldItemMainhand)) return; destroyTree(heldItemMainhand, event.getWorld(), event.getState(), event.getPos(), event.getPlayer()); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java index b92764ace..b2d43c796 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java @@ -152,7 +152,7 @@ public class BlockzapperItem extends ZapperItem { @Override public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { - if (AllItems.typeOf(AllItems.BLOCKZAPPER, stack)) { + if (AllItems.BLOCKZAPPER.isIn(stack)) { CompoundNBT nbt = stack.getOrCreateTag(); if (!nbt.contains("Replace")) nbt.putBoolean("Replace", false); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java index 3b46555ae..5adf2e5aa 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java @@ -33,8 +33,8 @@ public class BlockzapperRenderHandler { ClientPlayerEntity player = Minecraft.getInstance().player; ItemStack heldMain = player.getHeldItemMainhand(); ItemStack heldOff = player.getHeldItemOffhand(); - boolean zapperInMain = AllItems.typeOf(AllItems.BLOCKZAPPER, heldMain); - boolean zapperInOff = AllItems.typeOf(AllItems.BLOCKZAPPER, heldOff); + boolean zapperInMain = AllItems.BLOCKZAPPER.isIn(heldMain); + boolean zapperInOff = AllItems.BLOCKZAPPER.isIn(heldOff); if (zapperInMain) { CompoundNBT tag = heldMain.getOrCreateTag(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java index 59d88ca95..41b736a41 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java @@ -45,7 +45,7 @@ public class BlockzapperUpgradeRecipe implements ICraftingRecipe { public ItemStack getCraftingResult(CraftingInventory inv) { for (int slot = 0; slot < inv.getSizeInventory(); slot++) { ItemStack handgun = inv.getStackInSlot(slot).copy(); - if (!AllItems.typeOf(AllItems.BLOCKZAPPER, handgun)) + if (!AllItems.BLOCKZAPPER.isIn(handgun)) continue; BlockzapperItem.setTier(getUpgradedComponent(), getTier(), handgun); return handgun; diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java index ab316b45c..2a93ac668 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java @@ -44,8 +44,8 @@ public class WorldshaperRenderHandler { ClientPlayerEntity player = Minecraft.getInstance().player; ItemStack heldMain = player.getHeldItemMainhand(); ItemStack heldOff = player.getHeldItemOffhand(); - boolean zapperInMain = AllItems.typeOf(AllItems.WORLDSHAPER, heldMain); - boolean zapperInOff = AllItems.typeOf(AllItems.WORLDSHAPER, heldOff); + boolean zapperInMain = AllItems.WORLDSHAPER.isIn(heldMain); + boolean zapperInOff = AllItems.WORLDSHAPER.isIn(heldOff); if (zapperInMain) { CompoundNBT tag = heldMain.getOrCreateTag(); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java index a1d803854..4f378f8cb 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java @@ -50,7 +50,7 @@ public class ToggleLatchBlock extends AbstractDiodeBlock { return ActionResultType.PASS; if (player.isSneaking()) return ActionResultType.PASS; - if (AllItems.typeOf(AllItems.WRENCH, player.getHeldItem(handIn))) + if (AllItems.WRENCH.isIn(player.getHeldItem(handIn))) return ActionResultType.PASS; return activated(worldIn, pos, state); } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java index 9ee3dc559..1dff71e17 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchBlock.java @@ -95,7 +95,7 @@ public class StockpileSwitchBlock extends HorizontalBlock implements ITE () -> withTileEntityDo(worldIn, pos, te -> this.displayScreen(te, player))); diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java index c68506b0a..00192180d 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java @@ -1,7 +1,5 @@ package com.simibubi.create.content.schematics.block; -import static com.simibubi.create.AllItems.typeOf; - import com.simibubi.create.AllContainerTypes; import com.simibubi.create.AllItems; @@ -46,9 +44,8 @@ public class SchematicTableContainer extends Container { inputSlot = new SlotItemHandler(te.inventory, 0, -9, 40) { @Override public boolean isItemValid(ItemStack stack) { - return typeOf(AllItems.EMPTY_SCHEMATIC, stack) - || typeOf(AllItems.SCHEMATIC_AND_QUILL, stack) - || typeOf(AllItems.SCHEMATIC, stack); + return AllItems.EMPTY_SCHEMATIC.isIn(stack) || AllItems.SCHEMATIC_AND_QUILL.isIn(stack) + || AllItems.SCHEMATIC.isIn(stack); } }; diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java index 534924146..edeb06709 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java @@ -27,7 +27,7 @@ public class SchematicannonInventory extends ItemStackHandler { public boolean isItemValid(int slot, ItemStack stack) { switch (slot) { case 0: // Blueprint Slot - return AllItems.typeOf(AllItems.SCHEMATIC, stack); + return AllItems.SCHEMATIC.isIn(stack); case 1: // Blueprint output return false; case 2: // Book input diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java index 1b4a1895e..41e46e798 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java @@ -177,7 +177,7 @@ public class SchematicAndQuillHandler { outliner().chaseAABB(outlineSlot, currentSelectionBox) .colored(0x6886c5) .withFaceTextures(AllSpecialTextures.CHECKERED, AllSpecialTextures.HIGHLIGHT_CHECKERED) - .lineWidth(1/16f) + .lineWidth(1 / 16f) .highlightFace(selectedFace); } @@ -192,8 +192,7 @@ public class SchematicAndQuillHandler { } private boolean isActive() { - return isPresent() && AllItems.typeOf(AllItems.SCHEMATIC_AND_QUILL, - Minecraft.getInstance().player.getHeldItemMainhand()); + return isPresent() && AllItems.SCHEMATIC_AND_QUILL.isIn(Minecraft.getInstance().player.getHeldItemMainhand()); } private boolean isPresent() { diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java index 3079edf63..e15904751 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java @@ -234,7 +234,7 @@ public class SchematicHandler { private ItemStack findBlueprintInHand(PlayerEntity player) { ItemStack stack = player.getHeldItemMainhand(); - if (!AllItems.typeOf(AllItems.SCHEMATIC, stack)) + if (!AllItems.SCHEMATIC.isIn(stack)) return null; if (!stack.hasTag()) return null; diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index 847b7658b..199cb453a 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -97,7 +97,7 @@ public class TooltipHelper { ClientPlayerEntity player = Minecraft.getInstance().player; boolean hasGlasses = player != null - && AllItems.typeOf(AllItems.GOGGLES, player.getItemStackFromSlot(EquipmentSlotType.HEAD)); + && AllItems.GOGGLES.isIn(player.getItemStackFromSlot(EquipmentSlotType.HEAD)); if (hasGlasses != gogglesMode) { gogglesMode = hasGlasses; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java index b2313035d..4e0b46635 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java @@ -36,7 +36,7 @@ public class ScrollValueHandler { return false; if (!mc.player.isAllowEdit()) return false; - if (scrolling.needsWrench && !AllItems.typeOf(AllItems.WRENCH, mc.player.getHeldItemMainhand())) + if (scrolling.needsWrench && !AllItems.WRENCH.isIn(mc.player.getHeldItemMainhand())) return false; if (scrolling.slotPositioning instanceof Sided) ((Sided) scrolling.slotPositioning).fromSide(result.getFace()); diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java index da8e9b33f..cac65c2ce 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java @@ -36,7 +36,7 @@ public class ScrollValueRenderer { if (behaviour == null) return; if (behaviour.needsWrench - && !AllItems.typeOf(AllItems.WRENCH, Minecraft.getInstance().player.getHeldItemMainhand())) + && !AllItems.WRENCH.isIn(Minecraft.getInstance().player.getHeldItemMainhand())) return; boolean highlight = behaviour.testHit(target.getHitVec());