2
0
Fork 0

> Gilded Galvorn can now be repaired and reforged

> Ash Forged bows were meant to use Ingots to repair, not string, this was fixed
> Fixed a ton of Sturdy Modifier issues
> Refactored most custom armor to utilize LoEArmor class instead of LOTRItemArmor
> Sturdy should hopefully appear on any armor or weapon sold by smiths
main
KeyLime17 5 months ago
parent 064801f3d3
commit 278604f616

@ -299,7 +299,7 @@ public class CinderEventHandler implements IFuelHandler {
} }
private void addNegativeModifier(ItemStack item, EntityPlayerMP player, String type) { private void addNegativeModifier(ItemStack item, EntityPlayerMP player, String type) {
//Sturdy Check //Sturdy Check
LOTREnchantment sturdy = type.equals("weapon") LOTREnchantment sturdy = type.equals("weapon") || type.equals("bow")
? LOTREnchantment.getEnchantmentByName("meleeSturdy") ? LOTREnchantment.getEnchantmentByName("meleeSturdy")
: type.equals("armor") : type.equals("armor")
? LOTREnchantment.getEnchantmentByName("armorSturdy") ? LOTREnchantment.getEnchantmentByName("armorSturdy")

@ -721,10 +721,10 @@ public class CinderLoE {
spearUnnamed = (new UnnamedSpear(EVENT)).setUnlocalizedName("lotr:spearUnnamed").setTextureName("lotr:spearUnnamed").setCreativeTab(null); spearUnnamed = (new UnnamedSpear(EVENT)).setUnlocalizedName("lotr:spearUnnamed").setTextureName("lotr:spearUnnamed").setCreativeTab(null);
whip = (new Whip()).setUnlocalizedName("lotr:whip").setTextureName("lotr:whip"); whip = (new Whip()).setUnlocalizedName("lotr:whip").setTextureName("lotr:whip");
helmetbrokenhalo = (new BrokenHalo(EVENT, 0, "helmet")).setUnlocalizedName("lotr:helmetbrokenhalo").setTextureName("lotr:helmetbrokenhalo").setCreativeTab(null); helmetbrokenhalo = (new BrokenHalo(EVENT, 0, "helmet")).setUnlocalizedName("lotr:helmetbrokenhalo").setTextureName("lotr:helmetbrokenhalo").setCreativeTab(null);
helmetJade = (new LOTRItemArmor(MATERIAL_JADE, 0, "helmet")).setUnlocalizedName("lotr:helmetJade").setTextureName("lotr:helmetJade").setCreativeTab(null); helmetJade = (new LoEArmor(MATERIAL_JADE, 0, "helmet")).setUnlocalizedName("lotr:helmetJade").setTextureName("lotr:helmetJade").setCreativeTab(null);
bodyJade = (new LOTRItemArmor(MATERIAL_JADE, 1, "chestplate")).setUnlocalizedName("lotr:bodyJade").setTextureName("lotr:bodyJade").setCreativeTab(null); bodyJade = (new LoEArmor(MATERIAL_JADE, 1, "chestplate")).setUnlocalizedName("lotr:bodyJade").setTextureName("lotr:bodyJade").setCreativeTab(null);
legsJade = (new LOTRItemArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null); legsJade = (new LoEArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null);
bootsJade = (new LOTRItemArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null); bootsJade = (new LoEArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null);
forgingKit = (new ForgingKit()); forgingKit = (new ForgingKit());
fieldRepairKit = new FieldRepairKit().setUnlocalizedName("lotr:field_repair_kit").setTextureName("lotr:field_repair_kit"); fieldRepairKit = new FieldRepairKit().setUnlocalizedName("lotr:field_repair_kit").setTextureName("lotr:field_repair_kit");
@ -799,10 +799,10 @@ public class CinderLoE {
MATERIAL_RED_DWARF = getLOTRMaterialByName("RED_DWARF"); MATERIAL_RED_DWARF = getLOTRMaterialByName("RED_DWARF");
if (MATERIAL_RED_DWARF != null) { if (MATERIAL_RED_DWARF != null) {
helmetRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 0, "helmet")).setUnlocalizedName("lotr:helmetRedDwarf").setTextureName("lotr:helmetRedDwarf"); helmetRedDwarf = (new LoEArmor(MATERIAL_RED_DWARF, 0, "helmet")).setUnlocalizedName("lotr:helmetRedDwarf").setTextureName("lotr:helmetRedDwarf");
bodyRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 1)).setUnlocalizedName("lotr:bodyRedDwarf").setTextureName("lotr:bodyRedDwarf"); bodyRedDwarf = (new LoEArmor(MATERIAL_RED_DWARF, 1)).setUnlocalizedName("lotr:bodyRedDwarf").setTextureName("lotr:bodyRedDwarf");
legsRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 2)).setUnlocalizedName("lotr:legsRedDwarf").setTextureName("lotr:legsRedDwarf"); legsRedDwarf = (new LoEArmor(MATERIAL_RED_DWARF, 2)).setUnlocalizedName("lotr:legsRedDwarf").setTextureName("lotr:legsRedDwarf");
bootsRedDwarf = (new LOTRItemArmor(MATERIAL_RED_DWARF, 3)).setUnlocalizedName("lotr:bootsRedDwarf").setTextureName("lotr:bootsRedDwarf"); bootsRedDwarf = (new LoEArmor(MATERIAL_RED_DWARF, 3)).setUnlocalizedName("lotr:bootsRedDwarf").setTextureName("lotr:bootsRedDwarf");
spearRedDwarf = (new LOTRItemSpear(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:spearRedDwarf").setTextureName("lotr:spearRedDwarf"); spearRedDwarf = (new LOTRItemSpear(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:spearRedDwarf").setTextureName("lotr:spearRedDwarf");
swordRedDwarf = (new LOTRItemSword(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:swordRedDwarf").setTextureName("lotr:swordRedDwarf"); swordRedDwarf = (new LOTRItemSword(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:swordRedDwarf").setTextureName("lotr:swordRedDwarf");
battleaxeRedDwarf = (new LOTRItemBattleaxe(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:battleaxeRedDwarf").setTextureName("lotr:battleaxeRedDwarf"); battleaxeRedDwarf = (new LOTRItemBattleaxe(MATERIAL_RED_DWARF)).setUnlocalizedName("lotr:battleaxeRedDwarf").setTextureName("lotr:battleaxeRedDwarf");
@ -848,15 +848,15 @@ public class CinderLoE {
MATERIAL_LIMWAITH_WOOD = getLOTRMaterialByName("LIMWAITH_WOOD"); MATERIAL_LIMWAITH_WOOD = getLOTRMaterialByName("LIMWAITH_WOOD");
MATERIAL_BONEMOLD = getLOTRMaterialByName("BONEMOLD"); MATERIAL_BONEMOLD = getLOTRMaterialByName("BONEMOLD");
if (MATERIAL_LIMWAITH_WOOD != null && MATERIAL_BONEMOLD != null) { if (MATERIAL_LIMWAITH_WOOD != null && MATERIAL_BONEMOLD != null) {
helmetLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 0)).setUnlocalizedName("lotr:helmetLimwaith").setTextureName("lotr:helmetLimwaith"); helmetLimwaith = (new LoEArmor(MATERIAL_LIMWAITH_WOOD, 0)).setUnlocalizedName("lotr:helmetLimwaith").setTextureName("lotr:helmetLimwaith");
bodyLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 1)).setUnlocalizedName("lotr:bodyLimwaith").setTextureName("lotr:bodyLimwaith"); bodyLimwaith = (new LoEArmor(MATERIAL_LIMWAITH_WOOD, 1)).setUnlocalizedName("lotr:bodyLimwaith").setTextureName("lotr:bodyLimwaith");
legsLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 2)).setUnlocalizedName("lotr:legsLimwaith").setTextureName("lotr:legsLimwaith"); legsLimwaith = (new LoEArmor(MATERIAL_LIMWAITH_WOOD, 2)).setUnlocalizedName("lotr:legsLimwaith").setTextureName("lotr:legsLimwaith");
bootsLimwaith = (new LOTRItemArmor(MATERIAL_LIMWAITH_WOOD, 3)).setUnlocalizedName("lotr:bootsLimwaith").setTextureName("lotr:bootsLimwaith"); bootsLimwaith = (new LoEArmor(MATERIAL_LIMWAITH_WOOD, 3)).setUnlocalizedName("lotr:bootsLimwaith").setTextureName("lotr:bootsLimwaith");
helmetboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 0)).setUnlocalizedName("lotr:helmetboneLimwaith").setTextureName("lotr:helmetboneLimwaith"); helmetboneLimwaith = (new LoEArmor(MATERIAL_BONEMOLD, 0)).setUnlocalizedName("lotr:helmetboneLimwaith").setTextureName("lotr:helmetboneLimwaith");
bodyboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 1)).setUnlocalizedName("lotr:bodyboneLimwaith").setTextureName("lotr:bodyboneLimwaith"); bodyboneLimwaith = (new LoEArmor(MATERIAL_BONEMOLD, 1)).setUnlocalizedName("lotr:bodyboneLimwaith").setTextureName("lotr:bodyboneLimwaith");
legsboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 2)).setUnlocalizedName("lotr:legsboneLimwaith").setTextureName("lotr:legsboneLimwaith"); legsboneLimwaith = (new LoEArmor(MATERIAL_BONEMOLD, 2)).setUnlocalizedName("lotr:legsboneLimwaith").setTextureName("lotr:legsboneLimwaith");
bootsboneLimwaith = (new LOTRItemArmor(MATERIAL_BONEMOLD, 3)).setUnlocalizedName("lotr:bootsboneLimwaith").setTextureName("lotr:bootsboneLimwaith"); bootsboneLimwaith = (new LoEArmor(MATERIAL_BONEMOLD, 3)).setUnlocalizedName("lotr:bootsboneLimwaith").setTextureName("lotr:bootsboneLimwaith");
spearLimwaith = (new LOTRItemSpear(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:spearLimwaith").setTextureName("lotr:spearLimwaith"); spearLimwaith = (new LOTRItemSpear(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:spearLimwaith").setTextureName("lotr:spearLimwaith");
truncheonLimwaith = (new LOTRItemSword(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:truncheonLimwaith").setTextureName("lotr:truncheonLimwaith"); truncheonLimwaith = (new LOTRItemSword(MATERIAL_BONEMOLD)).setUnlocalizedName("lotr:truncheonLimwaith").setTextureName("lotr:truncheonLimwaith");
@ -897,11 +897,11 @@ public class CinderLoE {
//Bree //Bree
MATERIAL_BREE = getLOTRMaterialByName("BREE"); MATERIAL_BREE = getLOTRMaterialByName("BREE");
if (MATERIAL_BREE != null) { if (MATERIAL_BREE != null) {
helmetBreeKettle = (new LOTRItemArmor(MATERIAL_BREE, 0, "helmet")).setUnlocalizedName("lotr:helmetBreeKettle").setTextureName("lotr:breekettlehelmet"); helmetBreeKettle = (new LoEArmor(MATERIAL_BREE, 0, "helmet")).setUnlocalizedName("lotr:helmetBreeKettle").setTextureName("lotr:breekettlehelmet");
helmetBree = (new LOTRItemArmor(MATERIAL_BREE, 0)).setUnlocalizedName("lotr:helmetBree").setTextureName("lotr:helmetBree"); helmetBree = (new LoEArmor(MATERIAL_BREE, 0)).setUnlocalizedName("lotr:helmetBree").setTextureName("lotr:helmetBree");
bodyBree = (new LOTRItemArmor(MATERIAL_BREE, 1)).setUnlocalizedName("lotr:bodyBree").setTextureName("lotr:bodyBree"); bodyBree = (new LoEArmor(MATERIAL_BREE, 1)).setUnlocalizedName("lotr:bodyBree").setTextureName("lotr:bodyBree");
legsBree = (new LOTRItemArmor(MATERIAL_BREE, 2)).setUnlocalizedName("lotr:legsBree").setTextureName("lotr:legsBree"); legsBree = (new LoEArmor(MATERIAL_BREE, 2)).setUnlocalizedName("lotr:legsBree").setTextureName("lotr:legsBree");
bootsBree = (new LOTRItemArmor(MATERIAL_BREE, 3)).setUnlocalizedName("lotr:bootsBree").setTextureName("lotr:bootsBree"); bootsBree = (new LoEArmor(MATERIAL_BREE, 3)).setUnlocalizedName("lotr:bootsBree").setTextureName("lotr:bootsBree");
swordBree = (new LOTRItemSword(MATERIAL_BREE)).setUnlocalizedName("lotr:swordBree").setTextureName("lotr:swordBree"); swordBree = (new LOTRItemSword(MATERIAL_BREE)).setUnlocalizedName("lotr:swordBree").setTextureName("lotr:swordBree");
ItemRegistration.register(helmetBreeKettle, "breekettle", 6440); ItemRegistration.register(helmetBreeKettle, "breekettle", 6440);
@ -919,10 +919,10 @@ public class CinderLoE {
MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT"); MATERIAL_SERPENT = getLOTRMaterialByName("SERPENT");
if (MATERIAL_SERPENT != null) { if (MATERIAL_SERPENT != null) {
helmetserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null); helmetserpent = (new LoEArmor(MATERIAL_SERPENT, 0)).setUnlocalizedName("lotr:helmetserpent").setTextureName("lotr:helmetserpent").setCreativeTab(null);
bodyserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 1, "chestplate")).setUnlocalizedName("lotr:bodyserpent").setTextureName("lotr:bodyserpent").setCreativeTab(null); bodyserpent = (new LoEArmor(MATERIAL_SERPENT, 1, "chestplate")).setUnlocalizedName("lotr:bodyserpent").setTextureName("lotr:bodyserpent").setCreativeTab(null);
legsserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 2)).setUnlocalizedName("lotr:legsserpent").setTextureName("lotr:legsserpent").setCreativeTab(null); legsserpent = (new LoEArmor(MATERIAL_SERPENT, 2)).setUnlocalizedName("lotr:legsserpent").setTextureName("lotr:legsserpent").setCreativeTab(null);
bootsserpent = (new LOTRItemArmor(MATERIAL_SERPENT, 3)).setUnlocalizedName("lotr:bootsserpent").setTextureName("lotr:bootsserpent").setCreativeTab(null); bootsserpent = (new LoEArmor(MATERIAL_SERPENT, 3)).setUnlocalizedName("lotr:bootsserpent").setTextureName("lotr:bootsserpent").setCreativeTab(null);
ItemRegistration.register(helmetserpent, "helmetserpent", 6800); ItemRegistration.register(helmetserpent, "helmetserpent", 6800);
ItemRegistration.register(bodyserpent, "bodyserpent", 6801); ItemRegistration.register(bodyserpent, "bodyserpent", 6801);
@ -933,10 +933,10 @@ public class CinderLoE {
} }
MATERIAL_USURPER = getLOTRMaterialByName("USURPER"); MATERIAL_USURPER = getLOTRMaterialByName("USURPER");
if (MATERIAL_USURPER != null) { if (MATERIAL_USURPER != null) {
helmetUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 0, "helmet")).setUnlocalizedName("lotr:helmetUsurper").setTextureName("lotr:helmetUsurper").setCreativeTab(null); helmetUsurper = (new LoEArmor(MATERIAL_USURPER, 0, "helmet")).setUnlocalizedName("lotr:helmetUsurper").setTextureName("lotr:helmetUsurper").setCreativeTab(null);
bodyUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 1)).setUnlocalizedName("lotr:bodyUsurper").setTextureName("lotr:bodyUsurper").setCreativeTab(null); bodyUsurper = (new LoEArmor(MATERIAL_USURPER, 1)).setUnlocalizedName("lotr:bodyUsurper").setTextureName("lotr:bodyUsurper").setCreativeTab(null);
legsUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 2)).setUnlocalizedName("lotr:legsUsurper").setTextureName("lotr:legsUsurper").setCreativeTab(null); legsUsurper = (new LoEArmor(MATERIAL_USURPER, 2)).setUnlocalizedName("lotr:legsUsurper").setTextureName("lotr:legsUsurper").setCreativeTab(null);
bootsUsurper = (new LOTRItemArmor(MATERIAL_USURPER, 3)).setUnlocalizedName("lotr:bootsUsurper").setTextureName("lotr:bootsUsurper").setCreativeTab(null); bootsUsurper = (new LoEArmor(MATERIAL_USURPER, 3)).setUnlocalizedName("lotr:bootsUsurper").setTextureName("lotr:bootsUsurper").setCreativeTab(null);
ItemRegistration.register(helmetUsurper, "helmetUsurper", 6804); ItemRegistration.register(helmetUsurper, "helmetUsurper", 6804);
@ -949,10 +949,10 @@ public class CinderLoE {
} }
MATERIAL_WARLORD = getLOTRMaterialByName("WARLORD"); MATERIAL_WARLORD = getLOTRMaterialByName("WARLORD");
if (MATERIAL_WARLORD != null) { if (MATERIAL_WARLORD != null) {
helmetWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 0, "helmet")).setUnlocalizedName("lotr:helmetWarlord").setTextureName("lotr:helmetWarlord").setCreativeTab(null); helmetWarlord = (new LoEArmor(MATERIAL_WARLORD, 0, "helmet")).setUnlocalizedName("lotr:helmetWarlord").setTextureName("lotr:helmetWarlord").setCreativeTab(null);
bodyWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 1)).setUnlocalizedName("lotr:bodyWarlord").setTextureName("lotr:bodyWarlord").setCreativeTab(null); bodyWarlord = (new LoEArmor(MATERIAL_WARLORD, 1)).setUnlocalizedName("lotr:bodyWarlord").setTextureName("lotr:bodyWarlord").setCreativeTab(null);
legsWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 2)).setUnlocalizedName("lotr:legsWarlord").setTextureName("lotr:legsWarlord").setCreativeTab(null); legsWarlord = (new LoEArmor(MATERIAL_WARLORD, 2)).setUnlocalizedName("lotr:legsWarlord").setTextureName("lotr:legsWarlord").setCreativeTab(null);
bootsWarlord = (new LOTRItemArmor(MATERIAL_WARLORD, 3)).setUnlocalizedName("lotr:bootsWarlord").setTextureName("lotr:bootsWarlord").setCreativeTab(null); bootsWarlord = (new LoEArmor(MATERIAL_WARLORD, 3)).setUnlocalizedName("lotr:bootsWarlord").setTextureName("lotr:bootsWarlord").setCreativeTab(null);
maceWarlord = (new LOTRItemHammer(MATERIAL_WARLORD)).setUnlocalizedName("lotr:maceWarlord").setTextureName("lotr:maceWarlord"); maceWarlord = (new LOTRItemHammer(MATERIAL_WARLORD)).setUnlocalizedName("lotr:maceWarlord").setTextureName("lotr:maceWarlord");
ItemRegistration.register(helmetWarlord, "helmetWarlord", 6808); ItemRegistration.register(helmetWarlord, "helmetWarlord", 6808);
@ -967,10 +967,10 @@ public class CinderLoE {
MATERIAL_GILDEDGALVORN = getLOTRMaterialByName("GILDEDGALVORN"); MATERIAL_GILDEDGALVORN = getLOTRMaterialByName("GILDEDGALVORN");
if (MATERIAL_GILDEDGALVORN != null) { if (MATERIAL_GILDEDGALVORN != null) {
helmetGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 0, "helmet")).setUnlocalizedName("lotr:helmetGildedGalvorn").setTextureName("lotr:helmetGildedGalvorn").setCreativeTab(null); helmetGildedGalvorn = (new LoEArmor(MATERIAL_GILDEDGALVORN, 0, "helmet")).setUnlocalizedName("lotr:helmetGildedGalvorn").setTextureName("lotr:helmetGildedGalvorn").setCreativeTab(null);
bodyGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 1)).setUnlocalizedName("lotr:bodyGildedGalvorn").setTextureName("lotr:bodyGildedGalvorn").setCreativeTab(null); bodyGildedGalvorn = (new LoEArmor(MATERIAL_GILDEDGALVORN, 1)).setUnlocalizedName("lotr:bodyGildedGalvorn").setTextureName("lotr:bodyGildedGalvorn").setCreativeTab(null);
legsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 2)).setUnlocalizedName("lotr:legsGildedGalvorn").setTextureName("lotr:legsGildedGalvorn").setCreativeTab(null); legsGildedGalvorn = (new LoEArmor(MATERIAL_GILDEDGALVORN, 2)).setUnlocalizedName("lotr:legsGildedGalvorn").setTextureName("lotr:legsGildedGalvorn").setCreativeTab(null);
bootsGildedGalvorn = (new LOTRItemArmor(MATERIAL_GILDEDGALVORN, 3)).setUnlocalizedName("lotr:bootsGildedGalvorn").setTextureName("lotr:bootsGildedGalvorn").setCreativeTab(null); bootsGildedGalvorn = (new LoEArmor(MATERIAL_GILDEDGALVORN, 3)).setUnlocalizedName("lotr:bootsGildedGalvorn").setTextureName("lotr:bootsGildedGalvorn").setCreativeTab(null);
ItemRegistration.register(helmetGildedGalvorn, "helmetGildedGalvorn", 6813); ItemRegistration.register(helmetGildedGalvorn, "helmetGildedGalvorn", 6813);
ItemRegistration.register(bodyGildedGalvorn, "bodyGildedGalvorn", 6814); ItemRegistration.register(bodyGildedGalvorn, "bodyGildedGalvorn", 6814);
@ -984,10 +984,10 @@ public class CinderLoE {
//Rhudaur //Rhudaur
MATERIAL_RHUDAUR = getLOTRMaterialByName("RHUDAUR"); MATERIAL_RHUDAUR = getLOTRMaterialByName("RHUDAUR");
if (MATERIAL_RHUDAUR != null) { if (MATERIAL_RHUDAUR != null) {
helmetRhudaur = (new LOTRItemArmor(MATERIAL_RHUDAUR, 0, "helmet")).setUnlocalizedName("lotr:helmetRhudaur").setTextureName("lotr:helmetRhudaur"); helmetRhudaur = (new LoEArmor(MATERIAL_RHUDAUR, 0, "helmet")).setUnlocalizedName("lotr:helmetRhudaur").setTextureName("lotr:helmetRhudaur");
bodyRhudaur = (new LOTRItemArmor(MATERIAL_RHUDAUR, 1)).setUnlocalizedName("lotr:bodyRhudaur").setTextureName("lotr:bodyRhudaur"); bodyRhudaur = (new LoEArmor(MATERIAL_RHUDAUR, 1)).setUnlocalizedName("lotr:bodyRhudaur").setTextureName("lotr:bodyRhudaur");
legsRhudaur = (new LOTRItemArmor(MATERIAL_RHUDAUR, 2)).setUnlocalizedName("lotr:legsRhudaur").setTextureName("lotr:legsRhudaur"); legsRhudaur = (new LoEArmor(MATERIAL_RHUDAUR, 2)).setUnlocalizedName("lotr:legsRhudaur").setTextureName("lotr:legsRhudaur");
bootsRhudaur = (new LOTRItemArmor(MATERIAL_RHUDAUR, 3)).setUnlocalizedName("lotr:bootsRhudaur").setTextureName("lotr:bootsRhudaur"); bootsRhudaur = (new LoEArmor(MATERIAL_RHUDAUR, 3)).setUnlocalizedName("lotr:bootsRhudaur").setTextureName("lotr:bootsRhudaur");
ItemRegistration.register(helmetRhudaur, "helmetRhudaur",6450); ItemRegistration.register(helmetRhudaur, "helmetRhudaur",6450);
ItemRegistration.register(bodyRhudaur, "bodyRhudaur", 6451); ItemRegistration.register(bodyRhudaur, "bodyRhudaur", 6451);
@ -999,10 +999,10 @@ public class CinderLoE {
//Arnor //Arnor
MATERIAL_BATTLENUN = getLOTRMaterialByName("BATTLENUN"); MATERIAL_BATTLENUN = getLOTRMaterialByName("BATTLENUN");
if (MATERIAL_BATTLENUN != null) { if (MATERIAL_BATTLENUN != null) {
helmetArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 0)).setUnlocalizedName("lotr:helmetArnorBanner").setTextureName("lotr:helmetArnorBanner"); helmetArnorBanner = (new LoEArmor(MATERIAL_BATTLENUN, 0)).setUnlocalizedName("lotr:helmetArnorBanner").setTextureName("lotr:helmetArnorBanner");
bodyArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 1)).setUnlocalizedName("lotr:bodyArnorBanner").setTextureName("lotr:bodyArnorBanner"); bodyArnorBanner = (new LoEArmor(MATERIAL_BATTLENUN, 1)).setUnlocalizedName("lotr:bodyArnorBanner").setTextureName("lotr:bodyArnorBanner");
legsArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 2)).setUnlocalizedName("lotr:legsArnorBanner").setTextureName("lotr:legsArnorBanner"); legsArnorBanner = (new LoEArmor(MATERIAL_BATTLENUN, 2)).setUnlocalizedName("lotr:legsArnorBanner").setTextureName("lotr:legsArnorBanner");
bootsArnorBanner = (new LOTRItemArmor(MATERIAL_BATTLENUN, 3)).setUnlocalizedName("lotr:bootsArnorBanner").setTextureName("lotr:bootsArnorBanner"); bootsArnorBanner = (new LoEArmor(MATERIAL_BATTLENUN, 3)).setUnlocalizedName("lotr:bootsArnorBanner").setTextureName("lotr:bootsArnorBanner");
maceArnor = (new LOTRItemHammer(LOTRMaterial.ARNOR)).setUnlocalizedName("lotr:maceArnor").setTextureName("lotr:maceArnor"); maceArnor = (new LOTRItemHammer(LOTRMaterial.ARNOR)).setUnlocalizedName("lotr:maceArnor").setTextureName("lotr:maceArnor");
ItemRegistration.register(helmetArnorBanner, "helmetArnorBanner", 6460); ItemRegistration.register(helmetArnorBanner, "helmetArnorBanner", 6460);

@ -1,6 +1,7 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRLevelData; import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
@ -28,12 +29,12 @@ public class CinderBow extends LOTRItemBow {
public CinderBow(LOTRMaterial material, double d) { public CinderBow(LOTRMaterial material, double d) {
super(material, d); super(material, d);
setCreativeTab(LoECreativeTabs.tabCombatLoE);
} }
@Override @Override
public boolean getIsRepairable(ItemStack itemstack, ItemStack repairItem) { public boolean getIsRepairable(ItemStack itemstack, ItemStack repairItem) {
return repairItem.getItem() == CinderLoE.ingotAsh || super.getIsRepairable(itemstack, repairItem); return repairItem.getItem() == CinderLoE.ingotAsh && super.getIsRepairable(itemstack, repairItem);
} }
} }

@ -144,14 +144,7 @@ public abstract class MixinLOTRContainerAnvil {
return (materialItem.getItem() == CinderLoE.bonemold); return (materialItem.getItem() == CinderLoE.bonemold);
if (armorMaterial == CinderLoE.MATERIAL_RHUDAUR.toArmorMaterial()) if (armorMaterial == CinderLoE.MATERIAL_RHUDAUR.toArmorMaterial())
return (materialItem.getItem() == Items.iron_ingot); return (materialItem.getItem() == Items.iron_ingot);
if (armorMaterial == CinderLoE.MATERIAL_JADE.toArmorMaterial())
return (materialItem.getItem() == LOTRMod.emerald);
if (armorMaterial == CinderLoE.MATERIAL_SERPENT.toArmorMaterial())
return (materialItem.getItem() == LOTRMod.bronze);
if (armorMaterial == CinderLoE.MATERIAL_WARLORD.toArmorMaterial())
return (materialItem.getItem() == LOTRMod.bronze);
if (armorMaterial == CinderLoE.MATERIAL_USURPER.toArmorMaterial())
return (materialItem.getItem() == Items.iron_ingot);
} }
return false; return false;

@ -36,8 +36,8 @@ public class MixinLOTREnchantment {
LOTREnchantment fireRepair = new LOTREnchantmentArmorSpecial("fireRepair").setEnchantWeight(0).setSkilful(); LOTREnchantment fireRepair = new LOTREnchantmentArmorSpecial("fireRepair").setEnchantWeight(0).setSkilful();
LOTREnchantment mountArmor = new LOTREnchantmentArmorSpecial("mountArmor").setEnchantWeight(0).setSkilful(); LOTREnchantment mountArmor = new LOTREnchantmentArmorSpecial("mountArmor").setEnchantWeight(0).setSkilful();
LOTREnchantment stealth = new LOTREnchantmentArmorSpecial("stealth").setEnchantWeight(0).setSkilful(); LOTREnchantment stealth = new LOTREnchantmentArmorSpecial("stealth").setEnchantWeight(0).setSkilful();
LOTREnchantment meleeSturdy = new LOTREnchantmentArmorSpecial("meleeSturdy").setEnchantWeight(1); LOTREnchantment meleeSturdy = new LOTREnchantmentWeaponSpecial("meleeSturdy").setEnchantWeight(0);
LOTREnchantment armorSturdy = new LOTREnchantmentArmorSpecial("armorSturdy").setEnchantWeight(1); LOTREnchantment armorSturdy = new LOTREnchantmentArmorSpecial("armorSturdy").setEnchantWeight(0);
LOTREnchantment.allEnchantments.add(protectRangedWeak1); LOTREnchantment.allEnchantments.add(protectRangedWeak1);

@ -1,30 +1,33 @@
package com.zivilon.cinder_loe.mixins.overrides; package com.zivilon.cinder_loe.mixins.overrides;
import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.mixins.MixinLOTRTradeEntries;
import lotr.common.LOTRFoods; import lotr.common.LOTRFoods;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper;
import lotr.common.entity.npc.LOTRTradeEntries; import lotr.common.entity.npc.LOTRTradeEntries;
import lotr.common.entity.npc.LOTRTradeEntry; import lotr.common.entity.npc.LOTRTradeEntry;
import lotr.common.entity.npc.LOTRTradeEntryBarrel; import lotr.common.entity.npc.LOTRTradeEntryBarrel;
import lotr.common.item.LOTRItemBanner; import lotr.common.item.LOTRItemBanner;
import lotr.common.item.LOTRItemMug;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.*;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import static lotr.common.entity.npc.LOTRTradeEntries.*; import static lotr.common.entity.npc.LOTRTradeEntries.*;
import static lotr.common.entity.npc.LOTRTradeEntries.MOREDAIN_HUNTSMAN_BUY;
@Mixin(LOTRTradeEntries.class) @Mixin(LOTRTradeEntries.class)
public abstract class MixinLOTRTradeEntriesOverrides { public abstract class MixinLOTRTradeEntriesOverrides {
@ -124,14 +127,39 @@ public abstract class MixinLOTRTradeEntriesOverrides {
@Shadow public static LOTRTradeEntries DALE_BLACKSMITH_BUY; @Shadow public static LOTRTradeEntries DALE_BLACKSMITH_BUY;
@Shadow public static LOTRTradeEntries DALE_BLACKSMITH_SELL; @Shadow public static LOTRTradeEntries DALE_BLACKSMITH_SELL;
@Shadow public static LOTRTradeEntries WICKED_DWARF_BUY; @Shadow public static LOTRTradeEntries WICKED_DWARF_BUY;
@Shadow public static LOTRTradeEntries DALE_BAKER_BUY; @Shadow public static LOTRTradeEntries DALE_BAKER_BUY;
@Redirect(
method = "getRandomTrades",
at = @At(
value = "INVOKE",
target = "Llotr/common/enchant/LOTREnchantmentHelper;applyRandomEnchantments(Lnet/minecraft/item/ItemStack;Ljava/util/Random;ZZ)V"
),
remap = false
)
private void applyRandomEnchantsThenSturdy(ItemStack tradeItem, Random random, boolean skilful, boolean keepBanes) {
LOTREnchantmentHelper.applyRandomEnchantments(tradeItem, random, skilful, keepBanes);
Item item = tradeItem.getItem();
String name;
if (item instanceof ItemArmor) {
name = "armorSturdy";
} else if (item instanceof ItemSword) {
name = "meleeSturdy";
} else if (item instanceof ItemBow) {
name = "meleeSturdy";
} else {
return;
}
LOTREnchantment sturdy = LOTREnchantment.getEnchantmentByName(name);
if (sturdy != null && !LOTREnchantmentHelper.hasEnchant(tradeItem, sturdy)) {
LOTREnchantmentHelper.setHasEnchant(tradeItem, sturdy);
}
}
/** /**
* @author * @author KeyLime + Mevans
* @reason * @reason Mixins is the very best!!!!!!!!!!!!!!!
*/ */
@Inject(method = "setupTrades1", at = @At("RETURN"), remap = false) @Inject(method = "setupTrades1", at = @At("RETURN"), remap = false)
private static void newTrades(CallbackInfo ci) { private static void newTrades(CallbackInfo ci) {
@ -1876,5 +1904,6 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 5), 6666)); new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 5), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)BREE_FLORIST_BUY).setVessels(LOTRFoods.BREE_DRINK); ((MixinLOTRTradeEntriesOverrides)(Object)BREE_FLORIST_BUY).setVessels(LOTRFoods.BREE_DRINK);
} }
} }

Loading…
Cancel
Save