2
0
Fork 0

Compare commits

...

4 Commits

2
.gitignore vendored

@ -1,2 +1,4 @@
build build
.gradle .gradle
.vs
.git

@ -285,6 +285,7 @@ public class CinderLoE {
public static Item pallandoStaff; public static Item pallandoStaff;
public static Item alatarStaff; public static Item alatarStaff;
public static Item sarumanStaff; public static Item sarumanStaff;
public static Item sarumanWhiteStaff;
// Relics // Relics
public static Item welfRelic; public static Item welfRelic;
@ -379,6 +380,7 @@ public class CinderLoE {
//Misc //Misc
EntityRegistry.registerModEntity(EntityWarDart.class, "WarDart", (entityID + 44), this, 64, 1, true); EntityRegistry.registerModEntity(EntityWarDart.class, "WarDart", (entityID + 44), this, 64, 1, true);
EntityRegistry.registerModEntity(SarumanFireball.class, "SarumanFireball", entityID + 0, this, 64, 10, true); EntityRegistry.registerModEntity(SarumanFireball.class, "SarumanFireball", entityID + 0, this, 64, 10, true);
EntityRegistry.registerModEntity(SarumanWhiteFireball.class, "SarumanWhiteFireball", entityID + 61, this, 64, 10, true);
EntityRegistry.registerModEntity(LOTREntitySauron.class, "LOTREntitySauron", (entityID + 28), this, 64, 1, true); EntityRegistry.registerModEntity(LOTREntitySauron.class, "LOTREntitySauron", (entityID + 28), this, 64, 1, true);
EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true); EntityRegistry.registerModEntity(UtumnoSlaveTrader.class, "UtumnoSlaveTrader", (entityID + 30), this, 64, 1, true);
@ -555,6 +557,7 @@ public class CinderLoE {
pallandoStaff = (new PallandoStaff()).setUnlocalizedName("lotr:pallandoStaff").setTextureName("lotr:pallandoStaff"); pallandoStaff = (new PallandoStaff()).setUnlocalizedName("lotr:pallandoStaff").setTextureName("lotr:pallandoStaff");
alatarStaff = (new AlatarStaff()).setUnlocalizedName("lotr:alatarStaff").setTextureName("lotr:alatarStaff"); alatarStaff = (new AlatarStaff()).setUnlocalizedName("lotr:alatarStaff").setTextureName("lotr:alatarStaff");
sarumanStaff = (new SarumanStaff()).setUnlocalizedName("lotr:sarumanStaff").setTextureName("lotr:sarumanStaff"); sarumanStaff = (new SarumanStaff()).setUnlocalizedName("lotr:sarumanStaff").setTextureName("lotr:sarumanStaff");
sarumanWhiteStaff = (new SarumanWhiteStaff()).setUnlocalizedName("lotr:sarumanWhiteStaff").setTextureName("lotr:sarumanStaff");
// Relics // Relics
welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic"); welfRelic = (new WoodElfRelic()).setUnlocalizedName("lotr:welfRelic").setTextureName("lotr:welfRelic");
unitLevelTool = (new unitLevelTool()).setUnlocalizedName("lotr:unitLevelTool").setTextureName("stick"); unitLevelTool = (new unitLevelTool()).setUnlocalizedName("lotr:unitLevelTool").setTextureName("stick");
@ -621,11 +624,13 @@ public class CinderLoE {
ItemRegistration.register(pallandoStaff, "pallandoStaff", 6701); ItemRegistration.register(pallandoStaff, "pallandoStaff", 6701);
ItemRegistration.register(alatarStaff, "alatarStaff", 6702); ItemRegistration.register(alatarStaff, "alatarStaff", 6702);
ItemRegistration.register(sarumanStaff, "sarumanStaff", 6703); ItemRegistration.register(sarumanStaff, "sarumanStaff", 6703);
ItemRegistration.register(sarumanWhiteStaff, "sarumanWhiteStaff", 6705);
linkLOTRWeapon(radagastStaff, "radagastStaff"); linkLOTRWeapon(radagastStaff, "radagastStaff");
linkLOTRWeapon(pallandoStaff, "pallandoStaff"); linkLOTRWeapon(pallandoStaff, "pallandoStaff");
linkLOTRWeapon(alatarStaff, "alatarStaff"); linkLOTRWeapon(alatarStaff, "alatarStaff");
linkLOTRWeapon(sarumanStaff, "sarumanStaff"); linkLOTRWeapon(sarumanStaff, "sarumanStaff");
linkLOTRWeapon(sarumanWhiteStaff, "sarumanWhiteStaff");
//Relics //Relics
ItemRegistration.register(welfRelic, "welfRelic", 6704); ItemRegistration.register(welfRelic, "welfRelic", 6704);
@ -961,6 +966,7 @@ public class CinderLoE {
RenderingRegistry.registerEntityRenderingHandler(CorruptSkeletonArcher.class, new RenderCorruptSkeleton()); RenderingRegistry.registerEntityRenderingHandler(CorruptSkeletonArcher.class, new RenderCorruptSkeleton());
RenderingRegistry.registerEntityRenderingHandler(SarumanFireball.class, new RenderSarumanFireball()); RenderingRegistry.registerEntityRenderingHandler(SarumanFireball.class, new RenderSarumanFireball());
RenderingRegistry.registerEntityRenderingHandler(SarumanWhiteFireball.class, new RenderSarumanWhiteFireball());
RenderingRegistry.registerEntityRenderingHandler(Renegade.class, new RenderRenegade()); RenderingRegistry.registerEntityRenderingHandler(Renegade.class, new RenderRenegade());
RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade()); RenderingRegistry.registerEntityRenderingHandler(RenegadeCaptain.class, new RenderRenegade());
RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith()); RenderingRegistry.registerEntityRenderingHandler(Wraith.class, new RenderWraith());
@ -1192,6 +1198,7 @@ public class CinderLoE {
CinderCore.registerItemFallback(Item.getIdFromItem(pallandoStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0"); CinderCore.registerItemFallback(Item.getIdFromItem(pallandoStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(alatarStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0"); CinderCore.registerItemFallback(Item.getIdFromItem(alatarStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(sarumanStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0"); CinderCore.registerItemFallback(Item.getIdFromItem(sarumanStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.0");
CinderCore.registerItemFallback(Item.getIdFromItem(sarumanWhiteStaff), Item.getIdFromItem(LOTRMod.gandalfStaffWhite), "cinder_loe", "1.4");
// == Relics == // == Relics ==
CinderCore.registerItemFallback(Item.getIdFromItem(welfRelic), Item.getIdFromItem(LOTRMod.rhinoHorn), "cinder_loe", "1.2"); CinderCore.registerItemFallback(Item.getIdFromItem(welfRelic), Item.getIdFromItem(LOTRMod.rhinoHorn), "cinder_loe", "1.2");
// == Specials == // == Specials ==
@ -1263,6 +1270,7 @@ public class CinderLoE {
CinderCore.registerEntityFallback(CorruptOrc.class, LOTREntityGundabadOrc.class, "cinder_loe", "1.2.3"); CinderCore.registerEntityFallback(CorruptOrc.class, LOTREntityGundabadOrc.class, "cinder_loe", "1.2.3");
CinderCore.registerEntityFallback(SarumanFireball.class, LOTREntityGandalfFireball.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(SarumanFireball.class, LOTREntityGandalfFireball.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(SarumanWhiteFireball.class, LOTREntityGandalfFireball.class, "cinder_loe", "1.4");
CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(Renegade.class, LOTREntityBandit.class, "cinder_loe", "1.0");
CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1"); CinderCore.registerEntityFallback(RenegadeCaptain.class, LOTREntityBandit.class, "cinder_loe", "1.1");
CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0"); CinderCore.registerEntityFallback(Wraith.class, LOTREntityMarshWraith.class, "cinder_loe", "1.0");

@ -14,7 +14,7 @@ public class Materials {
public static void registerMaterials() { public static void registerMaterials() {
modifyMaterial("RED_DWARF", 700, 3.0F, 0.7F, 3, 7.0F, 10, CinderLoE.redDwarfSteel); 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("WIZARD", 1000, 3.0F, 0.7F, 3, 7.0F, 10, null);
modifyMaterial("BONEMOLD", 674, 2.5F, 0.6F, 2, 6.0F, 10, CinderLoE.bonemold); //Original Durability = 350 | Add 162 | 2/4 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("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("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("BREE", 350, 2.5F, 0.6F, 2, 6.0F, 10, Items.iron_ingot);

@ -0,0 +1,50 @@
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();
}
}

@ -20,38 +20,38 @@ public class LOTRMaterialTransformer implements IClassTransformer {
reader.accept(classNode, 0); reader.accept(classNode, 0);
modifyMaterial("ANGMAR", 480, 0.6F, classNode); //Original Durability = 350 | Add 162 | 1/4 modifyMaterial("ANGMAR", 431, 0.6F, classNode); //Original Durability = 350 | Add 81 | 162 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("URUK", 662, 0.7F, classNode); //Original Durability = 550 | Add 112 | 1/4 modifyMaterial("URUK", 606, 0.7F, classNode); //Original Durability = 550 | Add 56 | 112 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("BLACK_URUK", 774, 0.7F, classNode); //Original Durability = 550 | Add 112 | 2/4 modifyMaterial("BLACK_URUK", 662, 0.7F, classNode); //Original Durability = 550 | Add 56 | 112 if Upgraded Armory | 2/4 (Unupgraded)
modifyMaterial("HALF_TROLL", 475, 0.6F, classNode); //Original Durability = 300 | Add 175 | 1/4 modifyMaterial("HALF_TROLL", 387, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 1/4 (Unupgraded)
// Good Humans // Good Humans
modifyMaterial("DALE", 475, 0.6F, classNode); //Original Durability = 300 | Add 175 | 1/4 modifyMaterial("DALE", 387, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("GONDOR", 861, 0.6F, classNode); //Original Durability = 450 | Add 137 | 3/4 modifyMaterial("GONDOR", 654, 0.6F, classNode); //Original Durability = 450 | Add 68 | 137 if Upgraded Armory | 3/4 (Unupgraded)
modifyMaterial("DORWINION_ELF", 875, 0.6F, classNode); //Original Durability = 500 | Add 125 | 3/4 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 175 | 0/4 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 175 | 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 150 | 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 175 | 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 175 | 0/4 modifyMaterial("LAMEDON", 300, 0.6F, classNode); //Original Durability = 300 | Add 87 | 175 if Upgraded Armory | 0/4
// Evil Humans // Evil Humans
modifyMaterial("RHUN_GOLD", 450, 0.6F, classNode); //Original Durability = 450 | Add 137 | 0/4 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 150 | 0/4 modifyMaterial("RHUN", 400, 0.6F, classNode); //Original Durability = 400 | Add 75 | 150 if Upgraded Armory | 0/4
modifyMaterial("DUNLENDING", 437, 0.6F, classNode); //Original Durability = 250 | Add 187 | 1/4 modifyMaterial("DUNLENDING", 343, 0.6F, classNode); //Original Durability = 250 | Add 93 | 187 if Upgraded Armory | 1/4 (Unupgraded)
modifyMaterial("NEAR_HARAD", 825, 0.6F, classNode); //Original Durability = 300 | Add 175 | 3/4 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 187 | 0/4 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 175 | 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 162 | 0/4 modifyMaterial("GULF_HARAD", 350, 0.6F, classNode); //Original Durability = 350 | Add 81 | 162 if Upgraded Armory | 0/4
modifyMaterial("UMBAR", 724, 0.6F, classNode); //Original Durability = 450 | Add 137 | 2/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 187 | 0/4 modifyMaterial("MOREDAIN", 250, 0.6F, classNode); //Original Durability = 250 | Add 93 | 187 if Upgraded Armory | 0/4
//Elves //Elves
modifyMaterial("WOOD_ELVEN", 1000, 0.6F, classNode); //Original Durability = 500 | Add 125 | 4/4 modifyMaterial("WOOD_ELVEN", 748, 0.6F, classNode); //Original Durability = 500 | Add 62 | 125 if Upgraded Armory | 4/4 (Unupgraded)
// Custom // Custom
modifyMaterial("UTUMNO", 1500, 0.7F, classNode); //Original Durability = 250 | Add 187 | 0/4 modifyMaterial("UTUMNO", 1500, 0.7F, classNode);
addMaterial("RED_DWARF", classNode); addMaterial("RED_DWARF", classNode);
addMaterial("WIZARD", classNode); addMaterial("WIZARD", classNode);

@ -20,7 +20,7 @@ public class LOTRWeaponLinker implements IClassTransformer {
// Can add any number of items, append with comma // Can add any number of items, append with comma
return addLinks(basicClass, return addLinks(basicClass,
"spearRedDwarf", "crossbowRedDwarf", "swordRedDwarf", "battleaxeRedDwarf", "pikeRedDwarf", "daggerRedDwarf", "daggerRedDwarfPoisoned", "hammerRedDwarf", "spearRedDwarf", "crossbowRedDwarf", "swordRedDwarf", "battleaxeRedDwarf", "pikeRedDwarf", "daggerRedDwarf", "daggerRedDwarfPoisoned", "hammerRedDwarf",
"radagastStaff", "alatarStaff", "pallandoStaff", "sarumanStaff", "maceWarlord", "radagastStaff", "alatarStaff", "pallandoStaff", "sarumanStaff", "maceWarlord", "sarumanWhiteStaff",
"spearLimwaith", "tridentLimwaith", "daggerLimwaith", "daggerLimwaithPoisoned", "truncheonLimwaith", "battleaxeLimwaith", "blowgunLimwaith", "spearLimwaith", "tridentLimwaith", "daggerLimwaith", "daggerLimwaithPoisoned", "truncheonLimwaith", "battleaxeLimwaith", "blowgunLimwaith",
"frostblade", "spearsolidgold", "whip", "spearUnnamed", "welfRelic", "daggerVoid", "frostblade", "spearsolidgold", "whip", "spearUnnamed", "welfRelic", "daggerVoid",
"swordBree", "swordBree",

@ -0,0 +1,80 @@
package com.zivilon.cinder_loe.enchants;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRDamage;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentBane;
import lotr.common.enchant.LOTREnchantmentType;
import lotr.common.item.LOTRWeaponStats;
import lotr.common.network.LOTRPacketHandler;
import lotr.common.network.LOTRPacketWeaponFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.StatCollector;
import net.minecraft.item.ItemStack;
public class LOTREnchantmentArmorSpecial extends LOTREnchantment {
private boolean compatibleBane = true;
private boolean compatibleOtherSpecial = false;
public LOTREnchantmentArmorSpecial(String s) {
super(s, new LOTREnchantmentType[] { LOTREnchantmentType.ARMOR, LOTREnchantmentType.ARMOR_FEET, LOTREnchantmentType.ARMOR_LEGS, LOTREnchantmentType.ARMOR_BODY, LOTREnchantmentType.ARMOR_HEAD, });
setValueModifier(3.0F);
setBypassAnvilLimit();
}
public LOTREnchantmentArmorSpecial setIncompatibleBane() {
this.compatibleBane = false;
return this;
}
public LOTREnchantmentArmorSpecial setCompatibleOtherSpecial() {
this.compatibleOtherSpecial = true;
return this;
}
public String getDescription(ItemStack itemstack) {
return StatCollector.translateToLocalFormatted("lotr.enchant." + this.enchantName + ".desc", new Object[0]);
}
public boolean isBeneficial() {
return true;
}
public boolean canApply(ItemStack itemstack, boolean considering) {
if (super.canApply(itemstack, considering)) {
Item item = itemstack.getItem();
/*if (item instanceof lotr.common.item.LOTRItemBalrogWhip && (this == LOTREnchantment.fire || this == LOTREnchantment.chill))*/
return true;
}
return false;
}
public boolean isCompatibleWith(LOTREnchantment other) {
if (!this.compatibleBane)
if (other instanceof LOTREnchantmentBane)
return false;
if (!this.compatibleOtherSpecial)
if (other instanceof LOTREnchantmentArmorSpecial && !((LOTREnchantmentArmorSpecial)other).compatibleOtherSpecial)
return false;
return true;
}
public static int getFireAmount() {
return 2;
}
/*public static void doChillAttack(EntityLivingBase entity) {
if (entity instanceof EntityPlayerMP)
LOTRDamage.doFrostDamage((EntityPlayerMP)entity);
int duration = 5;
entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration * 20, 1));
LOTRPacketWeaponFX packet = new LOTRPacketWeaponFX(LOTRPacketWeaponFX.Type.CHILLING, (Entity)entity);
LOTRPacketHandler.networkWrapper.sendToAllAround((IMessage)packet, LOTRPacketHandler.nearEntity((Entity)entity, 64.0D));*/
}

@ -0,0 +1,92 @@
package com.zivilon.cinder_loe.entity;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod;
import lotr.common.entity.npc.LOTREntityNPC;
import lotr.common.entity.animal.LOTREntityHorse;
import lotr.common.entity.projectile.LOTREntityGandalfFireball;
import lotr.common.fac.LOTRFaction;
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.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class SarumanWhiteFireball extends LOTREntityGandalfFireball {
public SarumanWhiteFireball(World world) {
super(world);
}
public SarumanWhiteFireball(World world, EntityLivingBase entityliving) {
super(world, entityliving);
}
public SarumanWhiteFireball(World world, double d, double d1, double d2) {
super(world, d, d1, d2);
}
protected void onImpact(MovingObjectPosition m) {
if (!this.worldObj.isRemote)
if (m.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
explode((Entity)null);
} else if (m.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY) {
Entity entity = m.entityHit;
if (isEntityVulnerable(entity))
explode(entity);
}
}
private void explode(Entity target) {
if (this.worldObj.isRemote)
return;
this.worldObj.playSoundAtEntity((Entity)this, "lotr:item.gandalfFireball", 4.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
LOTRPacketWeaponFX packet = new LOTRPacketWeaponFX(LOTRPacketWeaponFX.Type.MACE_SAURON, (Entity)this);
LOTRPacketHandler.networkWrapper.sendToAllAround((IMessage)packet, LOTRPacketHandler.nearEntity((Entity)this, 64.0D));
if (target != null && isEntityVulnerable(target))
target.attackEntityFrom(DamageSource.causeMobDamage(getThrower()), 10.0F);
List<EntityLivingBase> entities = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.boundingBox.expand(6.0D, 6.0D, 6.0D));
if (!entities.isEmpty())
for (int i = 0; i < entities.size(); i++) {
EntityLivingBase entity = entities.get(i);
if (entity != target && isEntityVulnerable((Entity)entity)) {
float damage = 10.0F - getDistanceToEntity((Entity)entity) * 0.5F;
if (damage > 0.0F)
entity.attackEntityFrom(DamageSource.causeMobDamage(getThrower()), damage);
}
}
setDead();
}
private boolean isEntityVulnerable(Entity entity) {
if (entity == getThrower())
return false;
if (!(entity instanceof EntityLivingBase))
return false;
if (entity instanceof EntityPlayer)
return (LOTRLevelData.getData((EntityPlayer)entity).getAlignment(LOTRFaction.HIGH_ELF) < 0.0F);
return !LOTRFaction.HIGH_ELF.isGoodRelation(LOTRMod.getNPCFaction(entity));
}
protected float func_70182_d() {
return 1.5F;
}
protected float getGravityVelocity() {
return 0.0F;
}
}

@ -0,0 +1,46 @@
package com.zivilon.cinder_loe.items;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import java.util.List;
import lotr.common.LOTRCreativeTabs;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod;
import lotr.common.fac.LOTRFaction;
import lotr.common.network.LOTRPacketHandler;
import lotr.common.network.LOTRPacketWeaponFX;
import net.minecraft.creativetab.CreativeTabs;
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.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.Potion;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import com.zivilon.cinder_loe.items.WizardStaff;
import com.zivilon.cinder_loe.entity.SarumanWhiteFireball;
public class SarumanWhiteStaff extends WizardStaff {
public SarumanWhiteStaff() {
super();
}
public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) {
entityplayer.swingItem();
itemstack.damageItem(2, (EntityLivingBase)entityplayer);
world.playSoundAtEntity((Entity)entityplayer, "mob.ghast.fireball", 2.0F, (itemRand.nextFloat() - itemRand.nextFloat()) * 0.2F + 1.0F);
if (!world.isRemote) {
world.spawnEntityInWorld((Entity)new SarumanWhiteFireball(world, (EntityLivingBase)entityplayer));
LOTRPacketWeaponFX packet = new LOTRPacketWeaponFX(LOTRPacketWeaponFX.Type.MACE_SAURON, (Entity)entityplayer);
LOTRPacketHandler.networkWrapper.sendToAllAround((IMessage)packet, LOTRPacketHandler.nearEntity((Entity)entityplayer, 64.0D));
}
return itemstack;
}
}

@ -1,15 +1,15 @@
package com.zivilon.cinder_loe.mixins; package com.zivilon.cinder_loe.mixins;
import com.zivilon.cinder_loe.util.Pair; import com.zivilon.cinder_loe.util.*;
import com.zivilon.cinder_loe.util.DamageEvent;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.injection.callback.*;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityTameable;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
@ -18,10 +18,14 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.ForgeHooks;
import java.lang.reflect.*;
import java.util.List; import java.util.List;
@Mixin(EntityLivingBase.class) @Mixin(EntityLivingBase.class)
public abstract class MixinEntityLivingBase extends Entity { public abstract class MixinEntityLivingBase extends Entity {
private static boolean checked_cauldron = false;
private static Method cauldron_method;
@Shadow @Shadow
protected int entityAge; protected int entityAge;
@Shadow @Shadow
@ -50,13 +54,13 @@ public abstract class MixinEntityLivingBase extends Entity {
@Shadow @Shadow
protected abstract String getHurtSound(); protected abstract String getHurtSound();
@Shadow @Shadow
public abstract void onDeath(DamageSource p_70645_1_); public abstract void onDeath(DamageSource source);
@Shadow @Shadow
protected abstract String getDeathSound(); protected abstract String getDeathSound();
@Shadow @Shadow
public abstract float getHealth(); public abstract float getHealth();
@Shadow @Shadow
public abstract void knockBack(Entity p_70653_1_, float p_70653_2_, double p_70653_3_, double p_70653_5_); public abstract void knockBack(Entity entity, float strength, double direction_x, double direction_z);
@Shadow @Shadow
public abstract void setRevengeTarget(EntityLivingBase p_70604_1_); public abstract void setRevengeTarget(EntityLivingBase p_70604_1_);
@Shadow @Shadow
@ -79,40 +83,53 @@ public abstract class MixinEntityLivingBase extends Entity {
@Overwrite @Overwrite
public boolean attackEntityFrom(DamageSource source, float damage) { public boolean attackEntityFrom(DamageSource source, float damage) {
if (ForgeHooks.onLivingAttack((EntityLivingBase)(Object)this, source, damage)) return false; if (ForgeHooks.onLivingAttack((EntityLivingBase)(Object)this, source, damage)) return false;
if (this.isEntityInvulnerable()) { if (this.isEntityInvulnerable()) return false;
return false; if (this.worldObj.isRemote) return false;
} else if (this.worldObj.isRemote) { this.entityAge = 0;
return false;
} else {
this.entityAge = 0;
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) return false;
return false; if (source.isFireDamage() && isPotionActive(Potion.fireResistance)) return false;
} else if (source.isFireDamage() && this.isPotionActive(Potion.fireResistance)) {
return false; if (!(checked_cauldron)) {
} check_cauldron();
checked_cauldron = true;
}
DamageEvent event = new DamageEvent(source, damage, (EntityLivingBase)(Object)this, source.getEntity()); DamageEvent event = new DamageEvent(source, damage, (EntityLivingBase)(Object)this, source.getEntity());
Pair<DamageEvent, Boolean> result = DamageEvent.run_events(event); Pair<DamageEvent, Boolean> result = DamageEvent.run_events(event);
if (result.value) return false; if (result.value) return false;
damage = result.key.damage; damage = result.key.damage;
if (cauldron_method == null) {
if ((source == DamageSource.anvil || source == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) { if ((source == DamageSource.anvil || source == DamageSource.fallingBlock) && this.getEquipmentInSlot(4) != null) {
this.getEquipmentInSlot(4).damageItem((int)(damage * 4.0F + this.rand.nextFloat() * damage * 2.0F), (EntityLivingBase)(Object)this); this.getEquipmentInSlot(4).damageItem((int)(damage * 4.0F + this.rand.nextFloat() * damage * 2.0F), (EntityLivingBase)(Object)this);
damage *= 0.75F; damage *= 0.75F;
} }
}
this.limbSwingAmount = 1.5F; this.limbSwingAmount = 1.5F;
boolean flag = true; boolean flag = true;
if ((float)this.hurtResistantTime > (float)this.maxHurtResistantTime / 2.0F) {
if (damage <= this.lastDamage) {
return false;
}
if (this.hurtResistantTime > (float)this.maxHurtResistantTime / 2.0F) {
if (damage <= this.lastDamage) return false;
if (cauldron_method != null) {
boolean cauldron_cancel = entitydamage_cauldron(source, damage - this.lastDamage);
if (!cauldron_cancel) return false;
} else {
this.damageEntity(source, damage - this.lastDamage); this.damageEntity(source, damage - this.lastDamage);
}
this.lastDamage = damage;
flag = false;
} else {
if (cauldron_method != null) {
float previousHealth = getHealth();
boolean cauldron_cancel = entitydamage_cauldron(source, damage);
if (!cauldron_cancel) return false;
this.lastDamage = damage; this.lastDamage = damage;
flag = false; this.prevHealth = previousHealth;
this.hurtResistantTime = this.maxHurtResistantTime;
this.hurtTime = this.maxHurtTime = 10;
} else { } else {
this.lastDamage = damage; this.lastDamage = damage;
this.prevHealth = this.getHealth(); this.prevHealth = this.getHealth();
@ -120,69 +137,97 @@ public abstract class MixinEntityLivingBase extends Entity {
this.damageEntity(source, damage); this.damageEntity(source, damage);
this.hurtTime = this.maxHurtTime = 10; this.hurtTime = this.maxHurtTime = 10;
} }
}
this.attackedAtYaw = 0.0F; this.attackedAtYaw = 0.0F;
Entity entity = source.getEntity(); Entity entity = source.getEntity();
if (entity != null) { if (entity != null) {
if (entity instanceof EntityLivingBase) { if (entity instanceof EntityLivingBase)
this.setRevengeTarget((EntityLivingBase)entity); this.setRevengeTarget((EntityLivingBase)entity);
}
if (entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer) {
this.recentlyHit = 100;
this.attackingPlayer = (EntityPlayer)entity;
} else if (entity instanceof EntityTameable) {
EntityTameable entitywolf = (EntityTameable)entity;
if (entitywolf.isTamed()) {
this.recentlyHit = 100; this.recentlyHit = 100;
this.attackingPlayer = (EntityPlayer)entity; this.attackingPlayer = null;
} else if (entity instanceof net.minecraft.entity.passive.EntityTameable) {
net.minecraft.entity.passive.EntityTameable entitywolf = (net.minecraft.entity.passive.EntityTameable)entity;
if (entitywolf.isTamed()) {
this.recentlyHit = 100;
this.attackingPlayer = null;
}
} }
} }
}
if (flag) { if (flag) {
this.worldObj.setEntityState(this, (byte)2); this.worldObj.setEntityState((Entity)this, (byte)2);
if (source != DamageSource.drown)
if (source != DamageSource.drown) { this.setBeenAttacked();
this.setBeenAttacked();
}
if (entity != null) { if (entity != null) {
double d1 = entity.posX - this.posX; double d1 = entity.posX - this.posX;
double d0; double d0;
for (d0 = entity.posZ - this.posZ; d1 * d1 + d0 * d0 < 1.0E-4D; d0 = (Math.random() - Math.random()) * 0.01D) { for (d0 = entity.posZ - this.posZ; d1 * d1 + d0 * d0 < 1.0E-4D; d0 = (Math.random() - Math.random()) * 0.01D)
d1 = (Math.random() - Math.random()) * 0.01D; d1 = (Math.random() - Math.random()) * 0.01D;
}
this.attackedAtYaw = (float)(Math.atan2(d0, d1) * 180.0D / Math.PI) - this.rotationYaw; this.attackedAtYaw = (float)(Math.atan2(d0, d1) * 180.0D / Math.PI) - this.rotationYaw;
this.knockBack(entity, damage, d1, d0); this.knockBack(entity, damage, d1, d0);
} else { } else {
this.attackedAtYaw = (float)((int)(Math.random() * 2.0D) * 180); this.attackedAtYaw = (float)((int)(Math.random() * 2.0D) * 180);
}
} }
}
String s; String sound;
if (this.getHealth() <= 0.0F) { if (getHealth() <= 0.0F) {
s = this.getDeathSound(); sound = getDeathSound();
if (flag && s != null) { if (flag && sound != null)
this.playSound(s, this.getSoundVolume(), this.getSoundPitch()); this.playSound(sound, getSoundVolume(), getSoundPitch());
}
this.onDeath(source); onDeath(source);
} else { } else {
s = this.getHurtSound(); sound = getHurtSound();
if (flag && s != null) { if (flag && sound != null)
this.playSound(s, this.getSoundVolume(), this.getSoundPitch()); this.playSound(sound, getSoundVolume(), getSoundPitch());
} }
return true;
}
@Dynamic
private void check_cauldron() {
try {
Class<?> target_class = EntityLivingBase.class;
Method[] methods = target_class.getDeclaredMethods();
for (Method method : methods) {
if (method.getName().equals("damageEntity_CB")) {
cauldron_method = method;
return;
} }
}
} catch (Exception e) {
e.printStackTrace();
}
return true; return;
}
@Dynamic
public boolean entitydamage_cauldron(DamageSource source, float damage) {
boolean return_value = true;
if (cauldron_method != null) {
try {
Object result = cauldron_method.invoke(this, source, damage);
if (result instanceof Boolean) { // Check if the result is a boolean
return_value = (Boolean) result;
}
} catch (IllegalAccessException | InvocationTargetException e) {
}
} }
return return_value;
} }
} }

@ -1,8 +1,10 @@
package com.zivilon.cinder_loe.mixins; package com.zivilon.cinder_loe.mixins;
import com.zivilon.cinder_loe.enchants.LOTREnchantmentWeakProtectionRanged; import com.zivilon.cinder_loe.enchants.LOTREnchantmentWeakProtectionRanged;
import com.zivilon.cinder_loe.enchants.LOTREnchantmentArmorSpecial;
import com.zivilon.cinder_loe.util.Utilities; import com.zivilon.cinder_loe.util.Utilities;
import lotr.common.enchant.*; import lotr.common.enchant.*;
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;
@ -30,6 +32,11 @@ public class MixinLOTREnchantment {
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();
LOTREnchantment Shinare = new LOTREnchantmentArmorSpecial("Shinare").setEnchantWeight(0).setSkilful();
LOTREnchantment swiftness = new LOTREnchantmentArmorSpecial("swiftness").setEnchantWeight(0).setSkilful();
LOTREnchantment fireRepair = new LOTREnchantmentArmorSpecial("fireRepair").setEnchantWeight(0).setSkilful();
LOTREnchantment mountArmor = new LOTREnchantmentArmorSpecial("mountArmor").setEnchantWeight(0).setSkilful();
LOTREnchantment stealth = new LOTREnchantmentArmorSpecial("stealth").setEnchantWeight(0).setSkilful();
LOTREnchantment.allEnchantments.add(protectRangedWeak1); LOTREnchantment.allEnchantments.add(protectRangedWeak1);
@ -40,6 +47,11 @@ public class MixinLOTREnchantment {
LOTREnchantment.allEnchantments.add(rangedStrong4); LOTREnchantment.allEnchantments.add(rangedStrong4);
LOTREnchantment.allEnchantments.add(meleeReach2); LOTREnchantment.allEnchantments.add(meleeReach2);
LOTREnchantment.allEnchantments.add(meleeSpeed2); LOTREnchantment.allEnchantments.add(meleeSpeed2);
LOTREnchantment.allEnchantments.add(Shinare);
LOTREnchantment.allEnchantments.add(swiftness);
LOTREnchantment.allEnchantments.add(fireRepair);
LOTREnchantment.allEnchantments.add(mountArmor);
LOTREnchantment.allEnchantments.add(stealth);
Field enchantsByNameField = LOTREnchantment.class.getDeclaredField("enchantsByName"); Field enchantsByNameField = LOTREnchantment.class.getDeclaredField("enchantsByName");
enchantsByNameField.setAccessible(true); enchantsByNameField.setAccessible(true);
@ -54,6 +66,11 @@ public class MixinLOTREnchantment {
enchantsByName.put(rangedStrong4.enchantName, rangedStrong4); enchantsByName.put(rangedStrong4.enchantName, rangedStrong4);
enchantsByName.put(meleeReach2.enchantName, meleeReach2); enchantsByName.put(meleeReach2.enchantName, meleeReach2);
enchantsByName.put(meleeSpeed2.enchantName, meleeSpeed2); enchantsByName.put(meleeSpeed2.enchantName, meleeSpeed2);
enchantsByName.put(Shinare.enchantName, Shinare);
enchantsByName.put(swiftness.enchantName, swiftness);
enchantsByName.put(fireRepair.enchantName, fireRepair);
enchantsByName.put(mountArmor.enchantName, mountArmor);
enchantsByName.put(stealth.enchantName, stealth);
} catch (NoSuchFieldException | IllegalAccessException e) { } catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
@ -61,7 +78,7 @@ public class MixinLOTREnchantment {
} }
/** /**
* @author Shinare * @author MrJeep20
* @reason Bad enchantments will not count towards 3 modifier limit now * @reason Bad enchantments will not count towards 3 modifier limit now
**/ **/
@Overwrite(remap = false) @Overwrite(remap = false)

@ -3,6 +3,11 @@ package com.zivilon.cinder_loe.util;
import net.minecraft.entity.*; import net.minecraft.entity.*;
import net.minecraft.entity.player.*; import net.minecraft.entity.player.*;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import com.zivilon.cinder_loe.mixins.MixinLOTREnchantment;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper;
import lotr.common.item.*; import lotr.common.item.*;
import net.minecraft.item.*; import net.minecraft.item.*;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -67,7 +72,22 @@ public class DamageEvent {
} }
} }
} }
if (event.source.isFireDamage() && event.defender instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.defender;
for (ItemStack armor : player.inventory.armorInventory) {
if (armor != null && LOTREnchantmentHelper.hasEnchant(armor, LOTREnchantment.getEnchantmentByName("fireRepair"))) {
int currentDamage = armor.getItemDamage();
int reduction = (int) event.damage;
int newDamage = currentDamage - reduction;
if (newDamage < 0) {
newDamage = 0;
}
armor.setItemDamage(newDamage);
}
}
}
return new Pair<>(event, cancel); return new Pair<>(event, cancel);
} }
} }

@ -10,7 +10,7 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.lang.reflect.Field; import java.lang.reflect.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.UUID; import java.util.UUID;
@ -153,31 +153,6 @@ public class Utilities {
return builder.toString(); return builder.toString();
} }
public static void dumpClass(String className, String outputFilePath, Class<?> contextClass) {
// Convert class name to a resource path
String resourcePath = className.replace('.', '/') + ".class";
// Use the class loader of the context class to find the resource
try (InputStream classStream = contextClass.getClassLoader().getResourceAsStream(resourcePath)) {
if (classStream == null) {
System.err.println("Class " + className + " could not be found.");
return;
}
try (OutputStream outputStream = new FileOutputStream(outputFilePath)) {
// Copy the class stream to the output file
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = classStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
System.out.println("Dumped " + className + " to " + outputFilePath);
} catch (IOException e) {
System.err.println("Failed to write class file: " + e.getMessage());
}
} catch (IOException e) {
System.err.println("Failed to read class file: " + e.getMessage());
}
}
public static void writeLog(String message) { public static void writeLog(String message) {
try (BufferedWriter writer = new BufferedWriter(new FileWriter("custom_log.txt", true))) { try (BufferedWriter writer = new BufferedWriter(new FileWriter("custom_log.txt", true))) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();

@ -1,2 +1,3 @@
item.lotr:sarumanStaff.name=Staff of Saruman of Many Colours item.lotr:sarumanStaff.name=Staff of Saruman of Many Colours
item.lotr:sarumanWhiteStaff.name=Staff of Saruman the White
item.lotr:boarArmorRedDwarf.name=Red Dwarven Boar Armour item.lotr:boarArmorRedDwarf.name=Red Dwarven Boar Armour

@ -102,6 +102,7 @@ item.lotr:radagastStaff.name=Staff of Radagast the Brown
item.lotr:pallandoStaff.name=Staff of Pallando the Blue item.lotr:pallandoStaff.name=Staff of Pallando the Blue
item.lotr:alatarStaff.name=Staff of Alatar the Blue item.lotr:alatarStaff.name=Staff of Alatar the Blue
item.lotr:sarumanStaff.name=Staff of Saruman of Many Colors item.lotr:sarumanStaff.name=Staff of Saruman of Many Colors
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Loading…
Cancel
Save