Skip to content

Commit

Permalink
wip: Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 30, 2024
1 parent e744e2e commit 6e7f08e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,7 @@ public Collection<ItemStack> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
}

0 comments on commit 6e7f08e

Please sign in to comment.