From c54137d12f78d4b171a8d06e52ce2eb9f5f64e72 Mon Sep 17 00:00:00 2001 From: koolkrafter5 Date: Wed, 13 Aug 2025 20:14:22 -0400 Subject: [PATCH] Add Equivalent Rod Placeholder Item (#16) --- .../forbidden/VillagerHereticManager.java | 6 +- .../forbidden/items/ForbiddenItems.java | 2 +- .../forbidden/items/wands/ItemWandCores.java | 67 +++++++++--------- .../items/wands/ProfaneWandUpdate.java | 6 +- .../assets/forbidden/lang/en_US.lang | 1 + .../textures/items/wand_rod_equivalent.png | Bin 0 -> 258 bytes 6 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 src/main/resources/assets/forbidden/textures/items/wand_rod_equivalent.png diff --git a/src/main/java/fox/spiteful/forbidden/VillagerHereticManager.java b/src/main/java/fox/spiteful/forbidden/VillagerHereticManager.java index 78f94f0..92bf734 100644 --- a/src/main/java/fox/spiteful/forbidden/VillagerHereticManager.java +++ b/src/main/java/fox/spiteful/forbidden/VillagerHereticManager.java @@ -12,8 +12,6 @@ import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler; import fox.spiteful.forbidden.items.ForbiddenItems; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; import thaumcraft.common.config.ConfigItems; import thaumcraft.common.items.wands.ItemWandCasting; @@ -75,8 +73,8 @@ public class VillagerHereticManager implements IVillageTradeHandler { new ItemStack(Items.glowstone_dust, 8 + random.nextInt(9)))); ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_IRON); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_PROFANE); ((ItemWandCasting) wand.getItem()).storeAllVis( wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000) diff --git a/src/main/java/fox/spiteful/forbidden/items/ForbiddenItems.java b/src/main/java/fox/spiteful/forbidden/items/ForbiddenItems.java index 6492ca7..aa3045e 100644 --- a/src/main/java/fox/spiteful/forbidden/items/ForbiddenItems.java +++ b/src/main/java/fox/spiteful/forbidden/items/ForbiddenItems.java @@ -201,7 +201,7 @@ public class ForbiddenItems { WAND_ROD_EQUIVALENT = new WandRod( "equivalent", 100, - new ItemStack(wandCore, 1, 11), + new ItemStack(wandCore, 1, 14), 12, new ResourceLocation("forbidden", "textures/models/wand_rod_equivalent.png")); WAND_ROD_PROFANE = new WandRod( diff --git a/src/main/java/fox/spiteful/forbidden/items/wands/ItemWandCores.java b/src/main/java/fox/spiteful/forbidden/items/wands/ItemWandCores.java index 7abb3b2..d5a3274 100644 --- a/src/main/java/fox/spiteful/forbidden/items/wands/ItemWandCores.java +++ b/src/main/java/fox/spiteful/forbidden/items/wands/ItemWandCores.java @@ -13,10 +13,9 @@ import cpw.mods.fml.relauncher.SideOnly; import fox.spiteful.forbidden.Config; import fox.spiteful.forbidden.Forbidden; import fox.spiteful.forbidden.compat.Compat; +import fox.spiteful.forbidden.items.ForbiddenItems; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.wands.WandCap; -import thaumcraft.api.wands.WandRod; import thaumcraft.common.config.ConfigItems; import thaumcraft.common.items.wands.ItemWandCasting; @@ -24,7 +23,7 @@ public class ItemWandCores extends Item { public final String[] types = { "tainted", "infernal", "soul", "blood", "witchwood", "profane", "blood_inert", "livingwood", "livingwood_inert", "blood_staff", "witchwood_staff", "dreamwood", "dreamwood_inert", - "dreamwood_staff" }; + "dreamwood_staff", "equivalent" }; public IIcon[] icon; public ItemWandCores() { @@ -55,24 +54,24 @@ public class ItemWandCores extends Item { } ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 72); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("tainted")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_TAINTED); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 72); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("infernal")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_INFERNAL); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 2000); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ORICHALCUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_NEUTRONIUM); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 2000); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium_staff")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ORICHALCUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.STAFF_ROD_NEUTRONIUM); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_IRON); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_PROFANE); ((ItemWandCasting) wand.getItem()).storeAllVis( wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000) @@ -80,46 +79,48 @@ public class ItemWandCores extends Item { list.add(wand); if (Compat.bm && Config.crossWand) { wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ALCHEMICAL); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_BLOOD); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 168); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood_staff")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ALCHEMICAL); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.STAFF_ROD_BLOOD); list.add(wand); } if (Compat.am2 && Config.crossWand) { wand = new ItemStack(ConfigItems.itemWandCasting, 1, 72); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_VINTEUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_WITCHWOOD); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 144); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood_staff")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_VINTEUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.STAFF_ROD_WITCHWOOD); list.add(wand); } if (Compat.botan && Config.crossWand) { wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("manasteel")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("livingwood")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_MANASTEEL); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_LIVINGWOOD); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("elementium")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("dreamwood")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ELEMENTIUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_DREAMWOOD); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 144); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("elementium")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("dreamwood_staff")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_ELEMENTIUM); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.STAFF_ROD_DREAMWOOD); list.add(wand); wand = new ItemStack(ConfigItems.itemWandCasting, 1, 1); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("terrasteel")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("wood")); + ((ItemWandCasting) wand.getItem()).setCap(wand, ForbiddenItems.WAND_CAP_TERRASTEEL); + ((ItemWandCasting) wand.getItem()).setRod(wand, ConfigItems.WAND_ROD_WOOD); + list.add(wand); + } + if (Compat.ee3 && Config.crossWand) { + wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84); + ((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_VOID); + ((ItemWandCasting) wand.getItem()).setRod(wand, ForbiddenItems.WAND_ROD_EQUIVALENT); list.add(wand); } - wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84); - ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("void")); - ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("equivalent")); - list.add(wand); } @Override diff --git a/src/main/java/fox/spiteful/forbidden/items/wands/ProfaneWandUpdate.java b/src/main/java/fox/spiteful/forbidden/items/wands/ProfaneWandUpdate.java index f54d443..d5b61f7 100644 --- a/src/main/java/fox/spiteful/forbidden/items/wands/ProfaneWandUpdate.java +++ b/src/main/java/fox/spiteful/forbidden/items/wands/ProfaneWandUpdate.java @@ -4,15 +4,15 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import fox.spiteful.forbidden.items.ForbiddenItems; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.wands.IWandRodOnUpdate; -import thaumcraft.api.wands.WandRod; import thaumcraft.common.Thaumcraft; import thaumcraft.common.items.wands.ItemWandCasting; public class ProfaneWandUpdate implements IWandRodOnUpdate { - Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]); + Aspect[] primals = Aspect.getPrimalAspects().toArray(new Aspect[0]); public void onUpdate(ItemStack itemstack, EntityPlayer player) { @@ -36,7 +36,7 @@ public class ProfaneWandUpdate implements IWandRodOnUpdate { } if (tag.getInteger("contract") <= 0) { - ((ItemWandCasting) itemstack.getItem()).setRod(itemstack, WandRod.rods.get("profaned")); + ((ItemWandCasting) itemstack.getItem()).setRod(itemstack, ForbiddenItems.WAND_ROD_PROFANED); Thaumcraft.addStickyWarpToPlayer(player, 1); player.worldObj.spawnParticle( "largeexplode", diff --git a/src/main/resources/assets/forbidden/lang/en_US.lang b/src/main/resources/assets/forbidden/lang/en_US.lang index 8afb852..8c039b3 100644 --- a/src/main/resources/assets/forbidden/lang/en_US.lang +++ b/src/main/resources/assets/forbidden/lang/en_US.lang @@ -84,6 +84,7 @@ item.WandCores.witchwood_staff.name=Witchwood Staff Core item.WandCores.dreamwood.name=Dreamwood Rod item.WandCores.dreamwood_inert.name=Silent Dreamwood Rod item.WandCores.dreamwood_staff.name=Dreamwood Staff Core +item.WandCores.equivalent.name=§kAlchemical§r Rod item.WandCaps.name=Wand Cap item.WandCaps.alchemical.name=Alchemical Cap item.WandCaps.vinteum.name=Vinteum Cap diff --git a/src/main/resources/assets/forbidden/textures/items/wand_rod_equivalent.png b/src/main/resources/assets/forbidden/textures/items/wand_rod_equivalent.png new file mode 100644 index 0000000000000000000000000000000000000000..0c0bdb243e8d8b7c6b1da2f100ac776eaae50035 GIT binary patch literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`)Ym%P6qOKdb&7< zSoB_>f zxn|YQFT3ygKU}}zTG!UFd&!FxKh+kqCRD`)gofseKcACQs1wEd*v_c^xnNn@?E}2Zd{fp_qpFK+Fi@&au`f|_v20O!