You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1441 lines
94 KiB
Java
1441 lines
94 KiB
Java
package com.zivilon.cinder_loe;
|
|
|
|
import com.zivilon.cinder_loe.blocks.*;
|
|
import com.zivilon.cinder_loe.character.CharacterEventListener;
|
|
import com.zivilon.cinder_loe.character.CharacterRoleAPI;
|
|
import com.zivilon.cinder_loe.client.render.*;
|
|
import com.zivilon.cinder_loe.client.render.block.*;
|
|
import com.zivilon.cinder_loe.client.render.projectile.*;
|
|
import com.zivilon.cinder_loe.client.render.corrupt.*;
|
|
import com.zivilon.cinder_loe.command.CommandCinderCharacter;
|
|
import com.zivilon.cinder_loe.entity.*;
|
|
import com.zivilon.cinder_loe.entity.projectile.*;
|
|
import com.zivilon.cinder_loe.entity.corrupt.*;
|
|
import com.zivilon.cinder_loe.entity.npc.*;
|
|
import com.zivilon.cinder_loe.entity.trader.BladorthinSmith;
|
|
import com.zivilon.cinder_loe.entity.trader.LimwaithFishmonger;
|
|
import com.zivilon.cinder_loe.entity.trader.LimwaithShaman;
|
|
import com.zivilon.cinder_loe.entity.trader.RedDwarfSmith;
|
|
import com.zivilon.cinder_loe.items.*;
|
|
import com.zivilon.cinder_loe.tileentity.*;
|
|
import com.zivilon.cinder_loe.util.Utilities;
|
|
import com.zivilon.cindercore.CinderCore;
|
|
import lotr.common.LOTREventHandler;
|
|
import lotr.common.item.*;
|
|
import net.minecraft.potion.Potion;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
import org.objectweb.asm.ClassReader;
|
|
import org.objectweb.asm.util.TraceClassVisitor;
|
|
|
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
|
import cpw.mods.fml.common.FMLCommonHandler;
|
|
import cpw.mods.fml.common.Mod;
|
|
import cpw.mods.fml.common.Mod.Instance;
|
|
import cpw.mods.fml.common.ModContainer;
|
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.PrintWriter;
|
|
import java.lang.reflect.Constructor;
|
|
import java.lang.reflect.Field;
|
|
|
|
import lotr.client.render.entity.*;
|
|
import lotr.client.render.entity.LOTRRenderSauron;
|
|
import lotr.client.render.tileentity.LOTRRenderUtumnoPortal;
|
|
import lotr.common.LOTRCreativeTabs;
|
|
import lotr.common.LOTRMod;
|
|
import lotr.common.entity.animal.*;
|
|
import lotr.common.entity.npc.*;
|
|
import lotr.common.entity.npc.LOTREntityBarrowWight;
|
|
import lotr.common.entity.npc.LOTREntitySauron;
|
|
import lotr.common.entity.projectile.LOTREntityGandalfFireball;
|
|
import lotr.common.world.biome.LOTRBiome;
|
|
import lotr.common.world.spawning.LOTRBiomeSpawnList;
|
|
import lotr.common.world.spawning.LOTRSpawnEntry;
|
|
import lotr.common.world.spawning.LOTRSpawnList;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
import net.minecraft.entity.passive.EntityWolf;
|
|
import net.minecraft.init.Blocks;
|
|
import net.minecraft.init.Items;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
import net.minecraftforge.event.world.WorldEvent;
|
|
|
|
import static lotr.common.LOTRMod.horseArmorIron;
|
|
import static lotr.common.item.LOTRMaterial.GONDOR;
|
|
|
|
import net.minecraft.command.ICommandSender;
|
|
import net.minecraft.command.CommandBase;
|
|
import net.minecraft.util.ChatComponentText;
|
|
import net.minecraftforge.client.ClientCommandHandler;
|
|
|
|
@Mod(
|
|
modid = "cinder_loe",
|
|
version = "1.2.5",
|
|
name = "CinderLoE",
|
|
dependencies = "required-after:spongemixins@[1.1.0,);required-after:lotr",
|
|
acceptedMinecraftVersions = "[1.7.10]",
|
|
acceptableRemoteVersions = "[1.2.5]")
|
|
public class CinderLoE {
|
|
|
|
@Instance("cinder_loe")
|
|
public static CinderLoE instance;
|
|
|
|
public static final Logger LOG = LogManager.getLogger(Tags.MODID);
|
|
|
|
// LOTR Materials
|
|
public static LOTRMaterial MATERIAL_RED_DWARF;
|
|
public static LOTRMaterial MATERIAL_BONEMOLD;
|
|
public static LOTRMaterial MATERIAL_LIMWAITH_WOOD;
|
|
public static LOTRMaterial EVENT;
|
|
public static LOTRMaterial MATERIAL_BREE;
|
|
public static LOTRMaterial MATERIAL_RHUDUAR;
|
|
public static LOTRMaterial MATERIAL_BATTLENUN;
|
|
public static LOTRMaterial MATERIAL_ASH;
|
|
public static LOTRMaterial MATERIAL_SERPENT;
|
|
public static LOTRMaterial MATERIAL_USURPER;
|
|
public static LOTRMaterial MATERIAL_WARLORD;
|
|
public static LOTRMaterial MATERIAL_JADE;
|
|
public static LOTRMaterial MATERIAL_NEX_ICE;
|
|
public static LOTRMaterial MATERIAL_NEX_FIRE;
|
|
public static LOTRMaterial MATERIAL_NEX_TOXIN;
|
|
public static LOTRMaterial MATERIAL_NEX_SHADOW;
|
|
|
|
|
|
// Blocks
|
|
// public static Block barricade;
|
|
public static Block cinderBlock;
|
|
public static Block ivoryBlock;
|
|
public static Block blockRedDwarfSteel;
|
|
public static Block barsRedDwarf;
|
|
public static Block chandelierRedDwarf;
|
|
public static Block furBundle;
|
|
public static Block leatherBundle;
|
|
public static Block reedBale;
|
|
public static Block dwarvenBrickRuned;
|
|
public static Block fishBarrel;
|
|
///public static Block rustedsword;
|
|
public static Block mistBlock;
|
|
public static Block cutDrystone;
|
|
public static Block cindercobble;
|
|
public static Block reeflessCoral;
|
|
public static Block silverChain;
|
|
public static Block goldChain;
|
|
public static Block ironChain;
|
|
public static Block bronzeChain;
|
|
public static Block plaster;
|
|
public static Block voidblock;
|
|
public static Block shadowTile;
|
|
public static Block entityBarrier;
|
|
public static Block iceCage;
|
|
public static Block enchantedIce;
|
|
public static Block woodpanel;
|
|
|
|
//public static Block verticalWeaponRack;
|
|
|
|
//Gates
|
|
//public static Block gatecharredportcullis;
|
|
|
|
//Food Crop blocks
|
|
public static Block onionCrop;
|
|
public static Block cabbageCrop;
|
|
//Food! Yum :P
|
|
public static Item onion;
|
|
public static Item cabbage;
|
|
public static Item pelmen;
|
|
public static Item spice;
|
|
public static Item spicedHam;
|
|
public static Item lightStew;
|
|
public static Item chocolatebar;
|
|
public static Item fruitsalad;
|
|
public static Item flour;
|
|
public static Item dough;
|
|
public static Item pasta;
|
|
public static Item pretzel;
|
|
public static Item halva;
|
|
public static Item honey;
|
|
|
|
// Event/special
|
|
public static Item frostblade;
|
|
public static Item daggervoid;
|
|
public static Item spearsolidgold;
|
|
public static Item spearblood;
|
|
public static Item spearUnnamed;
|
|
public static Item swordAsh;
|
|
public static Item staffAsh;
|
|
public static Item daggerAsh;
|
|
public static Item spearAsh;
|
|
public static Item hammerAsh;
|
|
public static Item battleaxeAsh;
|
|
public static Item pikeAsh;
|
|
public static Item bowAsh;
|
|
public static Item ingotAsh;
|
|
public static Item helmetbrokenhalo;
|
|
public static Item helmetJade;
|
|
public static Item bodyJade;
|
|
public static Item legsJade;
|
|
public static Item bootsJade;
|
|
|
|
// Frozen Dungeon
|
|
public static Item helmetNexIce;
|
|
public static Item bodyNexIce;
|
|
public static Item legsNexIce;
|
|
public static Item bootsNexIce;
|
|
public static Item helmetNexFire;
|
|
public static Item bodyNexFire;
|
|
public static Item legsNexFire;
|
|
public static Item bootsNexFire;
|
|
public static Item helmetNexToxin;
|
|
public static Item bodyNexToxin;
|
|
public static Item legsNexToxin;
|
|
public static Item bootsNexToxin;
|
|
public static Item helmetNexShadow;
|
|
public static Item bodyNexShadow;
|
|
public static Item legsNexShadow;
|
|
public static Item bootsNexShadow;
|
|
public static Item firstAgeGlaive;
|
|
public static Item toxicCore;
|
|
|
|
|
|
|
|
// Misc
|
|
|
|
// Common tools/weapons
|
|
public static Item whip;
|
|
public static Item cleaver;
|
|
public static Item warDart;
|
|
public static Item warDartHeads;
|
|
|
|
// Elite Armors/weapons
|
|
public static Item helmetserpent;
|
|
public static Item bodyserpent;
|
|
public static Item legsserpent;
|
|
public static Item bootsserpent;
|
|
public static Item helmetUsurper;
|
|
public static Item bodyUsurper;
|
|
public static Item legsUsurper;
|
|
public static Item bootsUsurper;
|
|
public static Item helmetWarlord;
|
|
public static Item bodyWarlord;
|
|
public static Item legsWarlord;
|
|
public static Item bootsWarlord;
|
|
public static Item maceWarlord;
|
|
public static Item bowserpent;
|
|
public static Item swordUsurper;
|
|
|
|
|
|
// Red Dwarves
|
|
public static Item redDwarfSteel;
|
|
public static Item helmetRedDwarf;
|
|
public static Item bodyRedDwarf;
|
|
public static Item legsRedDwarf;
|
|
public static Item bootsRedDwarf;
|
|
public static Item spearRedDwarf;
|
|
public static Item swordRedDwarf;
|
|
public static Item battleaxeRedDwarf;
|
|
public static Item pikeRedDwarf;
|
|
public static Item hammerRedDwarf;
|
|
public static Item daggerRedDwarf;
|
|
public static Item daggerRedDwarfPoisoned;
|
|
public static Item crossbowRedDwarf;
|
|
public static Item boarArmorRedDwarf;
|
|
public static LOTRUnitTradeEntries RED_DWARF_COMMANDER;
|
|
|
|
// Rhudaur
|
|
public static Item helmetRhudaur;
|
|
public static Item bodyRhudaur;
|
|
public static Item legsRhudaur;
|
|
public static Item bootsRhudaur;
|
|
|
|
// Limwaith
|
|
public static Item bonemold;
|
|
public static Item helmetLimwaith;
|
|
public static Item bodyLimwaith;
|
|
public static Item legsLimwaith;
|
|
public static Item bootsLimwaith;
|
|
public static Item helmetboneLimwaith;
|
|
public static Item bodyboneLimwaith;
|
|
public static Item legsboneLimwaith;
|
|
public static Item bootsboneLimwaith;
|
|
public static Item tridentLimwaith;
|
|
public static Item spearLimwaith;
|
|
public static Item truncheonLimwaith;
|
|
public static Item battleaxeLimwaith;
|
|
public static Item daggerLimwaith;
|
|
public static Item daggerLimwaithPoisoned;
|
|
public static Item blowgunLimwaith;
|
|
public static LOTRUnitTradeEntries LIMWAITH_COMMANDER;
|
|
|
|
//Bree
|
|
public static Item helmetBree;
|
|
public static Item helmetBreeKettle;
|
|
public static Item bodyBree;
|
|
public static Item legsBree;
|
|
public static Item bootsBree;
|
|
public static Item swordBree;
|
|
public static LOTRUnitTradeEntries BREE_CAPTAIN;
|
|
|
|
// Arnor
|
|
public static Item helmetArnorBanner;
|
|
public static Item bodyArnorBanner;
|
|
public static Item legsArnorBanner;
|
|
public static Item bootsArnorBanner;
|
|
public static Item maceArnor;
|
|
public static LOTRUnitTradeEntries ARNOR_CAPTAIN;
|
|
|
|
// Wizards
|
|
public static Item radagastStaff;
|
|
public static Item pallandoStaff;
|
|
public static Item alatarStaff;
|
|
public static Item sarumanStaff;
|
|
|
|
// Relics
|
|
public static Item welfRelic;
|
|
// Spawn eggs
|
|
public static Item spawnEgg;
|
|
|
|
// Spawn lists
|
|
public static LOTRSpawnList RED_DWARF;
|
|
public static LOTRSpawnList LIMWAITH;
|
|
public static LOTRSpawnList Rhudaur;
|
|
|
|
private static CinderEventHandler modEventHandler;
|
|
@Mod.EventHandler
|
|
public void preInit(FMLPreInitializationEvent event) {
|
|
CinderLoE_Config.init(event);
|
|
Materials.registerMaterials();
|
|
registerItems();
|
|
ItemRegistration.registerItems();
|
|
registerBlocks();
|
|
registerEntities();
|
|
modEventHandler = new CinderEventHandler();
|
|
}
|
|
|
|
@Mod.EventHandler
|
|
public void init(FMLInitializationEvent event) {
|
|
CommonProxy proxy = event.getSide() == Side.CLIENT ? new ClientProxy() : new ServerProxy();
|
|
proxy.setup();
|
|
if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
|
|
FMLCommonHandler.instance().bus().register(this);
|
|
}
|
|
MinecraftForge.EVENT_BUS.register(this);
|
|
new CharacterEventListener();
|
|
|
|
if (event.getSide().isClient()) {
|
|
ClientCommandHandler.instance.registerCommand(new DevCommand());
|
|
}
|
|
}
|
|
|
|
|
|
@Mod.EventHandler
|
|
public void postInit(FMLPostInitializationEvent event) {
|
|
if (event.getSide()
|
|
.isServer()) {
|
|
SpeechBankModifier.insertSpeechBanks();
|
|
modifySpawnLists();
|
|
}
|
|
Utilities.initialize_reflects();
|
|
recipes.registerRecipes(); // Register recipes at com.zivilon.cinder_loe.recipes.java
|
|
setupTradeEntries();
|
|
LOTRWeaponStats.registerMeleeReach(Whip.class, 1.5F);
|
|
LOTRWeaponStats.registerMeleeReach(FirstAgeGlaive.class, 1.8F);
|
|
LOTRWeaponStats.registerMeleeSpeed(FirstAgeGlaive.class, 1.0F);
|
|
LoECreativeTabs.setupIcons();
|
|
}
|
|
|
|
|
|
@Mod.EventHandler
|
|
public void serverStarting(FMLServerStartingEvent event) {
|
|
CharacterRoleAPI.loadRolesFromFile();
|
|
event.registerServerCommand(new CommandCinderCharacter());
|
|
}
|
|
|
|
public void registerEntities() { // Last ID added: 45
|
|
///GameRegistry.registerTileEntity(TileEntityMistBlock.class, "TileEntityMistBlock");
|
|
///.registerBlock(TileEntityRustedSword, "TileEntityRustedSword");
|
|
|
|
int entityID = 7320; // Always increment entityID by 1 over the last entity to ensure unique IDs
|
|
// EntityRegistry.registerModEntity(HaradLevy.class, "HaradLevy", (entityID + 36), this, 64, 1, true);
|
|
// EntityRegistry.registerModEntity(DwarfLevy.class, "DwarfLevy", (entityID + 37), this, 64, 1, true);
|
|
|
|
// Traders
|
|
EntityRegistry.registerModEntity(RedDwarfSmith.class, "RedDwarfSmith", (entityID + 29), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithFishmonger.class, "LimwaithFishmonger", (entityID + 33), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithShaman.class, "LimwaithShaman", (entityID + 34), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BladorthinSmith.class, "BladorthinSmith", (entityID + 43), this, 64, 1, true);
|
|
|
|
|
|
// Others
|
|
|
|
EntityRegistry.registerModEntity(DarkSpider.class, "DarkSpider", (entityID + 42), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(Nex.class, "Nex", (entityID + 44), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(EntityWarDart.class, "WarDart", (entityID + 45), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(CorruptDwarf.class, "CorruptDwarf", (entityID + 36), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(CorruptElf.class, "CorruptElf", (entityID + 37), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(CorruptEnt.class, "CorruptEnt", (entityID + 38), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(CorruptHobbit.class, "CorruptHobit", (entityID + 39), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(CorruptMan.class, "CorruptMan", (entityID + 40), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(CorruptOrc.class, "CorruptOrc", (entityID + 41), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(SarumanFireball.class, "SarumanFireball", entityID + 0, this, 64, 10, true);
|
|
EntityRegistry.registerModEntity(Renegade.class, "Renegade", (entityID + 1), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(RenegadeCaptain.class, "RenegadeCaptain", (entityID + 16), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(RedDwarfWarrior.class, "RedDwarfWarrior", (entityID + 2), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(RedDwarfArbalest.class, "RedDwarfArbalest", (entityID + 3), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(RedDwarfBannerBearer.class, "RedDwarfBannerBearer", (entityID + 4), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(RedDwarfCommander.class, "RedDwarfCommander", (entityID + 5), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(FangornBear.class, "FangornBear", (entityID + 6), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(FangornWildBoar.class, "FangornWildBoar", (entityID + 7), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(FangornAuroch.class, "FangornAuroch", (entityID + 8), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(FangornElk.class, "FangornElk", (entityID + 9), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(FangornWolf.class, "FangornWolf", (entityID + 10), this, 64, 1, true);
|
|
// EntityRegistry.registerModEntity(FangornWolf.class, "TamedCrocodile", (entityID + 35), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(Limwaith.class, "Limwaith", (entityID + 31), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithWarrior.class, "LimwaithWarrior", (entityID + 11), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithBoneWarrior.class, "LimwaithBoneWarrior", (entityID + 32), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithBlowgunner.class, "LimwaithBlowgunner", (entityID + 12), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithBannerBearer.class, "LimwaithBannerBearer", (entityID + 13), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(LimwaithChieftain.class, "LimwaithChieftain", (entityID + 14), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(Wraith.class, "Wraith", (entityID + 15), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(ArnorSoldier.class, "ArnorSoldier", (entityID + 17), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(ArnorSoldierArcher.class, "ArnorSoldierArcher", (entityID + 19), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(ArnorCaptain.class, "ArnorCaptain", (entityID + 20), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(ArnorBannerBearer.class, "ArnorBannerBearer", (entityID + 21), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BattleNun.class, "BattleNun", (entityID + 27), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(BreeSoldier.class, "BreeSoldier", (entityID + 22), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BreeCrossbowman.class, "BreeCrossbowman", (entityID + 23), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BreeCaptain.class, "BreeCaptain", (entityID + 24), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BreeSoldierBannerBearer.class, "BreeSoldierBannerBearer", (entityID + 25), this, 64, 1, true);
|
|
EntityRegistry.registerModEntity(BreeOutrider.class, "BreeOutrider", (entityID + 26), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(LOTREntitySauron.class, "LOTREntitySauron", (entityID + 28), this, 64, 1, true);
|
|
|
|
EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true);
|
|
}
|
|
|
|
public void registerBlocks() {
|
|
// barricade
|
|
// barricade = (new barricade());
|
|
// GameRegistry.registerBlock(barricade, "barricade");
|
|
|
|
// Cinder Block
|
|
cinderBlock = (new CinderBlock());
|
|
GameRegistry.registerBlock(cinderBlock, "cinderBlock");
|
|
|
|
// Ivory Block
|
|
ivoryBlock = (new IvoryBlock()); //Unobtainable
|
|
GameRegistry.registerBlock(ivoryBlock, "ivoryBlock");
|
|
|
|
// Reefless Coral
|
|
reeflessCoral = (new reeflessCoral());
|
|
GameRegistry.registerBlock(reeflessCoral, "reeflessCoral");
|
|
|
|
// Red Dwarven Steel Block
|
|
blockRedDwarfSteel = (new BlockRedDwarfSteel());
|
|
GameRegistry.registerBlock(blockRedDwarfSteel, "blockRedDwarfSteel");
|
|
|
|
// Red Dwarven Steel Bars
|
|
barsRedDwarf = (new RedDwarfBars());
|
|
GameRegistry.registerBlock(barsRedDwarf, "barsRedDwarf");
|
|
|
|
// Red dwarven chandelier
|
|
chandelierRedDwarf = (new RedDwarfChandelier());
|
|
GameRegistry.registerBlock(chandelierRedDwarf, "chandelierRedDwarf");
|
|
|
|
// Bundles
|
|
furBundle = (new FurBundle());
|
|
GameRegistry.registerBlock(furBundle, "furBundle");
|
|
leatherBundle = (new LeatherBundle());
|
|
GameRegistry.registerBlock(leatherBundle, "leatherBundle");
|
|
reedBale = (new ReedBale());
|
|
GameRegistry.registerBlock(reedBale, "reedBale");
|
|
|
|
// Unique
|
|
dwarvenBrickRuned = (new RunedDwarvenBrick());
|
|
GameRegistry.registerBlock(dwarvenBrickRuned, "dwarvenBrickRuned");
|
|
// verticalWeaponRack = new VerticalWeaponRack();
|
|
// GameRegistry.registerTileEntity(LOTRTileEntityWeaponRack.class, "verticalWeaponRack");
|
|
// GameRegistry.registerBlock(verticalWeaponRack, "verticalWeaponRack");
|
|
//Decor
|
|
///rustedsword = (new RustedSword());
|
|
///GameRegistry.registerBlock(rustedsword, "rustedsword");
|
|
// Barrel
|
|
fishBarrel = (new FishBarrel());
|
|
GameRegistry.registerBlock(fishBarrel, "fishbarrel");
|
|
|
|
// Chains
|
|
silverChain = (new silverChain());
|
|
GameRegistry.registerBlock(silverChain, "silverChain");
|
|
goldChain = (new goldChain());
|
|
GameRegistry.registerBlock(goldChain, "goldChain");
|
|
ironChain = (new ironChain());
|
|
GameRegistry.registerBlock(ironChain, "ironChain");
|
|
bronzeChain = (new bronzeChain());
|
|
GameRegistry.registerBlock(bronzeChain, "bronzeChain");
|
|
|
|
// Staff
|
|
mistBlock = (new MistBlock());
|
|
GameRegistry.registerBlock(mistBlock, "mist");
|
|
voidblock = (new voidblock());
|
|
GameRegistry.registerBlock(voidblock, "voidblock");
|
|
shadowTile = (new ShadowTile());
|
|
GameRegistry.registerBlock(shadowTile, "shadow_tile");
|
|
entityBarrier = (new EntityBarrier());
|
|
GameRegistry.registerBlock(entityBarrier, "entity_barrier");
|
|
iceCage = (new IceCage());
|
|
GameRegistry.registerBlock(iceCage, "ice_cage");
|
|
enchantedIce = (new EnchantedIce());
|
|
GameRegistry.registerBlock(enchantedIce, "enchanted_ice");
|
|
|
|
// Building Blocks
|
|
cutDrystone = (new cutDrystone());
|
|
GameRegistry.registerBlock(cutDrystone, "cutDrystone");
|
|
|
|
cindercobble = (new CobbleBlock());
|
|
GameRegistry.registerBlock(cindercobble, CinderBlockMetaData.class, "cindercobble");
|
|
|
|
plaster = (new plaster());
|
|
GameRegistry.registerBlock(plaster, "plaster");
|
|
|
|
woodpanel = (new woodpanel());
|
|
GameRegistry.registerBlock(woodpanel, "woodpanel");
|
|
|
|
// Gates
|
|
//gatecharredportcullis = LOTRBlockGate.createWooden(false).setBlockName("lotr:gatecharredportcullis");
|
|
//GameRegistry.registerBlock(gatecharredportcullis, "gatecharredportcullis");
|
|
|
|
//Food Crops
|
|
onionCrop = new onionCrop().setBlockName("onion");
|
|
GameRegistry.registerBlock(onionCrop, "onionCrop");
|
|
cabbageCrop = new cabbageCrop().setBlockName("cabbage");
|
|
GameRegistry.registerBlock(cabbageCrop, "cabbageCrop");
|
|
|
|
|
|
}
|
|
|
|
public void registerItems() {
|
|
// Get materials tab via reflection because ForgeGradle insists on obfuscating it when it should not
|
|
LOTRCreativeTabs materials = null;
|
|
try {
|
|
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabMaterials"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to be
|
|
materials = (LOTRCreativeTabs) tabField.get(null);
|
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
|
e.printStackTrace();
|
|
}
|
|
// Food
|
|
// onion = new ItemSeedFood(3, 0.3f, CinderLoE.onionCrop, Blocks.farmland).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion");
|
|
//cabbage = new ItemSeedFood(3, 0.3f, CinderLoE.cabbageCrop, Blocks.farmland).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage");;
|
|
spice = new CinderItemFood(1, 0.0f, false).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 5,0,100).setUnlocalizedName("lotr:spice").setTextureName("lotr:spice");
|
|
spicedHam = new CinderItemFood(9, 0.6f, true).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 15, 0, 100).setUnlocalizedName("lotr:spicedHam").setTextureName("lotr:spicedHam");
|
|
// spice = new LOTRItemFood(1, 0.0f, false).setPotionEffect(Potion.moveSpeed.id, 10,0,100).setUnlocalizedName("lotr:spice");
|
|
pelmen = new LOTRItemFood(4, 5.0f, true).setUnlocalizedName("lotr:pelmen").setTextureName("lotr:pelmen");
|
|
onion = new LOTRItemFood(3, 0.3f, false).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion");
|
|
cabbage = new LOTRItemFood(4, 0.5f, false).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage");
|
|
lightStew = new LOTRItemStew(6, 0.7f, false).setPotionEffect(Potion.damageBoost.id, 60, 0, 100).setUnlocalizedName("lotr:lightStew").setTextureName("lotr:lightStew");
|
|
chocolatebar = new LOTRItemFood(4,0.3f, false).setUnlocalizedName("lotr:chocolatebar").setTextureName("lotr:chocolatebar");
|
|
fruitsalad = new LOTRItemStew(6, 0.5f, false).setPotionEffect(Potion.field_76444_x.id, 60, 0,1).setUnlocalizedName("lotr:fruitsalad").setTextureName("lotr:fruitsalad");
|
|
flour = new LOTRItemFood(0,0.0f, false).setPotionEffect(Potion.confusion.id, 5,0,100).setUnlocalizedName("lotr:flour").setTextureName("lotr:flour");
|
|
dough = new LOTRItemFood(1,0.0f, false).setPotionEffect(Potion.hunger.id, 5,0,100).setUnlocalizedName("lotr:dough").setTextureName("lotr:dough");
|
|
pasta = new LOTRItemFood(2,0.0f, false).setPotionEffect(Potion.hunger.id, 5,0,100).setUnlocalizedName("lotr:pasta").setTextureName("lotr:pasta");
|
|
pretzel = new LOTRItemFood(4,1.0f, false).setUnlocalizedName("lotr:pretzel").setTextureName("lotr:pretzel");
|
|
halva = new LOTRItemFood (7, 4.0f, false).setUnlocalizedName("lotr:halva").setTextureName("lotr:halva");
|
|
honey = new LOTRItemFood(3, 0.4f, false).setPotionEffect(Potion.regeneration.id, 5, 0, 100).setUnlocalizedName("lotr:honey").setTextureName("lotr:honey");
|
|
|
|
spawnEgg = new CinderLoESpawnEgg();
|
|
|
|
// Wizard Staves
|
|
radagastStaff = (new RadagastStaff()).setUnlocalizedName("lotr:radagastStaff").setTextureName("lotr:radagastStaff");
|
|
pallandoStaff = (new PallandoStaff()).setUnlocalizedName("lotr:pallandoStaff").setTextureName("lotr:pallandoStaff");
|
|
alatarStaff = (new AlatarStaff()).setUnlocalizedName("lotr:alatarStaff").setTextureName("lotr:alatarStaff");
|
|
sarumanStaff = (new SarumanStaff()).setUnlocalizedName("lotr:sarumanStaff").setTextureName("lotr:sarumanStaff");
|
|
// Relics
|
|
welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic");
|
|
|
|
/*
|
|
* Item Registation, add up the "last ID added" upon adding a new item
|
|
* Weapons will need to be linked
|
|
*/
|
|
// Last ID added: 119
|
|
|
|
// ==Food Items==
|
|
ItemRegistration.registerItem(onion, "onion", 58);
|
|
ItemRegistration.registerItem(cabbage, "cabbage", 59);
|
|
ItemRegistration.registerItem(pelmen, "pelmen", 60);
|
|
ItemRegistration.registerItem(lightStew, "lightStew", 61);
|
|
ItemRegistration.registerItem(spice, "spice", 62);
|
|
ItemRegistration.registerItem(spicedHam, "spicedHam", 63);
|
|
ItemRegistration.registerItem(chocolatebar, "chocolatebar", 84);
|
|
ItemRegistration.registerItem(fruitsalad, "fruitsalad", 85);
|
|
ItemRegistration.registerItem(flour, "flour", 86);
|
|
ItemRegistration.registerItem(dough, "dough", 87);
|
|
ItemRegistration.registerItem(pasta, "pasta", 88);
|
|
ItemRegistration.registerItem(pretzel, "pretzel", 89);
|
|
ItemRegistration.registerItem(halva, "halva", 94);
|
|
ItemRegistration.registerItem(honey, "honey", 95);
|
|
|
|
ItemRegistration.registerItem(spawnEgg, "spawnEgg", 42);
|
|
|
|
// Wizard Staves
|
|
ItemRegistration.registerItem(radagastStaff, "radagastStaff", 0);
|
|
ItemRegistration.registerItem(pallandoStaff, "pallandoStaff", 1);
|
|
ItemRegistration.registerItem(alatarStaff, "alatarStaff", 2);
|
|
ItemRegistration.registerItem(sarumanStaff, "sarumanStaff", 3);
|
|
|
|
linkLOTRWeapon(radagastStaff, "radagastStaff");
|
|
linkLOTRWeapon(pallandoStaff, "pallandoStaff");
|
|
linkLOTRWeapon(alatarStaff, "alatarStaff");
|
|
linkLOTRWeapon(sarumanStaff, "sarumanStaff");
|
|
|
|
//Relics
|
|
ItemRegistration.registerItem(welfRelic, "welfRelic", 56);
|
|
|
|
linkLOTRWeapon(welfRelic, "welfRelic");
|
|
|
|
// Misc
|
|
EVENT = getLOTRMaterialByName("EVENT");
|
|
MATERIAL_JADE = getLOTRMaterialByName("JADE");
|
|
MATERIAL_NEX_ICE = getLOTRMaterialByName("NEX_ICE");
|
|
MATERIAL_NEX_FIRE = getLOTRMaterialByName("NEX_FIRE");
|
|
MATERIAL_NEX_TOXIN = getLOTRMaterialByName("NEX_TOXIN");
|
|
MATERIAL_NEX_SHADOW = getLOTRMaterialByName("NEX_SHADOW");
|
|
|
|
frostblade = (new LOTRItemSword(EVENT)).setUnlocalizedName("lotr:frostblade").setTextureName("lotr:frostblade");
|
|
daggervoid = (new VoidDagger(EVENT)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:daggerVoid").setTextureName("lotr:daggerVoid").setCreativeTab(null);
|
|
spearsolidgold = (new LOTRItemSpear(EVENT)).setUnlocalizedName("lotr:spearsolidgold").setTextureName("lotr:spearsolidgold").setCreativeTab(null);
|
|
spearblood = (new LOTRItemSpear(EVENT)).setUnlocalizedName("lotr:spearblood").setTextureName("lotr:spearblood").setCreativeTab(null);
|
|
spearUnnamed = (new UnnamedSpear(EVENT)).setUnlocalizedName("lotr:spearUnnamed").setTextureName("lotr:spearUnnamed").setCreativeTab(null);
|
|
whip = (new Whip()).setUnlocalizedName("lotr:whip").setTextureName("lotr:whip");
|
|
helmetbrokenhalo = (new BrokenHalo(EVENT, 0, "helmet")).setUnlocalizedName("lotr:helmetbrokenhalo").setTextureName("lotr:helmetbrokenhalo").setCreativeTab(null);
|
|
helmetJade = (new LOTRItemArmor(MATERIAL_JADE, 0, "helmet")).setUnlocalizedName("lotr:helmetJade").setTextureName("lotr:helmetJade").setCreativeTab(null);
|
|
bodyJade = (new LOTRItemArmor(MATERIAL_JADE, 1, "chestplate")).setUnlocalizedName("lotr:bodyJade").setTextureName("lotr:bodyJade").setCreativeTab(null);
|
|
legsJade = (new LOTRItemArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null);
|
|
bootsJade = (new LOTRItemArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null);
|
|
|
|
helmetNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 0)).setUnlocalizedName("lotr:helmetNexIce").setTextureName("lotr:helmetNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bodyNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 1, "chestplate")).setUnlocalizedName("lotr:bodyNexIce").setTextureName("lotr:bodyNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
legsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 2)).setUnlocalizedName("lotr:legsNexIce").setTextureName("lotr:legsNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bootsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 3)).setUnlocalizedName("lotr:bootsNexIce").setTextureName("lotr:bootsNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
helmetNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 0)).setUnlocalizedName("lotr:helmetNexFire").setTextureName("lotr:helmetNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bodyNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 1, "chestplate")).setUnlocalizedName("lotr:bodyNexFire").setTextureName("lotr:bodyNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
legsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 2)).setUnlocalizedName("lotr:legsNexFire").setTextureName("lotr:legsNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bootsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 3)).setUnlocalizedName("lotr:bootsNexFire").setTextureName("lotr:bootsNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
helmetNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 0)).setUnlocalizedName("lotr:helmetNexToxin").setTextureName("lotr:helmetNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bodyNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 1, "chestplate")).setUnlocalizedName("lotr:bodyNexToxin").setTextureName("lotr:bodyNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
legsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 2)).setUnlocalizedName("lotr:legsNexToxin").setTextureName("lotr:legsNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bootsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 3)).setUnlocalizedName("lotr:bootsNexToxin").setTextureName("lotr:bootsNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
helmetNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 0)).setUnlocalizedName("lotr:helmetNexShadow").setTextureName("lotr:helmetNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
bodyNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 1)).setUnlocalizedName("lotr:bodyNexShadow").setTextureName("lotr:bodyNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
legsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 2)).setUnlocalizedName("lotr:legsNexShadow").setTextureName("lotr:legsNexShadow").setCreativeTab(null);
|
|
bootsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 3)).setUnlocalizedName("lotr:bootsNexShadow").setTextureName("lotr:bootsNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
firstAgeGlaive = (new FirstAgeGlaive()).setCreativeTab(LoECreativeTabs.tabCombatLoE);
|
|
toxicCore = (new ToxicCore());
|
|
|
|
linkLOTRWeapon(firstAgeGlaive, "firstAgeGlaive");
|
|
|
|
ItemRegistration.registerItem(helmetNexIce,"helmetNexIce",99);
|
|
ItemRegistration.registerItem(bodyNexIce,"bodyNexIce",100);
|
|
ItemRegistration.registerItem(legsNexIce,"legsNexIce",101);
|
|
ItemRegistration.registerItem(bootsNexIce,"bootsNexIce",102);
|
|
ItemRegistration.registerItem(helmetNexFire,"helmetNexFire",103);
|
|
ItemRegistration.registerItem(bodyNexFire,"bodyNexFire",104);
|
|
ItemRegistration.registerItem(legsNexFire,"legsNexFire",105);
|
|
ItemRegistration.registerItem(bootsNexFire,"bootsNexFire",106);
|
|
ItemRegistration.registerItem(helmetNexToxin,"helmetNexToxin",107);
|
|
ItemRegistration.registerItem(bodyNexToxin,"bodyNexToxin",108);
|
|
ItemRegistration.registerItem(legsNexToxin,"legsNexToxin",109);
|
|
ItemRegistration.registerItem(bootsNexToxin,"bootsNexToxin",110);
|
|
ItemRegistration.registerItem(helmetNexShadow,"helmetNexShadow",111);
|
|
ItemRegistration.registerItem(bodyNexShadow,"bodyNexShadow",112);
|
|
ItemRegistration.registerItem(legsNexShadow,"legsNexShadow",113);
|
|
ItemRegistration.registerItem(bootsNexShadow,"bootsNexShadow",114);
|
|
ItemRegistration.registerItem(firstAgeGlaive, "firstAgeGlaive",115);
|
|
ItemRegistration.registerItem(toxicCore,"toxicCore",116);
|
|
|
|
ItemRegistration.registerItem(frostblade, "frostblade", 4);
|
|
ItemRegistration.registerItem(daggervoid, "daggerVoid", 65);
|
|
ItemRegistration.registerItem(spearsolidgold, "spearsolidgold", 5);
|
|
ItemRegistration.registerItem(spearblood, "spearblood", 119);
|
|
ItemRegistration.registerItem(spearUnnamed, "spearUnnamed", 66);
|
|
ItemRegistration.registerItem(whip, "whip", 6);
|
|
ItemRegistration.registerItem(helmetbrokenhalo, "brokenhalo", 67);
|
|
ItemRegistration.registerItem(helmetJade, "helmetJade", 90);
|
|
ItemRegistration.registerItem(bodyJade, "chestplateJade", 91);
|
|
ItemRegistration.registerItem(legsJade, "legsJade", 92);
|
|
ItemRegistration.registerItem(bootsJade, "bootsJade", 93);
|
|
linkLOTRWeapon(frostblade, "frostblade");
|
|
linkLOTRWeapon(daggervoid, "daggerVoid");
|
|
linkLOTRWeapon(spearsolidgold, "spearsolidgold");
|
|
linkLOTRWeapon(spearblood, "spearblood");
|
|
linkLOTRWeapon(spearUnnamed, "spearUnnamed");
|
|
linkLOTRWeapon(whip, "whip");
|
|
|
|
// Common Tools/Weapons
|
|
cleaver = (new LOTRItemDagger(GONDOR)).setUnlocalizedName("lotr:cleaver").setTextureName("lotr:cleaver");
|
|
warDart = (new WarDart()).setUnlocalizedName("war_dart").setTextureName("lotr:war_dart");
|
|
warDartHeads = (new WarDartHeads()).setUnlocalizedName("war_dart_heads").setTextureName("lotr:war_dart_heads_0");
|
|
|
|
ItemRegistration.registerItem(cleaver,"cleaver",96);
|
|
linkLOTRWeapon(cleaver, "cleaver");
|
|
|
|
ItemRegistration.registerItem(warDart,"warDart",97);
|
|
ItemRegistration.registerItem(warDartHeads,"warDartHeads",98);
|
|
|
|
|
|
//ASH
|
|
MATERIAL_ASH = getLOTRMaterialByName("ASH");
|
|
ingotAsh = new Item().setUnlocalizedName("lotr:ingotAsh").setTextureName("lotr:ingotAsh").setCreativeTab((CreativeTabs) materials);
|
|
if (MATERIAL_ASH != null) {
|
|
swordAsh = (new LOTRItemSword(MATERIAL_ASH)).addWeaponDamage(4.25F).setUnlocalizedName("lotr:swordAsh").setTextureName("lotr:swordAsh");
|
|
staffAsh = (new LOTRItemPolearm(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:staffAsh").setTextureName("lotr:staffAsh");
|
|
daggerAsh = (new LOTRItemDagger(MATERIAL_ASH)).addWeaponDamage(6.75F).setUnlocalizedName("lotr:daggerAsh").setTextureName("lotr:daggerAsh");
|
|
hammerAsh = (new LOTRItemHammer(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:hammerAsh").setTextureName("lotr:hammerAsh");
|
|
battleaxeAsh = (new LOTRItemBattleaxe(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:battleaxeAsh").setTextureName("lotr:battleaxeAsh");
|
|
bowAsh = (new CinderBow(MATERIAL_ASH, 1.5)).setDrawTime(16).setUnlocalizedName("lotr:bowAsh").setTextureName("lotr:bowAsh");
|
|
pikeAsh = (new LOTRItemPike(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:pikeAsh").setTextureName("lotr:pikeAsh");
|
|
spearAsh = (new LOTRItemSpear(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:spearAsh").setTextureName("lotr:spearAsh");
|
|
|
|
ItemRegistration.registerItem(ingotAsh, "ingotAsh", 47);
|
|
ItemRegistration.registerItem(swordAsh, "swordAsh", 48);
|
|
ItemRegistration.registerItem(daggerAsh, "daggerAsh", 49);
|
|
ItemRegistration.registerItem(hammerAsh, "hammerAsh", 50);
|
|
ItemRegistration.registerItem(battleaxeAsh, "battleaxeAsh", 51);
|
|
ItemRegistration.registerItem(bowAsh, "bowAsh", 52);
|
|
ItemRegistration.registerItem(pikeAsh, "pikeAsh", 53);
|
|
ItemRegistration.registerItem(spearAsh, "spearAsh", 54);
|
|
ItemRegistration.registerItem(staffAsh, "staffAsh", 64);
|
|
} else {
|
|
// Log an error or handle the case where the material could not be found
|
|
System.err.println("Failed to find MATERIAL_ASH material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(swordAsh, "swordAsh");
|
|
linkLOTRWeapon(daggerAsh, "daggerAsh");
|
|
linkLOTRWeapon(hammerAsh, "hammerAsh");
|
|
linkLOTRWeapon(battleaxeAsh, "battleaxeAsh");
|
|
linkLOTRWeapon(bowAsh, "bowAsh");
|
|
linkLOTRWeapon(pikeAsh, "pikeAsh");
|
|
linkLOTRWeapon(spearAsh, "spearAsh");
|
|
linkLOTRWeapon(staffAsh, "staffAsh");
|
|
|
|
// Red Dwarves
|
|
redDwarfSteel = new Item().setUnlocalizedName("lotr:redDwarfSteel").setTextureName("lotr:redDwarfSteel").setCreativeTab((CreativeTabs) materials);
|
|
ItemRegistration.registerItem(redDwarfSteel, "redDwarfSteel", 7);
|
|
|
|
MATERIAL_RED_DWARF = getLOTRMaterialByName("RED_DWARF");
|
|
if (MATERIAL_RED_DWARF != null) {
|
|
helmetRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 0, "helmet")).setUnlocalizedName("lotr:helmetRedDwarf").setTextureName("lotr:helmetRedDwarf");
|
|
bodyRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 1)).setUnlocalizedName("lotr:bodyRedDwarf").setTextureName("lotr:bodyRedDwarf");
|
|
legsRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 2)).setUnlocalizedName("lotr:legsRedDwarf").setTextureName("lotr:legsRedDwarf");
|
|
bootsRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 3)).setUnlocalizedName("lotr:bootsRedDwarf").setTextureName("lotr:bootsRedDwarf");
|
|
spearRedDwarf = (new LOTRItemSpear(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:spearRedDwarf").setTextureName("lotr:spearRedDwarf");
|
|
swordRedDwarf = (new LOTRItemSword(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:swordRedDwarf").setTextureName("lotr:swordRedDwarf");
|
|
battleaxeRedDwarf = (new LOTRItemBattleaxe(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:battleaxeRedDwarf").setTextureName("lotr:battleaxeRedDwarf");
|
|
pikeRedDwarf = (new LOTRItemPike(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:pikeRedDwarf").setTextureName("lotr:pikeRedDwarf");
|
|
hammerRedDwarf = (new LOTRItemHammer(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:hammerRedDwarf").setTextureName("lotr:hammerRedDwarf");
|
|
daggerRedDwarf = (new LOTRItemDagger(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:daggerRedDwarf").setTextureName("lotr:daggerRedDwarf");
|
|
daggerRedDwarfPoisoned = (new LOTRItemDagger(MATERIAL_RED_DWARF, LOTRItemDagger.DaggerEffect.POISON)).setUnlocalizedName("lotr:daggerRedDwarfPoisoned").setTextureName("lotr:daggerRedDwarfPoisoned");
|
|
crossbowRedDwarf = (new LOTRItemCrossbow(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:crossbowRedDwarf").setTextureName("lotr:crossbowRedDwarf");
|
|
boarArmorRedDwarf = (new LOTRItemMountArmor(MATERIAL_RED_DWARF, LOTRItemMountArmor.Mount.BOAR)).setUnlocalizedName("lotr:boarArmorRedDwarf").setTextureName("lotr:boarArmorRedDwarf");
|
|
|
|
ItemRegistration.registerItem(helmetRedDwarf, "helmetRedDwarf", 8);
|
|
ItemRegistration.registerItem(bodyRedDwarf, "bodyRedDwarf", 9);
|
|
ItemRegistration.registerItem(legsRedDwarf, "legsRedDwarf", 10);
|
|
ItemRegistration.registerItem(bootsRedDwarf, "bootsRedDwarf", 11);
|
|
ItemRegistration.registerItem(spearRedDwarf, "spearRedDwarf", 12);
|
|
ItemRegistration.registerItem(swordRedDwarf, "swordRedDwarf", 13);
|
|
ItemRegistration.registerItem(battleaxeRedDwarf, "battleaxeRedDwarf", 14);
|
|
ItemRegistration.registerItem(pikeRedDwarf, "pikeRedDwarf", 15);
|
|
ItemRegistration.registerItem(hammerRedDwarf, "hammerRedDwarf", 16);
|
|
ItemRegistration.registerItem(daggerRedDwarf, "daggerRedDwarf", 17);
|
|
ItemRegistration.registerItem(daggerRedDwarfPoisoned, "daggerRedDwarfPoisoned", 18);
|
|
ItemRegistration.registerItem(crossbowRedDwarf, "crossbowRedDwarf", 19);
|
|
ItemRegistration.registerItem(boarArmorRedDwarf, "boarArmorRedDwarf", 20);
|
|
// System.out.println("Registered red dwarf equipment");
|
|
} else {
|
|
// Log an error or handle the case where the material could not be found
|
|
System.err.println("Failed to find RED_DWARF material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(spearRedDwarf, "spearRedDwarf");
|
|
linkLOTRWeapon(swordRedDwarf, "swordRedDwarf");
|
|
linkLOTRWeapon(battleaxeRedDwarf, "battleaxeRedDwarf");
|
|
linkLOTRWeapon(pikeRedDwarf, "pikeRedDwarf");
|
|
linkLOTRWeapon(hammerRedDwarf, "hammerRedDwarf");
|
|
linkLOTRWeapon(daggerRedDwarf, "daggerRedDwarf");
|
|
linkLOTRWeapon(daggerRedDwarfPoisoned, "daggerRedDwarfPoisoned");
|
|
linkLOTRWeapon(crossbowRedDwarf, "crossbowRedDwarf");
|
|
|
|
// Limwaith
|
|
|
|
bonemold = new Item().setUnlocalizedName("lotr:bonemold").setTextureName("lotr:bonemold").setCreativeTab((CreativeTabs) materials);
|
|
ItemRegistration.registerItem(bonemold, "bonemold", 55);
|
|
|
|
MATERIAL_LIMWAITH_WOOD = getLOTRMaterialByName("LIMWAITH_WOOD");
|
|
MATERIAL_BONEMOLD = getLOTRMaterialByName("BONEMOLD");
|
|
if (MATERIAL_LIMWAITH_WOOD != null && MATERIAL_BONEMOLD != null) {
|
|
helmetLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 0)).setUnlocalizedName("lotr:helmetLimwaith").setTextureName("lotr:helmetLimwaith");
|
|
bodyLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 1)).setUnlocalizedName("lotr:bodyLimwaith").setTextureName("lotr:bodyLimwaith");
|
|
legsLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 2)).setUnlocalizedName("lotr:legsLimwaith").setTextureName("lotr:legsLimwaith");
|
|
bootsLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 3)).setUnlocalizedName("lotr:bootsLimwaith").setTextureName("lotr:bootsLimwaith");
|
|
|
|
helmetboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 0)).setUnlocalizedName("lotr:helmetboneLimwaith").setTextureName("lotr:helmetboneLimwaith");
|
|
bodyboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 1)).setUnlocalizedName("lotr:bodyboneLimwaith").setTextureName("lotr:bodyboneLimwaith");
|
|
legsboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 2)).setUnlocalizedName("lotr:legsboneLimwaith").setTextureName("lotr:legsboneLimwaith");
|
|
bootsboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 3)).setUnlocalizedName("lotr:bootsboneLimwaith").setTextureName("lotr:bootsboneLimwaith");
|
|
|
|
spearLimwaith = (new LOTRItemSpear(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:spearLimwaith").setTextureName("lotr:spearLimwaith");
|
|
truncheonLimwaith = (new LOTRItemSword(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:truncheonLimwaith").setTextureName("lotr:truncheonLimwaith");
|
|
battleaxeLimwaith = (new LOTRItemBattleaxe(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:battleaxeLimwaith").setTextureName("lotr:battleaxeLimwaith");
|
|
tridentLimwaith = (new LOTRItemTrident(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:tridentLimwaith").setTextureName("lotr:tridentLimwaith");
|
|
daggerLimwaith = (new LOTRItemDagger(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:daggerLimwaith").setTextureName("lotr:daggerLimwaith");
|
|
daggerLimwaithPoisoned = (new LOTRItemDagger(MATERIAL_BONEMOLD, LOTRItemDagger.DaggerEffect.POISON)).setUnlocalizedName("lotr:daggerLimwaithPoisoned").setTextureName("lotr:daggerLimwaithPoisoned");
|
|
blowgunLimwaith = (new LOTRItemBlowgun(LOTRMaterial.TAUREDAIN)).setUnlocalizedName("lotr:blowgunLimwaith").setTextureName("lotr:blowgunLimwaith");
|
|
|
|
ItemRegistration.registerItem(helmetLimwaith, "helmetLimwaith", 21);
|
|
ItemRegistration.registerItem(bodyLimwaith, "bodyLimwaith", 22);
|
|
ItemRegistration.registerItem(legsLimwaith, "legsLimwaith", 23);
|
|
ItemRegistration.registerItem(bootsLimwaith, "bootsLimwaith", 24);
|
|
|
|
ItemRegistration.registerItem(helmetboneLimwaith, "helmetboneLimwaith", 43);
|
|
ItemRegistration.registerItem(bodyboneLimwaith, "bodyboneLimwaith", 44);
|
|
ItemRegistration.registerItem(legsboneLimwaith, "legsboneLimwaith", 45);
|
|
ItemRegistration.registerItem(bootsboneLimwaith, "bootsboneLimwaith", 46);
|
|
|
|
ItemRegistration.registerItem(spearLimwaith, "spearLimwaith", 25);
|
|
ItemRegistration.registerItem(tridentLimwaith, "tridentLimwaith", 26);
|
|
ItemRegistration.registerItem(truncheonLimwaith, "truncheonLimwaith", 27);
|
|
ItemRegistration.registerItem(battleaxeLimwaith, "battleaxeLimwaith", 28);
|
|
ItemRegistration.registerItem(daggerLimwaith, "daggerLimwaith", 29);
|
|
ItemRegistration.registerItem(daggerLimwaithPoisoned, "daggerLimwaithPoisoned", 30);
|
|
ItemRegistration.registerItem(blowgunLimwaith, "blowgunLimwaith", 31);
|
|
} else {
|
|
System.err.println("Failed to find LIMWAITH material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(spearLimwaith, "spearLimwaith");
|
|
linkLOTRWeapon(truncheonLimwaith, "truncheonLimwaith");
|
|
linkLOTRWeapon(battleaxeLimwaith, "battleaxeLimwaith");
|
|
linkLOTRWeapon(tridentLimwaith, "tridentLimwaith");
|
|
linkLOTRWeapon(daggerLimwaith, "daggerLimwaith");
|
|
linkLOTRWeapon(daggerLimwaithPoisoned, "daggerLimwaithPoisoned");
|
|
linkLOTRWeapon(blowgunLimwaith, "blowgunLimwaith");
|
|
|
|
//Bree
|
|
MATERIAL_BREE = getLOTRMaterialByName("BREE");
|
|
if (MATERIAL_BREE != null) {
|
|
helmetBreeKettle = (new LOTRItemArmor(MATERIAL_BREE, 0, "helmet")).setUnlocalizedName("lotr:helmetBreeKettle").setTextureName("lotr:breekettlehelmet");
|
|
helmetBree = (new LOTRItemArmor(MATERIAL_BREE, 0)).setUnlocalizedName("lotr:helmetBree").setTextureName("lotr:helmetBree");
|
|
bodyBree = (new LOTRItemArmor(MATERIAL_BREE, 1)).setUnlocalizedName("lotr:bodyBree").setTextureName("lotr:bodyBree");
|
|
legsBree = (new LOTRItemArmor(MATERIAL_BREE, 2)).setUnlocalizedName("lotr:legsBree").setTextureName("lotr:legsBree");
|
|
bootsBree = (new LOTRItemArmor(MATERIAL_BREE, 3)).setUnlocalizedName("lotr:bootsBree").setTextureName("lotr:bootsBree");
|
|
swordBree = (new LOTRItemSword(MATERIAL_BREE)).setUnlocalizedName("lotr:swordBree").setTextureName("lotr:swordBree");
|
|
|
|
ItemRegistration.registerItem(helmetBree, "helmetBree", 32);
|
|
ItemRegistration.registerItem(helmetBreeKettle, "breekettle", 57);
|
|
ItemRegistration.registerItem(bodyBree, "bodyBree", 33);
|
|
ItemRegistration.registerItem(legsBree, "legsBree", 34);
|
|
ItemRegistration.registerItem(bootsBree, "bootsBree", 35);
|
|
ItemRegistration.registerItem(swordBree, "swordBree", 36);
|
|
} else {
|
|
System.err.println("Failed to find BREE material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(swordBree, "swordBree");
|
|
|
|
//Elite Armors
|
|
MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT");
|
|
if (MATERIAL_SERPENT != null) {
|
|
helmetserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null);
|
|
bodyserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 1, "chestplate")).setUnlocalizedName("lotr:bodyserpent").setTextureName("lotr:bodyserpent").setCreativeTab(null);
|
|
legsserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 2)).setUnlocalizedName("lotr:legsserpent").setTextureName("lotr:legsserpent").setCreativeTab(null);
|
|
bootsserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 3)).setUnlocalizedName("lotr:bootsserpent").setTextureName("lotr:bootsserpent").setCreativeTab(null);
|
|
|
|
ItemRegistration.registerItem(helmetserpent, "helmetserpent", 72);
|
|
ItemRegistration.registerItem(bodyserpent, "bodyserpent", 73);
|
|
ItemRegistration.registerItem(legsserpent, "legsserpent", 74);
|
|
ItemRegistration.registerItem(bootsserpent, "bootsserpent", 75);
|
|
} else {
|
|
System.err.println("Failed to find SERPENT material for armor initialization.");
|
|
}
|
|
MATERIAL_USURPER = getLOTRMaterialByName("USURPER");
|
|
if (MATERIAL_USURPER != null) {
|
|
helmetUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 0, "helmet")).setUnlocalizedName("lotr:helmetUsurper").setTextureName("lotr:helmetUsurper").setCreativeTab(null);
|
|
bodyUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 1)).setUnlocalizedName("lotr:bodyUsurper").setTextureName("lotr:bodyUsurper").setCreativeTab(null);
|
|
legsUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 2)).setUnlocalizedName("lotr:legsUsurper").setTextureName("lotr:legsUsurper").setCreativeTab(null);
|
|
bootsUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 3)).setUnlocalizedName("lotr:bootsUsurper").setTextureName("lotr:bootsUsurper").setCreativeTab(null);
|
|
|
|
ItemRegistration.registerItem(helmetUsurper, "helmetUsurper", 76);
|
|
ItemRegistration.registerItem(bodyUsurper, "bodyUsurper", 77);
|
|
ItemRegistration.registerItem(legsUsurper, "legsUsurper", 78);
|
|
ItemRegistration.registerItem(bootsUsurper, "bootsUsurper", 79);
|
|
} else {
|
|
System.err.println("Failed to find USURPER material for armor initialization.");
|
|
}
|
|
MATERIAL_WARLORD = getLOTRMaterialByName("WARLORD");
|
|
if (MATERIAL_WARLORD != null) {
|
|
helmetWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 0, "helmet")).setUnlocalizedName("lotr:helmetWarlord").setTextureName("lotr:helmetWarlord").setCreativeTab(null);
|
|
bodyWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 1)).setUnlocalizedName("lotr:bodyWarlord").setTextureName("lotr:bodyWarlord").setCreativeTab(null);
|
|
legsWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 2)).setUnlocalizedName("lotr:legsWarlord").setTextureName("lotr:legsWarlord").setCreativeTab(null);
|
|
bootsWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 3)).setUnlocalizedName("lotr:bootsWarlord").setTextureName("lotr:bootsWarlord").setCreativeTab(null);
|
|
maceWarlord = (new LOTRItemHammer(MATERIAL_WARLORD)).setUnlocalizedName("lotr:maceWarlord").setTextureName("lotr:maceWarlord").setCreativeTab(null);
|
|
|
|
ItemRegistration.registerItem(helmetWarlord, "helmetWarlord", 80);
|
|
ItemRegistration.registerItem(bodyWarlord, "bodyWarlord", 81);
|
|
ItemRegistration.registerItem(legsWarlord, "legsWarlord", 82);
|
|
ItemRegistration.registerItem(bootsWarlord, "bootsWarlord", 83);
|
|
ItemRegistration.registerItem(maceWarlord, "maceWarlord", 118);
|
|
} else {
|
|
System.err.println("Failed to find WARLORD material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(maceWarlord, "maceWarlord");
|
|
|
|
//Rhudaur
|
|
MATERIAL_RHUDUAR = getLOTRMaterialByName("RHUDAUR");
|
|
if (MATERIAL_RHUDUAR != null) {
|
|
helmetRhudaur = (new LOTRItemArmor(MATERIAL_RHUDUAR, 0, "helmet")).setUnlocalizedName("lotr:helmetRhudaur").setTextureName("lotr:helmetRhudaur");
|
|
bodyRhudaur = (new LOTRItemArmor(MATERIAL_RHUDUAR, 1)).setUnlocalizedName("lotr:bodyRhudaur").setTextureName("lotr:bodyRhudaur");
|
|
legsRhudaur = (new LOTRItemArmor(MATERIAL_RHUDUAR, 2)).setUnlocalizedName("lotr:legsRhudaur").setTextureName("lotr:legsRhudaur");
|
|
bootsRhudaur = (new LOTRItemArmor(MATERIAL_RHUDUAR, 3)).setUnlocalizedName("lotr:bootsRhudaur").setTextureName("lotr:bootsRhudaur");
|
|
|
|
ItemRegistration.registerItem(helmetRhudaur, "helmetRhudaur",68);
|
|
ItemRegistration.registerItem(bodyRhudaur, "bodyRhudaur", 69);
|
|
ItemRegistration.registerItem(legsRhudaur, "legsRhudaur", 70);
|
|
ItemRegistration.registerItem(bootsRhudaur, "bootsRhudaur", 71);
|
|
} else {
|
|
System.err.println("Failed to find RHUDAUR material for armor initialization.");
|
|
}
|
|
//Arnor
|
|
MATERIAL_BATTLENUN = getLOTRMaterialByName("BATTLENUN");
|
|
if (MATERIAL_BATTLENUN != null) {
|
|
helmetArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 0)).setUnlocalizedName("lotr:helmetArnorBanner").setTextureName("lotr:helmetArnorBanner");
|
|
bodyArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 1)).setUnlocalizedName("lotr:bodyArnorBanner").setTextureName("lotr:bodyArnorBanner");
|
|
legsArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 2)).setUnlocalizedName("lotr:legsArnorBanner").setTextureName("lotr:legsArnorBanner");
|
|
bootsArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 3)).setUnlocalizedName("lotr:bootsArnorBanner").setTextureName("lotr:bootsArnorBanner");
|
|
maceArnor = (new LOTRItemHammer(LOTRMaterial.ARNOR)).setUnlocalizedName("lotr:maceArnor").setTextureName("lotr:maceArnor");
|
|
|
|
ItemRegistration.registerItem(helmetArnorBanner, "helmetArnorBanner", 37);
|
|
ItemRegistration.registerItem(bodyArnorBanner, "bodyArnorBanner", 38);
|
|
ItemRegistration.registerItem(legsArnorBanner, "legsArnorBanner", 39);
|
|
ItemRegistration.registerItem(bootsArnorBanner, "bootsArnorBanner", 40);
|
|
ItemRegistration.registerItem(maceArnor, "maceArnor", 41);
|
|
} else {
|
|
System.err.println("Failed to find ARNOR material for armor initialization.");
|
|
}
|
|
linkLOTRWeapon(maceArnor, "maceArnor");
|
|
}
|
|
|
|
public static ModContainer getModContainer() {
|
|
return FMLCommonHandler.instance()
|
|
.findContainerFor(instance);
|
|
}
|
|
|
|
public void linkLOTRWeapon(Item item, String weapon_name) {
|
|
try {
|
|
Field field = LOTRMod.class.getField(weapon_name);
|
|
field.set(null, item);
|
|
} catch (Exception e) {
|
|
System.err.println("[CinderLoE] linkLOTRWeapon: Failed to find field " + weapon_name + " in LOTRMod!");
|
|
}
|
|
}
|
|
|
|
public static class CommonProxy {
|
|
public void setup() {
|
|
}
|
|
}
|
|
|
|
public static class ClientProxy extends CommonProxy {
|
|
@Override
|
|
public void setup() {
|
|
// RenderingRegistry.registerEntityRenderingHandler(HaradLevy.class, new LOTRRenderNearHaradrim());
|
|
// RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf());
|
|
RenderingRegistry.registerBlockHandler(new RenderIceCage());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart());
|
|
RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner());
|
|
RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptElf.class, new RenderCorruptElf());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptEnt.class, new RenderCorruptEnt());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptHobbit.class, new RenderCorruptHobbit());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptMan.class, new RenderCorruptMan());
|
|
RenderingRegistry.registerEntityRenderingHandler(CorruptOrc.class, new RenderCorruptOrc());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(SarumanFireball.class, new RenderSarumanFireball());
|
|
RenderingRegistry.registerEntityRenderingHandler(Renegade.class, new RenderRenegade());
|
|
RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade());
|
|
RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith());
|
|
RenderingRegistry.registerEntityRenderingHandler(Nex.class, new RenderNex());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(RedDwarfWarrior.class, new LOTRRenderDwarf());
|
|
RenderingRegistry.registerEntityRenderingHandler(RedDwarfArbalest.class, new LOTRRenderDwarf());
|
|
RenderingRegistry.registerEntityRenderingHandler(RedDwarfBannerBearer.class, new LOTRRenderDwarf());
|
|
RenderingRegistry.registerEntityRenderingHandler(RedDwarfCommander.class, new LOTRRenderDwarf());
|
|
RenderingRegistry.registerEntityRenderingHandler(RedDwarfSmith.class, new LOTRRenderDwarf());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(Limwaith.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithFishmonger.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithShaman.class, new RenderLimwaithShaman());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithWarrior.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithBoneWarrior.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithBlowgunner.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithBannerBearer.class, new RenderLimwaith());
|
|
RenderingRegistry.registerEntityRenderingHandler(LimwaithChieftain.class, new RenderLimwaith());
|
|
|
|
//RenderingRegistry.registerEntityRenderingHandler(LimwaithCrocodile.class, new RenderTamedCrocodile());
|
|
RenderingRegistry.registerEntityRenderingHandler(FangornBear.class, new RenderFangornBear());
|
|
RenderingRegistry.registerEntityRenderingHandler(FangornWildBoar.class, new RenderFangornWildBoar());
|
|
RenderingRegistry.registerEntityRenderingHandler(FangornAuroch.class, new RenderFangornAuroch());
|
|
RenderingRegistry.registerEntityRenderingHandler(FangornElk.class, new RenderFangornElk());
|
|
RenderingRegistry.registerEntityRenderingHandler(FangornWolf.class, new RenderFangornWolf());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(ArnorSoldier.class, new LOTRRenderDunedain());
|
|
RenderingRegistry.registerEntityRenderingHandler(ArnorSoldierArcher.class, new LOTRRenderDunedain());
|
|
RenderingRegistry.registerEntityRenderingHandler(ArnorCaptain.class, new LOTRRenderDunedain());
|
|
RenderingRegistry.registerEntityRenderingHandler(ArnorBannerBearer.class, new LOTRRenderDunedain());
|
|
RenderingRegistry.registerEntityRenderingHandler(BattleNun.class, new RenderBattleNun());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(BreeSoldier.class, new LOTRRenderBreeMan());
|
|
RenderingRegistry.registerEntityRenderingHandler(BreeCrossbowman.class, new LOTRRenderBreeMan());
|
|
RenderingRegistry.registerEntityRenderingHandler(BreeCaptain.class, new LOTRRenderBreeMan());
|
|
RenderingRegistry.registerEntityRenderingHandler(BreeSoldierBannerBearer.class, new LOTRRenderBreeMan());
|
|
RenderingRegistry.registerEntityRenderingHandler(BreeOutrider.class, new LOTRRenderBreeMan());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(LOTREntitySauron.class, new LOTRRenderSauron());
|
|
RenderingRegistry.registerEntityRenderingHandler(UtumnoSlaveTrader.class, new RenderUtumnoSlave());
|
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMistBlock.class, (TileEntitySpecialRenderer)new LOTRRenderUtumnoPortal());
|
|
}
|
|
}
|
|
|
|
public static class ServerProxy extends CommonProxy {
|
|
@Override
|
|
public void setup() {
|
|
}
|
|
}
|
|
|
|
public void modifySpawnLists() {
|
|
try {
|
|
// Retrieve the constructor of LOTRSpawnList class
|
|
Constructor<LOTRSpawnList> constructor = LOTRSpawnList.class.getDeclaredConstructor(LOTRSpawnEntry[].class);
|
|
constructor.setAccessible(true); // Make the private constructor accessible
|
|
|
|
// RED_DWARF is initialized earlier in this class
|
|
LOTRSpawnList RED_DWARF = constructor.newInstance((Object) new LOTRSpawnEntry[]{
|
|
new LOTRSpawnEntry(LOTREntityDwarf.class, 100, 4, 4),
|
|
new LOTRSpawnEntry(LOTREntityDwarfMiner.class, 15, 1, 3),
|
|
new LOTRSpawnEntry(RedDwarfWarrior.class, 20, 4, 4),
|
|
new LOTRSpawnEntry(RedDwarfArbalest.class, 10, 4, 4)
|
|
});
|
|
|
|
LOTRSpawnList LIMWAITH = constructor.newInstance((Object) new LOTRSpawnEntry[]{
|
|
new LOTRSpawnEntry(Limwaith.class, 100, 4, 6),
|
|
new LOTRSpawnEntry(LimwaithWarrior.class, 20, 4, 6),
|
|
new LOTRSpawnEntry(LimwaithBlowgunner.class, 15, 1, 3),
|
|
new LOTRSpawnEntry(LimwaithBoneWarrior.class, 10, 1, 3)
|
|
});
|
|
|
|
|
|
Field redDwarfField = LOTRSpawnList.class.getDeclaredField("RED_DWARF");
|
|
redDwarfField.setAccessible(true);
|
|
redDwarfField.set(null, RED_DWARF);
|
|
|
|
Field limwaithField = LOTRSpawnList.class.getDeclaredField("LIMWAITH");
|
|
limwaithField.setAccessible(true);
|
|
limwaithField.set(null, LIMWAITH);
|
|
|
|
|
|
if (LOTRBiome.redMountains != null) {
|
|
LOTRBiome.redMountains.npcSpawnList.newFactionList(500)
|
|
.add(new LOTRBiomeSpawnList.SpawnListContainer[]{
|
|
LOTRBiomeSpawnList.entry((LOTRSpawnList) redDwarfField.get(null), 10)
|
|
});
|
|
} else {
|
|
System.out.println("Red Mountains biome is not available.");
|
|
}
|
|
if (LOTRBiome.farHaradMangrove != null) {
|
|
LOTRBiome.farHaradMangrove.npcSpawnList.newFactionList(500)
|
|
.add(new LOTRBiomeSpawnList.SpawnListContainer[]{
|
|
LOTRBiomeSpawnList.entry((LOTRSpawnList) limwaithField.get(null), 10)
|
|
});
|
|
} else {
|
|
System.out.println("Mangrove biome is not available.");
|
|
}
|
|
} catch (Exception e) {
|
|
System.err.println("[CinderLoE] linkLOTRWeapon: Failed to find field RED_DWARF in LOTRSpawnList!");
|
|
}
|
|
}
|
|
|
|
public static LOTRMaterial getLOTRMaterialByName(String materialName) {
|
|
try {
|
|
Field materialField = LOTRMaterial.class.getField(materialName);
|
|
return (LOTRMaterial) materialField.get(null);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Debug method
|
|
public static void printClass(String className) {
|
|
String resourcePath = "/" + className.replace('.', '/') + ".class";
|
|
InputStream in = CinderLoE.class.getResourceAsStream(resourcePath);
|
|
if (in == null) {
|
|
System.out.println("Class resource not found: " + resourcePath);
|
|
return;
|
|
}
|
|
try {
|
|
ClassReader classReader = new ClassReader(in);
|
|
classReader.accept(new TraceClassVisitor(new PrintWriter(System.out)), 0);
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
} finally {
|
|
try {
|
|
in.close();
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
@SubscribeEvent
|
|
@SideOnly(Side.SERVER)
|
|
public void onWorldLoad(WorldEvent.Load event) {
|
|
// == Crop Blocks ==
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(onionCrop), Block.getIdFromBlock(LOTRMod.turnipCrop), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(cabbageCrop), Block.getIdFromBlock(LOTRMod.lettuceCrop), "cinder_loe", "1.2.1");
|
|
// == Food Items ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(onion), Item.getIdFromItem(LOTRMod.turnip), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(cabbage), Item.getIdFromItem(LOTRMod.lettuce), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spice), Item.getIdFromItem(LOTRMod.dye), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spicedHam), Item.getIdFromItem(LOTRMod.gammon), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pelmen), Item.getIdFromItem(LOTRMod.cram), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(lightStew), Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(chocolatebar),Item.getIdFromItem(LOTRMod.marzipanChocolate), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(fruitsalad),Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(flour),Item.getIdFromItem(Items.sugar), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(dough),Item.getIdFromItem(Items.gunpowder), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pasta),Item.getIdFromItem(Items.wheat), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pretzel),Item.getIdFromItem(Items.bread), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(halva),Item.getIdFromItem(Items.bread),"cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(honey),Item.getIdFromItem(LOTRMod.mapleSyrup), "cinder_loe", "1.2.5");
|
|
|
|
//== Blocks==
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(cinderBlock), Block.getIdFromBlock(Blocks.netherrack), "cinder_loe", "1.0");
|
|
// CinderCore.registerItemFallback(Block.getIdFromBlock(barricade), Block.getIdFromBlock(Blocks.fence), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(ivoryBlock), Block.getIdFromBlock(LOTRMod.boneBlock), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(blockRedDwarfSteel), Block.getIdFromBlock(LOTRMod.blockOreStorage), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(chandelierRedDwarf), Block.getIdFromBlock(LOTRMod.chandelier), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(barsRedDwarf), Block.getIdFromBlock(LOTRMod.dwarfBars), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(furBundle), Block.getIdFromBlock(Blocks.hay_block), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(leatherBundle), Block.getIdFromBlock(Blocks.hay_block), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(reedBale), Block.getIdFromBlock(Blocks.hay_block), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(dwarvenBrickRuned), Block.getIdFromBlock(LOTRMod.brick), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(fishBarrel), Block.getIdFromBlock(LOTRMod.woodBeam1), "cinder_loe", "1.1");
|
|
//CinderCore.registerItemFallback(Block.getIdFromBlock(rustedsword), Block.getIdFromBlock(Blocks.nether_brick_fence), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(silverChain), Block.getIdFromBlock(LOTRMod.orcChain), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(goldChain), Block.getIdFromBlock(LOTRMod.orcChain), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(ironChain), Block.getIdFromBlock(LOTRMod.orcChain), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(bronzeChain), Block.getIdFromBlock(LOTRMod.orcChain), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(mistBlock), Block.getIdFromBlock(LOTRMod.utumnoPortal), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(cutDrystone), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(cindercobble), Block.getIdFromBlock(LOTRMod.cobblebrick), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(reeflessCoral), Block.getIdFromBlock(LOTRMod.coralReef), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(plaster), Block.getIdFromBlock(Blocks.brick_block), "cinder_loe", "1.2.1");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(woodpanel), Block.getIdFromBlock(Blocks.planks), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Block.getIdFromBlock(voidblock), Block.getIdFromBlock(Blocks.coal_block), "cinder_loe", "1.2.1");
|
|
// CinderCore.registerItemFallback(Block.getIdFromBlock(verticalWeaponRack), Block.getIdFromBlock(Blocks.fence), "cinder_loe", "1.2.4");
|
|
// == Gates ==
|
|
//CinderCore.registerItemFallback(Block.getIdFromBlock(gatecharredportcullis), Block.getIdFromBlock(LOTRMod.gateWoodenCross), "cinder_loe", "1.2.5");
|
|
// == Red Dwarf Items==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(redDwarfSteel), Item.getIdFromItem(LOTRMod.dwarfSteel), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearRedDwarf), Item.getIdFromItem(LOTRMod.spearDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(swordRedDwarf), Item.getIdFromItem(LOTRMod.swordDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(battleaxeRedDwarf), Item.getIdFromItem(LOTRMod.battleaxeDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pikeRedDwarf), Item.getIdFromItem(LOTRMod.pikeDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(hammerRedDwarf), Item.getIdFromItem(LOTRMod.hammerDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggerRedDwarf), Item.getIdFromItem(LOTRMod.daggerDwarven), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggerRedDwarfPoisoned), Item.getIdFromItem(LOTRMod.daggerDwarvenPoisoned), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetRedDwarf), Item.getIdFromItem(LOTRMod.helmetDwarvenGold), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyRedDwarf), Item.getIdFromItem(LOTRMod.bodyDwarvenGold), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsRedDwarf), Item.getIdFromItem(LOTRMod.legsDwarvenGold), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsRedDwarf), Item.getIdFromItem(LOTRMod.bootsDwarvenGold), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(crossbowRedDwarf), Item.getIdFromItem(LOTRMod.ironCrossbow), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(boarArmorRedDwarf), Item.getIdFromItem(LOTRMod.boarArmorDwarven), "cinder_loe", "1.0");
|
|
// == Rhudaur Items==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetRhudaur), Item.getIdFromItem(LOTRMod.helmetFur), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyRhudaur), Item.getIdFromItem(LOTRMod.bodyFur), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsRhudaur), Item.getIdFromItem(LOTRMod.legsFur), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsRhudaur), Item.getIdFromItem(LOTRMod.bootsFur), "cinder_loe", "1.2.5");
|
|
// == Elite Armors==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetserpent), Item.getIdFromItem(LOTRMod.helmetNearHarad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyserpent), Item.getIdFromItem(LOTRMod.bodyNearHarad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsserpent),Item.getIdFromItem(LOTRMod.bodyNearHarad), "cinder_loe","1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsserpent), Item.getIdFromItem(LOTRMod.bootsNearHarad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetUsurper), Item.getIdFromItem(LOTRMod.helmetUmbar), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyUsurper), Item.getIdFromItem(LOTRMod.bodyUmbar), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsUsurper), Item.getIdFromItem(LOTRMod.legsUmbar), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsUsurper), Item.getIdFromItem(LOTRMod.bootsUmbar), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetWarlord), Item.getIdFromItem(LOTRMod.helmetNomad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyWarlord), Item.getIdFromItem(LOTRMod.bodyNomad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsWarlord), Item.getIdFromItem(LOTRMod.legsNomad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsWarlord), Item.getIdFromItem(LOTRMod.bootsNomad), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(maceWarlord), Item.getIdFromItem(LOTRMod.maceNearHarad), "cinder_loe", "1.2.5");
|
|
// == Wizard Staves ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(radagastStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pallandoStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(alatarStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(sarumanStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
|
|
// == Relics ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(welfRelic), Item.getIdFromItem(LOTRMod.rhinoHorn), "cinder_loe", "1.2");
|
|
// == Specials ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(frostblade), Item.getIdFromItem(LOTRMod.swordMithril), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggervoid), Item.getIdFromItem(LOTRMod.daggerMithril), "cinder_loe", "1.2.3");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearsolidgold), Item.getIdFromItem(LOTRMod.spearMithril), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearblood), Item.getIdFromItem(LOTRMod.spearMithril), "cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearUnnamed), Item.getIdFromItem(LOTRMod.spearMithril), "cinder_loe", "1.2.4");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(whip), Item.getIdFromItem(LOTRMod.balrogWhip), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetbrokenhalo), Item.getIdFromItem(Items.golden_helmet),"cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetJade), Item.getIdFromItem(LOTRMod.helmetMithril),"cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyJade), Item.getIdFromItem(LOTRMod.bodyMithril),"cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsJade), Item.getIdFromItem(LOTRMod.legsMithril),"cinder_loe", "1.2.5");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsJade), Item.getIdFromItem(LOTRMod.bootsMithril),"cinder_loe", "1.2.5");
|
|
// == Common Tools/weapons ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(cleaver),Item.getIdFromItem(LOTRMod.daggerIron),"cinder_loe","1.2.5");
|
|
// == Ash Forged ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(ingotAsh), Item.getIdFromItem(LOTRMod.galvorn), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggerAsh), Item.getIdFromItem(LOTRMod.daggerBlackUruk), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(swordAsh), Item.getIdFromItem(LOTRMod.scimitarBlackUruk), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(staffAsh), Item.getIdFromItem(LOTRMod.polearmOrc), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(hammerAsh), Item.getIdFromItem(LOTRMod.hammerBlackUruk), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(battleaxeAsh), Item.getIdFromItem(LOTRMod.battleaxeBlackUruk), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(pikeAsh), Item.getIdFromItem(LOTRMod.pikeDolGuldur), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bowAsh), Item.getIdFromItem(LOTRMod.blackUrukBow), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearAsh), Item.getIdFromItem(LOTRMod.spearBlackUruk), "cinder_loe", "1.2");
|
|
// == Spawn Eggs ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spawnEgg), Item.getIdFromItem(Items.spawn_egg), "cinder_loe", "1.0");
|
|
// == Limwaith Items ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bonemold), Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetLimwaith), Item.getIdFromItem(LOTRMod.helmetMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyLimwaith), Item.getIdFromItem(LOTRMod.bodyMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsLimwaith), Item.getIdFromItem(LOTRMod.legsMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsLimwaith), Item.getIdFromItem(LOTRMod.bootsMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetboneLimwaith), Item.getIdFromItem(LOTRMod.helmetBone), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyboneLimwaith), Item.getIdFromItem(LOTRMod.bodyBone), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsboneLimwaith), Item.getIdFromItem(LOTRMod.legsBone), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsboneLimwaith), Item.getIdFromItem(LOTRMod.bootsBone), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(spearLimwaith), Item.getIdFromItem(LOTRMod.spearMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(tridentLimwaith), Item.getIdFromItem(LOTRMod.dunlendingTrident), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(truncheonLimwaith), Item.getIdFromItem(LOTRMod.swordMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(battleaxeLimwaith), Item.getIdFromItem(LOTRMod.battleaxeMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggerLimwaith), Item.getIdFromItem(LOTRMod.daggerMoredain), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(daggerLimwaithPoisoned), Item.getIdFromItem(LOTRMod.daggerMoredainPoisoned), "cinder_loe", "1.0");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(blowgunLimwaith), Item.getIdFromItem(LOTRMod.tauredainBlowgun), "cinder_loe", "1.0");
|
|
// == Bree Items ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetBree), Item.getIdFromItem(Items.iron_helmet), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetBreeKettle), Item.getIdFromItem(Items.iron_helmet), "cinder_loe", "1.2");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyBree), Item.getIdFromItem(Items.chainmail_chestplate), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsBree), Item.getIdFromItem(Items.chainmail_leggings), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsBree), Item.getIdFromItem(Items.iron_boots), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(swordBree), Item.getIdFromItem(Items.iron_sword), "cinder_loe", "1.1");
|
|
// == Arnor Items ==
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(helmetArnorBanner), Item.getIdFromItem(Items.chainmail_helmet), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bodyArnorBanner), Item.getIdFromItem(Items.chainmail_chestplate), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(legsArnorBanner), Item.getIdFromItem(Items.chainmail_leggings), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(bootsArnorBanner), Item.getIdFromItem(Items.chainmail_boots), "cinder_loe", "1.1");
|
|
CinderCore.registerItemFallback(Item.getIdFromItem(maceArnor), Item.getIdFromItem(LOTRMod.blacksmithHammer), "cinder_loe", "1.1");
|
|
|
|
// CinderCore.registerEntityFallback(HaradLevy.class, LOTREntityNearHaradrim.class, "cinder_loe", "1.2.3");
|
|
// CinderCore.registerEntityFallback(DwarfLevy.class, LOTREntityDwarf.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(DarkSpider.class, LOTREntityUtumnoIceSpider.class, "cinder_loe", "1.2.4");
|
|
|
|
CinderCore.registerEntityFallback(BladorthinSmith.class, LOTREntityDorwinionElf.class, "cinder_loe", "1.2.4");
|
|
|
|
CinderCore.registerEntityFallback(CorruptDwarf.class, LOTREntityDwarf.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(CorruptElf.class, LOTREntityTormentedElf.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(CorruptEnt.class, LOTREntityEnt.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(CorruptHobbit.class, LOTREntityHobbit.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(CorruptMan.class, LOTREntityGondorMan.class, "cinder_loe", "1.2.3");
|
|
CinderCore.registerEntityFallback(CorruptOrc.class, LOTREntityGundabadOrc.class, "cinder_loe", "1.2.3");
|
|
|
|
CinderCore.registerEntityFallback(SarumanFireball.class, LOTREntityGandalfFireball.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(LOTREntitySauron.class, LOTREntityBarrowWight.class, "cinder_loe", "1.1");
|
|
|
|
CinderCore.registerEntityFallback(RedDwarfWarrior.class, LOTREntityDwarfWarrior.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(RedDwarfArbalest.class, LOTREntityDwarfAxeThrower.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(RedDwarfBannerBearer.class, LOTREntityDwarfBannerBearer.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(RedDwarfCommander.class, LOTREntityDwarfCommander.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(RedDwarfSmith.class, LOTREntityDwarfSmith.class, "cinder_loe", "1.2.1");
|
|
|
|
CinderCore.registerEntityFallback(Limwaith.class, LOTREntityMoredain.class, "cinder_loe", "1.2");
|
|
CinderCore.registerEntityFallback(LimwaithFishmonger.class, LOTREntityMoredain.class, "cinder_loe", "1.2");
|
|
CinderCore.registerEntityFallback(LimwaithShaman.class, LOTREntityTauredainShaman.class, "cinder_loe", "1.2");
|
|
CinderCore.registerEntityFallback(LimwaithWarrior.class, LOTREntityMoredain.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(LimwaithBoneWarrior.class, LOTREntityMoredain.class, "cinder_loe", "1.2");
|
|
CinderCore.registerEntityFallback(LimwaithBlowgunner.class, LOTREntityMoredain.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(LimwaithBannerBearer.class, LOTREntityMoredainBannerBearer.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(LimwaithChieftain.class, LOTREntityMoredainChieftain.class, "cinder_loe", "1.0");
|
|
|
|
//CinderCore.registerEntityFallback(LimwaithCrocodile.class, LOTREntityCrocodile.class, "cinder_loe", "1.2");
|
|
CinderCore.registerEntityFallback(FangornBear.class, LOTREntityBear.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(FangornWildBoar.class, LOTREntityWildBoar.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(FangornAuroch.class, LOTREntityAurochs.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(FangornElk.class, LOTREntityElk.class, "cinder_loe", "1.0");
|
|
CinderCore.registerEntityFallback(FangornWolf.class, EntityWolf.class, "cinder_loe", "1.0");
|
|
|
|
CinderCore.registerEntityFallback(ArnorSoldier.class, LOTREntityDunedain.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(ArnorSoldierArcher.class, LOTREntityDunedain.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(ArnorCaptain.class, LOTREntityDunedain.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(ArnorBannerBearer.class, LOTREntityDunedain.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(BattleNun.class, LOTREntityDunedain.class, "cinder_loe", "1.1");
|
|
|
|
CinderCore.registerEntityFallback(BreeSoldier.class, LOTREntityBreeMan.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(BreeCrossbowman.class, LOTREntityBreeMan.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(BreeCaptain.class, LOTREntityBreeMan.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(BreeSoldierBannerBearer.class, LOTREntityBreeMan.class, "cinder_loe", "1.1");
|
|
CinderCore.registerEntityFallback(BreeOutrider.class, LOTREntityBreeMan.class, "cinder_loe", "1.1");
|
|
|
|
CinderCore.registerCustomFallback(42, 16, "banner", "cinder_loe", "1.2");
|
|
CinderCore.registerCustomFallback(43, 16, "banner", "cinder_loe", "1.2.4");
|
|
CinderCore.registerCustomFallback(44, 16, "banner", "cinder_loe", "1.2.4");
|
|
CinderCore.registerCustomFallback(45, 16, "banner", "cinder_loe", "1.2.4");
|
|
CinderCore.registerCustomFallback(46, 16, "banner", "cinder_loe", "1.2.4");
|
|
}
|
|
|
|
// Create unit trade entries here, out of the way of important code
|
|
public void setupTradeEntries() {
|
|
RED_DWARF_COMMANDER = new LOTRUnitTradeEntries(200.0F, new LOTRUnitTradeEntry[]{
|
|
new LOTRUnitTradeEntry(LOTREntityDwarf.class, 20, 0.0F),
|
|
(new LOTRUnitTradeEntry(RedDwarfWarrior.class, 30, 50.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.ANY_DWARF),
|
|
(new LOTRUnitTradeEntry(RedDwarfArbalest.class, 50, 100.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.ANY_DWARF),
|
|
(new LOTRUnitTradeEntry(RedDwarfWarrior.class, LOTREntityWildBoar.class, "RedDwarfWarrior_Boar", 50, 150.0F)).setMountArmor(boarArmorRedDwarf).setPledgeType(LOTRUnitTradeEntry.PledgeType.ANY_DWARF),
|
|
(new LOTRUnitTradeEntry(RedDwarfArbalest.class, LOTREntityWildBoar.class, "RedDwarfArbalest_Boar", 70, 200.0F)).setMountArmor(boarArmorRedDwarf).setPledgeType(LOTRUnitTradeEntry.PledgeType.ANY_DWARF),
|
|
(new LOTRUnitTradeEntry(RedDwarfBannerBearer.class, 50, 200.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.ANY_DWARF) });
|
|
|
|
LIMWAITH_COMMANDER = new LOTRUnitTradeEntries(200.0F, new LOTRUnitTradeEntry[]{
|
|
new LOTRUnitTradeEntry(LimwaithWarrior.class, 30, 50.0F),
|
|
(new LOTRUnitTradeEntry(LimwaithBlowgunner.class, 50, 100.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(LimwaithBoneWarrior.class, 70, 200.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(LimwaithBannerBearer.class, 50, 200.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION) });
|
|
|
|
ARNOR_CAPTAIN = new LOTRUnitTradeEntries(200.0F, new LOTRUnitTradeEntry[]{
|
|
(new LOTRUnitTradeEntry(ArnorSoldier.class, 60, 250.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(ArnorSoldierArcher.class, 100, 300.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(ArnorSoldier.class, LOTREntityHorse.class, "Arnor_Horse", 100, 150.0F)).setMountArmor(horseArmorIron).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(ArnorSoldierArcher.class, LOTREntityHorse.class, "Arnor_Horse", 140, 200.0F)).setMountArmor(horseArmorIron).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(LOTREntityRangerNorth.class, 50, 0.0f)),
|
|
(new LOTRUnitTradeEntry(LOTREntityRangerNorth.class, LOTREntityHorse.class, "RangerNorth_Horse", 70, 100.0f)),
|
|
(new LOTRUnitTradeEntry(LOTREntityRangerNorthBannerBearer.class, 70, 150.0f)),
|
|
(new LOTRUnitTradeEntry(ArnorBannerBearer.class, 100, 400.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION) });
|
|
|
|
BREE_CAPTAIN = new LOTRUnitTradeEntries(150.0F, new LOTRUnitTradeEntry[]{
|
|
(new LOTRUnitTradeEntry(LOTREntityBreeGuard.class, 20, 0.0f)),
|
|
(new LOTRUnitTradeEntry(BreeSoldier.class, 60, 250.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(BreeCrossbowman.class, 100, 300.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(BreeOutrider.class, LOTREntityHorse.class, "Bree_Horse", 150, 400.0F)).setMountArmor(horseArmorIron).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION),
|
|
(new LOTRUnitTradeEntry(LOTREntityBreeBannerBearer.class, 40, 150.0f)),
|
|
(new LOTRUnitTradeEntry(BreeSoldierBannerBearer.class, 100, 400.0F)).setPledgeType(LOTRUnitTradeEntry.PledgeType.FACTION) });
|
|
}
|
|
|
|
|
|
public class DevCommand extends CommandBase {
|
|
/*
|
|
public static float box1 = -7F;
|
|
public static float box2 = -6F;
|
|
public static float box3 = -7F;
|
|
public static int box4 = 14;
|
|
public static int box5 = 0;
|
|
public static int box6 = 14;
|
|
*/
|
|
public static float box1 = -7F; // X position
|
|
public static float box2 = -6.5F; // Y position
|
|
public static float box3 = -7F; // Z position
|
|
public static int box4 = 14; // X Texture map size
|
|
public static int box5 = 0; // Y Texture map size
|
|
public static int box6 = 14; // Z Texture map size
|
|
|
|
@Override
|
|
public String getCommandName() {
|
|
return "dev"; // Command name
|
|
}
|
|
|
|
@Override
|
|
public String getCommandUsage(ICommandSender sender) {
|
|
return "/dev"; // Usage
|
|
}
|
|
|
|
@Override
|
|
public void processCommand(ICommandSender sender, String[] args) {
|
|
if (args.length < 1) {
|
|
sender.addChatMessage(new ChatComponentText("Usage: /dev <variable> <value>"));
|
|
return;
|
|
} else if (args.length < 2 && args[0].equals("print")) {
|
|
sender.addChatMessage(new ChatComponentText("Variable box1: " + box1));
|
|
sender.addChatMessage(new ChatComponentText("Variable box2: " + box2));
|
|
sender.addChatMessage(new ChatComponentText("Variable box3: " + box3));
|
|
sender.addChatMessage(new ChatComponentText("Variable box4: " + box4));
|
|
sender.addChatMessage(new ChatComponentText("Variable box5: " + box5));
|
|
sender.addChatMessage(new ChatComponentText("Variable box6: " + box6));
|
|
return;
|
|
}
|
|
|
|
|
|
String variableName = args[0];
|
|
String value = args[1];
|
|
|
|
try {
|
|
switch (variableName) {
|
|
case "box1":
|
|
box1 = Float.parseFloat(value);
|
|
break;
|
|
case "box2":
|
|
box2 = Float.parseFloat(value);
|
|
break;
|
|
case "box3":
|
|
box3 = Float.parseFloat(value);
|
|
break;
|
|
case "box4":
|
|
box4 = Integer.parseInt(value);
|
|
break;
|
|
case "box5":
|
|
box5 = Integer.parseInt(value);
|
|
break;
|
|
case "box6":
|
|
box6 = Integer.parseInt(value);
|
|
break;
|
|
default:
|
|
sender.addChatMessage(new ChatComponentText("Unknown variable."));
|
|
return;
|
|
}
|
|
sender.addChatMessage(new ChatComponentText(variableName + " set to " + value));
|
|
} catch (NumberFormatException e) {
|
|
sender.addChatMessage(new ChatComponentText("Invalid value format for " + variableName));
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean canCommandSenderUseCommand(ICommandSender sender) {
|
|
return true; // Here you can add permission checks if necessary
|
|
}
|
|
}
|
|
public int getRustedSwordID() {return 0;}
|
|
}
|