2
0
Fork 0

1.5.2 Finalized

Added new achievements
framework for World Creation, and utilizing custom maps
Added a Util to test in future for event handlers regarding increasing incoming damage
Fixed bugs with brews
Attempted to make Unsmelting recipes for Cinder Items, failed.
main
KeyLime17 6 months ago
parent e79d1bb319
commit a0fe19d1e5

@ -1,5 +1,5 @@
modName = CinderLoE
modVersion = 1.5.1
modVersion = 1.5.2
modId = cinder_loe
modGroup = com.zivilon.cinder_loe

@ -8,10 +8,20 @@ public class CinderAchievement {
public static LOTRAchievement tameMonkey;
public static LOTRAchievement pickOlog;
public static LOTRAchievement spiceOrcBrew;
public static LOTRAchievement spiceHumanBrew;
public static LOTRAchievement spiceElfBrew;
public static LOTRAchievement spiceDwarfBrew;
public static LOTRAchievement Overdose;
public static void createAchievements() {
tameMonkey = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 78, LOTRMod.banana, "tameMonkey");
pickOlog = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 79, Items.skull, "pickpocketOlog");
spiceOrcBrew = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 80,CinderLoE.spiceOrcish , "spiceOrcBrew");
spiceHumanBrew = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 81,CinderLoE.spiceHuman , "spiceHumanBrew");
spiceElfBrew = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 82,CinderLoE.spiceElven , "spiceElfBrew");
spiceDwarfBrew = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 83,CinderLoE.spiceDwarven , "spiceDwarfBrew");
Overdose = new LOTRAchievement(LOTRAchievement.Category.GENERAL, 84, LOTRMod.barrel , "Overdose");
}
}

@ -89,23 +89,31 @@ public class CinderEventHandler implements IFuelHandler {
public void onLivingAttack(LivingAttackEvent event) {
Entity attacker = event.source.getEntity();
if (attacker instanceof EntityPlayerMP player) {
if (!(attacker instanceof EntityPlayerMP player)) return;
ItemStack weapon = player.getHeldItem();
// smithing rework for melee
if (weapon != null && (weapon.getItem() instanceof LOTRItemSpear || weapon.getItem() instanceof LOTRItemSword || weapon.getItem() instanceof LOTRItemDagger || weapon.getItem() instanceof LOTRItemBattleaxe || weapon.getItem() instanceof LOTRItemHammer || weapon.getItem() instanceof ItemSword)) {
float[] durabilityThresholds = {0.5f, 0.4f, 0.25f};
double[] probabilities = {0.0005, 0.001, 0.005}; // Corrected probabilities
if (weapon.isItemStackDamageable()) {
// Corrected durabilityPercent calculation
float durabilityPercent = (float) (weapon.getMaxDamage() - weapon.getItemDamage()) / weapon.getMaxDamage();
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;
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
float[] durabilityThresholds = {0.5f, 0.4f, 0.25f};
double[] probabilities = {0.0005, 0.001, 0.005};
LOTREnchantment sturdy = LOTREnchantment.getEnchantmentByName("meleeSturdy");
boolean hasSturdy = LOTREnchantmentHelper.hasEnchant(weapon, sturdy);
float durabilityPercent = (weapon.getMaxDamage() - weapon.getItemDamage()) / (float)weapon.getMaxDamage();
for (int i = 0; i < durabilityThresholds.length; i++) {
if (durabilityPercent <= durabilityThresholds[i]) {
double chance = probabilities[i] * (hasSturdy ? 0.5 : 1.0);
if (random.nextDouble() <= chance) {
addNegativeModifier(weapon, player, "weapon");
break; // Exit loop once a modifier is added
}
}
}
break;
}
}
}
@ -218,21 +226,27 @@ public class CinderEventHandler implements IFuelHandler {
// Durability thresholds and corresponding probabilities for adding a negative modifier
float[] durabilityThresholds = {0.4f, 0.3f, 0.2f};
double[] probabilities = {0.0005, 0.001, 0.005}; // Corrected probabilities
double[] probabilities = {0.0005, 0.001, 0.005};
LOTREnchantment sturdyArmor = LOTREnchantment.getEnchantmentByName("armorSturdy");
for (int i = 0; i < 4; ++i) {
ItemStack armor = player.getEquipmentInSlot(i + 1);
if (armor != null && armor.isItemStackDamageable()) {
float durabilityPercent = (float) (armor.getMaxDamage() - armor.getItemDamage()) / armor.getMaxDamage();
// Check each threshold and apply negative modifier if conditions are met
for (int j = 0; j < durabilityThresholds.length; j++) {
if (durabilityPercent <= durabilityThresholds[j] && random.nextDouble() <= probabilities[j]) {
for (int slot = 1; slot <= 4; slot++) {
ItemStack armor = player.getEquipmentInSlot(slot);
if (armor == null || !armor.isItemStackDamageable()) continue;
float durabilityPercent = (armor.getMaxDamage() - armor.getItemDamage()) / (float)armor.getMaxDamage();
boolean hasSturdy = LOTREnchantmentHelper.hasEnchant(armor, sturdyArmor);
for (int i = 0; i < durabilityThresholds.length; i++) {
if (durabilityPercent <= durabilityThresholds[i]) {
double chance = probabilities[i] * (hasSturdy ? 0.5 : 1.0);
if (random.nextDouble() <= chance) {
addNegativeModifier(armor, player, "armor");
break; // Exit loop once a modifier is added
}
break;
}
}
}
}
}

@ -95,11 +95,11 @@ import static lotr.common.LOTRMod.horseArmorIron;
@Mod(
modid = "cinder_loe",
version = "1.5.0",
version = "1.5.2",
name = "CinderLoE",
dependencies = "required-after:spongemixins@[1.1.0,);required-after:lotr",
acceptedMinecraftVersions = "[1.7.10]",
acceptableRemoteVersions = "[1.5.0]")
acceptableRemoteVersions = "[1.5.2]")
public class CinderLoE {
@Instance("cinder_loe")
@ -600,7 +600,7 @@ public class CinderLoE {
mugElfBrew = (new LoEItemMug(0.0F)).setDrinkStats(20, 1.0F).addPotionEffect(Potion.moveSpeed.id, 60, 1).toxic().setUnlocalizedName("lotr:mugElfBrew");
mugHumanBrew = (new LoEItemMug(0.0F)).setDrinkStats(20, 1.0F).addPotionEffect(Potion.regeneration.id, 60, 1).toxic().setUnlocalizedName("lotr:mugHumanBrew");
mugOrcBrew = (new LoEItemMug(0.0F)).setDrinkStats(20, 1.0F).addPotionEffect(Potion.damageBoost.id, 60, 1).toxic().setUnlocalizedName("lotr:mugOrcBrew");
mugOrcBrew = (new LoEItemMug(0.0F)).setDrinkStats(20, 1.0F).addPotionEffect(Potion.damageBoost.id, 60, 1).toxic().setDamageAmount(2).setUnlocalizedName("lotr:mugOrcBrew");
mugDwarfBrew = (new LoEItemMug(0.0F)).setDrinkStats(20, 1.0F).addPotionEffect(Potion.field_76443_y.id, 120).toxic().setUnlocalizedName("lotr:mugDwarfBrew");
((LoEItemMug)mugElfBrew).setTextureNameFromUnlocalizedName();
((LoEItemMug)mugHumanBrew).setTextureNameFromUnlocalizedName();

@ -29,7 +29,7 @@ public class LOTRDimensionAdder implements IClassTransformer {
public void registerDimensions() {
System.out.println("Registering dimensions");
custom_dimensions = new ArrayList<>();
// register("ISLAND", "Island", 102, CinderWorldProviderIsland.class, 100);
//register("ISLAND", "Island", 102, CinderWorldProviderIsland.class, 100);
}
// The ASM code you shouldn't touch

@ -76,9 +76,10 @@ public class RedDwarfSmith extends LOTREntityDwarf implements LOTRTradeable.Smit
new LOTRTradeEntry(new ItemStack(CinderLoE.legsRedDwarf), 30),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsRedDwarf), 22),
new LOTRTradeEntry(new ItemStack(CinderLoE.boarArmorRedDwarf), 25),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.barsRedDwarf, 8), 20),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200)
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
}
);

@ -1,8 +1,13 @@
package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.CinderAchievement;
import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.LoECreativeTabs;
import com.zivilon.cinder_loe.potion.LoEPotions;
import lotr.common.LOTRAchievement;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRReflection;
import lotr.common.item.LOTRItemMug;
import lotr.common.item.LOTRItemMug.Vessel;
import lotr.client.render.LOTRDrinkIcons;
@ -89,8 +94,25 @@ public class LoEItemMug extends LOTRItemMug {
return this;
}
public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) {
if (is_toxic)
if (is_toxic) {
increment_toxin(entityplayer);
}
if (this == CinderLoE.mugHumanBrew) {
LOTRLevelData.getData(entityplayer).addAchievement(CinderAchievement.spiceHumanBrew);
for (int i = 0; i < Potion.potionTypes.length; ++i) {
Potion potion = Potion.potionTypes[i];
if (potion == null || !LOTRReflection.isBadEffect(potion)) continue;
entityplayer.removePotionEffect(potion.id);
}
}
if (this == CinderLoE.mugDwarfBrew)
LOTRLevelData.getData(entityplayer).addAchievement(CinderAchievement.spiceDwarfBrew);
if (this == CinderLoE.mugOrcBrew)
LOTRLevelData.getData(entityplayer).addAchievement(CinderAchievement.spiceOrcBrew);
if (this == CinderLoE.mugElfBrew)
LOTRLevelData.getData(entityplayer).addAchievement(CinderAchievement.spiceElfBrew);
return super.onEaten(itemstack, world, entityplayer);
}
public void increment_toxin(EntityPlayer player) {
@ -99,5 +121,7 @@ public class LoEItemMug extends LOTRItemMug {
PotionEffect potion = player.getActivePotionEffect(LoEPotions.overdose);
if (potion != null) effect_potency = potion.getAmplifier() + 1;
player.addPotionEffect(new PotionEffect(LoEPotions.overdose.id, effect_duration, effect_potency));
if (effect_potency == 2)
LOTRLevelData.getData(player).addAchievement(CinderAchievement.Overdose);
}
}

@ -32,11 +32,12 @@ public class MixinLOTREnchantment {
LOTREnchantment rangedStrong4 = new LOTREnchantmentRangedDamage("rangedStrong4", 1.4f).setEnchantWeight(0).setSkilful();
LOTREnchantment meleeReach2 = new LOTREnchantmentMeleeReach("meleeReach2", 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 meleeSturdy = new LOTREnchantmentArmorSpecial("meleeSturdy").setEnchantWeight(1);
LOTREnchantment armorSturdy = new LOTREnchantmentArmorSpecial("armorSturdy").setEnchantWeight(1);
LOTREnchantment.allEnchantments.add(protectRangedWeak1);
@ -47,7 +48,8 @@ public class MixinLOTREnchantment {
LOTREnchantment.allEnchantments.add(rangedStrong4);
LOTREnchantment.allEnchantments.add(meleeReach2);
LOTREnchantment.allEnchantments.add(meleeSpeed2);
LOTREnchantment.allEnchantments.add(Shinare);
LOTREnchantment.allEnchantments.add(meleeSturdy);
LOTREnchantment.allEnchantments.add(armorSturdy);
LOTREnchantment.allEnchantments.add(swiftness);
LOTREnchantment.allEnchantments.add(fireRepair);
LOTREnchantment.allEnchantments.add(mountArmor);
@ -66,7 +68,8 @@ public class MixinLOTREnchantment {
enchantsByName.put(rangedStrong4.enchantName, rangedStrong4);
enchantsByName.put(meleeReach2.enchantName, meleeReach2);
enchantsByName.put(meleeSpeed2.enchantName, meleeSpeed2);
enchantsByName.put(Shinare.enchantName, Shinare);
enchantsByName.put(meleeSturdy.enchantName, meleeSturdy);
enchantsByName.put(armorSturdy.enchantName, armorSturdy);
enchantsByName.put(swiftness.enchantName, swiftness);
enchantsByName.put(fireRepair.enchantName, fireRepair);
enchantsByName.put(mountArmor.enchantName, mountArmor);

@ -126,6 +126,8 @@ public abstract class MixinLOTRTradeEntriesOverrides {
@Shadow public static LOTRTradeEntries DALE_BLACKSMITH_SELL;
@Shadow public static LOTRTradeEntries WICKED_DWARF_BUY;
@Shadow public static LOTRTradeEntries DALE_BAKER_BUY;
/**
* @author
@ -134,6 +136,42 @@ public abstract class MixinLOTRTradeEntriesOverrides {
@Inject(method = "setupTrades1", at = @At("RETURN"), remap = false)
private static void newTrades(CallbackInfo ci) {
DALE_BAKER_BUY = new LOTRTradeEntries(TradeType.BUY,
new LOTRTradeEntry(new ItemStack(Items.bread), 5),
new LOTRTradeEntry(new ItemStack(LOTRMod.cornBread), 5),
new LOTRTradeEntry(new ItemStack(LOTRMod.cram), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.oliveBread), 6),
new LOTRTradeEntry(new ItemStack(LOTRMod.dalishPastryItem), 12),
new LOTRTradeEntry(new ItemStack(Items.cake), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.lemonCakeItem), 20),
new LOTRTradeEntry(new ItemStack(LOTRMod.appleCrumbleItem), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.berryPieItem), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.cherryPieItem), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.marzipan), 8),
new LOTRTradeEntry(new ItemStack(LOTRMod.marzipanChocolate), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.marzipanBlock), 20),
new LOTRTradeEntry(new ItemStack(Items.cookie), 4),
new LOTRTradeEntry(new ItemStack(LOTRMod.plate), 4),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.ceramicPlate), 2));
((MixinLOTRTradeEntriesOverrides)(Object)DALE_BAKER_BUY).setVessels(LOTRFoods.DALE_DRINK);
TAUREDAIN_FARMER_BUY = new LOTRTradeEntries(TradeType.BUY,
new LOTRTradeEntry(new ItemStack(Items.wheat), 2),
new LOTRTradeEntry(new ItemStack(Items.wheat_seeds), 1),
new LOTRTradeEntry(new ItemStack(Items.carrot), 3),
new LOTRTradeEntry(new ItemStack(Items.potato), 2),
new LOTRTradeEntry(new ItemStack(LOTRMod.lettuce), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.mango), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.banana), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.reeds), 2),
new LOTRTradeEntry(new ItemStack(LOTRMod.driedReeds), 2),
new LOTRTradeEntry(new ItemStack(Items.dye, 1, 3), 8),
new LOTRTradeEntry(new ItemStack(CinderLoE.fruitsalad, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spice, 1), 10),
new LOTRTradeEntry(new ItemStack(LOTRMod.corn), 3));
((MixinLOTRTradeEntriesOverrides)(Object)TAUREDAIN_FARMER_BUY).setVessels(LOTRFoods.TAUREDAIN_DRINK);
DWARF_MINER_BUY =
new LOTRTradeEntries(TradeType.BUY,
new LOTRTradeEntry(new ItemStack(Items.coal, 2), 4),
@ -157,6 +195,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.amber), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.amethyst), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.topaz), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 10), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)DWARF_MINER_BUY).setVessels(LOTRFoods.DWARF_DRINK);
@ -381,6 +420,8 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugCider, 1, 9999), 8),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugRum, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugAppleJuice), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)DUNLENDING_BARTENDER_BUY).setVessels(LOTRFoods.DUNLENDING_DRINK);
@ -401,6 +442,8 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugWater), 2),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMead, 1, 9999), 8),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMilk), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)ROHAN_MEADHOST_BUY).setVessels(LOTRFoods.ROHAN_DRINK);
@ -425,6 +468,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.amber), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.amethyst), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.topaz), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 11), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)BLUE_DWARF_MINER_BUY).setVessels(LOTRFoods.DWARF_DRINK);
@ -475,6 +519,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.ruby), 20),
new LOTRTradeEntry(new ItemStack(LOTRMod.amethyst), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.topaz), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 9), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)BLUE_DWARF_MERCHANT_BUY).setVessels(LOTRFoods.DWARF_DRINK);
@ -639,6 +684,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsElven), 16),
new LOTRTradeEntry(new ItemStack(LOTRMod.horseArmorGaladhrim), 25),
new LOTRTradeEntry(new ItemStack(LOTRMod.elvenBow), 20),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3));
@ -659,6 +708,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsHighElven), 16),
new LOTRTradeEntry(new ItemStack(LOTRMod.horseArmorHighElven), 25),
new LOTRTradeEntry(new ItemStack(LOTRMod.highElvenBow), 20),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3));
@ -682,6 +735,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsWoodElven), 16),
new LOTRTradeEntry(new ItemStack(LOTRMod.elkArmorWoodElven), 25),
new LOTRTradeEntry(new ItemStack(LOTRMod.mirkwoodBow), 15),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsGildedGalvorn), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(Items.arrow, 4), 3),
@ -697,6 +754,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.rhinoRaw), 6),
new LOTRTradeEntry(new ItemStack(Items.rotten_flesh), 3),
new LOTRTradeEntry(new ItemStack(Items.feather), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetWarlord), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyWarlord), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsWarlord), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsWarlord), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 4), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)MOREDAIN_HUNTSMAN_BUY).setVessels(LOTRFoods.MOREDAIN_DRINK);
@ -736,6 +797,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.amber), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.amethyst), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.topaz), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 9), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)IRON_HILLS_MERCHANT_BUY).setVessels(LOTRFoods.DWARF_DRINK);
@ -751,6 +813,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugChocolate), 4),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugTauredainCocoa, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugTauredainCure), 20),
new LOTRTradeEntry(new ItemStack(CinderLoE.chocolatebar, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)TAUREDAIN_SHAMAN_BUY).setVessels(LOTRFoods.TAUREDAIN_DRINK);
@ -782,6 +845,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.legsDwarvenGold), 75),
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsDwarvenGold), 70),
new LOTRTradeEntry(new ItemStack(LOTRMod.boarArmorDwarven), 25),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(LOTRMod.dwarfBars, 8), 20));
@ -806,6 +870,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.legsBlueDwarven), 30),
new LOTRTradeEntry(new ItemStack(LOTRMod.bootsBlueDwarven), 22),
new LOTRTradeEntry(new ItemStack(LOTRMod.boarArmorBlueDwarven), 25),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(LOTRMod.blueDwarfBars, 8), 20));
@ -906,6 +971,8 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMead, 1, 9999), 8),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugRedWine, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugWhiteWine, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)GONDOR_BARTENDER_BUY).setVessels(LOTRFoods.GONDOR_DRINK);
@ -1094,6 +1161,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.deerRaw), 4),
new LOTRTradeEntry(new ItemStack(Items.leather), 3),
new LOTRTradeEntry(new ItemStack(Items.feather), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 4), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)RHUN_BUTCHER_BUY).setVessels(LOTRFoods.RHUN_DRINK);
@ -1265,6 +1333,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
}
/**
* @author
* @reason
@ -1295,6 +1364,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.crossbowBolt, 4), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.ironCrossbow), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.bronzeCrossbow), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetserpent), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyserpent), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsserpent), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsserpent), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(LOTRMod.horseArmorNearHarad), 25));
@ -1345,6 +1418,10 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.crossbowBolt, 4), 3),
new LOTRTradeEntry(new ItemStack(LOTRMod.ironCrossbow), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.bronzeCrossbow), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.helmetUsurper), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bodyUsurper), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.legsUsurper), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.bootsUsurper), 100),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(LOTRMod.horseArmorUmbar), 25));
@ -1399,6 +1476,9 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugLemonLiqueur, 1, 9999), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugLimeLiqueur, 1, 9999), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugCactusLiqueur, 1, 9999), 15),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.fruitsalad, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)HARNEDOR_BARTENDER_BUY).setVessels(LOTRFoods.HARNEDOR_DRINK);
@ -1481,6 +1561,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack((Block)Blocks.double_plant, 1, 5), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.doubleFlower, 1, 1), 15),
new LOTRTradeEntry(new ItemStack(LOTRMod.morgulShroom, 1, 0), 20),
new LOTRTradeEntry(new ItemStack(CinderLoE.spice, 1), 10),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 5), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)HARAD_FLORIST_BUY).setVessels(LOTRFoods.SOUTHRON_DRINK);
@ -1557,6 +1638,9 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugLemonLiqueur, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugLimeLiqueur, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugCactusLiqueur, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.fruitsalad, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)SOUTHRON_BARTENDER_BUY).setVessels(LOTRFoods.SOUTHRON_DRINK);
@ -1598,6 +1682,9 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugCactusLiqueur, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugBananaBeer, 1, 9999), 12),
new LOTRTradeEntry(new ItemStack(LOTRMod.mugMangoJuice), 10),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.fruitsalad, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)GULF_BARTENDER_BUY).setVessels(LOTRFoods.GULF_HARAD_DRINK);
@ -1655,6 +1742,7 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.wall4, 8, 6), 8),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 1), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.forgingKit, 1, 0), 200),
new LOTRTradeEntry(new ItemStack(CinderLoE.spicedHam, 1), 6),
new LOTRTradeEntry(new ItemStack(LOTRMod.gateDwarven, 1, 0), 12));
((MixinLOTRTradeEntriesOverrides)(Object)WICKED_DWARF_BUY).setVessels(LOTRFoods.DWARF_DRINK);
@ -1715,6 +1803,8 @@ public abstract class MixinLOTRTradeEntriesOverrides {
new LOTRTradeEntry(new ItemStack(LOTRMod.mugAppleJuice), 6),
new LOTRTradeEntry(new ItemStack(LOTRMod.pipeweed, 4), 8),
new LOTRTradeEntry(new ItemStack(LOTRMod.hobbitPipe), 25),
new LOTRTradeEntry(new ItemStack(CinderLoE.flatbread, 1), 3),
new LOTRTradeEntry(new ItemStack(CinderLoE.lightStew, 1), 6),
new LOTRTradeEntry(new ItemStack(CinderLoE.spiceIngredient, 1, 3), 6666));
((MixinLOTRTradeEntriesOverrides)(Object)BREE_INNKEEPER_BUY).setVessels(LOTRFoods.BREE_DRINK);

@ -20,6 +20,7 @@ import net.minecraftforge.oredict.RecipeSorter;
import net.minecraftforge.oredict.RecipeSorter.Category;
import static lotr.common.recipe.LOTRBrewingRecipes.BARREL_CAPACITY;
import static lotr.common.recipe.LOTRRecipes.uncraftableUnsmeltingRecipes;
public class recipes {
@ -35,6 +36,7 @@ public class recipes {
registerAngmarRecipes();
registerBrewingRecipes();
registerMillstoneRecipes();
registerSmeltingRecipes();
}
public static void registerGeneralRecipes() {
@ -175,6 +177,8 @@ public class recipes {
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(CinderLoE.pelmen), Items.wheat, "meat", LOTRMod.salt));
GameRegistry.addRecipe(new LOTRRecipesPoisonDrinks());
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.woodpanel, 4), "XY", "YX",
'X', "logWood" , 'Y', "plankWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.cinderBlock), "XXX", "XYX", "XXX",
'X', Blocks.stone, 'Y', LOTRMod.balrogFire));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(CinderLoE.reedBale), "XXX", "XXX", "XXX",
@ -448,4 +452,9 @@ public class recipes {
GameRegistry.addSmelting(new ItemStack(CinderLoE.flour), new ItemStack(CinderLoE.flatbread), 0f);
}
public static void createUnsmeltingRecipes() {
uncraftableUnsmeltingRecipes.add((IRecipe)new ShapedOreRecipe(new ItemStack(LOTRMod.utumnoBow), new Object[]{" XY", "X Y", " XY", Character.valueOf('X'), LOTRMod.orcSteel, Character.valueOf('Y'), Items.string}));
}
}

@ -0,0 +1,65 @@
package com.zivilon.cinder_loe.world;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.ModContainer;
import lotr.common.LOTRDimension;
import lotr.common.LOTRMod;
import lotr.common.world.biome.LOTRBiome;
import lotr.common.world.genlayer.LOTRGenLayerWorld;
import org.apache.logging.log4j.Level;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class CinderGenLayerWorld extends LOTRGenLayerWorld {
private static byte[] biomeImageData;
public CinderGenLayerWorld() {
super();
if (!LOTRGenLayerWorld.loadedBiomeImage()) {
try {
BufferedImage biomeImage = null;
String imageName = "assets/lotr/map/map.png";
ModContainer mc = LOTRMod.getModContainer();
if (mc.getSource().isFile()) {
ZipFile zip = new ZipFile(mc.getSource());
Enumeration<? extends ZipEntry> entries = zip.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
if (!entry.getName().equals(imageName)) continue;
biomeImage = ImageIO.read(zip.getInputStream(entry));
}
zip.close();
} else {
File file = new File(LOTRMod.class.getResource("/" + imageName).toURI());
biomeImage = ImageIO.read(new FileInputStream(file));
}
if (biomeImage == null) {
throw new RuntimeException("Could not load Cinder biome map image");
}
imageWidth = biomeImage.getWidth();
imageHeight = biomeImage.getHeight();
int[] colors = biomeImage.getRGB(0, 0, imageWidth, imageHeight, null, 0, imageWidth);
biomeImageData = new byte[imageWidth * imageHeight];
for (int i = 0; i < colors.length; ++i) {
int color = colors[i];
Integer biomeID = LOTRDimension.MIDDLE_EARTH.colorsToBiomeIDs.get(color);
if (biomeID != null) {
CinderGenLayerWorld.biomeImageData[i] = (byte)biomeID.intValue();
continue;
}
FMLLog.log((Level) Level.ERROR, (String)("Found unknown biome on map " + Integer.toHexString(color)), (Object[])new Object[0]);
CinderGenLayerWorld.biomeImageData[i] = (byte) LOTRBiome.ocean.biomeID;
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
}

@ -0,0 +1,75 @@
package com.zivilon.cinder_loe.world;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.*;
import lotr.common.world.LOTRWorldChunkManager;
import lotr.common.world.LOTRWorldProvider;
import net.minecraft.util.StatCollector;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.client.IRenderHandler;
public abstract class CinderWorldProvider extends LOTRWorldProvider {
public static int MOON_PHASES = 8;
@SideOnly(value= Side.CLIENT)
private IRenderHandler lotrSkyRenderer;
@SideOnly(value=Side.CLIENT)
private IRenderHandler lotrCloudRenderer;
@SideOnly(value=Side.CLIENT)
private IRenderHandler lotrWeatherRenderer;
private boolean spawnHostiles = true;
private boolean spawnPeacefuls = true;
private double cloudsR;
private double cloudsG;
private double cloudsB;
private double fogR;
private double fogG;
private double fogB;
public abstract LOTRDimension getLOTRDimension();
public void registerWorldChunkManager() {
this.worldChunkMgr = new LOTRWorldChunkManager(this.worldObj, this.getLOTRDimension());
this.dimensionId = this.getLOTRDimension().dimensionID;
}
public String getWelcomeMessage() {
return StatCollector.translateToLocalFormatted((String)"lotr.dimension.enter", (Object[])new Object[]{this.getLOTRDimension().getDimensionName()});
}
public String getDepartMessage() {
return StatCollector.translateToLocalFormatted((String)"lotr.dimension.exit", (Object[])new Object[]{this.getLOTRDimension().getDimensionName()});
}
public String getSaveFolder() {
return this.getLOTRDimension().dimensionName;
}
public String getDimensionName() {
return this.getLOTRDimension().dimensionName;
}
public boolean canRespawnHere() {
return false;
}
public BiomeGenBase getBiomeGenForCoords(int i, int k) {
Chunk chunk;
if (this.worldObj.blockExists(i, 0, k) && (chunk = this.worldObj.getChunkFromBlockCoords(i, k)) != null) {
int chunkX = i & 0xF;
int chunkZ = k & 0xF;
int biomeID = chunk.getBiomeArray()[chunkZ << 4 | chunkX] & 0xFF;
if (biomeID == 255) {
BiomeGenBase biomegenbase = this.worldChunkMgr.getBiomeGenAt((chunk.xPosition << 4) + chunkX, (chunk.zPosition << 4) + chunkZ);
biomeID = biomegenbase.biomeID;
chunk.getBiomeArray()[chunkZ << 4 | chunkX] = (byte)(biomeID & 0xFF);
}
LOTRDimension dim = this.getLOTRDimension();
return dim.biomeList[biomeID] == null ? dim.biomeList[0] : dim.biomeList[biomeID];
}
return this.worldChunkMgr.getBiomeGenAt(i, k);
}
}

@ -124,6 +124,7 @@ item.lotr:pasta.name=Pasta
item.lotr:pretzel.name=Pretzel
item.lotr:halva.name=Halva
item.lotr:doner_kebab.name=Döner Kebab
item.lotr:flatbread.name=Flatbread
item.lotr:bonemold.name=Bonemold
item.lotr:helmetLimwaith.name=Limwaith Helmet
@ -155,6 +156,11 @@ item.lotr:legsArnorBanner.name=Light Arnorian Leggings
item.lotr:bootsArnorBanner.name=Light Arnorian Boots
item.lotr:maceArnor.name=Arnorian Mace
item.lotr:helmetGildedGalvorn.name=Gilded Galvorn Helmet
item.lotr:bodyGildedGalvorn.name=Gilded Galvorn Chestplate
item.lotr:legsGildedGalvorn.name=Gilded Galvorn Leggings
item.lotr:bootsGildedGalvorn.name=Gilded Galvorn Boots
item.lotr:ingotAsh.name=Ashen Ingot
item.lotr:swordAsh.name=Ash-Forged Sword
item.lotr:staffAsh.name=Ash-Forged Bardiche
@ -358,6 +364,10 @@ lotr.enchant.stealth=Cloaked
lotr.enchant.stealth.desc=Reduces NPC detection range
lotr.enchant.mountArmor=Heavy
lotr.enchant.mountArmor.desc=+1 mount armor
lotr.enchant.meleeSturdy=Sturdy
lotr.enchant.meleeSturdy.desc=Reduces chance of negative modifiers
lotr.enchant.armorSturdy=Sturdy
lotr.enchant.armorSturdy.desc=Reduces chance of negative modifiers
lotr.unit.Banner_Warg=Warg Rider Banner
@ -417,5 +427,18 @@ lotr.achievement.tameMonkey.desc=Tame a Monkey
lotr.achievement.pickpocketOlog.title=Minor Mistake
lotr.achievement.pickpocketOlog.desc=Attempt and Fail to pickpocket an Olog-Hai
lotr.achievement.spiceHumanBrew.title=Invigorated!
lotr.achievement.spiceHumanBrew.desc=Drink a brew infused with Kings Herbs.
lotr.achievement.spiceElfBrew.title=Taste of starlight
lotr.achievement.spiceElfBrew.desc=Drink a brew infused with Silverblend.
lotr.achievement.spiceOrcBrew.title=Ghâsh-Drinker
lotr.achievement.spiceOrcBrew.desc=Drink a brew infused with Morgul Salts.
lotr.achievement.spiceDwarfBrew.title=Belly of Stone
lotr.achievement.spiceDwarfBrew.desc=Drink a brew infused with Stonegrit.
lotr.achievement.Overdose.title=I don't feel so good...
lotr.achievement.Overdose.desc=Overdose on concentrated brews.
#Biomes
lotr.biome.mistyForest.name=Misty Forest

Loading…
Cancel
Save