Skip to content

Commit

Permalink
Fixed Ender Smithing Template textures showing as missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Starexify committed Feb 11, 2025
1 parent 70c719a commit 3e23d3f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions src/main/java/net/nova/big_swords/item/EnderSmithingTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import net.minecraft.Util;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.flag.FeatureFlag;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.SmithingTemplateItem;
import net.nova.big_swords.BigSwordsR;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static net.nova.big_swords.BigSwordsR.rl;
Expand All @@ -32,17 +33,21 @@ public class EnderSmithingTemplate extends SmithingTemplateItem {
Util.makeDescriptionId("item", rl("smithing_template.ender_upgrade.additions_slot_description"))
);

public static final ResourceLocation EMPTY_SLOT_HELMET = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_helmet");
public static final ResourceLocation EMPTY_SLOT_CHESTPLATE = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_chestplate");
public static final ResourceLocation EMPTY_SLOT_LEGGINGS = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_leggings");
public static final ResourceLocation EMPTY_SLOT_BOOTS = ResourceLocation.withDefaultNamespace("item/empty_armor_slot_boots");
public static final ResourceLocation EMPTY_SLOT_HOE = ResourceLocation.withDefaultNamespace("item/empty_slot_hoe");
public static final ResourceLocation EMPTY_SLOT_AXE = ResourceLocation.withDefaultNamespace("item/empty_slot_axe");
public static final ResourceLocation EMPTY_SLOT_SWORD = ResourceLocation.withDefaultNamespace("item/empty_slot_sword");
public static final ResourceLocation EMPTY_SLOT_SHOVEL = ResourceLocation.withDefaultNamespace("item/empty_slot_shovel");
public static final ResourceLocation EMPTY_SLOT_PICKAXE = ResourceLocation.withDefaultNamespace("item/empty_slot_pickaxe");
public static final ResourceLocation EMPTY_SLOT_BIG_SWORD = BigSwordsR.rl("item/empty_slot_big_sword");
public static final ResourceLocation EMPTY_SLOT_INGOT = ResourceLocation.withDefaultNamespace("item/empty_slot_ingot");
public static final List<ResourceLocation> EMPTY_SLOTS = new ArrayList<>(Arrays.asList(
ResourceLocation.withDefaultNamespace("container/slot/helmet"),
ResourceLocation.withDefaultNamespace("container/slot/chestplate"),
ResourceLocation.withDefaultNamespace("container/slot/leggings"),
ResourceLocation.withDefaultNamespace("container/slot/boots"),
ResourceLocation.withDefaultNamespace("container/slot/hoe"),
ResourceLocation.withDefaultNamespace("container/slot/axe"),
ResourceLocation.withDefaultNamespace("container/slot/sword"),
ResourceLocation.withDefaultNamespace("container/slot/shovel"),
ResourceLocation.withDefaultNamespace("container/slot/pickaxe"),
BigSwordsR.rl("container/slot/big_sword")

));

public static final ResourceLocation EMPTY_SLOT_INGOT = ResourceLocation.withDefaultNamespace("container/slot/ingot");

public EnderSmithingTemplate(Component appliesTo, Component ingredients, Component baseSlotDescription, Component additionsSlotDescription, List<ResourceLocation> upgradeIconList, List<ResourceLocation> upgradeMaterialList, Properties properties) {
super(appliesTo, ingredients, baseSlotDescription, additionsSlotDescription, upgradeIconList, upgradeMaterialList, properties);
Expand All @@ -54,27 +59,12 @@ public static EnderSmithingTemplate createEnderUpgradeTemplate(Item.Properties p
ENDER_UPGRADE_INGREDIENTS,
ENDER_UPGRADE_BASE_SLOT_DESCRIPTION,
ENDER_UPGRADE_ADDITIONS_SLOT_DESCRIPTION,
createEnderUpgradeIconList(),
EMPTY_SLOTS,
createEnderUpgradeMaterialList(),
properties
);
}

public static List<ResourceLocation> createEnderUpgradeIconList() {
return List.of(
EMPTY_SLOT_HELMET,
EMPTY_SLOT_SWORD,
EMPTY_SLOT_BIG_SWORD,
EMPTY_SLOT_CHESTPLATE,
EMPTY_SLOT_PICKAXE,
EMPTY_SLOT_LEGGINGS,
EMPTY_SLOT_AXE,
EMPTY_SLOT_BOOTS,
EMPTY_SLOT_HOE,
EMPTY_SLOT_SHOVEL
);
}

public static List<ResourceLocation> createEnderUpgradeMaterialList() {
return List.of(EMPTY_SLOT_INGOT);
}
Expand Down

0 comments on commit 3e23d3f

Please sign in to comment.