Skip to content

Commit

Permalink
fix: Support all compressed hammers as upgrades #373
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 30, 2024
1 parent 654b32d commit 20164d3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.blay09.mods.excompressum.compat.Compat;
import net.blay09.mods.excompressum.config.ExCompressumConfig;
import net.blay09.mods.excompressum.item.ModItems;
import net.blay09.mods.excompressum.item.ModTags;
import net.blay09.mods.excompressum.loot.LootTableUtils;
import net.blay09.mods.excompressum.registry.ExRegistries;
import net.blay09.mods.excompressum.registry.compressedhammer.CompressedHammerRegistry;
Expand All @@ -13,6 +14,7 @@
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeManager;
Expand Down Expand Up @@ -51,9 +53,10 @@ public Collection<ItemStack> rollHammerRewards(ItemStack itemStack, ItemStack to

@Override
public boolean isHammerUpgrade(ItemStack itemStack) {
if (itemStack.getItem() == ModItems.compressedDiamondHammer) {
if (itemStack.is(ModTags.COMPRESSED_HAMMERS)) {
return true;
}

if (itemStack.getItem() == Compat.TCONSTRUCT_HAMMER) {
CompoundTag tagCompound = itemStack.getTag();
if (tagCompound != null) {
Expand Down

0 comments on commit 20164d3

Please sign in to comment.