From 6e7f08ea78cdfb979e4e1e7a6e9d4f1238304947 Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:51:04 +0200 Subject: [PATCH] wip: Fixes --- .../AutoCompressedHammerBlockEntity.java | 17 +--------------- .../block/entity/AutoHammerBlockEntity.java | 11 ---------- .../mods/excompressum/compat/Compat.java | 20 ------------------- 3 files changed, 1 insertion(+), 47 deletions(-) diff --git a/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoCompressedHammerBlockEntity.java b/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoCompressedHammerBlockEntity.java index 044f4b7f..2456bbc1 100644 --- a/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoCompressedHammerBlockEntity.java +++ b/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoCompressedHammerBlockEntity.java @@ -49,22 +49,7 @@ public Collection rollHammerRewards(ItemStack itemStack, ItemStack to @Override public boolean isHammerUpgrade(ItemStack itemStack) { - if (itemStack.is(ModItemTags.COMPRESSED_HAMMERS)) { - return true; - } - - if (itemStack.getItem() == Compat.TCONSTRUCT_HAMMER) { - CompoundTag tagCompound = itemStack.getTag(); - if (tagCompound != null) { - ListTag traits = tagCompound.getList("Traits", Tag.TAG_STRING); - for (Tag tag : traits) { - if (tag.getAsString().equalsIgnoreCase(Compat.TCONSTRUCT_TRAIT_SMASHINGII)) { - return true; - } - } - } - } - return false; + return itemStack.is(ModItemTags.COMPRESSED_HAMMERS); } @Override diff --git a/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoHammerBlockEntity.java b/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoHammerBlockEntity.java index 79cd0aaa..03180353 100644 --- a/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoHammerBlockEntity.java +++ b/shared/src/main/java/net/blay09/mods/excompressum/block/entity/AutoHammerBlockEntity.java @@ -424,17 +424,6 @@ public ItemStack getUpgradeStack(int i) { } public boolean isHammerUpgrade(ItemStack itemStack) { - if (itemStack.getItem() == Compat.TCONSTRUCT_HAMMER) { - CompoundTag tagCompound = itemStack.getTag(); - if (tagCompound != null) { - ListTag traits = tagCompound.getList("Traits", Tag.TAG_STRING); - for (Tag tag : traits) { - if (tag.getAsString().equalsIgnoreCase(Compat.TCONSTRUCT_TRAIT_SMASHING)) { - return true; - } - } - } - } return itemStack.is(ModItemTags.HAMMERS); } diff --git a/shared/src/main/java/net/blay09/mods/excompressum/compat/Compat.java b/shared/src/main/java/net/blay09/mods/excompressum/compat/Compat.java index afe5e18b..28e0cd7a 100644 --- a/shared/src/main/java/net/blay09/mods/excompressum/compat/Compat.java +++ b/shared/src/main/java/net/blay09/mods/excompressum/compat/Compat.java @@ -1,25 +1,5 @@ package net.blay09.mods.excompressum.compat; -import net.minecraft.world.item.Item; - public class Compat { - - public static Item TCONSTRUCT_HAMMER; - - public static final String PATCHOULI = "patchouli"; - public static final String BOTANIA = "botania"; - public static final String EXNIHILO_OMNIA = "exnihiloomnia"; - public static final String EXNIHILO_ADSCENSIO = "exnihiloadscensio"; public static final String EXNIHILO_SEQUENTIA = "exnihilosequentia"; - public static final String EXNIHILO_CREATIO = "exnihilocreatio"; - public static final String TCONSTRUCT = "tconstruct"; - public static final String EXTRAUTILS2 = "extrautils2"; - public static final String WAILA = "waila"; - public static final String JEI = "jei"; - public static final String THEONEPROBE = "theoneprobe"; - public static final String CRAFT_TWEAKER = "crafttweaker"; - - public static final String TCONSTRUCT_TRAIT_SMASHING = "exnihilo_smashing"; - public static final String TCONSTRUCT_TRAIT_SMASHINGII = "excompressum:smashingii"; - public static final String TCONSTRUCT_TRAIT_COMPRESSING = "excompressum:compressing"; }