diff --git a/.gradle/8.2.1/checksums/checksums.lock b/.gradle/8.2.1/checksums/checksums.lock index c55899e..3d69a43 100644 Binary files a/.gradle/8.2.1/checksums/checksums.lock and b/.gradle/8.2.1/checksums/checksums.lock differ diff --git a/.gradle/8.2.1/fileHashes/fileHashes.lock b/.gradle/8.2.1/fileHashes/fileHashes.lock index 94245ca..a0b0cd9 100644 Binary files a/.gradle/8.2.1/fileHashes/fileHashes.lock and b/.gradle/8.2.1/fileHashes/fileHashes.lock differ diff --git a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java index 0c2f8cc..dcf31d4 100644 --- a/src/main/java/com/zivilon/cinder_loe/CinderLoE.java +++ b/src/main/java/com/zivilon/cinder_loe/CinderLoE.java @@ -125,8 +125,8 @@ public class CinderLoE { public static Item onion; public static Item cabbage; public static Item pelmen; - // public static Item spice; - // public static Item spicedHam; + public static Item spice; + public static Item spicedHam; public static Item lightStew; // Misc @@ -423,13 +423,14 @@ public class CinderLoE { e.printStackTrace(); } // Food - onion = new ItemSeedFood(3, 0.3f, CinderLoE.onionCrop, Blocks.farmland).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion"); - cabbage = new ItemSeedFood(3, 0.3f, CinderLoE.cabbageCrop, Blocks.farmland).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage");; - // spice = new CinderItemFood(1, 0.0f, false).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 10,0,100).setUnlocalizedName("lotr:spice"); - // spicedHam = new CinderItemFood(9, 0.6f, true).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 60, 0, 100).setUnlocalizedName("lotr:spicedHam"); + // onion = new ItemSeedFood(3, 0.3f, CinderLoE.onionCrop, Blocks.farmland).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion"); + //cabbage = new ItemSeedFood(3, 0.3f, CinderLoE.cabbageCrop, Blocks.farmland).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage");; + spice = new CinderItemFood(1, 0.0f, false).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 10,0,100).setUnlocalizedName("lotr:spice").setTextureName("lotr:spice"); + spicedHam = new CinderItemFood(9, 0.6f, true).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 60, 0, 100).setUnlocalizedName("lotr:spicedHam").setTextureName("lotr:spicedHam"); + // spice = new LOTRItemFood(1, 0.0f, false).setPotionEffect(Potion.moveSpeed.id, 10,0,100).setUnlocalizedName("lotr:spice"); pelmen = new LOTRItemFood(6, 1.0f, true).setUnlocalizedName("lotr:pelmen").setTextureName("lotr:pelmen"); - // onion = new LOTRItemFood(6, 1.0f, false).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion"); - // cabbage = new LOTRItemFood(6, 1.0f, false).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage"); + onion = new LOTRItemFood(6, 1.0f, false).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion"); + cabbage = new LOTRItemFood(6, 1.0f, false).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage"); lightStew = new LOTRItemStew(6, 0.7f, false).setPotionEffect(Potion.damageBoost.id, 60, 0, 100).setUnlocalizedName("lotr:lightStew").setTextureName("lotr:lightStew"); // Red Dwarf Spawns redDwarfWarriorSpawnEgg = new CinderLoESpawnEgg(RedDwarfWarrior.class).setTextureName("lotr:spawn_egg"); @@ -490,8 +491,8 @@ public class CinderLoE { ItemRegistration.registerItem(cabbage, "cabbage", 90); ItemRegistration.registerItem(pelmen, "pelmen", 91); ItemRegistration.registerItem(lightStew, "lightStew", 92); - // ItemRegistration.registerItem(spice, "spice", 93); - // ItemRegistration.registerItem(spicedHam, "spicedHam", 94); + ItemRegistration.registerItem(spice, "spice", 93); + ItemRegistration.registerItem(spicedHam, "spicedHam", 94); // ==Red Dwarf Eggs== ItemRegistration.registerItem(redDwarfWarriorSpawnEgg, "redDwarfWarriorSpawnEgg", 0); @@ -906,8 +907,8 @@ public class CinderLoE { // == Food Items == CinderCore.registerItemFallback(Item.getIdFromItem(onion), Item.getIdFromItem(LOTRMod.turnip), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Item.getIdFromItem(cabbage), Item.getIdFromItem(LOTRMod.lettuce), "cinder_loe", "1.2.1"); - // CinderCore.registerItemFallback(Item.getIdFromItem(spice), Item.getIdFromItem(LOTRMod.dye), "cinder_loe", "1.2.1"); - // CinderCore.registerItemFallback(Item.getIdFromItem(spicedHam), Item.getIdFromItem(LOTRMod.gammon), "cinder_loe", "1.2.1"); + CinderCore.registerItemFallback(Item.getIdFromItem(spice), Item.getIdFromItem(LOTRMod.dye), "cinder_loe", "1.2.1"); + CinderCore.registerItemFallback(Item.getIdFromItem(spicedHam), Item.getIdFromItem(LOTRMod.gammon), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Item.getIdFromItem(pelmen), Item.getIdFromItem(LOTRMod.cram), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Item.getIdFromItem(lightStew), Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2.1"); diff --git a/src/main/java/com/zivilon/cinder_loe/items/CinderItemFood.java b/src/main/java/com/zivilon/cinder_loe/items/CinderItemFood.java index 6049f58..6e7c463 100644 --- a/src/main/java/com/zivilon/cinder_loe/items/CinderItemFood.java +++ b/src/main/java/com/zivilon/cinder_loe/items/CinderItemFood.java @@ -20,25 +20,25 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; -public class CinderItemFood extends ItemFood { +public class CinderItemFood extends LOTRItemFood { + private int damageAmount; public CinderItemFood(int healAmount, float saturation, boolean canWolfEat) { super(healAmount, saturation, canWolfEat); - this.setCreativeTab(LOTRCreativeTabs.tabFood); } - private int damageAmount; public CinderItemFood setdamageAmount(int i) { this.damageAmount = i; return this; } - + @Override public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) { + if (!world.isRemote && this == LOTRMod.maggotyBread) { + LOTRLevelData.getData(entityplayer).addAchievement(LOTRAchievement.eatMaggotyBread); + } if (this.damageAmount > 0) { - entityplayer.attackEntityFrom(DamageSource.magic, (float)this.damageAmount); + entityplayer.attackEntityFrom(DamageSource.onFire, (float)this.damageAmount); } - return super.onEaten(itemstack, world, entityplayer); } - -} +} \ No newline at end of file