2
0
Fork 0

Mouth of Sauron ability created

main
KeyLime17 4 months ago
parent 0435805069
commit 8aedbdfc5e

@ -10,6 +10,7 @@ import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
import lotr.common.LOTRDimension; import lotr.common.LOTRDimension;
import lotr.common.enchant.LOTREnchantment; import lotr.common.enchant.LOTREnchantment;
@ -18,6 +19,7 @@ import lotr.common.entity.item.LOTREntityArrowPoisoned;
import lotr.common.entity.npc.LOTREntityOrc; import lotr.common.entity.npc.LOTREntityOrc;
import lotr.common.entity.projectile.LOTREntityCrossbowBolt; import lotr.common.entity.projectile.LOTREntityCrossbowBolt;
import lotr.common.entity.projectile.LOTREntityDart; import lotr.common.entity.projectile.LOTREntityDart;
import lotr.common.fac.LOTRFaction;
import lotr.common.item.*; import lotr.common.item.*;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -99,55 +101,87 @@ public class CinderEventHandler implements IFuelHandler {
@SubscribeEvent @SubscribeEvent
public void onLivingAttack(LivingAttackEvent event) { public void onLivingAttack(LivingAttackEvent event) {
EntityLivingBase entity = event.entityLiving;
EntityLivingBase attacker = event.source.getEntity() instanceof EntityLivingBase ? (EntityLivingBase)event.source.getEntity() : null;
World world = entity.worldObj;
if (event.entityLiving.worldObj.isRemote) return; if (event.entityLiving.worldObj.isRemote) return;
EntityLivingBase target = event.entityLiving;
if (event.source instanceof EntityDamageSourceIndirect) { if (event.source instanceof EntityDamageSourceIndirect) {
Entity projectile = event.source.getSourceOfDamage(); Entity proj = event.source.getSourceOfDamage();
if (projectile instanceof EntityArrow || projectile instanceof LOTREntityCrossbowBolt || projectile instanceof LOTREntityDart) { if (proj instanceof EntityArrow
boolean wearingAllGalvorn = true; || proj instanceof LOTREntityCrossbowBolt
for (int i = 0; i < 4; ++i) { || proj instanceof LOTREntityDart) {
ItemStack armour = entity.getEquipmentInSlot(i + 1); boolean allGalvorn = true;
if (armour != null && armour.getItem() instanceof ItemArmor && ((ItemArmor)armour.getItem()).getArmorMaterial() == CinderLoE.MATERIAL_GILDEDGALVORN.toArmorMaterial()) continue; for (int slot = 1; slot <= 4; slot++) {
wearingAllGalvorn = false; ItemStack armor = target.getEquipmentInSlot(slot);
if (armor == null
|| !(armor.getItem() instanceof ItemArmor)
|| ((ItemArmor)armor.getItem()).getArmorMaterial()
!= CinderLoE.MATERIAL_GILDEDGALVORN.toArmorMaterial()) {
allGalvorn = false;
break; break;
} }
if (wearingAllGalvorn) {
if (!world.isRemote && entity instanceof EntityPlayer) {
((EntityPlayer)entity).inventory.damageArmor(event.ammount);
} }
this.cancelAttackEvent(event); if (allGalvorn && target instanceof EntityPlayerMP) {
((EntityPlayerMP)target).inventory.damageArmor(event.ammount);
cancelAttackEvent(event);
return;
} }
} }
} }
if (!(attacker instanceof EntityPlayerMP player)) return;
ItemStack weapon = player.getHeldItem();
if (weapon == null) return;
boolean isMelee = weapon.getItem() instanceof LOTRItemSpear
|| weapon.getItem() instanceof LOTRItemSword
|| weapon.getItem() instanceof LOTRItemDagger
|| weapon.getItem() instanceof LOTRItemBattleaxe
|| weapon.getItem() instanceof LOTRItemHammer
|| weapon.getItem() instanceof ItemSword;
if (!isMelee || !weapon.isItemStackDamageable()) return;
float[] durabilityThresholds = {0.5f, 0.4f, 0.25f};
double[] probabilities = {0.0005, 0.001, 0.005};
float durabilityPercent = (weapon.getMaxDamage() - weapon.getItemDamage()) / (float)weapon.getMaxDamage(); Entity rawAttacker = event.source.getEntity();
for (int i = 0; i < durabilityThresholds.length; i++) {
if (durabilityPercent <= durabilityThresholds[i]) { if (!(rawAttacker instanceof EntityPlayerMP)) return;
if (random.nextDouble() <= probabilities[i]) { EntityPlayerMP player = (EntityPlayerMP) rawAttacker;
addNegativeModifier(weapon, player, "weapon");
} ItemStack held = player.getHeldItem();
if (held != null) {
if (held.getItem() == LOTRMod.maceMallornCharred
&& LOTRLevelData.getData(player).getAlignment(LOTRFaction.FANGORN) > 0) {
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 100));
String msg = EnumChatFormatting.RED
+ "Your hand grows weak the "
+ EnumChatFormatting.YELLOW
+ "Ents of Fangorn"
+ EnumChatFormatting.RED
+ " do not forgive you!";
player.addChatMessage(new ChatComponentText(msg));
player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "You must have negative Fangorn alignment."));
} else if (held.getItem() == LOTRMod.swordGondolin
&& LOTRLevelData.getData(player).getAlignment(LOTRFaction.ANGMAR) > 0) {
player.addPotionEffect(new PotionEffect(Potion.weakness.id, 100));
String msg = EnumChatFormatting.RED
+ "Your hand grows weak the "
+ EnumChatFormatting.YELLOW
+ "Gondolininian spirits"
+ EnumChatFormatting.RED
+ " do not forgive you!";
player.addChatMessage(new ChatComponentText(msg));
player.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "You must have negative Angmar alignment."));
}
}
if (held != null) {
boolean isMelee = held.getItem() instanceof LOTRItemSpear
|| held.getItem() instanceof LOTRItemSword
|| held.getItem() instanceof LOTRItemDagger
|| held.getItem() instanceof LOTRItemBattleaxe
|| held.getItem() instanceof LOTRItemHammer
|| held.getItem() instanceof ItemSword;
if (isMelee && held.isItemStackDamageable()) {
float pct = (held.getMaxDamage() - held.getItemDamage()) / (float) held.getMaxDamage();
float[] thresholds = {0.5f, 0.4f, 0.25f};
double[] probs = {0.0005, 0.001, 0.005};
for (int i = 0; i < thresholds.length; i++) {
if (pct <= thresholds[i] && random.nextDouble() <= probs[i]) {
addNegativeModifier(held, player, "weapon");
break; break;
} }
} }
} }
}
}
private void cancelAttackEvent(LivingAttackEvent event) { private void cancelAttackEvent(LivingAttackEvent event) {
event.setCanceled(true); event.setCanceled(true);
@ -159,15 +193,15 @@ public class CinderEventHandler implements IFuelHandler {
@SubscribeEvent @SubscribeEvent
public void onLivingHurt(LivingHurtEvent event) { public void onLivingHurt(LivingHurtEvent event) {
if (event.entityLiving == null || event.source.getEntity() == null) { if (event.entityLiving == null || event.source.getEntity() == null) return;
return;
}
EntityLivingBase entity = event.entityLiving; EntityLivingBase entity = event.entityLiving;
EntityLivingBase attacker = event.source.getEntity() instanceof EntityLivingBase ? (EntityLivingBase) event.source.getEntity() : null; EntityLivingBase attacker = event.source.getEntity() instanceof EntityLivingBase ? (EntityLivingBase) event.source.getEntity() : null;
World world = entity.worldObj; World world = entity.worldObj;
DamageSource source = event.source; DamageSource source = event.source;
if (event.source.getSourceOfDamage() instanceof LOTREntityArrowPoisoned && !world.isRemote) { if (event.source.getSourceOfDamage() instanceof LOTREntityArrowPoisoned && !world.isRemote) {
LOTREntityArrowPoisoned arrow = (LOTREntityArrowPoisoned) event.source.getSourceOfDamage(); LOTREntityArrowPoisoned arrow = (LOTREntityArrowPoisoned) event.source.getSourceOfDamage();
Entity shooter = arrow.shootingEntity; Entity shooter = arrow.shootingEntity;
@ -188,7 +222,6 @@ public class CinderEventHandler implements IFuelHandler {
// Negative Arrow Protection Handler // Negative Arrow Protection Handler
if (!event.entityLiving.worldObj.isRemote && event.source.isProjectile() && event.entityLiving instanceof EntityPlayerMP player) { 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 float totalAdditionalDamage = 0.0f; // Initialize total additional damage
@ -221,57 +254,37 @@ public class CinderEventHandler implements IFuelHandler {
event.ammount = player.getHealth(); // Ensure player dies if health reaches 0 or below 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 // Broken Halo Event handler, Unused, deprecated until the halo has a new usage
if (attacker != null && event.source.getSourceOfDamage() == attacker) { // if (attacker != null && event.source.getSourceOfDamage() == attacker) {
ItemStack helmet = entity.getEquipmentInSlot(4); // ItemStack helmet = entity.getEquipmentInSlot(4);
if (helmet != null && helmet.getItem() instanceof BrokenHalo) { // if (helmet != null && helmet.getItem() instanceof BrokenHalo) {
//
if (random.nextDouble() <= 0.25) { // if (random.nextDouble() <= 0.25) {
// Summon Corrupt Civilian NPC // // Summon Corrupt Civilian NPC
CorruptMan spawnedEntity = new CorruptMan(world); // CorruptMan spawnedEntity = new CorruptMan(world);
spawnedEntity.copyLocationAndAnglesFrom(attacker); // spawnedEntity.copyLocationAndAnglesFrom(attacker);
//
// Randomly select main weapon // // Randomly select main weapon
ItemStack mainWeapon = getRandomWeapon(); // ItemStack mainWeapon = getRandomWeapon();
spawnedEntity.npcItemsInv.setIdleItem(mainWeapon); // spawnedEntity.npcItemsInv.setIdleItem(mainWeapon);
spawnedEntity.npcItemsInv.setMeleeWeapon(mainWeapon); // spawnedEntity.npcItemsInv.setMeleeWeapon(mainWeapon);
spawnedEntity.setHealth(10); // spawnedEntity.setHealth(10);
spawnedEntity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 9999, 0)); // spawnedEntity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 9999, 0));
//
spawnedEntity.onSpawnWithEgg(null); // spawnedEntity.onSpawnWithEgg(null);
world.spawnEntityInWorld(spawnedEntity); // world.spawnEntityInWorld(spawnedEntity);
world.playAuxSFXAtEntity(null, 1016, (int) spawnedEntity.posX, (int) spawnedEntity.posY, (int) spawnedEntity.posZ, 0); // world.playAuxSFXAtEntity(null, 1016, (int) spawnedEntity.posX, (int) spawnedEntity.posY, (int) spawnedEntity.posZ, 0);
world.playSoundAtEntity(entity, "mob.zombie.unfect", 1F, 1F); // world.playSoundAtEntity(entity, "mob.zombie.unfect", 1F, 1F);
//
} // }
} // }
} // }
// Smithing Rework event handler // Smithing Rework event handler
//Removed, there is a handler for when you already attack, this is redundant
/*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) { if (entity instanceof EntityPlayerMP player) {
// Durability thresholds and corresponding probabilities for adding a negative modifier // Durability thresholds and corresponding probabilities for adding a negative modifier
@ -298,6 +311,20 @@ public class CinderEventHandler implements IFuelHandler {
} }
} }
// Isildurs chestplate handler
// Incoming damage from poison, drink poison (for lurtz bow, rip anyone who drinks a bad drink), or wither is doubled
EntityPlayerMP player = (EntityPlayerMP) event.entityLiving;
ItemStack chest = player.getEquipmentInSlot(2);
if (chest == null || chest.getItem() != CinderLoE.bodyIsildur) return;
boolean isPoison = player.isPotionActive(Potion.poison.id);
boolean isPoisonedDrink = player.isPotionActive(LOTRPoisonedDrinks.killingPoison.id);
boolean isWitherDamage = event.source == DamageSource.wither;
if (isPoisonedDrink || isWitherDamage || isPoison) {
event.ammount *= 2.0F;
}
} }
private void sendNegativeModifierMessage(EntityPlayerMP player, String type) { private void sendNegativeModifierMessage(EntityPlayerMP player, String type) {

@ -1068,7 +1068,7 @@ public class CinderLoE {
MATERIAL_DORWINIONELITE = getLOTRMaterialByName("DORWINIONELITE"); MATERIAL_DORWINIONELITE = getLOTRMaterialByName("DORWINIONELITE");
if (MATERIAL_DORWINIONELITE != null) { if (MATERIAL_DORWINIONELITE != null) {
helmetDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 0, "helmet", LOTRMod.elfSteel)).setUnlocalizedName("lotr:helmetDorwinionElite").setTextureName("lotr:helmetDorwinionElite").setCreativeTab(null); helmetDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 0, "helmet", LOTRMod.elfSteel)).setUnlocalizedName("lotr:helmetDorwinionElite").setTextureName("lotr:helmetDorwinionElite").setCreativeTab(null);
bodyDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 1, LOTRMod.elfSteel)).setUnlocalizedName("lotr:bodyDorwinionElite").setTextureName("lotr:bodyDorwinionElite").setCreativeTab(null); bodyDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 1, "chestplate", LOTRMod.elfSteel)).setUnlocalizedName("lotr:bodyDorwinionElite").setTextureName("lotr:bodyDorwinionElite").setCreativeTab(null);
legsDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 2, LOTRMod.elfSteel)).setUnlocalizedName("lotr:legsDorwinionElite").setTextureName("lotr:legsDorwinionElite").setCreativeTab(null); legsDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 2, LOTRMod.elfSteel)).setUnlocalizedName("lotr:legsDorwinionElite").setTextureName("lotr:legsDorwinionElite").setCreativeTab(null);
bootsDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 3, LOTRMod.elfSteel)).setUnlocalizedName("lotr:bootsDorwinionElite").setTextureName("lotr:bootsDorwinionElite").setCreativeTab(null); bootsDorwinionElite = (new LoEArmor(MATERIAL_DORWINIONELITE, 3, LOTRMod.elfSteel)).setUnlocalizedName("lotr:bootsDorwinionElite").setTextureName("lotr:bootsDorwinionElite").setCreativeTab(null);

@ -0,0 +1,96 @@
package com.zivilon.cinder_loe.client.model;
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
// Made with Blockbench 4.12.5
// Exported for Minecraft version 1.7 - 1.12
// Paste this class into your mod and generate all required imports
public class ModelBodyDorwinionElite extends LOTRModelBiped {
public ModelRenderer Body;
public ModelRenderer Backplate;
public ModelRenderer FrontPlate;
public ModelRenderer LeftArm;
public ModelRenderer PauldronLeft;
public ModelRenderer PauldronTopperLeft;
public ModelRenderer RightArm;
public ModelRenderer PauldronRight;
public ModelRenderer PauldronTopperRight;
public ModelBodyDorwinionElite(float f) {
textureWidth = 64;
textureHeight = 64;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
this.bipedHead.cubeList.clear();
this.bipedHeadwear.cubeList.clear();
this.bipedRightLeg.cubeList.clear();
this.bipedLeftLeg.cubeList.clear();
Body = new ModelRenderer(this);
Body.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedBody.addChild(Body);
Body.cubeList.add(new ModelBox(Body, 0, 16, -4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F));
Backplate = new ModelRenderer(this);
Backplate.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedBody.addChild(Backplate);
Backplate.cubeList.add(new ModelBox(Backplate, 22, 4, -5.0F, -1.05F, 2.8F, 10, 8, 0, 0.0F));
FrontPlate = new ModelRenderer(this);
FrontPlate.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedBody.addChild(FrontPlate);
FrontPlate.cubeList.add(new ModelBox(FrontPlate, 32, 4, -5.0F, -1.05F, -2.8F, 10, 8, 0, 0.0F));
LeftArm = new ModelRenderer(this);
LeftArm.setRotationPoint(-1.0F, -2.0F, -2.0F);
bipedLeftArm.addChild(LeftArm);
LeftArm.cubeList.add(new ModelBox(LeftArm, 25, 35, 0.0F, 0.0F, 0.0F, 4, 12, 4, 0.5F));
PauldronLeft = new ModelRenderer(this);
PauldronLeft.setRotationPoint(0.0F, 0.0F, 0.0F);
LeftArm.addChild(PauldronLeft);
setRotationAngle(PauldronLeft, 0.0F, 0.0F, 0.0873F);
PauldronLeft.cubeList.add(new ModelBox(PauldronLeft, 40, 47, -0.5F, -1.4F, -1.0F, 6, 6, 6, 0.0F));
PauldronTopperLeft = new ModelRenderer(this);
PauldronTopperLeft.setRotationPoint(0.0F, 0.0F, 0.0F);
LeftArm.addChild(PauldronTopperLeft);
setRotationAngle(PauldronTopperLeft, 0.0F, 0.0F, 0.0873F);
PauldronTopperLeft.cubeList.add(new ModelBox(PauldronTopperLeft, 48, 8, 0.5F, -3.4F, -2.0F, 0, 4, 8, 0.0F));
RightArm = new ModelRenderer(this);
RightArm.setRotationPoint(-1.0F, -2.0F, -2.0F);
bipedRightArm.addChild(RightArm);
RightArm.cubeList.add(new ModelBox(RightArm, 24, 16, -2.0F, 0.0F, 0.0F, 4, 12, 4, 0.5F));
PauldronRight = new ModelRenderer(this);
PauldronRight.setRotationPoint(0.0F, 0.0F, 0.0F);
RightArm.addChild(PauldronRight);
setRotationAngle(PauldronRight, 0.0F, 0.0F, -0.0873F);
PauldronRight.cubeList.add(new ModelBox(PauldronRight, 40, 20, -3.5F, -1.4F, -1.0F, 6, 6, 6, 0.0F));
PauldronTopperRight = new ModelRenderer(this);
PauldronTopperRight.setRotationPoint(0.0F, 0.0F, 0.0F);
RightArm.addChild(PauldronTopperRight);
setRotationAngle(PauldronTopperRight, 0.0F, 0.0F, -0.0873F);
PauldronTopperRight.cubeList.add(new ModelBox(PauldronTopperRight, 48, 8, 1.5F, -3.4F, -2.0F, 0, 4, 8, 0.0F));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.bipedBody.render(f5);
this.bipedLeftArm.render(f5);
this.bipedRightArm.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -1,112 +0,0 @@
package com.zivilon.cinder_loe.client.model;// Made with Blockbench 4.12.4
// Exported for Minecraft version 1.7 - 1.12
// Paste this class into your mod and generate all required imports
import lotr.client.model.LOTRModelBiped;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
//======================================================
//Deprecated
//======================================================
public class ModelDorwinionChestplate extends LOTRModelBiped {
// private final ModelRenderer bipedRightArm_r1;
// private final ModelRenderer BLOODGUARDPAULDRONRIGHTTOPPER_r1;
// private final ModelRenderer BLOODGUARDPAULDRONRIGHT_r1;
// private final ModelRenderer BLOODGUARDPAULDRONLEFT_r1;
// private final ModelRenderer BLOODGUARDPAULDRONLEFTTOPPER_r1;
public ModelDorwinionChestplate(float f) {
super(f);
textureWidth = 64;
textureHeight = 64;
this.bipedBody.cubeList.clear();
this.bipedRightArm.cubeList.clear();
this.bipedLeftArm.cubeList.clear();
bipedBody = new ModelRenderer(this);
bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
bipedBody.cubeList.add(new ModelBox(bipedBody, 0, 16, -4.0F, 0.0F, -2.0F, 8, 12, 4, 0.5F));
bipedBody.cubeList.add(new ModelBox(bipedBody, 22, 4, -5.0F, -1.05F, 2.8F, 10, 8, 0, 0.0F));
bipedBody.cubeList.add(new ModelBox(bipedBody, 32, 4, -5.0F, -1.05F, -2.8F, 10, 8, 0, 0.0F));
//bipedLeftArm = new ModelRenderer(this, 40, 16);
bipedLeftArm = new ModelRenderer(this, 24, 16);
this.bipedLeftArm.mirror = true;
this.bipedLeftArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
//bipedLeftArm.cubeList.add(new ModelBox(bipedLeftArm, 24, 16, -9.0F, -24.0F, -2.0F, 4, 12, 4, 0.5F));
this.bipedLeftArm.addBox(-9.0F, -24.0F, -2.0F, 4, 12, 4, 0.5F);
this.setRotationAngle(bipedLeftArm, 0.0F, 0.0F, 0.026354471705114374F);
this.bipedRightArm = new ModelRenderer(this, 40, 16);
this.bipedRightArm.setRotationPoint(5.0F, 2.0F, 0.0F);
// bipedRightArm = new ModelRenderer(this, 40, 16);
// bipedRightArm.setRotationPoint(5.0F, 2.0F, 0.0F);
// bipedRightArm.mirror = true;
// bipedLeftArm = new ModelRenderer(this,40, 16);
// bipedLeftArm.setRotationPoint(0.0F, 24.0F, 0.0F);
// bipedLeftArm.cubeList.add(new ModelBox(bipedLeftArm, 24, 16, -9.0F, -24.0F, -2.0F, 4, 12, 4, 0.5F));
//
// bipedRightArm_r1 = new ModelRenderer(this);
// bipedRightArm_r1.setRotationPoint(-2.0F, 22.0F, 0.0F);
//
// setRotationAngle(bipedRightArm_r1, 0.0F, 3.1416F, 0.0F);
// bipedRightArm_r1.cubeList.add(new ModelBox(bipedRightArm_r1, 24, 16, -6.0F, -24.0F, -2.0F, 4, 12, 4, 0.5F));
//
// BLOODGUARDPAULDRONRIGHTTOPPER_r1 = new ModelRenderer(this);
// BLOODGUARDPAULDRONRIGHTTOPPER_r1.setRotationPoint(2.0F, -1.0F, 3.0F);
//
// setRotationAngle(BLOODGUARDPAULDRONRIGHTTOPPER_r1, 0.0F, 3.1416F, 0.0873F);
// BLOODGUARDPAULDRONRIGHTTOPPER_r1.cubeList.add(new ModelBox(BLOODGUARDPAULDRONRIGHTTOPPER_r1, 48, 8, 1.6F, -3.9F, -1.0F, 0, 4, 8, 0.0F));
//
// BLOODGUARDPAULDRONRIGHT_r1 = new ModelRenderer(this);
// BLOODGUARDPAULDRONRIGHT_r1.setRotationPoint(0.0F, 3.0F, 3.0F);
//
// setRotationAngle(BLOODGUARDPAULDRONRIGHT_r1, 0.0F, 3.1416F, 0.0873F);
// BLOODGUARDPAULDRONRIGHT_r1.cubeList.add(new ModelBox(BLOODGUARDPAULDRONRIGHT_r1, 40, 20, -5.0F, -6.0F, 0.0F, 6, 6, 6, 0.0F));
//
// BLOODGUARDPAULDRONLEFT_r1 = new ModelRenderer(this);
// BLOODGUARDPAULDRONLEFT_r1.setRotationPoint(-5.0F, -19.0F, -3.0F);
//
// setRotationAngle(BLOODGUARDPAULDRONLEFT_r1, 0.0F, 0.0F, -0.0873F);
// BLOODGUARDPAULDRONLEFT_r1.cubeList.add(new ModelBox(BLOODGUARDPAULDRONLEFT_r1, 40, 20, -5.0F, -6.0F, 0.0F, 6, 6, 6, 0.0F));
//
// BLOODGUARDPAULDRONLEFTTOPPER_r1 = new ModelRenderer(this);
// BLOODGUARDPAULDRONLEFTTOPPER_r1.setRotationPoint(-6.0F, -23.0F, -3.0F);
//
// setRotationAngle(BLOODGUARDPAULDRONLEFTTOPPER_r1, 0.0F, 0.0F, -0.0873F);
// BLOODGUARDPAULDRONLEFTTOPPER_r1.cubeList.add(new ModelBox(BLOODGUARDPAULDRONLEFTTOPPER_r1, 48, 8, 0.6F, -3.9F, -1.0F, 0, 4, 8, 0.0F));
//
//
// bipedRightArm.addChild(BLOODGUARDPAULDRONRIGHTTOPPER_r1);
// bipedRightArm.addChild(bipedRightArm_r1);
// bipedLeftArm.addChild(BLOODGUARDPAULDRONLEFTTOPPER_r1);
// bipedLeftArm.addChild(BLOODGUARDPAULDRONLEFT_r1);
// bipedRightArm.addChild(BLOODGUARDPAULDRONRIGHT_r1);
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) {
bipedBody.render(f5);
bipedRightArm.render(f5);
bipedLeftArm.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}

@ -52,6 +52,7 @@ public class LOTRMaterialTransformer implements IClassTransformer {
// Custom // Custom
modifyMaterial("UTUMNO", 1500, 0.7F, 3.5F, classNode); modifyMaterial("UTUMNO", 1500, 0.7F, 3.5F, classNode);
modifyMaterial("GONDOLIN", 1500, 0.7F, 4.5F, classNode);
addMaterial("RED_DWARF", classNode); addMaterial("RED_DWARF", classNode);
addMaterial("WIZARD", classNode); addMaterial("WIZARD", classNode);

@ -0,0 +1,69 @@
package com.zivilon.cinder_loe.items.specials;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod;
import lotr.common.entity.animal.LOTREntityHorse;
import lotr.common.fac.LOTRFaction;
import lotr.common.item.LOTRItemSword;
import lotr.common.item.LOTRMaterial;
import lotr.common.network.LOTRPacketHandler;
import lotr.common.network.LOTRPacketWeaponFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import java.util.List;
public class MouthOfSauronWeapon extends LOTRItemSword {
public MouthOfSauronWeapon() {
super(LOTRMaterial.MORDOR);
this.setMaxDamage(1500);
this.lotrWeaponDamage = 8.0f;
}
public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) {
itemstack.damageItem(2, (EntityLivingBase)entityplayer);
return MouthOfSauronWeapon.useAbility(itemstack, world, (EntityLivingBase)entityplayer);
}
public static ItemStack useAbility(ItemStack itemstack, World world, EntityLivingBase user) {
user.swingItem();
world.playSoundAtEntity((Entity)user, "mob.wither.hurt", 2.0f, (itemRand.nextFloat() - itemRand.nextFloat()) * 0.2f + 1.0f);
if (!world.isRemote) {
List entities = world.getEntitiesWithinAABB(EntityLivingBase.class, user.boundingBox.expand(12.0, 8.0, 12.0));
if (!entities.isEmpty()) {
for (int i = 0; i < entities.size(); ++i) {
EntityLiving entityliving;
EntityLivingBase entity = (EntityLivingBase)entities.get(i);
if (entity == user || entity instanceof EntityLiving && LOTRFaction.MORDOR.isGoodRelation(LOTRMod.getNPCFaction((Entity)(entityliving = (EntityLiving)entity))) || entity instanceof EntityPlayer && (!(user instanceof EntityPlayer) ? user instanceof EntityLiving && ((EntityLiving)user).getAttackTarget() != entity && LOTRLevelData.getData((EntityPlayer)entity).getAlignment(LOTRFaction.MORDOR) > 0.0f : !MinecraftServer.getServer().isPVPEnabled() || LOTRLevelData.getData((EntityPlayer)entity).getAlignment(LOTRFaction.MORDOR) > 0.0f)) continue;
float strength = 6.0f - user.getDistanceToEntity((Entity)entity) * 0.75f;
if (strength < 1.0f) {
strength = 1.0f;
}
if (user instanceof EntityPlayer) {
entity.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer)((EntityPlayer)user)), 6.0f * strength);
} else {
entity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)user), 6.0f * strength);
}
float knockback = strength;
if (knockback > 4.0f) {
knockback = 4.0f;
}
if (!(entity instanceof LOTREntityHorse)) entity.addVelocity((double)(-MathHelper.sin((float)(user.rotationYaw * (float)Math.PI / 180.0f)) * 0.7f * knockback), 0.2 + 0.12 * (double)knockback, (double)(MathHelper.cos((float)(user.rotationYaw * (float)Math.PI / 180.0f)) * 0.7f * knockback));
}
}
LOTRPacketWeaponFX packet = new LOTRPacketWeaponFX(LOTRPacketWeaponFX.Type.MACE_SAURON, (Entity)user);
LOTRPacketHandler.networkWrapper.sendToAllAround((IMessage)packet, LOTRPacketHandler.nearEntity((Entity)user, 64.0));
}
return itemstack;
}
}

@ -109,6 +109,7 @@ public class MixinLOTRArmorModels {
map.put(LOTRMod.woodPlate, new LOTRModelHeadPlate()); map.put(LOTRMod.woodPlate, new LOTRModelHeadPlate());
map.put(LOTRMod.ceramicPlate, new LOTRModelHeadPlate()); map.put(LOTRMod.ceramicPlate, new LOTRModelHeadPlate());
map.put(CinderLoE.helmetDorwinionElite, new ModelDorwinionHelmet(1.0f)); map.put(CinderLoE.helmetDorwinionElite, new ModelDorwinionHelmet(1.0f));
map.put(CinderLoE.bodyDorwinionElite, new ModelBodyDorwinionElite(1.0f));
for (ModelBiped armorModel : map.values()) for (ModelBiped armorModel : map.values())
copyModelRotations(armorModel, key); copyModelRotations(armorModel, key);
this.specialArmorModels.put(key, map); this.specialArmorModels.put(key, map);

@ -30,7 +30,8 @@ public class MixinLOTREnchantment {
LOTREnchantment protectRangedWeak2 = new LOTREnchantmentWeakProtectionRanged("protectRangedWeak2", -2).setEnchantWeight(0); LOTREnchantment protectRangedWeak2 = new LOTREnchantmentWeakProtectionRanged("protectRangedWeak2", -2).setEnchantWeight(0);
LOTREnchantment rangedWeak3 = new LOTREnchantmentRangedDamage("rangedWeak3", 0.25f); LOTREnchantment rangedWeak3 = new LOTREnchantmentRangedDamage("rangedWeak3", 0.25f);
LOTREnchantment weak4 = new LOTREnchantmentDamage("weak4", -3.0f).setEnchantWeight(0); LOTREnchantment weak4 = new LOTREnchantmentDamage("weak4", -3.0f).setEnchantWeight(0);
LOTREnchantment chill = new LOTREnchantmentExtraSpecial("strong5", 1.0f).setEnchantWeight(0); //LOTREnchantment chill = new LOTREnchantmentExtraSpecial("strong5", 1.0f).setEnchantWeight(0);
LOTREnchantment chill = new LOTREnchantmentDamage("strong5", 3.25f).setEnchantWeight(0);
LOTREnchantment rangedStrong4 = new LOTREnchantmentRangedDamage("rangedStrong4", 1.4f).setEnchantWeight(0).setSkilful(); LOTREnchantment rangedStrong4 = new LOTREnchantmentRangedDamage("rangedStrong4", 1.4f).setEnchantWeight(0).setSkilful();
LOTREnchantment meleeReach2 = new LOTREnchantmentMeleeReach("meleeReach2", 1.33f).setEnchantWeight(0).setSkilful(); LOTREnchantment meleeReach2 = new LOTREnchantmentMeleeReach("meleeReach2", 1.33f).setEnchantWeight(0).setSkilful();
LOTREnchantment meleeSpeed2 = new LOTREnchantmentMeleeSpeed("meleeSpeed2", 1.33f).setEnchantWeight(0).setSkilful(); LOTREnchantment meleeSpeed2 = new LOTREnchantmentMeleeSpeed("meleeSpeed2", 1.33f).setEnchantWeight(0).setSkilful();

@ -109,6 +109,14 @@ item.lotr:sarumanWhiteStaff.name=Staff of Saruman the White
item.lotr:welfRelic.name=Horn of the Greenwood Stag item.lotr:welfRelic.name=Horn of the Greenwood Stag
item.lotr:ulukai.name=Ulûkai item.lotr:ulukai.name=Ulûkai
item.lotr:helmetDorLomin.name=Dragonhelm of Dor-Lomin
item.lotr:bodyIsildur.name=Isildurs Chestplate
item.lotr:bowLurtz.name=Lurtz' Bow
item.lotr:greatswordAngmar.name=Angmar Greatsword
item.lotr:greatswordLindon.name=Sirrandrai Battleblade
item.lotr:greatswordDale.name=Esgarothi Greatsword
item.lotr:greatswordNumenor.name=Black Númenórean Greatsword
item.lotr:onion.name=Onion item.lotr:onion.name=Onion
item.lotr:cabbage.name=Cabbage item.lotr:cabbage.name=Cabbage
@ -117,7 +125,7 @@ item.lotr:lightStew.name=Light Stew
item.lotr:spice.name=Spices item.lotr:spice.name=Spices
item.lotr:spicedHam.name=Spiced Ham item.lotr:spicedHam.name=Spiced Ham
item.lotr:chocolatebar.name=Chocolate Bar item.lotr:chocolatebar.name=Chocolate Bar
item.lotr:fruitsalad.name=Fruid Salad item.lotr:fruitsalad.name=Fruit Salad
item.lotr:flour.name=Flour item.lotr:flour.name=Flour
item.lotr:dough.name=Dough item.lotr:dough.name=Dough
item.lotr:pasta.name=Pasta item.lotr:pasta.name=Pasta
@ -125,6 +133,7 @@ item.lotr:pretzel.name=Pretzel
item.lotr:halva.name=Halva item.lotr:halva.name=Halva
item.lotr:doner_kebab.name=Döner Kebab item.lotr:doner_kebab.name=Döner Kebab
item.lotr:flatbread.name=Flatbread item.lotr:flatbread.name=Flatbread
item.lotr:maggotymaggotlessBread.name=Maggoty Maggotless Bread
item.lotr:bonemold.name=Bonemold item.lotr:bonemold.name=Bonemold
item.lotr:helmetLimwaith.name=Limwaith Helmet item.lotr:helmetLimwaith.name=Limwaith Helmet
@ -161,6 +170,16 @@ item.lotr:bodyGildedGalvorn.name=Gilded Galvorn Chestplate
item.lotr:legsGildedGalvorn.name=Gilded Galvorn Leggings item.lotr:legsGildedGalvorn.name=Gilded Galvorn Leggings
item.lotr:bootsGildedGalvorn.name=Gilded Galvorn Boots item.lotr:bootsGildedGalvorn.name=Gilded Galvorn Boots
item.lotr:helmetEsgaroth.name=Esgarothi Helmet
item.lotr:bodyEsgaroth.name=Esgarothi Chestplate
item.lotr:legsEsgaroth.name=Esgarothi Leggings
item.lotr:bootsEsgaroth.name=Esgarothi Boots
item.lotr:helmetDorwinionElite.name=Bladorthin Champion Helmet
item.lotr:bodyDorwinionElite.name=Bladorthin Champion Chestplate
item.lotr:legsDorwinionElite.name=Bladorthin Champion Leggings
item.lotr:bootsDorwinionElite.name=Bladorthin Champion Boots
item.lotr:ingotAsh.name=Ashen Ingot item.lotr:ingotAsh.name=Ashen Ingot
item.lotr:swordAsh.name=Ash-Forged Sword item.lotr:swordAsh.name=Ash-Forged Sword
item.lotr:staffAsh.name=Ash-Forged Bardiche item.lotr:staffAsh.name=Ash-Forged Bardiche
@ -346,6 +365,24 @@ entity.cinder_loe.NorthernOrc.name=Northern Orc
entity.cinder_loe.Monkey.name=Monkey entity.cinder_loe.Monkey.name=Monkey
entity.cinder_loe.Usurper.name=Umbar Usurper entity.cinder_loe.Usurper.name=Umbar Usurper
entity.cinder_loe.AngmarOrcButcher.name=Angmar Orc Butcher
entity.cinder_loe.AngmarOrcBrewer.name=Angmar Orc Brewer
entity.cinder_loe.AngmarOrcSmith.name=Angmar Orc Smith
entity.cinder_loe.DolGuldurOrcButcher.name=Dol Guldur Orc Butcher
entity.cinder_loe.DolGuldurOrcBrewer.name=Dol Guldur Orc Brewer
entity.cinder_loe.DolGuldurOrcSmith.name=Dol Guldur Orc Smith
entity.cinder_loe.GundabadOrcBrewer.name=Gundabad Orc Brewer
entity.cinder_loe.GundabadOrcButcher.name=Gundabad Orc Butcher
entity.cinder_loe.GundabadOrcSmith.name=Gundabad Orc Smith
entity.cinder_loe.HalfTrollBrewer.name=Half-Troll Brewer
entity.cinder_loe.HalfTrollButcher.name=Half-Troll Butcher
entity.cinder_loe.IsengardOrcBrewer.name=Isengard Snaga Brewer
entity.cinder_loe.IsengardOrcButcher.name=Isengard Snaga Butcher
entity.cinder_loe.IsengardOrcSmith.name=Uruk-Hai Smith
entity.cinder_loe.MordorOrcBrewer.name=Mordor Orc Brewer
entity.cinder_loe.MordorOrcButcher.name=Mordor Orc Butcher
entity.cinder_loe.MordorOrcSmith.name=Black Uruk Smith
lotr.enchant.protectWeak1=Dented lotr.enchant.protectWeak1=Dented
lotr.enchant.baneNPC=Lifebane lotr.enchant.baneNPC=Lifebane
lotr.enchant.protectWeak2=Defective lotr.enchant.protectWeak2=Defective
@ -376,7 +413,6 @@ lotr.unit.Banner_Horse=Mounted Banner Bearer
lotr.unit.TestMob=Test Mob lotr.unit.TestMob=Test Mob
lotr.unit.Sirrandrai=Rider of Sirrandrai lotr.unit.Sirrandrai=Rider of Sirrandrai
lotr.unitinfo.Angmar=To Hire this unit you must have the Angmar Objective complete. lotr.unitinfo.Angmar=To Hire this unit you must have the Angmar Objective complete.
lotr.unitinfo.Arnor=To Hire this unit you must have the Arnor Objective complete. lotr.unitinfo.Arnor=To Hire this unit you must have the Arnor Objective complete.
lotr.unitinfo.Rhudaur=To Hire this unit you must have the Rhudaur Objective complete. lotr.unitinfo.Rhudaur=To Hire this unit you must have the Rhudaur Objective complete.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 401 B

Loading…
Cancel
Save