2
0
Fork 0

Fixing previous commit

main
Shinare 7 months ago
parent 3cb4184115
commit caf07ceae0

@ -1,5 +1,5 @@
modName = CinderLoE modName = CinderLoE
modVersion = 1.3.0 modVersion = 1.4.0
# This is a case-sensitive string to identify your mod. Convention is to use lower case. # This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId = cinder_loe modId = cinder_loe

@ -1,22 +0,0 @@
package com.zivilon.cinder_loe;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class CinderBlockMetaData extends ItemBlock {
public CinderBlockMetaData(Block block) {
super(block);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int damage) {
return damage;
}
@Override
public String getUnlocalizedName(ItemStack stack) {
return super.getUnlocalizedName() + "." + stack.getItemDamage();
}
}

@ -1,29 +0,0 @@
package com.zivilon.cinder_loe;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.world.World;
public class CinderDrinkRecipe
implements IRecipe {
@Override
public boolean matches(InventoryCrafting inv, World world) {
return false;
}
@Override
public ItemStack getCraftingResult(InventoryCrafting p_77572_1_) {
return null;
}
@Override
public int getRecipeSize() {
return 0;
}
@Override
public ItemStack getRecipeOutput() {
return null;
}
}

@ -1,445 +0,0 @@
package com.zivilon.cinder_loe;
import com.zivilon.cinder_loe.entity.corrupt.CorruptMan;
import com.zivilon.cinder_loe.items.BrokenHalo;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import lotr.common.LOTRMod;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper;
import lotr.common.item.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.DataWatcher;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.*;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S04PacketEntityEquipment;
import net.minecraft.network.play.server.S09PacketHeldItemChange;
import net.minecraft.network.play.server.S1CPacketEntityMetadata;
import net.minecraft.network.play.server.S19PacketEntityStatus;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import java.util.Random;
public class CinderEventHandler implements IFuelHandler {
private static final Random random = new Random();
public CinderEventHandler() {
FMLCommonHandler.instance().bus().register(this);
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.TERRAIN_GEN_BUS.register(this);
GameRegistry.registerFuelHandler(this);
}
@SubscribeEvent
public void onArrowLoose(ArrowLooseEvent event) {
Entity attacker = event.entityLiving;
if (attacker instanceof EntityPlayerMP player) {
ItemStack bow = player.getHeldItem();
if (bow != null && bow.isItemStackDamageable() && (bow.getItem() instanceof LOTRItemBow || bow.getItem() instanceof ItemBow)) {
float[] durabilityThresholds = {0.5f, 0.4f, 0.25f};
double[] probabilities = {0.0005, 0.001, 0.005}; // Corrected probabilities
// Corrected durabilityPercent calculation
float durabilityPercent = (float) (bow.getMaxDamage() - bow.getItemDamage()) / bow.getMaxDamage();
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
addNegativeModifier(bow, player, "bow");
break; // Exit loop once a modifier is added
}
}
}
}
}
@SubscribeEvent
public void onLivingAttack(LivingAttackEvent event) {
Entity attacker = event.source.getEntity();
if (attacker instanceof EntityPlayerMP player) {
ItemStack weapon = player.getHeldItem();
// smithing rework for melee
if (weapon != null && (weapon.getItem() instanceof LOTRItemSpear || weapon.getItem() instanceof LOTRItemSword || weapon.getItem() instanceof LOTRItemDagger || weapon.getItem() instanceof LOTRItemBattleaxe || weapon.getItem() instanceof LOTRItemHammer || weapon.getItem() instanceof ItemSword)) {
float[] durabilityThresholds = {0.5f, 0.4f, 0.25f};
double[] probabilities = {0.0005, 0.001, 0.005}; // Corrected probabilities
if (weapon.isItemStackDamageable()) {
// Corrected durabilityPercent calculation
float durabilityPercent = (float) (weapon.getMaxDamage() - weapon.getItemDamage()) / weapon.getMaxDamage();
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
addNegativeModifier(weapon, player, "weapon");
break; // Exit loop once a modifier is added
}
}
}
}
}
}
@SubscribeEvent
public void onLivingHurt(LivingHurtEvent event) {
if (event.entityLiving == null || event.source.getEntity() == null) {
return;
}
EntityLivingBase entity = event.entityLiving;
EntityLivingBase attacker = event.source.getEntity() instanceof EntityLivingBase ? (EntityLivingBase) event.source.getEntity() : null;
World world = entity.worldObj;
DamageSource source = event.source;
/* Blocking event handler removed and replaced with one in DamageEvent class. Temporarily stored for backup reasons.
if (event.entity instanceof EntityPlayer && !source.isUnblockable()) {
EntityPlayerMP player = (EntityPlayerMP) event.entity;
ItemStack sword = player.getHeldItem();
float playerYaw = player.getRotationYawHead();
float attackerYaw = attacker.getRotationYawHead();
// Normalize both angles to be within 0 - 360
playerYaw = (playerYaw + 360) % 360;
attackerYaw = (attackerYaw + 360) % 360;
// Calculate the angle difference
float angleDifference = Math.abs(playerYaw - attackerYaw);
if (angleDifference > 180) {
angleDifference = 360 - angleDifference;
}
ItemStack weapon = attacker.getHeldItem();
if (weapon != null) {
if (player.isBlocking() && angleDifference >= 135 && angleDifference <=225) {
float additionalDamage = 0.0f;
if (weapon.getItem() instanceof ItemAxe || weapon.getItem() instanceof LOTRItemAxe || weapon.getItem() instanceof LOTRItemBattleaxe) {
sword.damageItem((int) (event.ammount *1.5), player); // Axes deal 150% the Durability damage
player.clearItemInUse();
world.playSoundAtEntity(player, "random.anvil_land", 1F, 2F);
additionalDamage = 0.75f; // Only 25% Passes through
} else if (weapon.getItem() instanceof LOTRItemHammer) {
sword.damageItem((int) event.ammount, player); // Hammers bypass the block better, but only deal 100% of the durability damage
player.clearItemInUse();
world.playSoundAtEntity(player, "random.anvil_land", 1F, 2F);
additionalDamage = 0.5f; // Only 50% Passes through
} else {
additionalDamage = 0.0f; // 0% Damage Passes through
sword.damageItem((int) (event.ammount/2), player); //Swords only deal 50% of durability damage
player.clearItemInUse();
world.playSoundAtEntity(player, "random.anvil_land", 1F, 2F);
}
float newDamage = event.ammount * (additionalDamage); // Calculate new damage
float newHealth = player.getHealth() - (newDamage - event.ammount); // Calculate health after applying extra damage
if (newHealth > 0) {
player.setHealth(newHealth);
event.setCanceled(true);
} else {
event.ammount = player.getHealth(); // Ensure player dies if health reaches 0 or below
}
}
}
}
*/
// Negative Arrow Protection Handler
if (!event.entityLiving.worldObj.isRemote && event.source.isProjectile() && event.entityLiving instanceof EntityPlayerMP player) {
// player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "DEBUG: Initial Damage: " + event.ammount));
float totalAdditionalDamage = 0.0f; // Initialize total additional damage
for (int i = 0; i < 4; i++) {
ItemStack armor = player.getEquipmentInSlot(i + 1);
if (armor != null) {
LOTREnchantment protectRangedWeak1 = LOTREnchantment.getEnchantmentByName("protectRangedWeak1");
LOTREnchantment protectRangedWeak2 = LOTREnchantment.getEnchantmentByName("protectRangedWeak2");
if (LOTREnchantmentHelper.hasEnchant(armor, protectRangedWeak1)) {
float additionalDamage = 0.2f; // 20% more damage per piece
totalAdditionalDamage += additionalDamage; // Accumulate damage increase
}
if (LOTREnchantmentHelper.hasEnchant(armor, protectRangedWeak2)) {
float additionalDamage = 0.4f; // 40% more damage per piece
totalAdditionalDamage += additionalDamage; // Accumulate damage increase
}
}
}
// Apply total additional damage
if (totalAdditionalDamage > 0) {
float newDamage = event.ammount * (1 + totalAdditionalDamage); // Calculate new damage
float newHealth = player.getHealth() - (newDamage - event.ammount); // Calculate health after applying extra damage
if (newHealth > 0) {
player.setHealth(newHealth);
event.setCanceled(true);
} else {
event.ammount = player.getHealth(); // Ensure player dies if health reaches 0 or below
}
// player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "DEBUG: Total Additional Damage: " + newDamage));
}
}
// Broken Halo Event handler
if (attacker != null && event.source.getSourceOfDamage() == attacker) {
ItemStack helmet = entity.getEquipmentInSlot(4);
if (helmet != null && helmet.getItem() instanceof BrokenHalo) {
if (random.nextDouble() <= 0.25) {
// Summon Corrupt Civilian NPC
CorruptMan spawnedEntity = new CorruptMan(world);
spawnedEntity.copyLocationAndAnglesFrom(attacker);
// Randomly select main weapon
ItemStack mainWeapon = getRandomWeapon();
spawnedEntity.npcItemsInv.setIdleItem(mainWeapon);
spawnedEntity.npcItemsInv.setMeleeWeapon(mainWeapon);
spawnedEntity.setHealth(10);
spawnedEntity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 9999, 0));
spawnedEntity.onSpawnWithEgg(null);
world.spawnEntityInWorld(spawnedEntity);
world.playAuxSFXAtEntity(null, 1016, (int) spawnedEntity.posX, (int) spawnedEntity.posY, (int) spawnedEntity.posZ, 0);
world.playSoundAtEntity(entity, "mob.zombie.unfect", 1F, 1F);
}
}
}
// Smithing Rework event handler
if (attacker instanceof EntityPlayerMP player) {
ItemStack weapon = player.getHeldItem();
// smithing rework for melee
if (weapon !=null && (weapon.getItem() instanceof LOTRItemSpear || weapon.getItem() instanceof LOTRItemSword || weapon.getItem() instanceof LOTRItemDagger || weapon.getItem() instanceof LOTRItemBattleaxe || weapon.getItem() instanceof LOTRItemHammer || weapon.getItem() instanceof ItemSword)) {
float[] durabilityThresholds = {0.6f, 0.5f, 0.4f};
double[] probabilities = {0.02, 0.05, 0.1};
if (weapon.isItemStackDamageable()) {
float durabilityPercent = (float) (weapon.getMaxDamage() - weapon.getItemDamage() / weapon.getMaxDamage());
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
addNegativeModifier(weapon, player, "weapon");
break; // Exit loop once a modifier is added
}
}
}
}
}
if (entity instanceof EntityPlayerMP player) {
// Durability thresholds and corresponding probabilities for adding a negative modifier
float[] durabilityThresholds = {0.6f, 0.5f, 0.4f};
double[] probabilities = {0.02, 0.05, 0.1};
for (int i = 0; i < 4; ++i) {
ItemStack armor = player.getEquipmentInSlot(i + 1);
if (armor != null && armor.isItemStackDamageable()) {
float durabilityPercent = (float) (armor.getMaxDamage() - armor.getItemDamage()) / armor.getMaxDamage();
// Check each threshold and apply negative modifier if conditions are met
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
addNegativeModifier(armor, player, "armor");
break; // Exit loop once a modifier is added
}
}
}
}
}
}
private void sendNegativeModifierMessage(EntityPlayerMP player, String type) {
player.addChatMessage(new ChatComponentText(
EnumChatFormatting.RED + "Your " +
EnumChatFormatting.GOLD + type +
EnumChatFormatting.RED + " has received a negative modifier!"
));
}
private void playNegativeModifierSound(World world, double x, double y, double z) {
world.playSoundEffect(x, y, z, "mob.irongolem.hit", 1.0F, 2.0F);
}
private void addNegativeModifier(ItemStack item, EntityPlayerMP player, String type) {
NBTTagCompound tag = item.getTagCompound();
if (tag == null) {
tag = new NBTTagCompound();
item.setTagCompound(tag);
}
if (!tag.hasKey("LOTREnch")) {
tag.setTag("LOTREnch", new NBTTagList());
}
NBTTagList enchList = tag.getTagList("LOTREnch", 8); // 8 is the type for strings
boolean protectWeakUpgraded = false;
boolean protectRangedWeakUpgraded = false;
boolean upgraded = false;
boolean meleeSwift = false;
boolean meleeReach = false;
if (type.equals("armor")) {
// First, iterate and upgrade if necessary
for (int i = 0; i < enchList.tagCount(); i++) {
String ench = enchList.getStringTagAt(i);
switch (ench) {
case "protectWeak1" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("protectWeak2"));
protectWeakUpgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Armor");
}
case "protectRangedWeak1" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("protectRangedWeak2"));
protectRangedWeakUpgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Armor");
}
case "protectWeak2" -> protectWeakUpgraded = true;
case "protectRangedWeak2" -> protectRangedWeakUpgraded = true;
}
}
// After upgrading, check if we need to add a new modifier
if (!protectWeakUpgraded || !protectRangedWeakUpgraded) {
// Separate conditions for adding new modifiers
if (!protectWeakUpgraded && !protectRangedWeakUpgraded) {
// Randomly add either protectWeak1 or protectRangedWeak1
String[] possibleModifiers = {"protectWeak1", "protectRangedWeak1"};
String newModifier = possibleModifiers[random.nextInt(possibleModifiers.length)];
enchList.appendTag(new NBTTagString(newModifier));
} else if (!protectWeakUpgraded) {
// Only protectWeak1 is added
enchList.appendTag(new NBTTagString("protectWeak1"));
} else if (!protectRangedWeakUpgraded) {
// Only protectRangedWeak1 is added
enchList.appendTag(new NBTTagString("protectRangedWeak1"));
}
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Armor");
}
tag.setTag("LOTREnch", enchList);
} else if (type.equals("bow")) {
for (int i = 0; i < enchList.tagCount(); i++) {
String ench = enchList.getStringTagAt(i);
switch (ench) {
case "rangedWeak1" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("rangedWeak2"));
upgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Bow");
}
case "rangedWeak2" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("rangedWeak3"));
upgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Bow");
}
case "rangedWeak3" -> upgraded = true;
}
}
if (!upgraded) {
// Randomly add either rangedWeak1... etc
String[] possibleModifiers = {"rangedWeak1", "rangedWeak2", "rangedWeak3"};
String newModifier = possibleModifiers[random.nextInt(possibleModifiers.length)];
enchList.appendTag(new NBTTagString(newModifier));
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Weapon");
}
} else if (type.equals("weapon")) {
// First, iterate and upgrade if necessary
for (int i = 0; i < enchList.tagCount(); i++) {
String ench = enchList.getStringTagAt(i);
switch (ench) {
case "weak1" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("weak2"));
upgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Weapon");
}
case "weak3" -> {
enchList.removeTag(i);
enchList.appendTag(new NBTTagString("weak4"));
upgraded = true;
i--; // Adjust index after removal
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Weapon");
}
case "weak4" -> upgraded = true;
case "meleeSlow1" -> meleeSwift = true;
case "meleeUnreach1" -> meleeReach = true;
}
}
// After upgrading, check if we need to add a new modifier
if (!upgraded || !meleeSwift || !meleeReach) {
// Separate conditions for adding new modifiers
if (!upgraded && !meleeSwift && !meleeReach) {
// Randomly add one of the possible modifiers
String[] possibleModifiers = {"weak1", "weak2", "weak3", "weak4", "meleeSlow1", "meleeUnreach1"};
String newModifier = possibleModifiers[random.nextInt(possibleModifiers.length)];
enchList.appendTag(new NBTTagString(newModifier));
} else if (!upgraded) {
// Only weak modifier is added
String[] weakModifiers = {"weak1", "weak2", "weak3", "weak4"};
String newModifier = weakModifiers[random.nextInt(weakModifiers.length)];
enchList.appendTag(new NBTTagString(newModifier));
} else if (!meleeSwift) {
// Only meleeSlow1 is added
enchList.appendTag(new NBTTagString("meleeSlow1"));
} else if (!meleeReach) {
// Only meleeUnreach1 is added
enchList.appendTag(new NBTTagString("meleeUnreach1"));
}
playNegativeModifierSound(player.worldObj, player.posX, player.posY, player.posZ);
sendNegativeModifierMessage(player, "Weapon");
}
tag.setTag("LOTREnch", enchList);
}
}
private ItemStack getRandomWeapon() {
Item[] weapons = new Item[]{LOTRMod.blacksmithHammer, LOTRMod.daggerIron, LOTRMod.dunlendingTrident, LOTRMod.battleaxeBronze, CinderLoE.cleaver};
return new ItemStack(weapons[random.nextInt(weapons.length)]);
}
@Override
public int getBurnTime(ItemStack fuel) {
return 0;
}
}

File diff suppressed because it is too large Load Diff

@ -1,63 +0,0 @@
package com.zivilon.cinder_loe;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import java.io.File;
import lotr.common.fac.LOTRFaction;
import net.minecraftforge.common.config.Configuration;
public class CinderLoE_Config {
public static Configuration config;
public static float enchantment_color_red;
public static float enchantment_color_green;
public static float enchantment_color_blue;
public static String corrupt_faction;
public static boolean objective_lindon;
public static boolean objective_arnor;
public static boolean objective_angmar;
public static boolean objective_durin;
public static boolean objective_dolguldur;
public static boolean objective_woodelf;
public static boolean objective_lothlorien;
public static boolean objective_dale;
public static boolean objective_rhudaur;
public static void init(FMLPreInitializationEvent event) {
File configFile = new File(event.getModConfigurationDirectory(), "CinderLoE.cfg");
config = new Configuration(configFile);
syncConfig();
}
public static void syncConfig() {
try {
// Load the configuration file
config.load();
// Read properties, define categories and keys
enchantment_color_red = config.getFloat("EnchantmentColorRed", Configuration.CATEGORY_GENERAL, 0.38f, 0.0f, 1.0f, "Configure red color for enchantments");
enchantment_color_green = config.getFloat("EnchantmentColorGreen", Configuration.CATEGORY_GENERAL, 0.19f, 0.0f, 1.0f, "Configure green color for enchantments");
enchantment_color_blue = config.getFloat("EnchantmentColorBlue", Configuration.CATEGORY_GENERAL, 0.608f, 0.0f, 1.0f, "Configure blue color for enchantments");
corrupt_faction = config.getString("CorruptFaction", Configuration.CATEGORY_GENERAL, "MORDOR", "Configure the alignment the Corrupt npcs follow");
objective_lindon = config.getBoolean("Lindon", Configuration.CATEGORY_GENERAL, false, "set true if Lindon Objective Complete");
objective_arnor = config.getBoolean("Arnor", Configuration.CATEGORY_GENERAL, false,"set true if Arnor Objective Complete");
objective_angmar = config.getBoolean("Angmar", Configuration.CATEGORY_GENERAL, false, "set true if Angmar Objective Complete");
objective_durin = config.getBoolean("Durin", Configuration.CATEGORY_GENERAL, false, "set true if Durin Objective Complete");
objective_dolguldur = config.getBoolean("Dol_Guldur", Configuration.CATEGORY_GENERAL, false,"set true if Dol Guldur Objective Complete");
objective_woodelf = config.getBoolean("Wood_Elf", Configuration.CATEGORY_GENERAL, false, "set true if Wood Elf Objective Complete");
objective_lothlorien = config.getBoolean("Lothlorien", Configuration.CATEGORY_GENERAL, false, "set true if Lothlorien Objective Complete");
objective_dale = config.getBoolean("Dale", Configuration.CATEGORY_GENERAL, false, "set true if Dalish Objective Complete");
objective_rhudaur = config.getBoolean("Rhudaur", Configuration.CATEGORY_GENERAL, false, "set true if Rhudaur Objective Complete");
// Save the configuration if it has changed
if (config.hasChanged()) {
config.save();
}
} catch (Exception e) {
}
}
}

@ -1,44 +0,0 @@
package com.zivilon.cinder_loe;
import lotr.common.LOTRMod;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.Random;
public class CinderShapelessOreRecipe extends ShapelessOreRecipe {
public CinderShapelessOreRecipe(ItemStack result, Object... recipe) {
super(result, recipe);
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inv) {
ItemStack result = super.getCraftingResult(inv).copy();
for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if (stack != null && stack.getItem() == LOTRMod.rollingPin) {
stack = stack.copy();
stack.attemptDamageItem(1, new Random());
if (stack.getItemDamage() > stack.getMaxDamage()) {
stack.stackSize -= 1;
}
inv.setInventorySlotContents(i, stack);
}
}
return result;
}
@Override
public boolean matches (InventoryCrafting inv, World world) {
return super.matches(inv, world);
}
@Override
public ItemStack getRecipeOutput() {
return super.getRecipeOutput();
}
}

@ -1,93 +0,0 @@
package com.zivilon.cinder_loe;
import lotr.common.LOTRLevelData;
import lotr.common.entity.LOTREntities;
import lotr.common.entity.npc.LOTRBannerBearer;
import lotr.common.entity.npc.LOTRHireableBase;
import lotr.common.entity.npc.LOTRUnitTradeEntry;
import lotr.common.fac.LOTRFaction;
import lotr.common.item.LOTRItemCoin;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
public class CinderUnitTradeEntry extends LOTRUnitTradeEntry {
public Class entityClass;
private String name;
private PledgeType pledgeType = PledgeType.NONE;
private String objectivename;
private static Configuration config;
private String extraInfo;
static {
config = new Configuration(new File("CinderLoE.cfg"));
config.load();
}
public CinderUnitTradeEntry(Class c, int cost, float alignment) {
super(c, cost, alignment);
this.entityClass = c; // Set entityClass to the passed class
if (LOTRBannerBearer.class.isAssignableFrom(this.entityClass)) {
this.setExtraInfo("Banner");
}
}
public CinderUnitTradeEntry(Class c, Class c1, String s, int cost, float alignment) {
super(c, cost, alignment);
this.entityClass = c; // Set entityClass to the passed class
this.mountClass = c1;
this.name = s;
}
public boolean isObjectiveComplete(String objective) {
return config.getBoolean(objective, Configuration.CATEGORY_GENERAL, false, "Set true if " + objective + " is complete");
}
@Override
public boolean hasRequiredCostAndAlignment(EntityPlayer entityplayer, LOTRHireableBase trader) {
int coins = LOTRItemCoin.getInventoryValue(entityplayer, false);
if (coins < this.getCost(entityplayer, trader)) {
return false;
}
LOTRFaction fac = trader.getFaction();
if (!this.pledgeType.canAcceptPlayer(entityplayer, fac)) {
return false;
}
if (objectivename != null && !isObjectiveComplete(objectivename)) {
return false;
}
float alignment = LOTRLevelData.getData(entityplayer).getAlignment(fac);
return alignment >= this.alignmentRequired;
}
public CinderUnitTradeEntry setObjective(String objective) {
this.objectivename = objective;
return this;
}
public String getFormattedExtraInfo() {
return StatCollector.translateToLocal((String) "lotr.unitinfo." + this.objectivename);
}
public LOTRUnitTradeEntry setExtraInfo(String s) {
this.extraInfo = s;
return this;
}
public boolean hasExtraInfo() {
return this.extraInfo != null;
}
public String getUnitTradeName() {
if (this.mountClass == null) {
String entityName = LOTREntities.getStringFromClass(this.entityClass);
return StatCollector.translateToLocal((String)("entity." + entityName + ".name"));
}
return StatCollector.translateToLocal((String)("lotr.unit." + this.name));
}
}

@ -1,51 +0,0 @@
package com.zivilon.cinder_loe;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry;
public class ItemRegistration {
public static FMLControlledNamespacedRegistry<Block> block_registry;
public static FMLControlledNamespacedRegistry<Item> item_registry;
static {
block_registry = GameData.getBlockRegistry();
item_registry = GameData.getItemRegistry();
}
public static List<SimpleEntry<Item, String>> list = new ArrayList<>();
@Deprecated
public static void registerItem(Item item, String item_name, int ordinal) {
while (list.size() <= ordinal) {
list.add(new SimpleEntry<>(null, null));
}
list.set(ordinal, new SimpleEntry<>(item, item_name));
}
// Register items in consistent order that persists through mod updates while enabling us to keep the item lists neatly organized.
// Unknown if this is actually necessary, but might help to prevent item ID shifts
public static void registerItems() {
for (int i = 0; i < list.size(); i++) {
SimpleEntry<Item, String> entry = list.get(i);
if (entry == null || entry.getKey() == null || entry.getValue() == null) {
break;
}
GameRegistry.registerItem(entry.getKey(), entry.getValue());
}
}
public static void register(Item item, String item_name, int id) {
item_registry.addObject(id, item_name, item);
}
public static void register(Block block, String item_name, int id) {
block_registry.addObject(id, item_name, block);
}
}

@ -1,49 +0,0 @@
package com.zivilon.cinder_loe;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class LoECreativeTabs extends CreativeTabs {
public static LoECreativeTabs tabBlockLoE = new LoECreativeTabs("tabBlockLoE");
public static LoECreativeTabs tabCombatLoE = new LoECreativeTabs("tabCombatLoE");
public static LoECreativeTabs tabSpawnLoE = new LoECreativeTabs("tabSpawnLoE");
public static LoECreativeTabs tabMiscLoE = new LoECreativeTabs("tabMiscLoE");
public static LoECreativeTabs tabFoodLoE = new LoECreativeTabs("tabFoodLoE");
public static LoECreativeTabs tabDecoLoE = new LoECreativeTabs("tabDecoLoE");
public static LoECreativeTabs tabCharacterLoE = new LoECreativeTabs("tabCharacterLoE");
public ItemStack theIcon;
public LoECreativeTabs(String label) {
super(label);
}
public static void setupIcons() {
tabBlockLoE.theIcon = new ItemStack(CinderLoE.fishBarrel);
tabCombatLoE.theIcon = new ItemStack(CinderLoE.swordAsh);
tabSpawnLoE.theIcon = new ItemStack(CinderLoE.spawnEgg);
tabMiscLoE.theIcon = new ItemStack(CinderLoE.bonemold);
tabFoodLoE.theIcon = new ItemStack(CinderLoE.onion);
tabDecoLoE.theIcon = new ItemStack(CinderLoE.goldChain);
tabCharacterLoE.theIcon = new ItemStack(CinderLoE.sarumanStaff);
}
@SideOnly(Side.CLIENT)
public String getTranslatedTabLabel() {
return StatCollector.translateToLocal("cinder_loe.creativetab." + getTabLabel());
}
@SideOnly(Side.CLIENT)
public Item getTabIconItem() {
return this.theIcon.getItem();
}
public ItemStack getIconItemStack() {
return this.theIcon;
}
}

@ -1,7 +0,0 @@
package com.zivilon.cinder_loe;
import net.minecraft.util.DamageSource;
public class LoEDamage {
public static DamageSource shadow = (new DamageSource("cinder_loe.shadow")).setDamageBypassesArmor().setMagicDamage();
}

@ -1,75 +0,0 @@
package com.zivilon.cinder_loe;
import lotr.common.LOTRMod;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import lotr.common.item.LOTRMaterial;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Field;
public class Materials {
public static void registerMaterials() {
modifyMaterial("RED_DWARF", 700, 3.0F, 0.7F, 3, 7.0F, 10, CinderLoE.redDwarfSteel);
modifyMaterial("WIZARD", 1000, 3.0F, 0.7F, 3, 7.0F, 10, null);
modifyMaterial("BONEMOLD", 512, 2.5F, 0.6F, 2, 6.0F, 10, CinderLoE.bonemold); //Original Durability = 350 | Add 81 | 162 if Upgraded Armory | 2/4 (Unupgraded)
modifyMaterial("LIMWAITH_WOOD", 230, 1.5F, 0.5F, 2, 5.0F, 10, Item.getItemFromBlock(LOTRMod.driedReeds));
modifyMaterial("EVENT", 2400, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald);
modifyMaterial("BREE", 350, 2.5F, 0.6F, 2, 6.0F, 10, Items.iron_ingot);
modifyMaterial("RHUDAUR", 300, 2.5F, 0.6F, 2, 6.0F, 10, LOTRMod.fur);
modifyMaterial("BATTLENUN", 300, 3F, 0.6F, 2, 6.0F, 10, Items.iron_ingot);
modifyMaterial("ASH", 2000, 0.0F, 0.6F, 2, 7.0F, 10, CinderLoE.ingotAsh);
modifyMaterial("SERPENT", 650, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze);
modifyMaterial("USURPER",650, 2.0F, 0.6F, 2, 6.0F, 10, Items.iron_ingot);
modifyMaterial("WARLORD", 650, 2.0F, 0.6F, 2, 6.0F, 10, LOTRMod.bronze);
modifyMaterial("JADE",2400, 5.0F, 0.8F, 0, 9.0F, 10, LOTRMod.emerald);
}
public static void modifyMaterial(String fieldName, int uses, float weapon_damage, float protection, int harvest_level, float speed, int enchantability, Item crafting_item) {
try {
Class<?> lotrMaterialClass = Class.forName("lotr.common.item.LOTRMaterial");
Field materialField = lotrMaterialClass.getField(fieldName);
// Reflection to access and instantiate the private constructor of LOTRMaterial
Constructor<?> constructor = lotrMaterialClass.getDeclaredConstructor(String.class);
constructor.setAccessible(true);
Object materialLocal = constructor.newInstance(fieldName);
// Reflection to call the private methods on the new instance
Method setUses = lotrMaterialClass.getDeclaredMethod("setUses", int.class);
Method setDamage = lotrMaterialClass.getDeclaredMethod("setDamage", float.class);
Method setProtection = lotrMaterialClass.getDeclaredMethod("setProtection", float.class);
Method setHarvestLevel = lotrMaterialClass.getDeclaredMethod("setHarvestLevel", int.class);
Method setSpeed = lotrMaterialClass.getDeclaredMethod("setSpeed", float.class);
Method setEnchantability = lotrMaterialClass.getDeclaredMethod("setEnchantability", int.class);
Method setCraftingItem = lotrMaterialClass.getDeclaredMethod("setCraftingItem", Item.class);
// Method setManFlesh = lotrMaterialClass.getDeclaredMethod("canHarvestManFlesh", boolean.class);
setUses.setAccessible(true);
setDamage.setAccessible(true);
setProtection.setAccessible(true);
setHarvestLevel.setAccessible(true);
setSpeed.setAccessible(true);
setEnchantability.setAccessible(true);
setCraftingItem.setAccessible(true);
// setManFlesh.setAccessible(true);
setUses.invoke(materialLocal, uses);
setDamage.invoke(materialLocal, weapon_damage);
setProtection.invoke(materialLocal, protection);
setHarvestLevel.invoke(materialLocal, harvest_level);
setSpeed.invoke(materialLocal, speed);
setEnchantability.invoke(materialLocal, enchantability);
// setManFlesh.invoke(materialLocal, canHarvestManFlesh);
if (crafting_item != null) {
setCraftingItem.invoke(materialLocal, crafting_item);
}
materialField.set(null, materialLocal);
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -1,107 +0,0 @@
package com.zivilon.cinder_loe;
import java.util.List;
import java.util.ArrayList;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.ShapelessRecipes;
import net.minecraft.world.World;
import net.minecraft.item.crafting.IRecipe;
public class ShapelessDurabilityRecipe implements IRecipe {
private final ItemStack recipeOutput;
private final List<ItemStack> recipeItems;
private final Item toolItem;
public ShapelessDurabilityRecipe(ItemStack result, Item toolItem, ItemStack... ingredients) {
this.recipeOutput = result;
this.recipeItems = new ArrayList<>(ingredients.length);
for (ItemStack ingredient : ingredients) {
this.recipeItems.add(ingredient);
}
this.toolItem = toolItem;
System.out.println("[CinderLoE] Created ShapelessDurabilityRecipe for: " + result.getUnlocalizedName());
System.out.println("[CinderLoE] Ingredients: " + this.recipeItems);
}
@Override
public boolean matches(InventoryCrafting inv, World worldIn) {
System.out.println("[CinderLoE] Checking matches for ShapelessDurabilityRecipe");
boolean hasTool = false;
List<ItemStack> ingredientsCopy = new ArrayList<>(this.recipeItems);
for (int i = 0; i < inv.getSizeInventory(); ++i) {
ItemStack stack = inv.getStackInSlot(i);
if (stack != null) {
if (stack.getItem() == toolItem) {
hasTool = true;
} else {
boolean matched = false;
for (ItemStack recipeStack : ingredientsCopy) {
if (stack.getItem() == recipeStack.getItem() && (recipeStack.getItemDamage() == 32767 || stack.getItemDamage() == recipeStack.getItemDamage())) {
matched = true;
ingredientsCopy.remove(recipeStack);
break;
}
}
if (!matched) {
System.out.println("[CinderLoE] Ingredient did not match: " + stack);
return false;
}
}
}
}
boolean matches = hasTool && ingredientsCopy.isEmpty();
System.out.println("[CinderLoE] ShapelessDurabilityRecipe match result: " + matches + ", has tool: " + hasTool);
return matches;
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inv) {
System.out.println("[CinderLoE] Getting crafting result for ShapelessDurabilityRecipe");
return this.recipeOutput.copy();
}
@Override
public int getRecipeSize() {
return this.recipeItems.size();
}
@Override
public ItemStack getRecipeOutput() {
return this.recipeOutput;
}
public ItemStack[] getRemainingItems(InventoryCrafting inv) {
System.out.println("[CinderLoE] Getting remaining items for ShapelessDurabilityRecipe");
ItemStack[] remainingItems = new ItemStack[inv.getSizeInventory()];
for (int i = 0; i < remainingItems.length; ++i) {
ItemStack itemstack = inv.getStackInSlot(i);
if (itemstack != null && itemstack.getItem() == toolItem) {
ItemStack tool = itemstack.copy();
tool.setItemDamage(tool.getItemDamage() + 1);
System.out.println("[CinderLoE] Damaging tool: " + tool.getUnlocalizedName() + " | New Damage: " + tool.getItemDamage());
if (tool.getItemDamage() >= tool.getMaxDamage()) {
System.out.println("[CinderLoE] Tool is out of durability, breaking: " + tool.getUnlocalizedName());
tool = null;
}
remainingItems[i] = tool;
} else if (itemstack != null && itemstack.getItem().hasContainerItem(itemstack)) {
System.out.println("[CinderLoE] Consuming non-tool item " + itemstack.getUnlocalizedName());
remainingItems[i] = itemstack.getItem().getContainerItem(itemstack);
} else {
remainingItems[i] = itemstack;
}
}
return remainingItems;
}
}

@ -1,56 +0,0 @@
// File: SwiftnessHandler.java
package com.zivilon.cinder_loe;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingEvent;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import java.util.UUID;
public class SwiftnessHandler {
// Use fixed UUIDs to prevent stacking
private static final UUID[] SWIFTNESS_UUIDS = new UUID[]{
UUID.fromString("123e4567-e89b-12d3-a456-426614174001"), // boots
UUID.fromString("123e4567-e89b-12d3-a456-426614174002"), // leggings
UUID.fromString("123e4567-e89b-12d3-a456-426614174003"), // chestplate
UUID.fromString("123e4567-e89b-12d3-a456-426614174004") // helmet
};
private static final String[] MODIFIER_NAMES = new String[]{
"SwiftnessBoots", "SwiftnessLegs", "SwiftnessChest", "SwiftnessHelm"
};
@SubscribeEvent
public void onPlayerTick(LivingEvent.LivingUpdateEvent event) {
if (!(event.entityLiving instanceof EntityPlayer)) return;
EntityPlayer player = (EntityPlayer) event.entityLiving;
for (int i = 0; i < player.inventory.armorInventory.length; i++) {
ItemStack armor = player.inventory.armorInventory[i];
UUID uuid = SWIFTNESS_UUIDS[i];
String label = MODIFIER_NAMES[i];
// Get movement speed attribute
IAttributeInstance attr = player.getEntityAttribute(SharedMonsterAttributes.movementSpeed);
AttributeModifier existingMod = attr.getModifier(uuid);
if (armor != null && LOTREnchantmentHelper.hasEnchant(armor, LOTREnchantment.getEnchantmentByName("swiftness"))) {
if (existingMod == null) {
AttributeModifier mod = new AttributeModifier(uuid, label, 0.05, 1);
attr.applyModifier(mod);
}
} else {
if (existingMod != null) {
attr.removeModifier(existingMod);
}
}
}
}
}

@ -1,52 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPane;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockOrcChain;
import lotr.common.block.LOTRBlockPane;
import com.zivilon.cinder_loe.util.Utilities;
public abstract class BarsBase extends BlockPane {
public String textureName;
protected IIcon icon;
public BarsBase(String blockName) {
super("", "", Material.iron, true);
this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(5.0F);
setResistance(10.0F);
setStepSound(Block.soundTypeMetal);
}
public void registerBlockIcons(IIconRegister iconregister) {
this.icon = iconregister.registerIcon(textureName);
System.out.println("Registering texture " + textureName);
}
public IIcon getIcon() {
return this.icon;
}
public IIcon getIcon(int i, int j) {
return this.icon;
}
public IIcon func_150097_e() {
return this.icon;
}
}

@ -1,32 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import lotr.common.LOTRCreativeTabs;
import java.lang.reflect.Field;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockRedDwarfSteel extends Block {
public BlockRedDwarfSteel() {
super(Material.iron); // Choose the appropriate material
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(5.0F);
setResistance(15.0F);
setStepSound(Block.soundTypeMetal);
setBlockTextureName("lotr:red_dwarf_steel");
setBlockName("lotr:blockRedDwarfSteel");
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:red_dwarf_steel");
}
}

@ -1,106 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockOrcChain;
import com.zivilon.cinder_loe.util.Utilities;
public abstract class ChandelierBase extends Block {
public String textureName;
public IIcon icon;
public ChandelierBase(String blockName) {
super(Material.circuits);
this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(0.0F);
setResistance(2.0F);
setStepSound(Block.soundTypeMetal);
setLightLevel(0.9375F);
setBlockBounds(0.0625F, 0.1875F, 0.0625F, 0.9375F, 1.0F, 0.9375F);
}
public IIcon getIcon(int i, int j) {
return this.icon;
}
@Override
public void registerBlockIcons(IIconRegister reg) {
icon = reg.registerIcon(this.textureName);
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return 1;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k) {
return null;
}
public boolean canBlockStay(World world, int i, int j, int k) {
Block block = world.getBlock(i, j + 1, k);
int meta = world.getBlockMetadata(i, j + 1, k);
if (block instanceof net.minecraft.block.BlockFence || block instanceof net.minecraft.block.BlockWall)
return true;
if (block instanceof net.minecraft.block.BlockSlab && !block.isOpaqueCube() && (meta & 0x8) == 0)
return true;
if (block instanceof net.minecraft.block.BlockStairs && (meta & 0x4) == 0)
return true;
if (block instanceof LOTRBlockOrcChain)
return true;
return world.getBlock(i, j + 1, k).isSideSolid((IBlockAccess)world, i, j + 1, k, ForgeDirection.DOWN);
}
public boolean canPlaceBlockAt(World world, int i, int j, int k) {
return canBlockStay(world, i, j, k);
}
public void onNeighborBlockChange(World world, int i, int j, int k, Block block) {
if (!canBlockStay(world, i, j, k)) {
dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k), 0);
world.setBlockToAir(i, j, k);
}
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int i, int j, int k, Random random) {
double d = 0.13D;
double d1 = 1.0D - d;
double d2 = 0.6875D;
spawnChandelierParticles(world, i + d, j + d2, k + d);
spawnChandelierParticles(world, i + d1, j + d2, k + d1);
spawnChandelierParticles(world, i + d, j + d2, k + d1);
spawnChandelierParticles(world, i + d1, j + d2, k + d);
}
private void spawnChandelierParticles(World world, double d, double d1, double d2) {
world.spawnParticle("smoke", d, d1, d2, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", d, d1, d2, 0.0D, 0.0D, 0.0D);
}
}

@ -1,37 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.lang.reflect.Field;
public class CinderBlock extends Block {
public CinderBlock() {
super(Material.rock);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName("lotr:cinder_block");
setBlockName("lotr:cinderBlock");
setLightLevel(0.25F);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:cinder_block");
}
@Override
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
entity.setFire(20);
}
}

@ -1,149 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.List;
public class CinderChain extends LOTRBlockOrcChain {
public static final String[] chainTypes = {"bronze", "gold", "silver", "iron"};
@SideOnly(value= Side.CLIENT)
private IIcon[] iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon[] iconSingle;
@SideOnly(Side.CLIENT)
private IIcon[] iconItem;
public CinderChain() {
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
setBlockName("lotr:cinderchain");
setBlockTextureName("lotr:cinderchain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconItem = new IIcon[chainTypes.length];
for (int i = 0; i < chainTypes.length; ++i) {
this.iconItem[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_item");
}
this.iconMiddle = new IIcon[chainTypes.length];
this.iconTop = new IIcon[chainTypes.length];
this.iconBottom = new IIcon[chainTypes.length];
this.iconSingle = new IIcon[chainTypes.length];
for (int i = 0; i < chainTypes.length; ++i) {
this.iconMiddle[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_mid");
this.iconTop[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_top");
this.iconBottom[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_bottom");
this.iconSingle[i] = iconRegister.registerIcon(this.getTextureName() + "_" + chainTypes[i] + "_single");
}
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
Block above = world.getBlock(x, y + 1, z);
Block below = world.getBlock(x, y - 1, z);
boolean chainAbove = above instanceof CinderChain;
boolean chainBelow = below instanceof CinderChain;
int meta = world.getBlockMetadata(x, y, z);
if (chainAbove && chainBelow) {
return this.iconMiddle[meta];
}
if (chainAbove) {
return this.iconBottom[meta];
}
if (chainBelow) {
return this.iconTop[meta];
}
return this.iconSingle[meta];
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return i == 1 ? this.iconItem[0] : this.iconItem[1];
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
@Override
public int damageDropped(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < chainTypes.length; ++i) {
list.add(new ItemStack(item, 1, i));
}
}
@Override
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) {
// The metadata provided here is the metadata of the block being placed (from the item stack).
return metadata; // Return the metadata of the block that should be placed.
}
@Override
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
Block blockAbove = world.getBlock(x, y + 1, z);
int metaAbove = world.getBlockMetadata(x, y + 1, z);
// Get the metadata of the block to be placed (already handled by onBlockPlaced)
int currentMeta = world.getBlockMetadata(x, y, z); // Metadata of the block being placed
// Check if the block above is a chain block and if the metadata matches
if (blockAbove instanceof CinderChain) {
if (metaAbove != currentMeta) {
return false; // Prevent placement of different types of chains
}
return true; // Same type, allow placement
}
// Other checks for fences, walls, slabs, etc.
if (blockAbove instanceof BlockFence || blockAbove instanceof BlockWall) {
return true;
}
if (blockAbove instanceof BlockSlab && !blockAbove.isOpaqueCube() && (metaAbove & 8) == 0) {
return true;
}
if (blockAbove instanceof BlockStairs && (metaAbove & 4) == 0) {
return true;
}
// Check if the block above is solid on the bottom
return blockAbove.isSideSolid(world, x, y + 1, z, ForgeDirection.DOWN);
}
}

@ -1,64 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockBrickBase;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.lang.reflect.Field;
import java.util.List;
public class CinderFurBlock extends Block {
protected IIcon[] brickIcons;
protected String[] brickNames;
public CinderFurBlock() {
super(Material.cloth);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setBlockTextureName("lotr:cinderfur");
setBlockName("lotr:cinderfur");
setStepSound(Block.soundTypeCloth);
this.setBrickNames("brown", "gray", "black", "white", "obsidian", "bearblack", "bearbrown", "lion", "lioness");
}
protected void setBrickNames(String ... names) {
this.brickNames = names;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconregister) {
this.brickIcons = new IIcon[this.brickNames.length];
for (int i = 0; i < this.brickNames.length; ++i) {
String texturePath = this.getTextureName() + "_" + this.brickNames[i];
System.out.println("Registering texture: " + texturePath); // Debug log
this.brickIcons[i] = iconregister.registerIcon(texturePath);
}
}
@Override
public IIcon getIcon(int side, int meta) {
return this.brickIcons[meta];
}
@Override
public int damageDropped(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < this.brickNames.length; ++i) {
list.add(new ItemStack(item, 1, i));
}
}
}

@ -1,66 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import lotr.common.block.LOTRBlockBrickBase;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.lang.reflect.Field;
import java.util.List;
public class CobbleBlock extends Block {
protected IIcon[] brickIcons;
protected String[] brickNames;
public CobbleBlock() {
super(Material.rock);
this.setHardness(1.5f);
this.setResistance(10.0f);
this.setStepSound(Block.soundTypeStone);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setBlockTextureName("lotr:cindercobble");
setBlockName("lotr:cindercobble");
this.setBrickNames("drystone", "mordor", "silverbrick", "silvercobble");
}
protected void setBrickNames(String ... names) {
this.brickNames = names;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconregister) {
this.brickIcons = new IIcon[this.brickNames.length];
for (int i = 0; i < this.brickNames.length; ++i) {
String texturePath = this.getTextureName() + "_" + this.brickNames[i];
System.out.println("Registering texture: " + texturePath); // Debug log
this.brickIcons[i] = iconregister.registerIcon(texturePath);
}
}
@Override
public IIcon getIcon(int side, int meta) {
return this.brickIcons[meta];
}
@Override
public int damageDropped(int meta) {
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for (int i = 0; i < this.brickNames.length; ++i) {
list.add(new ItemStack(item, 1, i));
}
}
}

@ -1,84 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.util.IIcon;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import java.lang.reflect.Field;
import java.util.List;
import net.minecraft.client.Minecraft;
import cpw.mods.fml.common.FMLCommonHandler;
public class EntityBarrier extends Block {
@SideOnly(Side.CLIENT)
public IIcon transparentIcon;
public EntityBarrier() {
super(Material.rock);
setHardness(Float.MAX_VALUE);
setResistance(Float.MAX_VALUE);
setBlockTextureName(Utilities.toSnakeCase("lotr:entityBarrier"));
setBlockName(Utilities.toSnakeCase("lotr:entityBarrier"));
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public int getRenderType() {
return -1;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.transparentIcon = iconRegister.registerIcon("lotr:invisible");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return this.transparentIcon;
}
@SideOnly(Side.CLIENT)
private boolean isPlayerInSurvivalModeClientSide() {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
return player != null && !player.capabilities.isCreativeMode;
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT && isPlayerInSurvivalModeClientSide()) {
this.setBlockBounds(0.5F, 1.0F, 0.5F, 0.5F, 0.0F, 0.5F); // Zero-sized bounding box for survival players
} else {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); // Full-sized bounding box for others
}
}
@Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity entity) {
if (entity instanceof EntityPlayer) {
return;
}
AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0F, y + 1.0F, z + 1.0F);
if (boundingBox != null && aabb.intersectsWith(boundingBox)) {
list.add(boundingBox);
}
}
}

@ -1,26 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.IIcon;
import java.lang.reflect.Field;
public class FishBarrel extends StaticBlockBase3 {
public FishBarrel() {
super(Material.wood, "lotr:fishbarrel");
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
setStepSound(Block.soundTypeWood);
setBlockName("lotr:fishbarrel");
setHardness(1.0F);
setResistance(2.0F);
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
}

@ -1,23 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import java.lang.reflect.Field;
public class FurBundle extends RotatableBlockBase3 {
public FurBundle() {
super(Material.cloth, "lotr:furBundle");
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
setStepSound(Block.soundTypeCloth);
setBlockName("lotr:furBundle");
setHardness(0.5F);
setResistance(0.5F);
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
}

@ -1,45 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCarpet;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import java.util.List;
public class FurCarpet extends BlockCarpet {
public FurCarpet()
{
super();
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F);
this.setTickRandomly(true);
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
this.func_150089_b(0);
setBlockName("lotr:cinderfurcarpet");
setStepSound(Block.soundTypeCloth);
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
return CinderLoE.cinderfur.getIcon(side, meta);
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list)
{
for (int i = 0; i < 9; ++i)
{
list.add(new ItemStack(itemIn, 1, i));
}
}
}

@ -1,17 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase2;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class IvoryBlock extends RotatableBlockBase2 {
public IvoryBlock() {
super(Material.rock, "lotr:ivoryBlock");
setStepSound(Block.soundTypeStone);
setBlockName("lotr:ivoryBlock");
setHardness(1.0F);
setResistance(5.0F);
}
}

@ -1,23 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import java.lang.reflect.Field;
public class LeatherBundle extends RotatableBlockBase3 {
public LeatherBundle() {
super(Material.cloth, "lotr:leatherBundle");
this.setCreativeTab(LoECreativeTabs.tabDecoLoE);
setStepSound(Block.soundTypeCloth);
setBlockName("lotr:leatherBundle");
setHardness(0.5F);
setResistance(0.5F);
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
}

@ -1,56 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import java.util.Random;
import lotr.common.LOTRDimension;
import lotr.common.block.LOTRBlockUtumnoPortal;
import lotr.common.tileentity.LOTRTileEntityUtumnoPortal;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import com.zivilon.cinder_loe.tileentity.TileEntityMistBlock;
public class MistBlock extends LOTRBlockUtumnoPortal {
public float color_red;
public float color_green;
public float color_blue;
public MistBlock() {
super();
color_red = 0.0F;
color_green = 0.0F;
color_blue = 0.0F;
setBlockTextureName("lotr:mist_block");
setBlockName("lotr:mistBlock");
}
public MistBlock(float r, float g, float b) {
super();
color_red = r;
color_green = g;
color_blue = b;
setHardness(-1.0F);
setResistance(Float.MAX_VALUE);
setBlockTextureName("lotr:mist_block");
setBlockName("lotr:mistBlock");
}
public TileEntity createNewTileEntity(World world, int i) {
return (TileEntity)new TileEntityMistBlock(color_red, color_green, color_blue);
}
@Override
public void func_149670_a(World world, int i, int j, int k, Entity entity) {}
}

@ -1,12 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import com.zivilon.cinder_loe.blocks.BarsBase;
public class RedDwarfBars extends BarsBase {
public RedDwarfBars() {
super("lotr:barsRedDwarf");
}
}

@ -1,12 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import com.zivilon.cinder_loe.blocks.ChandelierBase;
public class RedDwarfChandelier extends ChandelierBase {
public RedDwarfChandelier() {
super("lotr:chandelierRedDwarf");
}
}

@ -1,23 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.blocks.RotatableBlockBase3;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import java.lang.reflect.Field;
public class ReedBale extends RotatableBlockBase3 {
public ReedBale() {
super(Material.grass, "lotr:reedBale");
setCreativeTab(LoECreativeTabs.tabDecoLoE);
setStepSound(Block.soundTypeGrass);
setBlockName("lotr:reedBale");
setHardness(0.5F);
setResistance(0.5F);
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
}

@ -1,88 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRotatedPillar;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import com.zivilon.cinder_loe.util.Utilities;
public abstract class RotatableBlockBase2 extends BlockRotatedPillar {
public String textureName;
public IIcon[] icons = new IIcon[3];
public RotatableBlockBase2(Material material, String blockName) {
super(material);
this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName);
// Get LOTRCreativeTabs.tabBlock without ForgeGradle incorrectly obfuscating it. Uses cached field, not real-time reflection
this.setCreativeTab((CreativeTabs)Utilities.reflected_tab_block);
}
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta) {
int orientation = 0;
switch (side) {
case 0: // Bottom
case 1: // Top
orientation = 0;
break;
case 2: // North
case 3: // South
orientation = 1;
break;
case 4: // West
case 5: // East
orientation = 2;
break;
}
return orientation;
}
public int damageDropped(int i) {
return 0;
}
@Override
public IIcon getIcon(int side, int meta) {
switch(meta) {
case 0: // Facing up
if(side == 0 || side == 1) return this.icons[0];
else return this.icons[1];
case 1: // Facing North-South
if(side == 2 || side == 3) return this.icons[0];
if(side == 4 || side == 5) return this.icons[2];
else return this.icons[1];
case 2: // Facing East-West
if(side == 4 || side == 5) return this.icons[0];
else return this.icons[2];
case 3: // Uniform block
return this.icons[1];
}
return this.blockIcon; // Default case, should not happen
}
@Override
public void registerBlockIcons(IIconRegister reg) {
icons[0] = reg.registerIcon(this.textureName + "_top");
icons[1] = reg.registerIcon(this.textureName + "_side_0");
icons[2] = reg.registerIcon(this.textureName + "_side_90");
}
@SideOnly(Side.CLIENT)
protected IIcon getSideIcon(int i) {
return null;
}
}

@ -1,165 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRotatedPillar;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.IIcon;
import net.minecraft.client.renderer.texture.IIconRegister;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.creativetab.CreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
public abstract class RotatableBlockBase3 extends BlockRotatedPillar {
public String textureName;
public IIcon[] icons = new IIcon[6];
public RotatableBlockBase3(Material material, String blockName) {
super(material);
this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName);
// Get LOTRCreativeTabs.tabBlock without ForgeGradle incorrectly obfuscating it. Uses cached field, not real-time reflection
this.setCreativeTab((CreativeTabs)Utilities.reflected_tab_block);
/* Examples for block properties
this.setHardness(2.0F); // How long it takes to break the block
this.setResistance(10.0F); // Explosion resistance
this.setStepSound(soundTypePiston); // The sound made when walking on the block
this.setLightLevel(0.5F); // Light emitted by the block, 0.0 - 1.0
this.setLightOpacity(255); // How much light is blocked, 0 - 255
this.setBlockName("exampleBlock"); // The unique name of the block
this.setBlockTextureName("modid:exampleBlock"); // Texture for the block
this.setCreativeTab(CreativeTabs.tabBlock); // The creative tab it appears in
*/
}
public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta) {
// Default orientation (meta 0)
int orientation = 0;
// Determine orientation based on the side of the block the player is placing against
switch (side) {
case 0: // Bottom
orientation = 5; // Unique orientation for bottom
break;
case 1: // Top
orientation = 0; // Default vertical orientation
break;
case 2: // North
orientation = 1; // North-South horizontal
break;
case 3: // South
orientation = 2; // South-North horizontal
break;
case 4: // West
orientation = 3; // West-East horizontal
break;
case 5: // East
orientation = 4; // East-West horizontal
break;
}
return orientation;
}
public int damageDropped(int i) {
return 0;
}
@Override
public IIcon getIcon(int side, int meta) {
switch(meta) {
case 0: // Facing up
if(side == 0) return this.icons[0];
else if(side == 1) return this.icons[1];
else return this.icons[2];
case 1: // Facing North
if(side == 0) return this.icons[2];
else if(side == 1) return this.icons[2];
else if(side == 2) return this.icons[1];
else if(side == 3) return this.icons[0];
else if(side == 4) return this.icons[5];
else if(side == 5) return this.icons[3];
case 2: // Facing South
if(side == 0) return this.icons[4];
else if(side == 1) return this.icons[4];
else if(side == 2) return this.icons[0];
else if(side == 3) return this.icons[1];
else if(side == 4) return this.icons[3];
else if(side == 5) return this.icons[5];
case 3: // Facing West
if(side == 0) return this.icons[5];
else if(side == 1) return this.icons[5];
else if(side == 2) return this.icons[3];
else if(side == 3) return this.icons[5];
else if(side == 4) return this.icons[1];
else if(side == 5) return this.icons[0];
case 4: // Facing East
if(side == 4) return this.icons[0];
else if(side == 5) return this.icons[1];
else return this.icons[2];
case 5: // Facing down
if(side == 0) return this.icons[1];
else if(side == 1) return this.icons[0];
else if (side == 2) return this.icons[3];
else if (side == 3) return this.icons[3];
else return this.icons[4];
}
return this.blockIcon;
}
@Override
public void registerBlockIcons(IIconRegister reg) {
icons[0] = reg.registerIcon(this.textureName + "_bottom");
icons[1] = reg.registerIcon(this.textureName + "_top");
icons[2] = reg.registerIcon(this.textureName + "_side_0");
icons[3] = reg.registerIcon(this.textureName + "_side_90");
icons[4] = reg.registerIcon(this.textureName + "_side_180");
icons[5] = reg.registerIcon(this.textureName + "_side_270");
}
@SideOnly(Side.CLIENT)
protected IIcon getSideIcon(int i) {
return null;
}
}
/* Example method overrides for blocks
@Override
public void onBlockAdded(World world, int x, int y, int z) {
// Called when the block is placed in the world
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int metadata) {
// Called when the block is broken
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
// Called when the player right-clicks the block
return true;
}
@Override
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
// Called when an entity walks over the block
}
@Override
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) {
// Determines the redstone power output
return 15;
}
*/

@ -1,36 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.zivilon.cinder_loe.util.Utilities;
import java.lang.reflect.Field;
public class RunedDwarvenBrick extends Block {
public RunedDwarvenBrick() {
super(Material.rock); // Choose the appropriate material
setCreativeTab(LoECreativeTabs.tabDecoLoE);
// Set other properties like hardness, resistance, name, etc.
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:dwarven_brick_runed"));
setBlockName("lotr:dwarvenBrickRuned");
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:dwarven_brick_runed");
}
}

@ -1,55 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRotatedPillar;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.IIcon;
import net.minecraft.client.renderer.texture.IIconRegister;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.creativetab.CreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
public abstract class StaticBlockBase3 extends Block {
public String textureName;
public IIcon[] icons = new IIcon[3];
public StaticBlockBase3(Material material, String blockName) {
super(material);
this.textureName = Utilities.toSnakeCase(blockName);
this.setBlockName(blockName);
this.setCreativeTab((CreativeTabs)Utilities.reflected_tab_block);
}
@Override
public IIcon getIcon(int side, int meta) {
switch(side) {
case 0: // Facing down
return this.icons[0];
case 1: // Facing up
return this.icons[1];
case 2: // Facing North
case 3: // Facing South
case 4: // Facing West
case 5: // Facing East
return this.icons[2];
}
return this.blockIcon;
}
@Override
public void registerBlockIcons(IIconRegister reg) {
icons[0] = reg.registerIcon(this.textureName + "_bottom");
icons[1] = reg.registerIcon(this.textureName + "_top");
icons[2] = reg.registerIcon(this.textureName + "_side");
}
}

@ -1,24 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockWeaponRack;
import lotr.common.tileentity.LOTRTileEntityWeaponRack;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class VerticalWeaponRack extends LOTRBlockWeaponRack {
public VerticalWeaponRack() {
super();
this.setHardness(0.5f);
this.setResistance(1.0f);
this.setStepSound(Block.soundTypeWood);
}
}

@ -1,53 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFence;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import java.lang.reflect.Field;
import static net.minecraft.init.Blocks.fence;
public class barricade extends Block {
@SideOnly(Side.CLIENT)
private IIcon field_149950_a;
@SideOnly(Side.CLIENT)
private IIcon field_149949_b;
public barricade() {
super(Material.wood); // Choose the appropriate material
setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(5.0F);
setResistance(15.0F);
setStepSound(Block.soundTypeWood);
setBlockTextureName("lotr:red_dwarf_steel");
setBlockName("lotr:blockRedDwarfSteel");
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean isOpaqueCube()
{
return false;
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
return side == 0 ? this.field_149949_b : (side == 1 ? this.field_149950_a : this.blockIcon);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg)
{
this.blockIcon = reg.registerIcon(this.getTextureName());
}
}

@ -1,120 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockChandelier;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class bronzeChain extends LOTRBlockOrcChain {
public IIcon icon;
@SideOnly(value= Side.CLIENT)
private IIcon iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon iconSingle;
public bronzeChain() {
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
this.textureName = "lotr:bronzeChain";
setBlockName("lotr:bronzeChain");
setBlockTextureName("lotr:bronzeChain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.iconMiddle = iconregister.registerIcon(this.getTextureName() + "_mid");
this.iconTop = iconregister.registerIcon(this.getTextureName() + "_top");
this.iconBottom = iconregister.registerIcon(this.getTextureName() + "_bottom");
this.iconSingle = iconregister.registerIcon(this.getTextureName() + "_single");
this.blockIcon = iconregister.registerIcon(this.getTextureName());
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int i, int j, int k, int side) {
boolean chainBelow;
Block above = world.getBlock(i, j + 1, k);
Block below = world.getBlock(i, j - 1, k);
boolean chainAbove = above instanceof bronzeChain;
boolean bl = chainBelow = below instanceof bronzeChain || below instanceof LOTRBlockChandelier;
if (chainAbove && chainBelow) {
return this.iconMiddle;
}
if (chainAbove) {
return this.iconBottom;
}
if (chainBelow) {
return this.iconTop;
}
return this.iconSingle;
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return this.iconMiddle;
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
public boolean canPlaceBlockAt(World world, int i, int j, int k) {
Block block = world.getBlock(i, j + 1, k);
int meta = world.getBlockMetadata(i, j + 1, k);
if (block instanceof bronzeChain) {
return true;
}
if (block instanceof BlockFence || block instanceof BlockWall) {
return true;
}
if (block instanceof BlockSlab && !block.isOpaqueCube() && (meta & 8) == 0) {
return true;
}
if (block instanceof BlockStairs && (meta & 4) == 0) {
return true;
}
return world.getBlock(i, j + 1, k).isSideSolid((IBlockAccess)world, i, j + 1, k, ForgeDirection.DOWN);
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int side, float f, float f1, float f2) {
ItemStack itemstack = entityplayer.getHeldItem();
if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock((Block)this)) {
Block block;
int j1;
for (j1 = j; j1 >= 0 && j1 < world.getHeight() && (block = world.getBlock(i, j1, k)) == this; --j1) {
}
if (j1 >= 0 && j1 < world.getHeight()) {
block = world.getBlock(i, j1, k);
if (this.canPlaceBlockOnSide(world, i, j1, k, side) && block.isReplaceable((IBlockAccess)world, i, j1, k) && !block.getMaterial().isLiquid()) {
int thisMeta = world.getBlockMetadata(i, j, k);
world.setBlock(i, j1, k, (Block)this, thisMeta, 3);
world.playSoundEffect((double)((float)i + 0.5f), (double)((float)j1 + 0.5f), (double)((float)k + 0.5f), this.stepSound.func_150496_b(), (this.stepSound.getVolume() + 1.0f) / 2.0f, this.stepSound.getPitch() * 0.8f);
if (!entityplayer.capabilities.isCreativeMode) {
--itemstack.stackSize;
}
if (itemstack.stackSize <= 0) {
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
}
return true;
}
}
}
return false;
}
}

@ -1,49 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.CinderLoE;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRMod;
import net.minecraft.block.BlockCrops;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.EnumPlantType;
public class cabbageCrop
extends BlockCrops {
@SideOnly(value=Side.CLIENT)
private IIcon[] cabbageIcons;
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
if (j < 7) {
if (j == 6) {
j = 5;
}
return this.cabbageIcons[j >> 1];
}
return this.cabbageIcons[3];
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.cabbageIcons = new IIcon[4];
for (int i = 0; i < this.cabbageIcons.length; ++i) {
this.cabbageIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i);
}
}
public Item func_149866_i() {
return CinderLoE.cabbage;
}
public Item func_149865_P() {
return CinderLoE.cabbage;
}
public EnumPlantType getPlantType(IBlockAccess world, int i, int j, int k) {
return EnumPlantType.Crop;
}
}

@ -1,33 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import java.lang.reflect.Field;
public class cutDrystone extends Block {
public cutDrystone() {
super(Material.rock); // Choose the appropriate material
// Set other properties like hardness, resistance, name, etc.
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:cut_drystone"));
setBlockName("lotr:cutDrystone");
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabBlock);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:cutDrystone");
}
}

@ -1,121 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockChandelier;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class goldChain
extends LOTRBlockOrcChain {
public IIcon icon;
@SideOnly(value= Side.CLIENT)
private IIcon iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon iconSingle;
public goldChain() {
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
this.textureName = "lotr:goldChain";
setBlockName("lotr:goldChain");
setBlockTextureName("lotr:goldChain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.iconMiddle = iconregister.registerIcon(this.getTextureName() + "_mid");
this.iconTop = iconregister.registerIcon(this.getTextureName() + "_top");
this.iconBottom = iconregister.registerIcon(this.getTextureName() + "_bottom");
this.iconSingle = iconregister.registerIcon(this.getTextureName() + "_single");
this.blockIcon = iconregister.registerIcon(this.getTextureName());
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int i, int j, int k, int side) {
boolean chainBelow;
Block above = world.getBlock(i, j + 1, k);
Block below = world.getBlock(i, j - 1, k);
boolean chainAbove = above instanceof goldChain;
boolean bl = chainBelow = below instanceof goldChain || below instanceof LOTRBlockChandelier;
if (chainAbove && chainBelow) {
return this.iconMiddle;
}
if (chainAbove) {
return this.iconBottom;
}
if (chainBelow) {
return this.iconTop;
}
return this.iconSingle;
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return this.iconMiddle;
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
public boolean canPlaceBlockAt(World world, int i, int j, int k) {
Block block = world.getBlock(i, j + 1, k);
int meta = world.getBlockMetadata(i, j + 1, k);
if (block instanceof goldChain) {
return true;
}
if (block instanceof BlockFence || block instanceof BlockWall) {
return true;
}
if (block instanceof BlockSlab && !block.isOpaqueCube() && (meta & 8) == 0) {
return true;
}
if (block instanceof BlockStairs && (meta & 4) == 0) {
return true;
}
return world.getBlock(i, j + 1, k).isSideSolid((IBlockAccess)world, i, j + 1, k, ForgeDirection.DOWN);
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int side, float f, float f1, float f2) {
ItemStack itemstack = entityplayer.getHeldItem();
if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock((Block)this)) {
Block block;
int j1;
for (j1 = j; j1 >= 0 && j1 < world.getHeight() && (block = world.getBlock(i, j1, k)) == this; --j1) {
}
if (j1 >= 0 && j1 < world.getHeight()) {
block = world.getBlock(i, j1, k);
if (this.canPlaceBlockOnSide(world, i, j1, k, side) && block.isReplaceable((IBlockAccess)world, i, j1, k) && !block.getMaterial().isLiquid()) {
int thisMeta = world.getBlockMetadata(i, j, k);
world.setBlock(i, j1, k, (Block)this, thisMeta, 3);
world.playSoundEffect((double)((float)i + 0.5f), (double)((float)j1 + 0.5f), (double)((float)k + 0.5f), this.stepSound.func_150496_b(), (this.stepSound.getVolume() + 1.0f) / 2.0f, this.stepSound.getPitch() * 0.8f);
if (!entityplayer.capabilities.isCreativeMode) {
--itemstack.stackSize;
}
if (itemstack.stackSize <= 0) {
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
}
return true;
}
}
}
return false;
}
}

@ -1,121 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.block.LOTRBlockChandelier;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class ironChain
extends LOTRBlockOrcChain {
public IIcon icon;
@SideOnly(value= Side.CLIENT)
private IIcon iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon iconSingle;
public ironChain() {
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
this.textureName = "lotr:ironChain";
setBlockName("lotr:ironChain");
setBlockTextureName("lotr:ironChain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.iconMiddle = iconregister.registerIcon(this.getTextureName() + "_mid");
this.iconTop = iconregister.registerIcon(this.getTextureName() + "_top");
this.iconBottom = iconregister.registerIcon(this.getTextureName() + "_bottom");
this.iconSingle = iconregister.registerIcon(this.getTextureName() + "_single");
this.blockIcon = iconregister.registerIcon(this.getTextureName());
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int i, int j, int k, int side) {
boolean chainBelow;
Block above = world.getBlock(i, j + 1, k);
Block below = world.getBlock(i, j - 1, k);
boolean chainAbove = above instanceof ironChain;
boolean bl = chainBelow = below instanceof ironChain || below instanceof LOTRBlockChandelier;
if (chainAbove && chainBelow) {
return this.iconMiddle;
}
if (chainAbove) {
return this.iconBottom;
}
if (chainBelow) {
return this.iconTop;
}
return this.iconSingle;
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return this.iconMiddle;
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
public boolean canPlaceBlockAt(World world, int i, int j, int k) {
Block block = world.getBlock(i, j + 1, k);
int meta = world.getBlockMetadata(i, j + 1, k);
if (block instanceof ironChain) {
return true;
}
if (block instanceof BlockFence || block instanceof BlockWall) {
return true;
}
if (block instanceof BlockSlab && !block.isOpaqueCube() && (meta & 8) == 0) {
return true;
}
if (block instanceof BlockStairs && (meta & 4) == 0) {
return true;
}
return world.getBlock(i, j + 1, k).isSideSolid((IBlockAccess)world, i, j + 1, k, ForgeDirection.DOWN);
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int side, float f, float f1, float f2) {
ItemStack itemstack = entityplayer.getHeldItem();
if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock((Block)this)) {
Block block;
int j1;
for (j1 = j; j1 >= 0 && j1 < world.getHeight() && (block = world.getBlock(i, j1, k)) == this; --j1) {
}
if (j1 >= 0 && j1 < world.getHeight()) {
block = world.getBlock(i, j1, k);
if (this.canPlaceBlockOnSide(world, i, j1, k, side) && block.isReplaceable((IBlockAccess)world, i, j1, k) && !block.getMaterial().isLiquid()) {
int thisMeta = world.getBlockMetadata(i, j, k);
world.setBlock(i, j1, k, (Block)this, thisMeta, 3);
world.playSoundEffect((double)((float)i + 0.5f), (double)((float)j1 + 0.5f), (double)((float)k + 0.5f), this.stepSound.func_150496_b(), (this.stepSound.getVolume() + 1.0f) / 2.0f, this.stepSound.getPitch() * 0.8f);
if (!entityplayer.capabilities.isCreativeMode) {
--itemstack.stackSize;
}
if (itemstack.stackSize <= 0) {
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
}
return true;
}
}
}
return false;
}
}

@ -1,50 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.CinderLoE;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRMod;
import net.minecraft.block.BlockCrops;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.EnumPlantType;
public class onionCrop
extends BlockCrops {
@SideOnly(value=Side.CLIENT)
private IIcon[] onionIcons;
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
if (j < 7) {
if (j == 6) {
j = 5;
}
return this.onionIcons[j >> 1];
}
return this.onionIcons[3];
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.onionIcons = new IIcon[4];
for (int i = 0; i < this.onionIcons.length; ++i) {
this.onionIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i);
}
}
public Item func_149866_i() {
return CinderLoE.onion;
}
public Item func_149865_P() {
return CinderLoE.onion;
}
public EnumPlantType getPlantType(IBlockAccess world, int i, int j, int k) {
return EnumPlantType.Crop;
}
}

@ -1,31 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import com.zivilon.cinder_loe.LoECreativeTabs;
import java.lang.reflect.Field;
public class plaster extends Block {
public plaster() {
super(Material.rock); // Choose the appropriate material
setCreativeTab(LoECreativeTabs.tabBlockLoE);
// Set other properties like hardness, resistance, name, etc.
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:plaster"));
setBlockName("lotr:plaster");
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabBlock);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:plaster");
}
}

@ -1,33 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRCreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import java.lang.reflect.Field;
public class reeflessCoral extends Block {
public reeflessCoral() {
super(Material.rock); // Choose the appropriate material
setCreativeTab(LoECreativeTabs.tabBlockLoE);
// Set other properties like hardness, resistance, name, etc.
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:reeflessCoral"));
setBlockName("lotr:reeflessCoral");
// setCreativeTab((CreativeTabs) LOTRCreativeTabs.tabDeco);
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:reeflessCoral");
}
}

@ -1,125 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRMod;
import lotr.common.block.LOTRBlockChandelier;
import lotr.common.block.LOTRBlockOrcChain;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class silverChain extends LOTRBlockOrcChain {
public IIcon icon;
@SideOnly(value= Side.CLIENT)
private IIcon iconMiddle;
@SideOnly(value=Side.CLIENT)
private IIcon iconTop;
@SideOnly(value=Side.CLIENT)
private IIcon iconBottom;
@SideOnly(value=Side.CLIENT)
private IIcon iconSingle;
public silverChain() {
this.setHardness(1.0f);
this.setStepSound(Block.soundTypeMetal);
this.textureName = "lotr:silverChain";
setBlockName("lotr:silverChain");
setBlockTextureName("lotr:silverChain");
float f = 0.2f;
this.setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, 1.0f, 0.5f + f);
}
@SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) {
this.iconMiddle = iconregister.registerIcon(this.getTextureName() + "_mid");
this.iconTop = iconregister.registerIcon(this.getTextureName() + "_top");
this.iconBottom = iconregister.registerIcon(this.getTextureName() + "_bottom");
this.iconSingle = iconregister.registerIcon(this.getTextureName() + "_single");
this.blockIcon = iconregister.registerIcon(this.getTextureName());
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int i, int j, int k, int side) {
boolean chainBelow;
Block above = world.getBlock(i, j + 1, k);
Block below = world.getBlock(i, j - 1, k);
boolean chainAbove = above instanceof silverChain;
boolean bl = chainBelow = below instanceof silverChain || below instanceof LOTRBlockChandelier;
if (chainAbove && chainBelow) {
return this.iconMiddle;
}
if (chainAbove) {
return this.iconBottom;
}
if (chainBelow) {
return this.iconTop;
}
return this.iconSingle;
}
@SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) {
return this.iconMiddle;
}
@SideOnly(value=Side.CLIENT)
public String getItemIconName() {
return this.getTextureName();
}
public boolean canPlaceBlockAt(World world, int i, int j, int k) {
Block block = world.getBlock(i, j + 1, k);
int meta = world.getBlockMetadata(i, j + 1, k);
if (block instanceof silverChain) {
return true;
}
if (block instanceof BlockFence || block instanceof BlockWall) {
return true;
}
if (block instanceof BlockSlab && !block.isOpaqueCube() && (meta & 8) == 0) {
return true;
}
if (block instanceof BlockStairs && (meta & 4) == 0) {
return true;
}
return world.getBlock(i, j + 1, k).isSideSolid((IBlockAccess)world, i, j + 1, k, ForgeDirection.DOWN);
}
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int side, float f, float f1, float f2) {
ItemStack itemstack = entityplayer.getHeldItem();
if (itemstack != null && itemstack.getItem() == Item.getItemFromBlock((Block)this)) {
Block block;
int j1;
for (j1 = j; j1 >= 0 && j1 < world.getHeight() && (block = world.getBlock(i, j1, k)) == this; --j1) {
}
if (j1 >= 0 && j1 < world.getHeight()) {
block = world.getBlock(i, j1, k);
if (this.canPlaceBlockOnSide(world, i, j1, k, side) && block.isReplaceable((IBlockAccess)world, i, j1, k) && !block.getMaterial().isLiquid()) {
int thisMeta = world.getBlockMetadata(i, j, k);
world.setBlock(i, j1, k, (Block)this, thisMeta, 3);
world.playSoundEffect((double)((float)i + 0.5f), (double)((float)j1 + 0.5f), (double)((float)k + 0.5f), this.stepSound.func_150496_b(), (this.stepSound.getVolume() + 1.0f) / 2.0f, this.stepSound.getPitch() * 0.8f);
if (!entityplayer.capabilities.isCreativeMode) {
--itemstack.stackSize;
}
if (itemstack.stackSize <= 0) {
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
}
return true;
}
}
}
return false;
}
}

@ -1,27 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.util.Utilities;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class voidblock extends Block {
public voidblock() {
super(Material.rock); // Choose the appropriate material
// Set other properties like hardness, resistance, name, etc.
setHardness(100.0F);
setResistance(100.0F);
setBlockTextureName(Utilities.toSnakeCase("lotr:voidblock"));
setBlockName("lotr:voidblock");
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("lotr:voidblock");
}
}

@ -1,17 +0,0 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
public class woodpanel extends RotatableBlockBase3{
public woodpanel() {
super(Material.wood, "lotr:woodpanel");
setCreativeTab(LoECreativeTabs.tabBlockLoE);
setStepSound(Block.soundTypeWood);
setHardness(2.0F);
setResistance(5.0F);
setBlockName("lotr:woodpanel");
}
}

@ -1,75 +0,0 @@
package com.zivilon.cinder_loe.character;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.eventhandler.EventPriority;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornAnimal;
public class CharacterEventListener {
public CharacterEventListener() {
// Register the event listener
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public void onLivingHurt(LivingHurtEvent event) {
// Check if the entity being hurt is a character of interest
EntityLivingBase damagedEntity = event.entityLiving;
// Check if the source of damage is an entity
if (event.source.getSourceOfDamage() instanceof EntityLivingBase) {
// The entity that caused the damage
EntityLivingBase damagerEntity = (EntityLivingBase) event.source.getSourceOfDamage();
if (damagedEntity instanceof EntityPlayerMP) {
EntityPlayerMP player = (EntityPlayerMP)damagedEntity;
UUID radagast = CharacterRoleAPI.getCharacterRoleUUID("Radagast");
if (player.getUniqueID().equals(radagast)) {
List<EntityLivingBase> entities = findAnimalsAndFangornEntities((EntityLivingBase)player);
for (EntityLivingBase entity : entities) {
EntityLiving animal = (EntityLiving) entity;
animal.setAttackTarget((EntityLivingBase)damagerEntity);
}
}
}
}
}
public static List<EntityLivingBase> findAnimalsAndFangornEntities(EntityLivingBase centerEntity) {
World world = centerEntity.worldObj;
double searchRadius = 32.0D; // Define the search radius
// Calculate the search area
AxisAlignedBB searchArea = AxisAlignedBB.getBoundingBox(
centerEntity.posX - searchRadius, centerEntity.posY - searchRadius, centerEntity.posZ - searchRadius,
centerEntity.posX + searchRadius, centerEntity.posY + searchRadius, centerEntity.posZ + searchRadius);
// Retrieve all entities within the search area
List entitiesWithinAABB = world.getEntitiesWithinAABB(EntityLivingBase.class, searchArea);
List<EntityLivingBase> foundEntities = new ArrayList<EntityLivingBase>();
// Manually filter the entities to match your criteria
for (Object obj : entitiesWithinAABB) {
if (obj instanceof EntityAnimal || obj instanceof FangornAnimal) { // Adjust for your custom entity
foundEntities.add((EntityLivingBase) obj);
}
}
return foundEntities;
}
}

@ -1,61 +0,0 @@
package com.zivilon.cinder_loe.character;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.*;
import java.nio.file.*;
import java.lang.reflect.Type;
import java.util.*;
public class CharacterRoleAPI {
private static final Path FILE_PATH = Paths.get("character_roles.json");
private static Map<String, UUID> characterRoles = new HashMap<>();
public static void loadRolesFromFile() {
if (!Files.exists(FILE_PATH)) {
try {
Files.createFile(FILE_PATH);
} catch (IOException e) {
e.printStackTrace();
}
return;
}
try (Reader reader = Files.newBufferedReader(FILE_PATH)) {
Gson gson = new Gson();
Type type = new TypeToken<Map<String, UUID>>() {}.getType();
characterRoles = gson.fromJson(reader, type);
if (characterRoles == null) {
characterRoles = new HashMap<>();
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void saveRolesToFile() {
Gson gson = new Gson();
try (Writer writer = Files.newBufferedWriter(FILE_PATH)) {
gson.toJson(characterRoles, writer);
} catch (IOException e) {
e.printStackTrace();
}
}
public static UUID getCharacterRoleUUID(String roleName) {
return characterRoles.get(roleName);
}
public static void setCharacterRoleUUID(String roleName, UUID playerUUID) {
characterRoles.put(roleName, playerUUID);
saveRolesToFile();
}
public static void removeCharacterRole(String roleName) {
if (characterRoles.containsKey(roleName)) {
characterRoles.remove(roleName);
saveRolesToFile();
}
}
}

@ -1,101 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* LegsJade - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelBodyJade extends LOTRModelBiped {
public ModelRenderer lpad;
public ModelRenderer lribbon;
public ModelRenderer neck3;
public ModelRenderer neck2;
public ModelRenderer neck1;
public ModelRenderer rpad;
public ModelRenderer rribbon;
public ModelBodyJade(float f) {
super(f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.neck1 = new ModelRenderer(this, 13, 0);
this.neck1.setRotationPoint(0.0F, 0.0F, 0.0F);
this.neck1.addBox(-3.7F, -2.1F, -3.4F, 3, 3, 1, 0.0F);
this.setRotateAngle(neck1, 0.5009094953223726F, 0.22759093446006054F, 0.0F);
this.lpad = new ModelRenderer(this, 16, 0);
this.lpad.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lpad.addBox(3.5F, -4.5F, -2.5F, 1, 7, 5, 0.0F);
this.bipedBody = new ModelRenderer(this, 16, 16);
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F);
this.rribbon = new ModelRenderer(this, 16, 7);
this.rribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rribbon.addBox(-4F, 2.5F, -2.5F, 0, 2, 5, 0.0F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.mirror = true;
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, -0.0F);
this.bipedRightArm.addBox( -3.0F, -2.0F, -2.0F, 4, 12, 4, 0.5F);
this.setRotateAngle(bipedRightArm, 4.371139006309477E-9F, 0.0F, -0.02639634720981121F);
this.neck2 = new ModelRenderer(this, 13, 0);
this.neck2.setRotationPoint(0.0F, 0.0F, 0.0F);
this.neck2.addBox(0.7F, -2.1F, -3.4F, 3, 3, 1, 0.0F);
this.setRotateAngle(neck2, 0.5009094953223726F, -0.22759093446006054F, 0.0F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.5F);
this.setRotateAngle(bipedLeftArm, -4.371139006309477E-9F, 0.0F, 0.02639634720981121F);
this.lribbon = new ModelRenderer(this, 16, 7);
this.lribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lribbon.addBox(4F, 2.5F, -2.5F, 0, 2, 5, 0.0F);
this.rpad = new ModelRenderer(this, 16, 0);
this.rpad.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rpad.addBox(-4.5F, -4.5F, -2.5F, 1, 7, 5, 0.0F);
this.neck3 = new ModelRenderer(this, 13, 0);
this.neck3.setRotationPoint(0.0F, 0.0F, 0.0F);
this.neck3.addBox(-1.5F, -2.0F, -3.2F, 3, 3, 1, 0.0F);
this.setRotateAngle(neck3, 0.5009094953223726F, 0.0F, 0.0F);
this.bipedBody.addChild(this.neck1);
this.bipedLeftArm.addChild(this.lpad);
this.bipedRightArm.addChild(this.rribbon);
this.bipedBody.addChild(this.neck2);
this.bipedLeftArm.addChild(this.lribbon);
this.bipedRightArm.addChild(this.rpad);
this.bipedBody.addChild(this.neck3);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedBody.render(f5);
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,90 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* Black serpent Chestpiece - cleric_red
* Created using Tabula 4.1.1
*/
public class ModelBodySerpent extends LOTRModelBiped {
public ModelRenderer sash;
public ModelRenderer Quiver;
public ModelRenderer Arrows1;
public ModelRenderer Arrows1_1;
public ModelRenderer Arrows1_2;
public ModelRenderer Arrows1_3;
public ModelBodySerpent(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedBody = new ModelRenderer(this, 16, 16);
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.mirror = true;
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, -0.0F);
this.bipedRightArm.addBox( -3.0F, -2.0F, -2.0F, 4, 12, 4, 0.5F);
this.setRotateAngle(bipedRightArm, 4.371139006309477E-9F, 0.0F, -0.02639634720981121F);
this.Arrows1_1 = new ModelRenderer(this, 6, 20);
this.Arrows1_1.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Arrows1_1.addBox(-6.0F, -7.0F, 3.7F, 4, 3, 0, 0.0F);
this.Arrows1_3 = new ModelRenderer(this, 8, 23);
this.Arrows1_3.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Arrows1_3.addBox(-2.5F, -7.0F, 1.2F, 0, 3, 3, 0.0F);
this.Quiver = new ModelRenderer(this, 33, 0);
this.Quiver.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Quiver.addBox(-6.0F, -4.0F, 2.0F, 4, 12, 3, 0.0F);
this.setRotateAngle(Quiver, 0.0F, 0.0F, -0.5138249317871306F);
this.Arrows1_2 = new ModelRenderer(this, 8, 23);
this.Arrows1_2.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Arrows1_2.addBox(-4.5F, -7.0F, 2.0F, 0, 3, 3, 0.0F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.5F);
this.setRotateAngle(bipedLeftArm, -4.371139006309477E-9F, 0.0F, 0.02639634720981121F);
this.sash = new ModelRenderer(this, 16, 3);
this.sash.setRotationPoint(0.0F, 0.0F, 0.0F);
this.sash.addBox(-4.0F, 0.0F, -2.7F, 8, 12, 0, 0.0F);
this.Arrows1 = new ModelRenderer(this, 6, 20);
this.Arrows1.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Arrows1.addBox(-4.0F, -7.0F, 2.8F, 4, 3, 0, 0.0F);
this.Arrows1.addChild(this.Arrows1_1);
this.Arrows1_2.addChild(this.Arrows1_3);
this.sash.addChild(this.Quiver);
this.Arrows1_1.addChild(this.Arrows1_2);
this.bipedBody.addChild(this.sash);
this.Quiver.addChild(this.Arrows1);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedBody.render(f5);
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,54 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelBreeKettleHelmet extends LOTRModelBiped {
public ModelRenderer shape9;
public ModelBreeKettleHelmet(float f) {
super(f); // Call the parent constructor to initialize the biped parts
this.textureWidth = 64;
this.textureHeight = 32;
// Define the shape9 part and attach it to bipedHead
this.shape9 = new ModelRenderer(this, 0, 16);
this.shape9.setRotationPoint(0.0F, 0.0F, 0.0F);
//shape9.addBox(0F, -13F, -4F, 0, 4, 10);
this.shape9.addBox(-7.0F, -6.0F, -7.0F, 14, 0, 14, 0.0F);
// Clear any previously defined parts for the bipedHead
this.bipedHead.cubeList.clear();
// Define the main helmet part and attach shape9 to it
this.bipedHead = new ModelRenderer(this, 0, 0);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
// this.bipedHead.addBox(-4.5F, -9.0F, -4.5F, 9, 9, 9, 0.5F); // Adjusted position and scale
this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f); // Adjusted position and scale (f)
this.bipedHead.addChild(this.shape9);
// Clear unnecessary parts
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,50 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelBrokenHalo extends LOTRModelBiped {
public ModelRenderer shape9;
public ModelBrokenHalo(float f) {
super(f);
this.textureWidth = 128;
this.textureHeight = 64;
this.shape9 = new ModelRenderer(this, 32, 16);
this.shape9.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape9.addBox(-8.0F, -14.0F, 5.0F, 16, 16, 0, 0.0F);
this.bipedHead.cubeList.clear();
this.bipedHead = new ModelRenderer(this, 0, 0);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f); // Adjusted position and scale (f)
this.bipedHead.addChild(this.shape9);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,123 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelFangornAuroch extends ModelBase {
public ModelRenderer body;
public ModelRenderer leg1;
public ModelRenderer leg2;
public ModelRenderer leg3;
public ModelRenderer leg4;
public ModelRenderer tail;
public ModelRenderer head;
public ModelRenderer horns;
public ModelRenderer hornLeft1;
public ModelRenderer hornLeft2;
public ModelRenderer hornRight1;
public ModelRenderer hornRight2;
public ModelFangornAuroch() {
this.textureWidth = 128;
this.textureHeight = 64;
this.body = new ModelRenderer(this, 0, 0);
this.body.setRotationPoint(0.0F, 2.0F, -1.0F);
this.body.addBox(-8.0F, -6.0F, -11.0F, 16, 16, 26);
this.body.setTextureOffset(28, 42).addBox(-8.0F, -8.0F, -8.0F, 16, 2, 10);
this.body.setTextureOffset(84, 31).addBox(-3.0F, 10.0F, 4.0F, 6, 1, 6);
this.leg1 = new ModelRenderer(this, 0, 42);
this.leg1.setRotationPoint(-5.0F, 12.0F, 9.0F);
this.leg1.addBox(-2.5F, 0.0F, -2.5F, 5, 12, 5);
this.leg2 = new ModelRenderer(this, 0, 42);
this.leg2.setRotationPoint(5.0F, 12.0F, 9.0F);
this.leg2.mirror = true;
this.leg2.addBox(-2.5F, 0.0F, -2.5F, 5, 12, 5);
this.leg3 = new ModelRenderer(this, 0, 42);
this.leg3.setRotationPoint(-5.0F, 12.0F, -7.0F);
this.leg3.addBox(-2.5F, 0.0F, -2.5F, 5, 12, 5);
this.leg4 = new ModelRenderer(this, 0, 42);
this.leg4.setRotationPoint(5.0F, 12.0F, -7.0F);
this.leg4.mirror = true;
this.leg4.addBox(-2.5F, 0.0F, -2.5F, 5, 12, 5);
this.tail = new ModelRenderer(this, 20, 42);
this.tail.setRotationPoint(0.0F, 1.0F, 14.0F);
this.tail.addBox(-1.0F, -1.0F, 0.0F, 2, 12, 1);
this.head = new ModelRenderer(this, 58, 0);
this.head.setRotationPoint(0.0F, -1.0F, -10.0F);
this.head.addBox(-5.0F, -4.0F, -12.0F, 10, 10, 11);
this.head.setTextureOffset(89, 0).addBox(-3.0F, 1.0F, -15.0F, 6, 4, 4);
this.head.setTextureOffset(105, 0);
this.head.addBox(-8.0F, -2.5F, -7.0F, 3, 2, 1);
this.head.mirror = true;
this.head.addBox(5.0F, -2.5F, -7.0F, 3, 2, 1);
this.head.mirror = false;
this.horns = new ModelRenderer(this, 98, 21);
this.horns.setRotationPoint(0.0F, -3.5F, -5.0F);
this.horns.addBox(-6.0F, -1.5F, -1.5F, 12, 3, 3);
this.head.addChild(this.horns);
this.hornLeft1 = new ModelRenderer(this, 112, 27);
this.hornLeft1.setRotationPoint(-6.0F, 0.0F, 0.0F);
this.hornLeft1.addBox(-5.0F, -1.0F, -1.0F, 6, 2, 2);
this.hornLeft2 = new ModelRenderer(this, 114, 31);
this.hornLeft2.setRotationPoint(-5.0F, 0.0F, 0.0F);
this.hornLeft2.addBox(-5.0F, -0.5F, -0.5F, 6, 1, 1);
this.hornLeft1.addChild(this.hornLeft2);
this.horns.addChild(this.hornLeft1);
this.hornRight1 = new ModelRenderer(this, 112, 27);
this.hornRight1.mirror = true;
this.hornRight1.setRotationPoint(6.0F, 0.0F, 0.0F);
this.hornRight1.addBox(-1.0F, -1.0F, -1.0F, 6, 2, 2);
this.hornRight2 = new ModelRenderer(this, 114, 31);
this.hornRight2.mirror = true;
this.hornRight2.setRotationPoint(5.0F, 0.0F, 0.0F);
this.hornRight2.addBox(-1.0F, -0.5F, -0.5F, 6, 1, 1);
this.hornRight1.addChild(this.hornRight2);
this.horns.addChild(this.hornRight1);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.horns.showModel = true;
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
this.head.render(f5);
this.body.render(f5);
this.leg1.render(f5);
this.leg2.render(f5);
this.leg3.render(f5);
this.leg4.render(f5);
this.tail.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
this.head.rotateAngleX = 0.0F;
this.head.rotateAngleY = 0.0F;
this.head.rotateAngleZ = 0.0F;
this.head.rotateAngleX += (float)Math.toRadians(f4);
this.head.rotateAngleY += (float)Math.toRadians(f3);
this.head.rotateAngleX += MathHelper.cos(f * 0.2F) * f1 * 0.4F;
this.hornLeft1.rotateAngleZ = (float)Math.toRadians(25.0D);
this.hornLeft2.rotateAngleZ = (float)Math.toRadians(15.0D);
this.hornRight1.rotateAngleZ = -this.hornLeft1.rotateAngleZ;
this.hornRight2.rotateAngleZ = -this.hornLeft2.rotateAngleZ;
this.hornLeft1.rotateAngleY = (float)Math.toRadians(-25.0D);
this.hornRight1.rotateAngleY = -this.hornLeft1.rotateAngleY;
this.hornLeft1.rotateAngleX = (float)Math.toRadians(35.0D);
this.hornRight1.rotateAngleX = this.hornLeft1.rotateAngleX;
this.leg1.rotateAngleX = MathHelper.cos(f * 0.4F) * f1 * 0.8F;
this.leg2.rotateAngleX = MathHelper.cos(f * 0.4F + 3.1415927F) * f1 * 0.8F;
this.leg3.rotateAngleX = MathHelper.cos(f * 0.4F + 3.1415927F) * f1 * 0.8F;
this.leg4.rotateAngleX = MathHelper.cos(f * 0.4F) * f1 * 0.8F;
}
}

@ -1,187 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.common.LOTRMod;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornElk;
public class ModelFangornElk extends ModelBase {
private ModelRenderer body;
private ModelRenderer leg1;
private ModelRenderer leg2;
private ModelRenderer leg3;
private ModelRenderer leg4;
private ModelRenderer head;
private ModelRenderer nose;
private ModelRenderer antlersRight_1;
private ModelRenderer antlersRight_2;
private ModelRenderer antlersRight_3;
private ModelRenderer antlersRight_4;
private ModelRenderer antlersLeft_1;
private ModelRenderer antlersLeft_2;
private ModelRenderer antlersLeft_3;
private ModelRenderer antlersLeft_4;
public ModelFangornElk() {
this(0.0F);
}
public ModelFangornElk(float f) {
this.textureWidth = 128;
this.textureHeight = 64;
this.body = new ModelRenderer(this, 0, 0);
this.body.setRotationPoint(0.0F, 4.0F, 9.0F);
this.body.addBox(-6.0F, -4.0F, -21.0F, 12, 11, 26, f);
ModelRenderer tail = new ModelRenderer(this, 0, 54);
tail.addBox(-1.0F, -5.0F, 2.0F, 2, 2, 8, f);
tail.rotateAngleX = (float)Math.toRadians(-60.0D);
this.body.addChild(tail);
this.leg1 = new ModelRenderer(this, 42, 37);
this.leg1.setRotationPoint(-4.0F, 3.0F, 8.0F);
this.leg1.addBox(-5.5F, 0.0F, -3.0F, 7, 11, 8, f);
this.leg1.setTextureOffset(26, 37).addBox(-4.0F, 11.0F, -1.0F, 4, 10, 4, f);
this.leg2 = new ModelRenderer(this, 42, 37);
this.leg2.mirror = true;
this.leg2.setRotationPoint(4.0F, 3.0F, 8.0F);
this.leg2.addBox(-1.5F, 0.0F, -3.0F, 7, 11, 8, f);
this.leg2.setTextureOffset(26, 37).addBox(0.0F, 11.0F, -1.0F, 4, 10, 4, f);
this.leg3 = new ModelRenderer(this, 0, 37);
this.leg3.setRotationPoint(-4.0F, 4.0F, -6.0F);
this.leg3.addBox(-4.5F, 0.0F, -3.0F, 6, 10, 7, f);
this.leg3.setTextureOffset(26, 37).addBox(-3.5F, 10.0F, -2.0F, 4, 10, 4, f);
this.leg4 = new ModelRenderer(this, 0, 37);
this.leg4.mirror = true;
this.leg4.setRotationPoint(4.0F, 4.0F, -6.0F);
this.leg4.addBox(-1.5F, 0.0F, -3.0F, 6, 10, 7, f);
this.leg4.setTextureOffset(26, 37).addBox(-0.5F, 10.0F, -2.0F, 4, 10, 4, f);
this.head = new ModelRenderer(this, 50, 0);
this.head.setRotationPoint(0.0F, 4.0F, -10.0F);
this.head.addBox(-2.0F, -10.0F, -4.0F, 4, 12, 8, f);
this.head.setTextureOffset(74, 0).addBox(-3.0F, -16.0F, -8.0F, 6, 6, 13, f);
this.head.setTextureOffset(50, 20);
this.head.addBox(-2.0F, -18.0F, 3.0F, 1, 2, 1, f);
this.head.mirror = true;
this.head.addBox(1.0F, -18.0F, 3.0F, 1, 2, 1, f);
this.nose = new ModelRenderer(this, 56, 20);
this.nose.addBox(-1.0F, -14.5F, -9.0F, 2, 2, 1, f);
this.antlersRight_1 = new ModelRenderer(this, 0, 0);
this.antlersRight_1.addBox(10.0F, -19.0F, 2.5F, 1, 12, 1, f);
this.antlersRight_1.rotateAngleZ = (float)Math.toRadians(-65.0D);
this.antlersRight_2 = new ModelRenderer(this, 4, 0);
this.antlersRight_2.addBox(-3.0F, -23.6F, 2.5F, 1, 8, 1, f);
this.antlersRight_2.rotateAngleZ = (float)Math.toRadians(-15.0D);
this.antlersRight_3 = new ModelRenderer(this, 8, 0);
this.antlersRight_3.addBox(-8.0F, -36.0F, 2.5F, 1, 16, 1, f);
this.antlersRight_3.rotateAngleZ = (float)Math.toRadians(-15.0D);
this.antlersRight_4 = new ModelRenderer(this, 12, 0);
this.antlersRight_4.addBox(7.5F, -35.0F, 2.5F, 1, 10, 1, f);
this.antlersRight_4.rotateAngleZ = (float)Math.toRadians(-50.0D);
this.head.addChild(this.antlersRight_1);
this.head.addChild(this.antlersRight_2);
this.head.addChild(this.antlersRight_3);
this.head.addChild(this.antlersRight_4);
this.antlersLeft_1 = new ModelRenderer(this, 0, 0);
this.antlersLeft_1.mirror = true;
this.antlersLeft_1.addBox(-11.0F, -19.0F, 2.5F, 1, 12, 1, f);
this.antlersLeft_1.rotateAngleZ = (float)Math.toRadians(65.0D);
this.antlersLeft_2 = new ModelRenderer(this, 4, 0);
this.antlersLeft_2.mirror = true;
this.antlersLeft_2.addBox(2.0F, -23.6F, 2.5F, 1, 8, 1, f);
this.antlersLeft_2.rotateAngleZ = (float)Math.toRadians(15.0D);
this.antlersLeft_3 = new ModelRenderer(this, 8, 0);
this.antlersLeft_3.mirror = true;
this.antlersLeft_3.addBox(7.0F, -36.0F, 2.5F, 1, 16, 1, f);
this.antlersLeft_3.rotateAngleZ = (float)Math.toRadians(15.0D);
this.antlersLeft_4 = new ModelRenderer(this, 12, 0);
this.antlersLeft_4.mirror = true;
this.antlersLeft_4.addBox(-8.5F, -35.0F, 2.5F, 1, 10, 1, f);
this.antlersLeft_4.rotateAngleZ = (float)Math.toRadians(50.0D);
this.head.addChild(this.antlersLeft_1);
this.head.addChild(this.antlersLeft_2);
this.head.addChild(this.antlersLeft_3);
this.head.addChild(this.antlersLeft_4);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
FangornElk elk = (FangornElk)entity;
setRotationAngles(f, f1, f2, f3, f4, f5, (Entity)elk);
GL11.glPushMatrix();
float scale = 1.0F;
GL11.glTranslatef(0.0F, 24.0F * (1.0F - scale) * f5, 0.0F);
GL11.glScalef(scale, scale, scale);
boolean showAntlers = (scale > 0.75F);
this.antlersRight_1.showModel = showAntlers;
this.antlersRight_2.showModel = showAntlers;
this.antlersRight_3.showModel = showAntlers;
this.antlersRight_4.showModel = showAntlers;
this.antlersLeft_1.showModel = showAntlers;
this.antlersLeft_2.showModel = showAntlers;
this.antlersLeft_3.showModel = showAntlers;
this.antlersLeft_4.showModel = showAntlers;
this.body.render(f5);
this.leg1.render(f5);
this.leg2.render(f5);
this.leg3.render(f5);
this.leg4.render(f5);
this.head.render(f5);
if (LOTRMod.isChristmas())
GL11.glColor3f(1.0F, 0.0F, 0.0F);
this.nose.render(f5);
if (LOTRMod.isChristmas())
GL11.glColor3f(1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
float rearAmount = 0.0F;
float antiRearAmount = 1.0F - rearAmount;
this.head.rotationPointY = 4.0F;
this.head.rotationPointZ = -10.0F;
this.head.rotateAngleX = (float)Math.toRadians(20.0D);
this.head.rotateAngleY = 0.0F;
this.head.rotationPointY = rearAmount * -6.0F + antiRearAmount * this.head.rotationPointY;
this.head.rotationPointZ = rearAmount * -1.0F + antiRearAmount * this.head.rotationPointZ;
this.head.rotateAngleX = (float)(this.head.rotateAngleX + Math.toRadians(f4));
this.head.rotateAngleY = (float)(this.head.rotateAngleY + Math.toRadians(f3));
this.head.rotateAngleX = antiRearAmount * this.head.rotateAngleX;
this.head.rotateAngleY = antiRearAmount * this.head.rotateAngleY;
if (f1 > 0.2F)
this.head.rotateAngleX += MathHelper.cos(f * 0.3F) * 0.1F * f1;
this.nose.setRotationPoint(this.head.rotationPointX, this.head.rotationPointY, this.head.rotationPointZ);
this.nose.rotateAngleX = this.head.rotateAngleX;
this.nose.rotateAngleY = this.head.rotateAngleY;
this.nose.rotateAngleZ = this.head.rotateAngleZ;
this.body.rotateAngleX = 0.0F;
this.body.rotateAngleX = rearAmount * -0.7853982F + antiRearAmount * this.body.rotateAngleX;
float legRotation = MathHelper.cos(f * 0.4F + 3.1415927F) * f1;
float f17 = -1.0471976F;
float f18 = 0.2617994F * rearAmount;
float f19 = MathHelper.cos(f2 * 0.4F + 3.1415927F);
this.leg4.rotationPointY = -2.0F * rearAmount + 4.0F * antiRearAmount;
this.leg4.rotationPointZ = -2.0F * rearAmount + -6.0F * antiRearAmount;
this.leg3.rotationPointY = this.leg4.rotationPointY;
this.leg3.rotationPointZ = this.leg4.rotationPointZ;
this.leg1.rotateAngleX = f18 + legRotation * antiRearAmount;
this.leg2.rotateAngleX = f18 + -legRotation * antiRearAmount;
this.leg3.rotateAngleX = (f17 + -f19) * rearAmount + -legRotation * 0.8F * antiRearAmount;
this.leg4.rotateAngleX = (f17 + f19) * rearAmount + legRotation * 0.8F * antiRearAmount;
}
}

@ -1,124 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornWolf;
@SideOnly(Side.CLIENT)
public class ModelFangornWolf extends ModelBase {
/** main box for the wolf head */
public ModelRenderer wolfHeadMain;
/** The wolf's body */
public ModelRenderer wolfBody;
/** Wolf'se first leg */
public ModelRenderer wolfLeg1;
/** Wolf's second leg */
public ModelRenderer wolfLeg2;
/** Wolf's third leg */
public ModelRenderer wolfLeg3;
/** Wolf's fourth leg */
public ModelRenderer wolfLeg4;
/** The wolf's tail */
ModelRenderer wolfTail;
/** The wolf's mane */
ModelRenderer wolfMane;
public ModelFangornWolf()
{
float f = 0.0F;
float f1 = 13.5F;
this.wolfHeadMain = new ModelRenderer(this, 0, 0);
this.wolfHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, f);
this.wolfHeadMain.setRotationPoint(-1.0F, f1, -7.0F);
this.wolfBody = new ModelRenderer(this, 18, 14);
this.wolfBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, f);
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfMane = new ModelRenderer(this, 21, 0);
this.wolfMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, f);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, 2.0F);
this.wolfLeg1 = new ModelRenderer(this, 0, 18);
this.wolfLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2 = new ModelRenderer(this, 0, 18);
this.wolfLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3 = new ModelRenderer(this, 0, 18);
this.wolfLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4 = new ModelRenderer(this, 0, 18);
this.wolfLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfTail = new ModelRenderer(this, 9, 18);
this.wolfTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, f);
this.wolfHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, f);
this.wolfHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, f);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
{
super.render(p_78088_1_, p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_);
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_);
this.wolfHeadMain.renderWithRotation(p_78088_7_);
this.wolfBody.render(p_78088_7_);
this.wolfLeg1.render(p_78088_7_);
this.wolfLeg2.render(p_78088_7_);
this.wolfLeg3.render(p_78088_7_);
this.wolfLeg4.render(p_78088_7_);
this.wolfTail.renderWithRotation(p_78088_7_);
this.wolfMane.render(p_78088_7_);
}
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
FangornWolf entitywolf = (FangornWolf)p_78086_1_;
this.wolfTail.rotateAngleY = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
this.wolfBody.rotateAngleX = ((float)Math.PI / 2F);
this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
this.wolfLeg1.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
this.wolfLeg2.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
this.wolfLeg3.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F + (float)Math.PI) * 1.4F * p_78086_3_;
this.wolfLeg4.rotateAngleX = MathHelper.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
this.wolfHeadMain.rotateAngleZ = 0.0F;
this.wolfMane.rotateAngleZ = -0.08F;
this.wolfBody.rotateAngleZ = -0.16F;
this.wolfTail.rotateAngleZ = -0.2F;
}
/**
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
* "far" arms and legs can swing at most.
*/
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_)
{
super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_);
this.wolfHeadMain.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI);
this.wolfHeadMain.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI);
this.wolfTail.rotateAngleX = p_78087_3_;
}
}

@ -1,128 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* JadeHelmet - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelJadeHelmet extends LOTRModelBiped {
public ModelRenderer brframe;
public ModelRenderer frframe;
public ModelRenderer blframe;
public ModelRenderer frframe_1;
public ModelRenderer fgold;
public ModelRenderer bgold;
public ModelRenderer tgold;
public ModelRenderer glframe;
public ModelRenderer grframe;
public ModelRenderer back;
public ModelRenderer backangle;
public ModelRenderer Holder;
public ModelRenderer moon;
public ModelJadeHelmet(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedHead.cubeList.clear();
this.Holder = new ModelRenderer(this, 21, 22);
this.Holder.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Holder.addBox(-1.0F, -12.2F, -8.0F, 2, 3, 1, 0.0F);
this.setRotateAngle(Holder, -0.136659280431156F, 0.0F, 0.0F);
this.moon = new ModelRenderer(this, 0, 0);
this.moon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.moon.addBox(-5.5F, -16.2F, -7.3F, 11, 7, 0, 0.0F);
this.setRotateAngle(moon, -0.136659280431156F, 0.0F, 0.0F);
this.bgold = new ModelRenderer(this, 14, 19);
this.bgold.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bgold.addBox(-3.5F, -11.2F, 0.0F, 7, 2, 7, 0.0F);
this.setRotateAngle(bgold, -0.17453292519943295F, 0.0F, 0.0F);
this.glframe = new ModelRenderer(this, 21, 14);
this.glframe.setRotationPoint(0.0F, 0.0F, 0.0F);
this.glframe.addBox(7.4F, -7.4F, -2.5F, 1, 8, 5, 0.0F);
this.setRotateAngle(glframe, 0.0F, 0.0F, -0.6108652381980153F);
this.backangle = new ModelRenderer(this, 0, 7);
this.backangle.setRotationPoint(0.0F, 0.0F, 0.0F);
this.backangle.addBox(-5.0F, -2.4F, 6.2F, 10, 5, 1, 0.0F);
this.setRotateAngle(backangle, 0.36425021489121656F, 0.0F, 0.0F);
this.frframe = new ModelRenderer(this, 0, 14);
this.frframe.setRotationPoint(0.0F, 0.0F, 0.0F);
this.frframe.addBox(-8.6F, -7.5F, -7.0F, 1, 8, 6, 0.0F);
this.setRotateAngle(frframe, 0.17453292519943295F, 0.0F, 0.6108652381980153F);
this.blframe = new ModelRenderer(this, 0, 14);
this.blframe.setRotationPoint(0.0F, 0.0F, 0.0F);
this.blframe.addBox(7.6F, -7.5F, 1.0F, 1, 8, 6, 0.0F);
this.setRotateAngle(blframe, -0.17453292519943295F, 0.0F, -0.6108652381980153F);
this.fgold = new ModelRenderer(this, 14, 19);
this.fgold.setRotationPoint(0.0F, 0.0F, 0.0F);
this.fgold.addBox(-3.5F, -11.2F, -7.0F, 7, 2, 7, 0.0F);
this.setRotateAngle(fgold, 0.17453292519943295F, 0.0F, 0.0F);
this.back = new ModelRenderer(this, 0, 8);
this.back.setRotationPoint(0.0F, 0.0F, 0.0F);
this.back.addBox(-5.0F, -7.9F, 5.0F, 10, 4, 1, 0.0F);
this.tgold = new ModelRenderer(this, 16, 21);
this.tgold.setRotationPoint(0.0F, 0.0F, 0.0F);
this.tgold.addBox(-3.5F, -11.31F, -2.5F, 7, 2, 5, 0.0F);
this.brframe = new ModelRenderer(this, 0, 14);
this.brframe.setRotationPoint(0.0F, 0.0F, 0.0F);
this.brframe.addBox(-8.6F, -7.5F, 1.0F, 1, 8, 6, 0.0F);
this.setRotateAngle(brframe, -0.17453292519943295F, 0.0F, 0.6108652381980153F);
this.frframe_1 = new ModelRenderer(this, 0, 14);
this.frframe_1.setRotationPoint(0.0F, 0.0F, 0.0F);
this.frframe_1.addBox(7.6F, -7.5F, -7.0F, 1, 8, 6, 0.0F);
this.setRotateAngle(frframe_1, 0.17453292519943295F, 0.0F, -0.6108652381980153F);
this.grframe = new ModelRenderer(this, 21, 15);
this.grframe.setRotationPoint(0.0F, 0.0F, 0.0F);
this.grframe.addBox(-8.5F, -7.4F, -2.5F, 1, 8, 5, 0.0F);
this.setRotateAngle(grframe, 0.0F, 0.0F, 0.6108652381980153F);
this.bipedHead = new ModelRenderer(this, 32, 0);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.5F);
this.bipedHead.addChild(this.Holder);
this.bipedHead.addChild(this.moon);
this.bipedHead.addChild(this.bgold);
this.bipedHead.addChild(this.glframe);
this.bipedHead.addChild(this.backangle);
this.bipedHead.addChild(this.frframe);
this.bipedHead.addChild(this.blframe);
this.bipedHead.addChild(this.fgold);
this.bipedHead.addChild(this.back);
this.bipedHead.addChild(this.tgold);
this.bipedHead.addChild(this.brframe);
this.bipedHead.addChild(this.frframe_1);
this.bipedHead.addChild(this.grframe);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,89 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* LegsJade - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelLegsJade extends LOTRModelBiped {
public ModelRenderer rarmor;
public ModelRenderer rftrim;
public ModelRenderer rbtrim;
public ModelRenderer larmor;
public ModelRenderer lftrim;
public ModelRenderer lbtrim;
public ModelLegsJade(float f) {
super(f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
this.lftrim = new ModelRenderer(this, 2, 24);
this.lftrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lftrim.addBox(-2.0F, 0.1F, -3.1F, 4, 1, 1, 0.0F);
this.bipedRightLeg = new ModelRenderer(this, 0, 16);
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.5F);
this.rbtrim = new ModelRenderer(this, 1, 21);
this.rbtrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rbtrim.addBox(-2.0F, 0.1F, 2.1F, 4, 1, 1, 0.0F);
this.larmor = new ModelRenderer(this, -1, 0);
this.larmor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.larmor.addBox(1.0F, 1.0F, -3F, 4, 1, 6, 0.0F);
this.setRotateAngle(larmor, 0.0F, 0.0F, 2.0943951023931953F);
this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
this.bipedLeftLeg.mirror = true;
this.bipedLeftLeg.setRotationPoint(1.899999976158142F, 12.0F, 0.0F);
this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, 0.5F);
this.lbtrim = new ModelRenderer(this, 3, 21);
this.lbtrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lbtrim.addBox(-2.0F, 0.1F, 2.1F, 4, 1, 1, 0.0F);
this.rarmor = new ModelRenderer(this, -1, 0);
this.rarmor.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rarmor.addBox(1.0F, -2.0F, -3F, 4, 1, 6, 0.0F);
this.setRotateAngle(rarmor, 0.0F, 0.0F, 1.0471975511965976F);
this.rftrim = new ModelRenderer(this, 3, 24);
this.rftrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rftrim.addBox(-2.0F, 0.1F, -3.1F, 4, 1, 1, 0.0F);
this.bipedRightLeg.addChild(this.lftrim);
this.bipedLeftLeg.addChild(this.rbtrim);
this.bipedRightLeg.addChild(this.larmor);
this.bipedRightLeg.addChild(this.lbtrim);
this.bipedLeftLeg.addChild(this.rarmor);
this.bipedLeftLeg.addChild(this.rftrim);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedRightLeg.render(f5);
this.bipedLeftLeg.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,93 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* chestplatenex - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelNexFireChestplate extends LOTRModelBiped {
public ModelRenderer upperrightarm;
public ModelRenderer upperleftarm;
public ModelRenderer banner;
public ModelRenderer hood;
public ModelRenderer rightribbon;
public ModelRenderer leftribbon;
public ModelNexFireChestplate(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.banner = new ModelRenderer(this, 0, 17);
this.banner.setRotationPoint(0.0F, 0.0F, 0.0F);
this.banner.addBox(-4.0F, 0.0F, -2.7F, 8, 15, 0, 0.0F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.mirror = true;
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedRightArm, 0.0F, 0.0F, -0.026354471705114374F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedLeftArm, 0.0F, 0.0F, 0.026354471705114374F);
this.hood = new ModelRenderer(this, 0, 0);
this.hood.setRotationPoint(0.0F, 0.0F, 0.0F);
this.hood.addBox(-5.4F, 0.0F, 0.7F, 11, 4, 7, 0.0F);
this.setRotateAngle(hood, 0.5009094953223726F, 0.0F, 0.0F);
this.rightribbon = new ModelRenderer(this, 57, 17);
this.rightribbon.mirror = true;
this.rightribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightribbon.addBox(-4.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.leftribbon = new ModelRenderer(this, 57, 17);
this.leftribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftribbon.addBox(1.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.bipedBody = new ModelRenderer(this, 16, 16);
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F);
this.upperleftarm = new ModelRenderer(this, 40, 16);
this.upperleftarm.mirror = true;
this.upperleftarm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.upperleftarm.addBox(-6.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperleftarm, 0.0F, 0.0F, -0.026354471705114374F);
this.upperrightarm = new ModelRenderer(this, 40, 16);
this.upperrightarm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.upperrightarm.addBox(2.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperrightarm, 0.0F, 0.0F, 0.026354471705114374F);
this.bipedRightArm.addChild(this.upperrightarm);
this.bipedLeftArm.addChild(this.upperleftarm);
this.bipedBody.addChild(this.banner);
this.bipedBody.addChild(this.hood);
this.bipedBody.addChild(this.rightribbon);
this.bipedBody.addChild(this.leftribbon);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
this.bipedBody.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,84 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelNexIceChestplate extends LOTRModelBiped {
public ModelRenderer upperrightarm;
public ModelRenderer upperleftarm;
public ModelRenderer banner;
public ModelRenderer hood;
public ModelRenderer rightribbon;
public ModelRenderer leftribbon;
public ModelNexIceChestplate(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.banner = new ModelRenderer(this, 0, 17);
this.banner.setRotationPoint(0.0F, 0.0F, 0.0F);
this.banner.addBox(-4.0F, 0.0F, -2.7F, 8, 15, 0, 0.0F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.mirror = true;
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedRightArm, 0.0F, 0.0F, -0.026354471705114374F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedLeftArm, 0.0F, 0.0F, 0.026354471705114374F);
this.hood = new ModelRenderer(this, 0, 0);
this.hood.setRotationPoint(0.0F, 0.0F, 0.0F);
this.hood.addBox(-5.4F, 0.0F, 0.7F, 11, 4, 7, 0.0F);
this.setRotateAngle(hood, 0.5009094953223726F, 0.0F, 0.0F);
this.rightribbon = new ModelRenderer(this, 57, 17);
this.rightribbon.mirror = true;
this.rightribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightribbon.addBox(-4.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.leftribbon = new ModelRenderer(this, 57, 17);
this.leftribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftribbon.addBox(1.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.bipedBody = new ModelRenderer(this, 16, 16);
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F);
this.upperleftarm = new ModelRenderer(this, 40, 16);
this.upperleftarm.mirror = true;
this.upperleftarm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.upperleftarm.addBox(-6.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperleftarm, 0.0F, 0.0F, -0.026354471705114374F);
this.upperrightarm = new ModelRenderer(this, 40, 16);
this.upperrightarm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.upperrightarm.addBox(2.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperrightarm, 0.0F, 0.0F, 0.026354471705114374F);
this.bipedRightArm.addChild(this.upperrightarm);
this.bipedLeftArm.addChild(this.upperleftarm);
this.bipedBody.addChild(this.banner);
this.bipedBody.addChild(this.hood);
this.bipedBody.addChild(this.rightribbon);
this.bipedBody.addChild(this.leftribbon);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
this.bipedBody.render(f5);
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,88 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelNexToxinChestplate extends LOTRModelBiped {
public ModelRenderer upperrightarm;
public ModelRenderer upperleftarm;
public ModelRenderer banner;
public ModelRenderer hood;
public ModelRenderer rightribbon;
public ModelRenderer leftribbon;
public ModelNexToxinChestplate(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.banner = new ModelRenderer(this, 0, 17);
this.banner.setRotationPoint(0.0F, 0.0F, 0.0F);
this.banner.addBox(-4.0F, 0.0F, -2.7F, 8, 15, 0, 0.0F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.mirror = true;
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedRightArm, 0.0F, 0.0F, -0.026354471705114374F);
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, 0.1F);
this.setRotateAngle(bipedLeftArm, 0.0F, 0.0F, 0.026354471705114374F);
this.hood = new ModelRenderer(this, 0, 0);
this.hood.setRotationPoint(0.0F, 0.0F, 0.0F);
this.hood.addBox(-5.4F, 0.0F, 0.7F, 11, 4, 7, 0.0F);
this.setRotateAngle(hood, 0.5009094953223726F, 0.0F, 0.0F);
this.rightribbon = new ModelRenderer(this, 57, 17);
this.rightribbon.mirror = true;
this.rightribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightribbon.addBox(-4.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.leftribbon = new ModelRenderer(this, 57, 17);
this.leftribbon.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftribbon.addBox(1.0F, -0.8F, 8.3F, 3, 15, 0, 0.0F);
this.bipedBody = new ModelRenderer(this, 16, 16);
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F);
this.upperleftarm = new ModelRenderer(this, 40, 16);
this.upperleftarm.mirror = true;
this.upperleftarm.setRotationPoint(5.0F, 2.0F, 0.0F);
this.upperleftarm.addBox(-6.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperleftarm, 0.0F, 0.0F, -0.026354471705114374F);
this.upperrightarm = new ModelRenderer(this, 40, 16);
this.upperrightarm.setRotationPoint(-5.0F, 2.0F, 0.0F);
this.upperrightarm.addBox(2.0F, -4.0F, -2.0F, 4, 7, 4, 0.5F);
this.setRotateAngle(upperrightarm, 0.0F, 0.0F, 0.026354471705114374F);
this.bipedRightArm.addChild(this.upperrightarm);
this.bipedLeftArm.addChild(this.upperleftarm);
this.bipedBody.addChild(this.banner);
this.bipedBody.addChild(this.hood);
this.bipedBody.addChild(this.rightribbon);
this.bipedBody.addChild(this.leftribbon);
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
this.bipedBody.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,61 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelRedDwarfHelmet extends LOTRModelBiped {
//fields
ModelRenderer rightneckguard;
ModelRenderer leftneckguard = new ModelRenderer(this, 32, 0);
ModelRenderer shape1 = new ModelRenderer(this, 32, 18);
public ModelRedDwarfHelmet() {
}
public ModelRedDwarfHelmet(float f) {
super(f);
this.bipedHead = new ModelRenderer(this, 0, 0);
this.bipedHead.setRotationPoint(0F, 0F, 0F);
this.bipedHead.addBox(-4F, -8F, -4F, 8, 8, 8, f);
rightneckguard = new ModelRenderer(this, 32, 9);
rightneckguard.addBox(4.6F, 2.15F, -3.0F, 0, 1, 8);
rightneckguard.setRotationPoint(0F, 0F, 0F);
rightneckguard.setTextureSize(64, 32);
rightneckguard.mirror = true;
setRotation(rightneckguard, 0F, 0F, -0.2443461F);
this.bipedHead.addChild(rightneckguard);
leftneckguard = new ModelRenderer(this, 32, 0);
leftneckguard.addBox(-4.6F, 2.15F, -3.0F, 0, 1, 8);
leftneckguard.setRotationPoint(0F, 0F, 0F);
leftneckguard.setTextureSize(64, 32);
leftneckguard.mirror = true;
setRotation(leftneckguard, 0F, 0F, 0.2443461F);
this.bipedHead.addChild(leftneckguard);
shape1 = new ModelRenderer(this, 32, 18);
shape1.setRotationPoint(0F, 0F, 0F);
shape1.addBox(0F, -13F, -4F, 0, 4, 10);
shape1.setTextureSize(64, 32);
setRotation(shape1, 0F, 0F, 0F);
this.bipedHead.addChild(shape1);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}

@ -1,93 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelRhudaurHelmet extends LOTRModelBiped {
public ModelRenderer backhelm;
public ModelRenderer topfur;
public ModelRenderer righthelm;
public ModelRenderer fronthelm;
public ModelRenderer lefthelm;
public ModelRenderer rightfur;
public ModelRenderer leftfur;
public ModelRenderer Middlefur;
public ModelRenderer backfur;
public ModelRhudaurHelmet(float f) {
super(f);
this.textureWidth = 64;
this.textureHeight = 32;
this.Middlefur = new ModelRenderer(this, 24, 11);
this.Middlefur.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Middlefur.addBox(-4.0F, -8.0F, -4.1F, 8, 1, 0, 1.3F);
this.lefthelm = new ModelRenderer(this, 0, 0);
this.lefthelm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lefthelm.addBox(4.0F, -5.85F, -5.5F, 1, 2, 9, 0.6F);
this.setRotateAngle(lefthelm, -0.22759093446006054F, 0.0F, 0.0F);
this.fronthelm = new ModelRenderer(this, 0, 0);
this.fronthelm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.fronthelm.addBox(-5.0F, -5.85F, -6.5F, 10, 2, 1, 0.6F);
this.setRotateAngle(fronthelm, -0.22759093446006054F, 0.0F, 0.0F);
this.backhelm = new ModelRenderer(this, 0, 0);
this.backhelm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.backhelm.addBox(-5.0F, -5.0F, 3.9F, 10, 2, 1, 0.6F);
this.rightfur = new ModelRenderer(this, 32, 11);
this.rightfur.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightfur.addBox(-4.1F, -8.2F, -4.0F, 0, 3, 8, 1.3F);
this.righthelm = new ModelRenderer(this, 0, 0);
this.righthelm.setRotationPoint(0.0F, 0.0F, 0.0F);
this.righthelm.addBox(-5.0F, -5.85F, -5.5F, 1, 2, 9, 0.6F);
this.setRotateAngle(righthelm, -0.22759093446006054F, 0.0F, 0.0F);
this.backfur = new ModelRenderer(this, 24, 11);
this.backfur.setRotationPoint(0.0F, 0.0F, 0.0F);
this.backfur.addBox(-4.0F, -8.0F, 4.1F, 8, 3, 0, 1.3F);
this.leftfur = new ModelRenderer(this, 32, 11);
this.leftfur.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftfur.addBox(4.1F, -8.2F, -4.0F, 0, 3, 8, 1.3F);
this.topfur = new ModelRenderer(this, 16, 11);
this.topfur.setRotationPoint(0.0F, 0.0F, 0.0F);
this.topfur.addBox(-4.0F, -8.2F, -4.0F, 8, 0, 8, 1.3F);
this.bipedHead.cubeList.clear();
this.bipedHead = new ModelRenderer(this, 0, 11);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 1.0F);
this.bipedHead.addChild(this.Middlefur);
this.bipedHead.addChild(this.lefthelm);
this.bipedHead.addChild(this.fronthelm);
this.bipedHead.addChild(this.backhelm);
this.bipedHead.addChild(this.rightfur);
this.bipedHead.addChild(this.righthelm);
this.bipedHead.addChild(this.backfur);
this.bipedHead.addChild(this.leftfur);
this.bipedHead.addChild(this.topfur);
// Clear unnecessary parts
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,37 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* ModelSunkenSkeleton - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelSunkenSkeleton
extends ModelBiped {
public ModelSunkenSkeleton() {
this(0.0f);
}
public ModelSunkenSkeleton(float f) {
super(f, 0.0f, 64, 32);
if (f == 0.0f) {
this.bipedRightArm = new ModelRenderer((ModelBase)this, 40, 16);
this.bipedRightArm.addBox(-1.0f, -2.0f, -1.0f, 2, 12, 2, f);
this.bipedRightArm.setRotationPoint(-5.0f, 2.0f, 0.0f);
this.bipedLeftArm = new ModelRenderer((ModelBase)this, 40, 16);
this.bipedLeftArm.mirror = true;
this.bipedLeftArm.addBox(-1.0f, -2.0f, -1.0f, 2, 12, 2, f);
this.bipedLeftArm.setRotationPoint(5.0f, 2.0f, 0.0f);
this.bipedRightLeg = new ModelRenderer((ModelBase)this, 0, 16);
this.bipedRightLeg.addBox(-1.0f, 0.0f, -1.0f, 2, 12, 2, f);
this.bipedRightLeg.setRotationPoint(-2.0f, 12.0f, 0.0f);
this.bipedLeftLeg = new ModelRenderer((ModelBase)this, 0, 16);
this.bipedLeftLeg.mirror = true;
this.bipedLeftLeg.addBox(-1.0f, 0.0f, -1.0f, 2, 12, 2, f);
this.bipedLeftLeg.setRotationPoint(2.0f, 12.0f, 0.0f);
}
}
}

@ -1,78 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* UsurperHelmet - Cleric_red
* Created using Tabula 4.1.1
*/
public class ModelUsurperHelmet extends LOTRModelBiped {
public ModelRenderer leftfan;
public ModelRenderer rightfan;
public ModelRenderer leftfeather;
public ModelRenderer rightfeather;
public ModelRenderer shape15;
public ModelUsurperHelmet(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.leftfan = new ModelRenderer(this, 32, 19);
this.leftfan.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftfan.addBox(-8.4F, -12.0F, -1.0F, 4, 12, 1, 0.0F);
this.setRotateAngle(leftfan, 0.0F, 0.3490658503988659F, 0.0F);
this.leftfeather = new ModelRenderer(this, 43, 20);
this.leftfeather.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftfeather.addBox(-8.4F, -12.0F, -0.5F, 4, 12, 0, 0.0F);
this.setRotateAngle(leftfeather, 0.0F, 0.3490658503988659F, 0.0F);
this.rightfan = new ModelRenderer(this, 32, 5);
this.rightfan.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightfan.addBox(4.6F, -12.0F, -1.0F, 4, 12, 1, 0.0F);
this.setRotateAngle(rightfan, 0.0F, -0.3490658503988659F, 0.0F);
this.shape15 = new ModelRenderer(this, 8, 16);
this.shape15.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape15.addBox(-4.0F, -7.0F, -5.2F, 8, 6, 0, 0.0F);
this.rightfeather = new ModelRenderer(this, 43, 6);
this.rightfeather.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightfeather.addBox(4.6F, -12.0F, -0.5F, 4, 12, 0, 0.0F);
this.setRotateAngle(rightfeather, 0.0F, -0.3490658503988659F, 0.0F);
this.bipedHead.cubeList.clear();
this.bipedHead = new ModelRenderer(this, 0, 0);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedHead.addBox(-4.0F, -8F, -4.0F, 8, 8, 8, 1.0F);
this.bipedHead.addChild(this.leftfan);
this.bipedHead.addChild(this.leftfeather);
this.bipedHead.addChild(this.rightfan);
this.bipedHead.addChild(this.shape15);
this.bipedHead.addChild(this.rightfeather);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,90 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* heavyHelmet - Cleric
* Created using Tabula 4.1.1
*/
public class ModelWarlordHelmet extends LOTRModelBiped {
public ModelRenderer leftmaw;
public ModelRenderer rightmaw;
public ModelRenderer shape31;
public ModelRenderer hair;
public ModelRenderer mane;
public ModelRenderer lefttrim;
public ModelRenderer righttrim;
public ModelRenderer Teeth;
public ModelWarlordHelmet(float f) {
super (f);
this.textureWidth = 64;
this.textureHeight = 32;
this.shape31 = new ModelRenderer(this, 2, 2);
this.shape31.setRotationPoint(0.0F, 0.0F, 0.0F);
this.shape31.addBox(-4.0F, -10.0F, -7.0F, 8, 3, 6, 1.0F);
this.mane = new ModelRenderer(this, 8, 27);
this.mane.setRotationPoint(0.0F, 0.0F, 0.0F);
this.mane.addBox(-4.0F, 1.0F, 5.0F, 8, 3, 0, 0.0F);
this.leftmaw = new ModelRenderer(this, 24, 8);
this.leftmaw.setRotationPoint(0.0F, 0.0F, 0.0F);
this.leftmaw.addBox(-4.7F, -4.0F, -12.3F, 0, 4, 7, 0.0F);
this.setRotateAngle(leftmaw, 0.0F, 0.12217304763960307F, 0.0F);
this.hair = new ModelRenderer(this, 30, 6);
this.hair.setRotationPoint(0.0F, 0.0F, 0.0F);
this.hair.addBox(-3.0F, -8.7F, -3.0F, 6, 1, 4, 1.0F);
this.setRotateAngle(hair, -0.22759093446006054F, 0.0F, 0.0F);
this.righttrim = new ModelRenderer(this, 32, 15);
this.righttrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.righttrim.addBox(4.2F, -7.9F, -3.9F, 0, 8, 4, 1.0F);
this.lefttrim = new ModelRenderer(this, 32, 15);
this.lefttrim.setRotationPoint(0.0F, 0.0F, 0.0F);
this.lefttrim.addBox(-4.2F, -7.9F, -3.9F, 0, 8, 4, 1.0F);
this.Teeth = new ModelRenderer(this, 32, 12);
this.Teeth.setRotationPoint(0.0F, 0.0F, 0.0F);
this.Teeth.addBox(-4.0F, -6.0F, -6.0F, 8, 3, 0, 0.0F);
this.rightmaw = new ModelRenderer(this, 24, 8);
this.rightmaw.setRotationPoint(0.0F, 0.0F, 0.0F);
this.rightmaw.addBox(4.7F, -4.0F, -12.3F, 0, 4, 7, 0.0F);
this.setRotateAngle(rightmaw, 0.0F, -0.12217304763960307F, 0.0F);
this.bipedHead.cubeList.clear();
this.bipedHead = new ModelRenderer(this, 0, 11);
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.bipedHead.addBox(-4.0F, -8F, -4.0F, 8, 8, 8, 1.0F);
this.bipedHead.addChild(this.shape31);
this.bipedHead.addChild(this.mane);
this.bipedHead.addChild(this.leftmaw);
this.bipedHead.addChild(this.hair);
this.bipedHead.addChild(this.righttrim);
this.bipedHead.addChild(this.lefttrim);
this.bipedHead.addChild(this.Teeth);
this.bipedHead.addChild(this.rightmaw);
this.bipedHeadwear.cubeList.clear();
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedHead.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,92 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* Vertical Weapon rack - Cleric_red
* Created using Tabula 4.1.1
*/
public class Modelverticalweaponrack extends ModelBase {
public ModelRenderer Post;
public ModelRenderer Plate;
public ModelRenderer Post_1;
public ModelRenderer Base;
public ModelRenderer HolderBottom;
public ModelRenderer HolderBottom_1;
public ModelRenderer HolderBottom_2;
public ModelRenderer HolderTop;
public ModelRenderer HolderTop_1;
public ModelRenderer HolderTop_2;
public boolean onWall = true;
public Modelverticalweaponrack() {
this.textureWidth = 64;
this.textureHeight = 32;
this.HolderBottom_2 = new ModelRenderer(this, 0, 17);
this.HolderBottom_2.setRotationPoint(-1.0F, 20.0F, 2.0F);
this.HolderBottom_2.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
this.setRotateAngle(HolderBottom_2, 0.0F, 1.5707963267948966F, 0.0F);
this.Base = new ModelRenderer(this, 0, 0);
this.Base.setRotationPoint(-8.0F, 10.0F, 2.5F);
this.Base.addBox(0.0F, 0.0F, 0.0F, 5, 14, 2, 0.0F);
this.setRotateAngle(Base, 0.0F, 1.5707963267948966F, 0.0F);
this.HolderTop_1 = new ModelRenderer(this, 0, 17);
this.HolderTop_1.setRotationPoint(-1.0F, 12.0F, -1.0F);
this.HolderTop_1.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
this.setRotateAngle(HolderTop_1, 0.0F, 1.5707963267948966F, 0.0F);
this.HolderTop = new ModelRenderer(this, 5, 17);
this.HolderTop.setRotationPoint(-1.0F, 12.0F, 2.0F);
this.HolderTop.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
this.setRotateAngle(HolderTop, 0.0F, 1.5707963267948966F, 0.0F);
this.Post_1 = new ModelRenderer(this, 14, 0);
this.Post_1.setRotationPoint(-6.0F, 20.0F, 1.0F);
this.Post_1.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
this.setRotateAngle(Post_1, 0.0F, 1.5707963267948966F, 0.0F);
this.Plate = new ModelRenderer(this, 24, 0);
this.Plate.setRotationPoint(-3.0F, 10.0F, 1.5F);
this.Plate.addBox(0.0F, 0.0F, 0.0F, 3, 14, 1, 0.0F);
this.setRotateAngle(Plate, 0.0F, 1.5707963267948966F, 0.0F);
this.HolderTop_2 = new ModelRenderer(this, 0, 17);
this.HolderTop_2.setRotationPoint(-2.0F, 12.0F, 2.0F);
this.HolderTop_2.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
this.setRotateAngle(HolderTop_2, 0.0F, 1.5707963267948966F, 0.0F);
this.HolderBottom = new ModelRenderer(this, 5, 17);
this.HolderBottom.setRotationPoint(-1.0F, 20.0F, -1.0F);
this.HolderBottom.addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.0F);
this.setRotateAngle(HolderBottom, 0.0F, 1.5707963267948966F, 0.0F);
this.HolderBottom_1 = new ModelRenderer(this, 0, 17);
this.HolderBottom_1.setRotationPoint(-2.0F, 20.0F, 2.0F);
this.HolderBottom_1.addBox(0.0F, 0.0F, 0.0F, 4, 2, 1, 0.0F);
this.setRotateAngle(HolderBottom_1, 0.0F, 1.5707963267948966F, 0.0F);
this.Post = new ModelRenderer(this, 14, 0);
this.Post.setRotationPoint(-6.0F, 12.0F, 1.0F);
this.Post.addBox(0.0F, 0.0F, 0.0F, 2, 2, 3, 0.0F);
this.setRotateAngle(Post, 0.0F, 1.5707963267948966F, 0.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.HolderBottom_2.render(f5);
this.Base.render(f5);
this.HolderTop_1.render(f5);
this.HolderTop.render(f5);
this.Post_1.render(f5);
this.Plate.render(f5);
this.HolderTop_2.render(f5);
this.HolderBottom.render(f5);
this.HolderBottom_1.render(f5);
this.Post.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,42 +0,0 @@
package com.zivilon.cinder_loe.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
/**
* cavalry_spikes - Cleric_red
* Created using Tabula 4.1.1
*/
public class barricade_post extends ModelBase {
public ModelRenderer shape1;
public ModelRenderer shape1_1;
public barricade_post() {
this.textureWidth = 64;
this.textureHeight = 32;
this.shape1_1 = new ModelRenderer(this, 0, 0);
this.shape1_1.setRotationPoint(-3.0F, 9.0F, 4.0F);
this.shape1_1.addBox(1.0F, 0.0F, 2.0F, 4, 18, 4, 0.0F);
this.setRotateAngle(shape1_1, -0.6981317007977318F, 0.0F, 0.0F);
this.shape1 = new ModelRenderer(this, 0, 0);
this.shape1.setRotationPoint(-3.0F, 13.0F, -8.5F);
this.shape1.addBox(1.0F, 0.0F, 0.0F, 4, 18, 4, 0.0F);
this.setRotateAngle(shape1, 0.6981317007977318F, 0.0F, 0.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.shape1_1.render(f5);
this.shape1.render(f5);
}
/**
* This is a helper function from Tabula to set the rotation of model parts
*/
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,38 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import com.zivilon.cinder_loe.entity.npc.good_human.BattleNun;
import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderBattleNun extends LOTRRenderBiped {
public static LOTRRandomSkins skinsFemale;
public ModelBiped outfitModel = (ModelBiped)new LOTRModelHuman(0.6F, false);
public RenderBattleNun() {
super((ModelBiped)new LOTRModelHuman(), 0.5F);
setRenderPassModel((ModelBase)this.outfitModel);
skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/arnorNun/arnorNun_female");
}
public ResourceLocation getEntityTexture(Entity entity) {
BattleNun battleNun = (BattleNun)entity;
if (((LOTREntityNPC)battleNun).familyInfo.isMale())
return skinsFemale.getRandomSkin((LOTRRandomSkinEntity)battleNun);
return skinsFemale.getRandomSkin((LOTRRandomSkinEntity)battleNun);
}
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
BattleNun battleNun = (BattleNun)entity;
return super.shouldRenderPass((EntityLiving)battleNun, pass, f);
}
}

@ -1,14 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.render.entity.LOTRRenderSpiderBase;
import lotr.client.render.entity.LOTRRenderUtumnoIceSpider;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderDarkSpider extends LOTRRenderUtumnoIceSpider {
private static ResourceLocation spiderSkin = new ResourceLocation("cinder_loe:mob/spider/spider_dark.png");
protected ResourceLocation getEntityTexture(Entity entity) {
return spiderSkin;
}
}

@ -1,26 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.common.entity.LOTRRandomSkinEntity;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import com.zivilon.cinder_loe.client.model.ModelFangornAuroch;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornAuroch;
public class RenderFangornAuroch extends RenderLiving {
public static LOTRRandomSkins aurochsSkins;
public RenderFangornAuroch() {
super((ModelBase)new ModelFangornAuroch(), 0.5F);
aurochsSkins = LOTRRandomSkins.loadSkinsList("lotr:mob/aurochs");
}
public ResourceLocation getEntityTexture(Entity entity) {
FangornAuroch aurochs = (FangornAuroch)entity;
ResourceLocation skin = aurochsSkins.getRandomSkin((LOTRRandomSkinEntity)aurochs);
return skin;
}
}

@ -1,45 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornBear;
import java.util.HashMap;
import java.util.Map;
import lotr.client.model.LOTRModelBear;
import lotr.common.entity.animal.LOTREntityBear;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
public class RenderFangornBear extends RenderLiving {
public static Map bearSkins = new HashMap<Object, Object>();
public RenderFangornBear() {
super((ModelBase)new LOTRModelBear(), 0.5F);
}
protected ResourceLocation getEntityTexture(Entity entity) {
FangornBear bear = (FangornBear)entity;
return getBearSkin(bear.getBearType());
}
public static ResourceLocation getBearSkin(LOTREntityBear.BearType type) {
String s = type.textureName();
ResourceLocation skin = (ResourceLocation)bearSkins.get(s);
if (skin == null) {
skin = new ResourceLocation("lotr:mob/bear/" + s + ".png");
bearSkins.put(s, skin);
}
return skin;
}
public void preRenderCallback(EntityLivingBase entity, float f) {
scaleBearModel();
}
public static void scaleBearModel() {
float scale = 1.2F;
GL11.glScalef(scale, scale, scale);
}
}

@ -1,29 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.client.render.entity.LOTRRandomSkins;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import com.zivilon.cinder_loe.client.model.ModelFangornElk;
import com.zivilon.cinder_loe.entity.npc.radagast.FangornElk;
public class RenderFangornElk extends RenderLiving {
private static LOTRRandomSkins elkSkins;
private static ResourceLocation saddleTexture = new ResourceLocation("lotr:mob/elk/saddle.png");
public RenderFangornElk() {
super((ModelBase)new ModelFangornElk(), 0.5F);
setRenderPassModel((ModelBase)new ModelFangornElk(0.5F));
elkSkins = LOTRRandomSkins.loadSkinsList("lotr:mob/elk/elk");
}
public ResourceLocation getEntityTexture(Entity entity) {
FangornElk elk = (FangornElk)entity;
ResourceLocation elkSkin = elkSkins.getRandomSkin((LOTRRandomSkinEntity)elk);
return elkSkin;
}
}

@ -1,21 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.model.LOTRModelBoar;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderFangornWildBoar extends RenderLiving {
public static ResourceLocation boarSkin = new ResourceLocation("lotr:mob/boar/boar.png");
public RenderFangornWildBoar() {
super((ModelBase)new LOTRModelBoar(), 0.7F);
setRenderPassModel((ModelBase)new LOTRModelBoar(0.5F));
}
protected ResourceLocation getEntityTexture(Entity entity) {
return boarSkin;
}
}

@ -1,21 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import com.zivilon.cinder_loe.client.model.ModelFangornWolf;
public class RenderFangornWolf extends RenderLiving {
public static final ResourceLocation wolfSkin = new ResourceLocation("minecraft:textures/entity/wolf/wolf.png");
public RenderFangornWolf() {
super((ModelBase)new ModelFangornWolf(), 0.7F);
setRenderPassModel((ModelBase)new ModelFangornWolf());
}
protected ResourceLocation getEntityTexture(Entity entity) {
return wolfSkin;
}
}

@ -1,41 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
import com.zivilon.cinder_loe.entity.npc.evil_human.Limwaith;
public class RenderLimwaith extends LOTRRenderBiped {
public static LOTRRandomSkins skinsMale;
public static LOTRRandomSkins skinsFemale;
public ModelBiped outfitModel = (ModelBiped)new LOTRModelHuman(0.6F, false);
public RenderLimwaith() {
super((ModelBiped)new LOTRModelHuman(), 0.5F);
setRenderPassModel((ModelBase)this.outfitModel);
skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/limwaith/limwaith_male");
skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/limwaith/limwaith_female");
}
public ResourceLocation getEntityTexture(Entity entity) {
Limwaith limwaith = (Limwaith)entity;
if (((LOTREntityNPC)limwaith).familyInfo.isMale())
return skinsMale.getRandomSkin((LOTRRandomSkinEntity)limwaith);
return skinsFemale.getRandomSkin((LOTRRandomSkinEntity)limwaith);
}
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
Limwaith limwaith = (Limwaith)entity;
return super.shouldRenderPass((EntityLiving)limwaith, pass, f);
}
}

@ -1,25 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import com.zivilon.cinder_loe.entity.npc.evil_human.Limwaith;
import lotr.client.render.entity.LOTRRandomSkins;
import net.minecraft.client.model.ModelBase;
import net.minecraft.entity.EntityLiving;
public class RenderLimwaithShaman extends RenderLimwaith {
private static LOTRRandomSkins outfits;
public RenderLimwaithShaman() {
outfits = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/limwaith/shaman_outfit");
}
@Override
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
Limwaith shaman = (Limwaith) entity;
if (pass == 1 && shaman.getEquipmentInSlot(3) == null) {
this.setRenderPassModel((ModelBase)this.outfitModel);
this.bindTexture(outfits.getRandomSkin(shaman));
return 1;
}
return super.shouldRenderPass((EntityLiving)shaman, pass, f);
}
}

@ -1,50 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
import com.zivilon.cinder_loe.entity.Renegade;
import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
public class RenderRenegade extends LOTRRenderBiped {
private static LOTRRandomSkins skinsMale;
private static LOTRRandomSkins skinsFemale;
private static LOTRRandomSkins headwearFemale;
protected ModelBiped outfitModel = (ModelBiped) new LOTRModelHuman(0.6F, false);
public RenderRenegade() {
super((ModelBiped) new LOTRModelHuman(), 0.5F);
skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/renegade/renegade_male");
skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/renegade/renegade_female");
headwearFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/renegade/headwear_female");
}
public ResourceLocation getEntityTexture(Entity entity) {
Renegade man = (Renegade) entity;
if (((LOTREntityNPC) man).familyInfo.isMale()) return skinsMale.getRandomSkin((LOTRRandomSkinEntity) man);
return skinsFemale.getRandomSkin((LOTRRandomSkinEntity) man);
}
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
Renegade man = (Renegade) entity;
if (pass == 0 && man.getEquipmentInSlot(4) == null) if (!((LOTREntityNPC) man).familyInfo.isMale()
&& LOTRRandomSkins.nextInt((LOTRRandomSkinEntity) man, 4) == 0) {
setRenderPassModel((ModelBase) this.outfitModel);
bindTexture(headwearFemale.getRandomSkin((LOTRRandomSkinEntity) man));
return 1;
}
return super.shouldRenderPass((EntityLiving) man, pass, f);
}
}

@ -1,50 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.LOTRClientProxy;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import com.zivilon.cinder_loe.entity.SarumanFireball;
public class RenderSarumanFireball extends Render {
public static final ResourceLocation particlesTexture = new ResourceLocation("cinder_loe:misc/particles.png");
protected ResourceLocation getEntityTexture(Entity entity) {
return particlesTexture;
}
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
GL11.glPushMatrix();
GL11.glTranslatef((float)d, (float)d1, (float)d2);
GL11.glEnable(32826);
bindEntityTexture(entity);
Tessellator tessellator = Tessellator.instance;
drawSprite(tessellator, 24 + ((SarumanFireball)entity).animationTick);
GL11.glDisable(32826);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}
private void drawSprite(Tessellator tessellator, int index) {
float f = (index % 8 * 16 + 0) / 128.0F;
float f1 = (index % 8 * 16 + 16) / 128.0F;
float f2 = (index / 8 * 16 + 0) / 128.0F;
float f3 = (index / 8 * 16 + 16) / 128.0F;
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
tessellator.setBrightness(15728880);
tessellator.addVertexWithUV((0.0F - f5), (0.0F - f6), 0.0D, f, f3);
tessellator.addVertexWithUV((f4 - f5), (0.0F - f6), 0.0D, f1, f3);
tessellator.addVertexWithUV((f4 - f5), (f4 - f6), 0.0D, f1, f2);
tessellator.addVertexWithUV((0.0F - f5), (f4 - f6), 0.0D, f, f2);
tessellator.draw();
}
}

@ -1,50 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.LOTRClientProxy;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import com.zivilon.cinder_loe.entity.SarumanWhiteFireball;
public class RenderSarumanWhiteFireball extends Render {
public static final ResourceLocation particlesTexture = new ResourceLocation("cinder_loe:misc/particles.png");
protected ResourceLocation getEntityTexture(Entity entity) {
return particlesTexture;
}
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
GL11.glPushMatrix();
GL11.glTranslatef((float)d, (float)d1, (float)d2);
GL11.glEnable(32826);
bindEntityTexture(entity);
Tessellator tessellator = Tessellator.instance;
drawSprite(tessellator, 32 + ((SarumanWhiteFireball)entity).animationTick);
GL11.glDisable(32826);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}
private void drawSprite(Tessellator tessellator, int index) {
float f = (index % 8 * 16 + 0) / 128.0F;
float f1 = (index % 8 * 16 + 16) / 128.0F;
float f2 = (index / 8 * 16 + 0) / 128.0F;
float f3 = (index / 8 * 16 + 16) / 128.0F;
float f4 = 1.0F;
float f5 = 0.5F;
float f6 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
tessellator.setBrightness(15728880);
tessellator.addVertexWithUV((0.0F - f5), (0.0F - f6), 0.0D, f, f3);
tessellator.addVertexWithUV((f4 - f5), (0.0F - f6), 0.0D, f1, f3);
tessellator.addVertexWithUV((f4 - f5), (f4 - f6), 0.0D, f1, f2);
tessellator.addVertexWithUV((0.0F - f5), (f4 - f6), 0.0D, f, f2);
tessellator.draw();
}
}

@ -1,21 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.model.LOTRModelBoar;
import lotr.client.model.LOTRModelCrocodile;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderTamedCrocodile extends RenderLiving {
public static ResourceLocation crocskin = new ResourceLocation("lotr:mob/crocodile.png");
public RenderTamedCrocodile() {
super((ModelBase)new LOTRModelCrocodile(), 0.7F);
setRenderPassModel((ModelBase)new LOTRModelCrocodile());
}
protected ResourceLocation getEntityTexture(Entity entity) {
return crocskin;
}
}

@ -1,33 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderUtumnoSlave extends LOTRRenderBiped {
public static LOTRRandomSkins skins;
public ModelBiped outfitModel = (ModelBiped)new LOTRModelHuman(0.6F, false);
public RenderUtumnoSlave() {
super((ModelBiped)new LOTRModelHuman(), 0.5F);
setRenderPassModel((ModelBase)this.outfitModel);
skins = LOTRRandomSkins.loadSkinsList("lotr:mob/scrapTrader");
}
public ResourceLocation getEntityTexture(Entity entity) {
LOTREntityNPC lotrEntity = (LOTREntityNPC) entity;
return skins.getRandomSkin(lotrEntity);
}
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
return super.shouldRenderPass(entity, pass, f);
}
}

@ -1,43 +0,0 @@
package com.zivilon.cinder_loe.client.render;
import lotr.client.model.LOTRModelMarshWraith;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import com.zivilon.cinder_loe.entity.Wraith;
public class RenderWraith extends RenderLiving {
private static ResourceLocation skin = new ResourceLocation("cinder_loe:mob/wraith/wraith.png");
public RenderWraith() {
super((ModelBase)new LOTRModelMarshWraith(), 0.5F);
}
protected ResourceLocation getEntityTexture(Entity entity) {
return skin;
}
protected void preRenderCallback(EntityLivingBase entity, float f) {
super.preRenderCallback(entity, f);
float f1 = 0.9375F;
float hover = MathHelper.sin((((Entity)entity).ticksExisted + f) * 0.15F) * 0.2F - 0.5F;
GL11.glScalef(f1, f1, f1);
GL11.glTranslatef(0.0F, hover, 0.0F);
Wraith wraith = (Wraith)entity;
if (wraith.getDeathFadeTime() > 0) {
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glEnable(3008);
GL11.glColor4f(1.0F, 1.0F, 1.0F, wraith.getDeathFadeTime() / 30.0F);
}
}
protected float getDeathMaxRotation(EntityLivingBase entity) {
return 0.0F;
}
}

@ -1,43 +0,0 @@
package com.zivilon.cinder_loe.client.render.block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import com.zivilon.cinder_loe.tileentity.TileEntityMistBlock;
import lotr.client.render.tileentity.LOTRRenderUtumnoPortal;
public class RenderMistBlock extends TileEntitySpecialRenderer {
public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) {
TileEntityMistBlock mist = (TileEntityMistBlock)tileentity;
GL11.glPushMatrix();
GL11.glDisable(2884);
GL11.glDisable(3553);
GL11.glDisable(2896);
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glDepthMask(false);
int passes = 60;
for (int i = 0; i < passes; i++) {
GL11.glPushMatrix();
GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.0F + i * 0.5F, (float)d2 + 0.5F);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_F(mist.color_red, mist.color_green, mist.color_blue, (passes - i) / passes);
double width = 0.5D;
tessellator.addVertexWithUV(width, 0.0D, width, 0.0D, 0.0D);
tessellator.addVertexWithUV(width, 0.0D, -width, 0.0D, 0.0D);
tessellator.addVertexWithUV(-width, 0.0D, -width, 0.0D, 0.0D);
tessellator.addVertexWithUV(-width, 0.0D, width, 0.0D, 0.0D);
tessellator.draw();
GL11.glPopMatrix();
}
GL11.glDepthMask(true);
GL11.glEnable(3553);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042);
GL11.glEnable(2896);
GL11.glEnable(2884);
GL11.glPopMatrix();
}
}

@ -1,144 +0,0 @@
package com.zivilon.cinder_loe.client.render.block;
import com.zivilon.cinder_loe.client.model.Modelverticalweaponrack;
import com.zivilon.cinder_loe.tileentity.TileEntityMistBlock;
import lotr.client.model.LOTRModelWeaponRack;
import lotr.client.render.item.LOTRRenderBow;
import lotr.common.tileentity.LOTRTileEntityWeaponRack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
public class Renderverticalweaponrack extends TileEntitySpecialRenderer {
private static ResourceLocation rackTexture = new ResourceLocation("lotr:item/verticalweaponRack.png");
private static Modelverticalweaponrack rackModel = new Modelverticalweaponrack();
public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) {
LOTRTileEntityWeaponRack weaponRack = (LOTRTileEntityWeaponRack)tileentity;
GL11.glPushMatrix();
GL11.glDisable((int)2884);
GL11.glEnable((int)32826);
GL11.glEnable((int)3008);
GL11.glTranslatef((float)((float)d + 0.5f), (float)((float)d1 + 1.5f), (float)((float)d2 + 0.5f));
int meta = weaponRack.getBlockMetadata();
int dir = meta & 3;
boolean wall = (meta & 4) != 0;
switch (dir) {
case 0: {
GL11.glRotatef((float)0.0f, (float)0.0f, (float)1.0f, (float)0.0f);
break;
}
case 1: {
GL11.glRotatef((float)270.0f, (float)0.0f, (float)1.0f, (float)0.0f);
break;
}
case 2: {
GL11.glRotatef((float)180.0f, (float)0.0f, (float)1.0f, (float)0.0f);
break;
}
case 3: {
GL11.glRotatef((float)90.0f, (float)0.0f, (float)1.0f, (float)0.0f);
}
}
if (wall) {
GL11.glTranslatef((float)0.0f, (float)0.375f, (float)-0.5f);
}
GL11.glScalef((float)-1.0f, (float)-1.0f, (float)1.0f);
float scale = 0.0625f;
this.bindTexture(rackTexture);
Renderverticalweaponrack.rackModel.onWall = wall;
rackModel.render(null, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, scale);
ItemStack weaponItem = weaponRack.getWeaponItem();
if (weaponItem != null) {
float weaponScale = 0.625f;
GL11.glScalef((float)weaponScale, (float)weaponScale, (float)weaponScale);
GL11.glScalef((float)-1.0f, (float)1.0f, (float)1.0f);
GL11.glTranslatef((float)0.0f, (float)0.52f, (float)0.0f);
if (wall) {
GL11.glTranslatef((float)0.0f, (float)1.1f, (float)0.51f);
}
GL11.glRotatef((float)45.0f, (float)0.0f, (float)0.0f, (float)1.0f);
GL11.glTranslatef((float)0.9375f, (float)0.0625f, (float)0.0f);
GL11.glRotatef((float)-335.0f, (float)0.0f, (float)0.0f, (float)1.0f);
GL11.glRotatef((float)-50.0f, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glScalef((float)0.6666667f, (float)0.6666667f, (float)0.6666667f);
GL11.glTranslatef((float)0.0f, (float)0.3f, (float)0.0f);
RenderManager renderManager = RenderManager.instance;
int passes = 1;
if (weaponItem.getItem().requiresMultipleRenderPasses()) {
passes = weaponItem.getItem().getRenderPasses(weaponItem.getItemDamage());
}
LOTRRenderBow.renderingWeaponRack = true;
for (int pass = 0; pass < passes; ++pass) {
int color = weaponItem.getItem().getColorFromItemStack(weaponItem, pass);
float r = (float)(color >> 16 & 0xFF) / 255.0f;
float g = (float)(color >> 8 & 0xFF) / 255.0f;
float b = (float)(color & 0xFF) / 255.0f;
GL11.glColor4f((float)r, (float)g, (float)b, (float)1.0f);
renderManager.itemRenderer.renderItem(weaponRack.getEntityForRender(), weaponItem, 0, IItemRenderer.ItemRenderType.EQUIPPED);
}
LOTRRenderBow.renderingWeaponRack = false;
}
GL11.glEnable((int)2884);
GL11.glDisable((int)32826);
GL11.glPopMatrix();
this.renderWeaponName(weaponRack, d + 0.5, d1 + 0.75, d2 + 0.5);
}
private void renderWeaponName(LOTRTileEntityWeaponRack rack, double d, double d1, double d2) {
MovingObjectPosition mop = Minecraft.getMinecraft().objectMouseOver;
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && mop.blockX == rack.xCoord && mop.blockY == rack.yCoord && mop.blockZ == rack.zCoord) {
ItemStack weaponItem = rack.getWeaponItem();
if (Minecraft.isGuiEnabled() && weaponItem != null && weaponItem.hasDisplayName()) {
float f2;
RenderManager renderManager = RenderManager.instance;
FontRenderer fontRenderer = this.func_147498_b();
float f = 1.6f;
float f1 = 0.016666668f * f;
double dSq = renderManager.livingPlayer.getDistanceSq((double)rack.xCoord + 0.5, (double)rack.yCoord + 0.5, (double)rack.zCoord);
if (dSq < (double)((f2 = 64.0f) * f2)) {
String name = weaponItem.getDisplayName();
GL11.glPushMatrix();
GL11.glTranslatef((float)((float)d), (float)((float)d1 + 0.5f), (float)((float)d2));
GL11.glNormal3f((float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-renderManager.playerViewY), (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)renderManager.playerViewX, (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glScalef((float)(-f1), (float)(-f1), (float)f1);
GL11.glDisable((int)2896);
GL11.glDepthMask((boolean)false);
GL11.glDisable((int)2929);
GL11.glEnable((int)3042);
OpenGlHelper.glBlendFunc((int)770, (int)771, (int)1, (int)0);
Tessellator tessellator = Tessellator.instance;
int b0 = 0;
GL11.glDisable((int)3553);
tessellator.startDrawingQuads();
int j = fontRenderer.getStringWidth(name) / 2;
tessellator.setColorRGBA_F(0.0f, 0.0f, 0.0f, 0.25f);
tessellator.addVertex((double)(-j - 1), (double)(-1 + b0), 0.0);
tessellator.addVertex((double)(-j - 1), (double)(8 + b0), 0.0);
tessellator.addVertex((double)(j + 1), (double)(8 + b0), 0.0);
tessellator.addVertex((double)(j + 1), (double)(-1 + b0), 0.0);
tessellator.draw();
GL11.glEnable((int)3553);
fontRenderer.drawString(name, -fontRenderer.getStringWidth(name) / 2, b0, 0x20FFFFFF);
GL11.glEnable((int)2929);
GL11.glDepthMask((boolean)true);
fontRenderer.drawString(name, -fontRenderer.getStringWidth(name) / 2, b0, -1);
GL11.glEnable((int)2896);
GL11.glDisable((int)3042);
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
GL11.glPopMatrix();
}
}
}
}
}

@ -1,38 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptDwarf;
import com.zivilon.cinder_loe.entity.corrupt.CorruptElf;
import lotr.client.model.LOTRModelDwarf;
import lotr.client.model.LOTRModelElf;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRenderDwarf;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderCorruptDwarf extends LOTRRenderDwarf {
public static LOTRRandomSkins skinsMale;
protected ModelBiped standardRenderPassModel = new LOTRModelDwarf(0.5f, 64, 64);
public RenderCorruptDwarf() {
super();
skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/dwarf");
}
@Override
protected void func_82421_b() {
this.field_82423_g = new LOTRModelDwarf(1.0f);
this.field_82425_h = new LOTRModelDwarf(0.5f);
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
CorruptDwarf dwarf = (CorruptDwarf)entity;
if (dwarf.familyInfo.isMale()) {
return skinsMale.getRandomSkin(dwarf);
}
return skinsMale.getRandomSkin(dwarf);
}
}

@ -1,41 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptDwarf;
import com.zivilon.cinder_loe.entity.corrupt.CorruptElf;
import lotr.client.model.LOTRModelElf;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRenderElf;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderCorruptElf extends LOTRRenderElf {
public static LOTRRandomSkins skinsMale;
public static LOTRRandomSkins skinsFemale;
private LOTRModelElf eyesModel = new LOTRModelElf(0.05f, 64, 64);
private LOTRModelElf outfitModel = new LOTRModelElf(0.6f, 64, 64);
public RenderCorruptElf() {
super();
skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/elf_male");
skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/elf_female");
}
@Override
protected void func_82421_b() {
this.field_82423_g = new LOTRModelElf(1.0f);
this.field_82425_h = new LOTRModelElf(0.5f);
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
CorruptElf elf = (CorruptElf)entity;
if (((LOTREntityNPC)elf).familyInfo.isMale()) {
return skinsMale.getRandomSkin((LOTRRandomSkinEntity)elf);
}
return skinsFemale.getRandomSkin((LOTRRandomSkinEntity)elf);
}
}

@ -1,45 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptDwarf;
import lotr.client.LOTRTextures;
import lotr.client.model.LOTRModelDwarf;
import lotr.client.model.LOTRModelEnt;
import lotr.client.render.entity.LOTRGlowingEyes;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.common.entity.npc.LOTREntityEnt;
import lotr.common.entity.npc.LOTREntityTree;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import java.util.HashMap;
public class RenderCorruptEnt extends RenderLiving {
private static HashMap entTextures = new HashMap();
private LOTRModelEnt eyesModel = new LOTRModelEnt(0.05f);
public RenderCorruptEnt() {
super((ModelBase)new LOTRModelEnt(), 0.5f);
}
protected ResourceLocation getEntityTexture(Entity entity) {
int treeType = ((LOTREntityEnt)entity).getTreeType();
String s = "cinder_loe:mob/corrupt/ent/" + LOTREntityTree.TYPES[treeType] + ".png";
ResourceLocation r = (ResourceLocation)entTextures.get(treeType);
if (r == null) {
r = new ResourceLocation(s);
entTextures.put(treeType, r);
}
return r;
}
protected void renderModel(EntityLivingBase entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.renderModel(entity, f, f1, f2, f3, f4, f5);
ResourceLocation eyes = LOTRTextures.getEyesTexture(this.getEntityTexture((Entity)entity), new int[][]{{15, 23}, {22, 23}}, 3, 2);
LOTRGlowingEyes.renderGlowingEyes((Entity)entity, eyes, this.eyesModel, f, f1, f2, f3, f4, f5);
}
}

@ -1,42 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptDwarf;
import com.zivilon.cinder_loe.entity.corrupt.CorruptHobbit;
import lotr.client.model.LOTRModelDwarf;
import lotr.client.model.LOTRModelHobbit;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRenderHobbit;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderCorruptHobbit extends LOTRRenderHobbit {
public static LOTRRandomSkins hobbitSkinsMale;
public static LOTRRandomSkins hobbitSkinsFemale;
protected ModelBiped outfitModel = new LOTRModelHobbit(0.5f, 64, 64);
public RenderCorruptHobbit() {
super();
hobbitSkinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/hobbit_male");
hobbitSkinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/hobbit_female");
}
@Override
protected void func_82421_b() {
this.field_82423_g = new LOTRModelHobbit(1.0f);
this.field_82425_h = new LOTRModelHobbit(0.5f);
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
CorruptHobbit dwarf = (CorruptHobbit) entity;
if (dwarf.familyInfo.isMale()) {
return hobbitSkinsMale.getRandomSkin(dwarf);
}
return hobbitSkinsFemale.getRandomSkin(dwarf);
}
}

@ -1,41 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptElf;
import com.zivilon.cinder_loe.entity.corrupt.CorruptMan;
import lotr.client.model.LOTRModelElf;
import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.*;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityMan;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderCorruptMan extends LOTRRenderGondorMan {
public static LOTRRandomSkins skinsMale;
public static LOTRRandomSkins skinsFemale;
protected ModelBiped outfitModel = new LOTRModelHuman(0.6f, false);
public RenderCorruptMan() {
super();
skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/human_male");
skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/human_female");
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
CorruptMan gondorian = (CorruptMan)entity;
if (gondorian.familyInfo.isMale()) {
return skinsMale.getRandomSkin(gondorian);
}
return skinsFemale.getRandomSkin(gondorian);
}
@Override
public int shouldRenderPass(EntityLiving entity, int pass, float f) {
CorruptMan dunedain = (CorruptMan)entity;
return super.shouldRenderPass((EntityLiving)dunedain, pass, f);
}
}

@ -1,40 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.entity.corrupt.CorruptDwarf;
import com.zivilon.cinder_loe.entity.corrupt.CorruptOrc;
import lotr.client.LOTRTextures;
import lotr.client.model.LOTRModelDwarf;
import lotr.client.model.LOTRModelOrc;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRenderDwarf;
import lotr.client.render.entity.LOTRRenderOrc;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
public class RenderCorruptOrc extends LOTRRenderOrc {
private static LOTRRandomSkins orcSkins;
private static LOTRRandomSkins urukSkins;
private static LOTRRandomSkins blackUrukSkins;
private LOTRModelOrc eyesModel = new LOTRModelOrc(0.05f);
public RenderCorruptOrc() {
super();
orcSkins = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/corrupt/orc");
}
@Override
protected void func_82421_b() {
this.field_82423_g = new LOTRModelOrc(1.0f);
this.field_82425_h = new LOTRModelOrc(0.5f);
}
@Override
public ResourceLocation getEntityTexture(Entity entity) {
CorruptOrc orc = (CorruptOrc)entity;
return orcSkins.getRandomSkin(orc);
}
}

@ -1,36 +0,0 @@
package com.zivilon.cinder_loe.client.render.corrupt;
import com.zivilon.cinder_loe.client.model.ModelFangornElk;
import com.zivilon.cinder_loe.client.model.ModelSunkenSkeleton;
import com.zivilon.cinder_loe.entity.corrupt.CorruptMan;
import lotr.client.model.LOTRModelHuman;
import lotr.client.model.LOTRModelSkeleton;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRenderGondorMan;
import lotr.client.render.entity.LOTRRenderSkeleton;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;
public class RenderCorruptSkeleton extends RenderBiped {
private static ResourceLocation skin = new ResourceLocation("textures/entity/skeleton/skeleton.png");
public RenderCorruptSkeleton() {
super(new ModelSunkenSkeleton(), 0.5F);
}
protected void func_82421_b() {
this.field_82423_g = new ModelSunkenSkeleton(1.0F);
this.field_82425_h = new ModelSunkenSkeleton(0.5F);
}
protected ResourceLocation func_110775_a(Entity entity) {
return skin;
}
}

@ -1,151 +0,0 @@
package com.zivilon.cinder_loe.client.render.item;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Dynamic;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.texture.TextureUtil;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemCloth;
import net.minecraft.item.ItemMap;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.storage.MapData;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
import net.minecraftforge.client.MinecraftForgeClient;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
public class RenderHelper extends ItemRenderer {
public RenderHelper() {
super(Minecraft.getMinecraft());
}
public static void customRenderItemIn2D(Tessellator p_78439_0_, float p_78439_1_, float p_78439_2_, float p_78439_3_, float p_78439_4_, int p_78439_5_, int p_78439_6_, float p_78439_7_, boolean enchant) {
if (!enchant) GL11.glPushMatrix(); // Save the current OpenGL state
if (!enchant) GL11.glEnable(GL11.GL_BLEND); // Enable blending
if (!enchant) OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO); // Apply your custom blend function for semi-transparency
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(0.0F, 0.0F, 1.0F);
p_78439_0_.addVertexWithUV(0.0D, 0.0D, 0.0D, (double)p_78439_1_, (double)p_78439_4_);
p_78439_0_.addVertexWithUV(1.0D, 0.0D, 0.0D, (double)p_78439_3_, (double)p_78439_4_);
p_78439_0_.addVertexWithUV(1.0D, 1.0D, 0.0D, (double)p_78439_3_, (double)p_78439_2_);
p_78439_0_.addVertexWithUV(0.0D, 1.0D, 0.0D, (double)p_78439_1_, (double)p_78439_2_);
p_78439_0_.draw();
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(0.0F, 0.0F, -1.0F);
p_78439_0_.addVertexWithUV(0.0D, 1.0D, (double)(0.0F - p_78439_7_), (double)p_78439_1_, (double)p_78439_2_);
p_78439_0_.addVertexWithUV(1.0D, 1.0D, (double)(0.0F - p_78439_7_), (double)p_78439_3_, (double)p_78439_2_);
p_78439_0_.addVertexWithUV(1.0D, 0.0D, (double)(0.0F - p_78439_7_), (double)p_78439_3_, (double)p_78439_4_);
p_78439_0_.addVertexWithUV(0.0D, 0.0D, (double)(0.0F - p_78439_7_), (double)p_78439_1_, (double)p_78439_4_);
p_78439_0_.draw();
float f5 = 0.5F * (p_78439_1_ - p_78439_3_) / (float)p_78439_5_;
float f6 = 0.5F * (p_78439_4_ - p_78439_2_) / (float)p_78439_6_;
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(-1.0F, 0.0F, 0.0F);
int k;
float f7;
float f8;
for (k = 0; k < p_78439_5_; ++k)
{
f7 = (float)k / (float)p_78439_5_;
f8 = p_78439_1_ + (p_78439_3_ - p_78439_1_) * f7 - f5;
p_78439_0_.addVertexWithUV((double)f7, 0.0D, (double)(0.0F - p_78439_7_), (double)f8, (double)p_78439_4_);
p_78439_0_.addVertexWithUV((double)f7, 0.0D, 0.0D, (double)f8, (double)p_78439_4_);
p_78439_0_.addVertexWithUV((double)f7, 1.0D, 0.0D, (double)f8, (double)p_78439_2_);
p_78439_0_.addVertexWithUV((double)f7, 1.0D, (double)(0.0F - p_78439_7_), (double)f8, (double)p_78439_2_);
}
p_78439_0_.draw();
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(1.0F, 0.0F, 0.0F);
float f9;
for (k = 0; k < p_78439_5_; ++k)
{
f7 = (float)k / (float)p_78439_5_;
f8 = p_78439_1_ + (p_78439_3_ - p_78439_1_) * f7 - f5;
f9 = f7 + 1.0F / (float)p_78439_5_;
p_78439_0_.addVertexWithUV((double)f9, 1.0D, (double)(0.0F - p_78439_7_), (double)f8, (double)p_78439_2_);
p_78439_0_.addVertexWithUV((double)f9, 1.0D, 0.0D, (double)f8, (double)p_78439_2_);
p_78439_0_.addVertexWithUV((double)f9, 0.0D, 0.0D, (double)f8, (double)p_78439_4_);
p_78439_0_.addVertexWithUV((double)f9, 0.0D, (double)(0.0F - p_78439_7_), (double)f8, (double)p_78439_4_);
}
p_78439_0_.draw();
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(0.0F, 1.0F, 0.0F);
for (k = 0; k < p_78439_6_; ++k)
{
f7 = (float)k / (float)p_78439_6_;
f8 = p_78439_4_ + (p_78439_2_ - p_78439_4_) * f7 - f6;
f9 = f7 + 1.0F / (float)p_78439_6_;
p_78439_0_.addVertexWithUV(0.0D, (double)f9, 0.0D, (double)p_78439_1_, (double)f8);
p_78439_0_.addVertexWithUV(1.0D, (double)f9, 0.0D, (double)p_78439_3_, (double)f8);
p_78439_0_.addVertexWithUV(1.0D, (double)f9, (double)(0.0F - p_78439_7_), (double)p_78439_3_, (double)f8);
p_78439_0_.addVertexWithUV(0.0D, (double)f9, (double)(0.0F - p_78439_7_), (double)p_78439_1_, (double)f8);
}
p_78439_0_.draw();
p_78439_0_.startDrawingQuads();
p_78439_0_.setNormal(0.0F, -1.0F, 0.0F);
for (k = 0; k < p_78439_6_; ++k)
{
f7 = (float)k / (float)p_78439_6_;
f8 = p_78439_4_ + (p_78439_2_ - p_78439_4_) * f7 - f6;
p_78439_0_.addVertexWithUV(1.0D, (double)f7, 0.0D, (double)p_78439_3_, (double)f8);
p_78439_0_.addVertexWithUV(0.0D, (double)f7, 0.0D, (double)p_78439_1_, (double)f8);
p_78439_0_.addVertexWithUV(0.0D, (double)f7, (double)(0.0F - p_78439_7_), (double)p_78439_1_, (double)f8);
p_78439_0_.addVertexWithUV(1.0D, (double)f7, (double)(0.0F - p_78439_7_), (double)p_78439_3_, (double)f8);
}
p_78439_0_.draw();
if (!enchant) GL11.glPopMatrix(); // Restore the saved OpenGL state
}
}

@ -1,53 +0,0 @@
package com.zivilon.cinder_loe.client.render.projectile;
import com.zivilon.cinder_loe.entity.projectile.EntityWarDart;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.ItemRenderer;
public class RenderWarDart extends Render {
protected ResourceLocation getEntityTexture(Entity entity) {
return TextureMap.locationItemsTexture;
}
@Override
public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) {
EntityWarDart dart = (EntityWarDart)entity;
GL11.glPushMatrix();
GL11.glTranslatef((float)d, (float)d1, (float)d2);
GL11.glRotatef(dart.prevRotationYaw + (dart.rotationYaw - dart.prevRotationYaw) * f1 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(dart.prevRotationPitch + (dart.rotationPitch - dart.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F);
GL11.glEnable(32826);
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
float scale = 0.6F;
GL11.glScalef(scale, scale, scale);
GL11.glTranslatef(0.0F, 0.8F, 0.0F);
if (dart.item != null) {
IIcon icon = dart.getDartIcon();
if (icon != null) {
Tessellator tessellator = Tessellator.instance;
float minU = icon.getMinU();
float maxU = icon.getMaxU();
float minV = icon.getMinV();
float maxV = icon.getMaxV();
int width = icon.getIconWidth();
int height = icon.getIconHeight();
bindTexture(getEntityTexture((Entity)dart));
ItemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, width, height, 0.0625F);
}
}
GL11.glDisable(32826);
GL11.glPopMatrix();
}
}

@ -1,81 +0,0 @@
package com.zivilon.cinder_loe.command;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentText;
import com.zivilon.cinder_loe.character.CharacterRoleAPI;
import com.zivilon.cinder_loe.util.Utilities;
import java.util.UUID;
public class CommandCinderCharacter extends CommandBase {
@Override
public String getCommandName() {
return "cinder_character";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/cinder_character <set/get/remove> <character_name> [player_name]";
}
@Override
public int getRequiredPermissionLevel() {
return 4;
}
@Override
public void processCommand(ICommandSender sender, String[] args) {
if(args.length < 2) {
sender.addChatMessage(new ChatComponentText("Incorrect arguments. Usage: " + getCommandUsage(sender)));
return;
}
String action = args[0];
String character = args[1];
if (action.equals("set")) {
if(args.length < 3) {
// Set character UUID to player UUID
sender.addChatMessage(new ChatComponentText("Incorrect arguments. Please specify player: " + getCommandUsage(sender)));
} else {
String player = args[2];
EntityPlayerMP player_entity = MinecraftServer.getServer().getConfigurationManager().func_152612_a(player);
if (player_entity == null) {
sender.addChatMessage(new ChatComponentText("Invalid player name"));
} else {
sender.addChatMessage(new ChatComponentText("Setting player " + player_entity.getCommandSenderName() + " as " + character));
CharacterRoleAPI.setCharacterRoleUUID(character, player_entity.getUniqueID());
}
}
} else if (action.equals("remove")) {
UUID uuid = CharacterRoleAPI.getCharacterRoleUUID(character);
if (uuid == null) {
sender.addChatMessage(new ChatComponentText("Invalid character name"));
return;
}
sender.addChatMessage(new ChatComponentText("Cleared player for character " + character));
CharacterRoleAPI.removeCharacterRole(character);
} else if (action.equals("get")) {
UUID uuid = CharacterRoleAPI.getCharacterRoleUUID(character);
if (uuid == null) {
sender.addChatMessage(new ChatComponentText("Character " + character + " is unclaimed"));
return;
}
String player_name = Utilities.getPlayerByUUID(uuid).getCommandSenderName();
if (player_name != null) {
sender.addChatMessage(new ChatComponentText("Character " + character + " is currently set to " + player_name));
return;
}
sender.addChatMessage(new ChatComponentText("Character " + character + " is currently set to offline player " + uuid.toString()));
} else {
sender.addChatMessage(new ChatComponentText("Incorrect arguments. Usage: " + getCommandUsage(sender)));
return;
}
}
}

@ -1,43 +0,0 @@
package com.zivilon.cinder_loe.coremod;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
import org.spongepowered.asm.launch.MixinBootstrap;
import org.spongepowered.asm.mixin.Mixins;
import java.util.Map;
@TransformerExclusions({"com.zivilon.cinder_loe.coremod"})
@SortingIndex(1001)
@MCVersion("1.7.10")
public class CoreMod implements IFMLLoadingPlugin {
@Override
public String[] getASMTransformerClass() {
return new String[] {"com.zivilon.cinder_loe.coremod.LOTRMaterialTransformer","com.zivilon.cinder_loe.coremod.LOTRWeaponLinker", "com.zivilon.cinder_loe.coremod.LOTRBannerAdder", "com.zivilon.cinder_loe.coremod.LOTRSpawnListLinker", "com.zivilon.cinder_loe.coremod.OptiFinePatcher"};
}
@Override
public String getModContainerClass() {
// Return the class name of your @Mod class
return null;
}
@Override
public String getSetupClass() {
// Return the class name that sets up coremod environment, or null if none
return null;
}
@Override
public void injectData(Map<String, Object> data) {
MixinBootstrap.init();
Mixins.addConfiguration("mixins.cinder_loe.json");
}
@Override
public String getAccessTransformerClass() {
// Return the class name of your access transformer or null if none
return null;
}
}

@ -1,168 +0,0 @@
package com.zivilon.cinder_loe.coremod;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.FieldNode;
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.IntInsnNode;
import org.objectweb.asm.tree.TypeInsnNode;
import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.LdcInsnNode;
import org.objectweb.asm.tree.FieldInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.List;
import java.util.ArrayList;
public class LOTRBannerAdder implements IClassTransformer {
public static List<BannerInfo> custom_banners = new ArrayList<>();
public void registerBanners() {
custom_banners = new ArrayList<>();
// Arguments: enum name, texture name, ID, faction name
register("RED_DWARF", "redDwarf", 42, "DURINS_FOLK");
register("LIMWAITH", "limwaith", 43, "MORWAITH");
register("RED", "red", 44, "GONDOR");
register("BLUE", "blue", 45, "GONDOR");
register("GREEN", "green", 46, "GONDOR");
// register("TEST", "test", 43, "GONDOR");
}
@Override
public byte[] transform(String name, String transformedName, byte[] basicClass) {
if ("lotr.common.item.LOTRItemBanner$BannerType".equals(transformedName)) {
registerBanners();
// Get class
ClassReader classReader = new ClassReader(basicClass);
ClassNode classNode = new ClassNode();
classReader.accept(classNode, 0);
// Add the new enum constant
for (BannerInfo banner : custom_banners) {
FieldNode newEnumConstant = new FieldNode(
Opcodes.ACC_PUBLIC + Opcodes.ACC_STATIC + Opcodes.ACC_FINAL + Opcodes.ACC_ENUM,
banner.enum_name,
"Llotr/common/item/LOTRItemBanner$BannerType;",
null,
null
);
classNode.fields.add(newEnumConstant);
}
// Locate <clinit>
MethodNode clinit = null;
for (MethodNode method : classNode.methods) {
if ("<clinit>".equals(method.name)) {
clinit = method;
break;
}
}
InsnList insns = clinit.instructions;
AbstractInsnNode constructor_injection_point = null;
for (int i = 0; i < insns.size(); i++) {
AbstractInsnNode insn = insns.get(i);
// Check if the instruction is a BIPUSH
if (insn.getOpcode() == Opcodes.BIPUSH) {
IntInsnNode intInsn = (IntInsnNode) insn;
// Check if the operand is 42, indicating the size of the $VALUES array
if (intInsn.operand == 42) {
// Found the instruction to modify
constructor_injection_point = insn;
// Modify the operand from 42 to 43 to account for the new enum constant
intInsn.operand = 42 + custom_banners.size();
System.out.println("Enum array length set to " + intInsn.operand);
System.out.println("Banner list size: " + custom_banners.size());
break;
}
}
}
// Create the constructor instructions to add new banner
InsnList constructor_injection = new InsnList();
for (BannerInfo banner : custom_banners) {
constructor_injection.add(new TypeInsnNode(Opcodes.NEW, "lotr/common/item/LOTRItemBanner$BannerType"));
constructor_injection.add(new InsnNode(Opcodes.DUP));
System.out.println("Registering with enum " + banner.enum_name);
constructor_injection.add(new LdcInsnNode(banner.enum_name));
System.out.println("Registering with ordinal " + banner.ordinal);
constructor_injection.add(new IntInsnNode(Opcodes.BIPUSH, banner.ordinal));
constructor_injection.add(new IntInsnNode(Opcodes.BIPUSH, banner.ordinal));
System.out.println("Registering with identifier " + banner.identifier);
constructor_injection.add(new LdcInsnNode(banner.identifier));
constructor_injection.add(new FieldInsnNode(Opcodes.GETSTATIC, "lotr/common/fac/LOTRFaction", banner.faction, "Llotr/common/fac/LOTRFaction;"));
constructor_injection.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "lotr/common/item/LOTRItemBanner$BannerType", "<init>", "(Ljava/lang/String;IILjava/lang/String;Llotr/common/fac/LOTRFaction;)V", false));
constructor_injection.add(new FieldInsnNode(Opcodes.PUTSTATIC, "lotr/common/item/LOTRItemBanner$BannerType", banner.enum_name, "Llotr/common/item/LOTRItemBanner$BannerType;"));
}
// Insert the new instructions
if (constructor_injection_point != null) {
insns.insertBefore(constructor_injection_point, constructor_injection);
}
// Modifying the $VALUES array
// Create new instruction list to be injected later
InsnList values_array_injection = new InsnList();
// Add instructions to the instruction list
for (BannerInfo banner : custom_banners) {
values_array_injection.add(new InsnNode(Opcodes.DUP));
values_array_injection.add(new IntInsnNode(Opcodes.BIPUSH, banner.ordinal));
values_array_injection.add(new FieldInsnNode(Opcodes.GETSTATIC, "lotr/common/item/LOTRItemBanner$BannerType", banner.enum_name, "Llotr/common/item/LOTRItemBanner$BannerType;"));
values_array_injection.add(new InsnNode(Opcodes.AASTORE));
}
// Find the putstatic instruction for $VALUES
// This is where the fields are injected into a list, we want to inject our instructions before this
AbstractInsnNode values_injection_point = null;
while (constructor_injection_point != null) {
constructor_injection_point = constructor_injection_point.getNext();
if (constructor_injection_point.getOpcode() == Opcodes.PUTSTATIC) {
values_injection_point = constructor_injection_point;
break;
}
}
// Insert the new instructions before the putstatic instruction
if (values_injection_point != null) {
insns.insertBefore(values_injection_point, values_array_injection);
}
// Write the modified class back to a byte array
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
classNode.accept(classWriter);
return classWriter.toByteArray(); // Return the modified class
}
return basicClass; // Return the unmodified class for all other classes
}
public void register(String enum_name, String identifier, int ordinal, String faction) {
System.out.println("Registering banner " + enum_name + " " + identifier);
custom_banners.add(new BannerInfo(enum_name, identifier, ordinal, faction));
}
public class BannerInfo {
String enum_name;
String identifier;
int ordinal;
String faction;
public BannerInfo(String enum_name, String identifier, int ordinal, String faction) {
this.enum_name = enum_name;
this.identifier = identifier;
this.ordinal = ordinal;
this.faction = faction;
}
}
}

@ -1,159 +0,0 @@
package com.zivilon.cinder_loe.coremod;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.*;
import java.util.Iterator;
public class LOTRMaterialTransformer implements IClassTransformer {
@Override
public byte[] transform(String name, String transformedName, byte[] classBytes) {
if (transformedName.equals("lotr.common.item.LOTRMaterial")) {
System.out.println("[CinderLoE] Transforming LOTRMaterial...");
ClassReader reader = new ClassReader(classBytes);
ClassNode classNode = new ClassNode();
reader.accept(classNode, 0);
modifyMaterial("ANGMAR", 431, 0.6F, classNode); //Original Durability = 350 | Add 81 | 162 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("URUK", 606, 0.7F, classNode); //Original Durability = 550 | Add 56 | 112 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("BLACK_URUK", 662, 0.7F, classNode); //Original Durability = 550 | Add 56 | 112 if Upgraded Armory | 2/4 (Unupgraded)
modifyMaterial("HALF_TROLL", 387, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 1/4 (Unupgraded)
// Good Humans
modifyMaterial("DALE", 387, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("GONDOR", 654, 0.6F, classNode); //Original Durability = 450 | Add 68 | 137 if Upgraded Armory | 3/4 (Unupgraded)
modifyMaterial("DORWINION_ELF", 692, 0.6F, classNode); //Original Durability = 500 | Add 62 | 125 if Upgraded Armory | 3/4 (Unupgraded)
modifyMaterial("ROHAN", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 0/4
modifyMaterial("TAUREDAIN", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 0/4
modifyMaterial("DORWINION", 400, 0.6F, classNode); //Original Durability = 400 | Add 75 | 150 if Upgraded Armory | 0/4
modifyMaterial("LOSSARNACH", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory 0/4
modifyMaterial("LAMEDON", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 0/4
// Evil Humans
modifyMaterial("RHUN_GOLD", 450, 0.6F, classNode); //Original Durability = 450 | Add 68 | 137 if Upgraded Armory | 0/4
modifyMaterial("RHUN", 400, 0.6F, classNode); //Original Durability = 400 | Add 75 | 150 if Upgraded Armory | 0/4
modifyMaterial("DUNLENDING", 343, 0.6F, classNode); //Original Durability = 250 | Add 93 | 187 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("NEAR_HARAD", 561, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 3/4 (Unupgraded)
modifyMaterial("HARNEDOR", 250, 0.6F, classNode); //Original Durability = 250 | Add 93 | 187 if Upgraded Armory | 0/4
modifyMaterial("CORSAIR", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 0/4
modifyMaterial("GULF_HARAD", 350, 0.6F, classNode); //Original Durability = 350 | Add 81 | 162 if Upgraded Armory | 0/4
modifyMaterial("UMBAR", 586, 0.6F, classNode); //Original Durability = 450 | Add 68 | 137 if Upgraded Armory | 2/4 (Unupgraded)
modifyMaterial("MOREDAIN", 250, 0.6F, classNode); //Original Durability = 250 | Add 93 | 187 if Upgraded Armory | 0/4
//Elves
modifyMaterial("WOOD_ELVEN", 748, 0.6F, classNode); //Original Durability = 500 | Add 62 | 125 if Upgraded Armory | 4/4 (Unupgraded)
// Custom
modifyMaterial("UTUMNO", 1500, 0.7F, classNode);
addMaterial("RED_DWARF", classNode);
addMaterial("WIZARD", classNode);
addMaterial("LIMWAITH_BONE", classNode);
addMaterial("BONEMOLD", classNode);
addMaterial("LIMWAITH_WOOD", classNode);
addMaterial("EVENT", classNode);
addMaterial("BREE", classNode);
addMaterial("BATTLENUN", classNode);
addMaterial("ASH", classNode);
addMaterial("RHUDAUR", classNode);
addMaterial("SERPENT", classNode);
addMaterial("USURPER", classNode);
addMaterial("WARLORD",classNode);
addMaterial("JADE",classNode);
// Protection Conversion
// Convert your ClassNode back to byte array with ClassWriter
ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
classNode.accept(writer);
byte[] transformedBytes = writer.toByteArray();
return transformedBytes;
}
return classBytes;
}
public void addMaterial(String fieldName, ClassNode classNode) {
FieldNode field = new FieldNode(
Opcodes.ACC_PUBLIC + Opcodes.ACC_STATIC,
fieldName,
"Llotr/common/item/LOTRMaterial;", // Adjust the descriptor based on the actual package name
null,
null
);
classNode.fields.add(field);
}
public void modifyMaterial(String fieldName, int durability, float protection, ClassNode classNode) {
MethodNode clinit = null;
boolean foundField = false;
boolean durabilityModified = false;
boolean protectionModified = false;
// First, find the <clinit> method
for (MethodNode method : classNode.methods) {
if (method.name.equals("<clinit>")) {
clinit = method;
break;
}
}
if (clinit == null) {
return;
}
Iterator<AbstractInsnNode> iter = clinit.instructions.iterator();
while (iter.hasNext()) {
AbstractInsnNode insn = iter.next();
if (insn instanceof LdcInsnNode && ((LdcInsnNode) insn).cst.equals(fieldName)) {
foundField = true;
}
if (foundField && insn instanceof MethodInsnNode && ((MethodInsnNode) insn).name.equals("setProtection")) {
AbstractInsnNode protectionInsn = insn.getPrevious();
if (protectionInsn instanceof LdcInsnNode) {
((LdcInsnNode) protectionInsn).cst = protection;
System.out.println("[CinderLoE] Updated protection for " + fieldName + " to " + protection);
return;
}
}
if (foundField && !durabilityModified && insn instanceof MethodInsnNode && ((MethodInsnNode) insn).name.equals("setUses")) {
AbstractInsnNode durabilityInsn = insn.getPrevious();
if (durabilityInsn instanceof IntInsnNode) {
((IntInsnNode) durabilityInsn).operand = durability;
System.out.println("[CinderLoE] Updated durability for " + fieldName + " to " + durability);
durabilityModified = true;
}
}
if (foundField && !protectionModified && insn instanceof MethodInsnNode && ((MethodInsnNode) insn).name.equals("setProtection")) {
AbstractInsnNode protectionInsn = insn.getPrevious();
if (protectionInsn instanceof LdcInsnNode) {
((LdcInsnNode) protectionInsn).cst = protection;
System.out.println("[CinderLoE] Updated protection for " + fieldName + " to " + protection);
protectionModified = true;
}
}
if (durabilityModified && protectionModified) {
return;
}
}
if (!foundField) {
System.out.println("[CinderLoE] Field '" + fieldName + "' not found in <clinit>.");
}
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save