2
0
Fork 0

cabbage and onion crop textures dont register, planting an onion or cabbage causes crash

frozen
KeyLime17 2 years ago
parent 838c3d2c5e
commit 023886c3c5

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/CinderLoE-Git.main.iml" filepath="$PROJECT_DIR$/.idea/modules/CinderLoE-Git.main.iml" />
</modules>
</component>
</project>

@ -10,4 +10,7 @@
</configuration> </configuration>
</facet> </facet>
</component> </component>
<component name="McpModuleSettings">
<option name="srgType" value="SRG" />
</component>
</module> </module>

@ -12,6 +12,8 @@ import com.zivilon.cinder_loe.util.Utilities;
import com.zivilon.cinder_loe.ItemRegistration; import com.zivilon.cinder_loe.ItemRegistration;
import com.zivilon.cindercore.CinderCore; import com.zivilon.cindercore.CinderCore;
import lotr.common.item.*; import lotr.common.item.*;
import net.minecraft.item.ItemSeedFood;
import net.minecraft.potion.Potion;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassReader;
@ -123,8 +125,8 @@ public class CinderLoE {
public static Item onion; public static Item onion;
public static Item cabbage; public static Item cabbage;
public static Item pelmen; public static Item pelmen;
public static Item spice; // public static Item spice;
public static Item spicedHam; // public static Item spicedHam;
public static Item lightStew; public static Item lightStew;
// Misc // Misc
@ -403,10 +405,12 @@ public class CinderLoE {
GameRegistry.registerBlock(cobbleDrystone, "cobbleDrystone"); GameRegistry.registerBlock(cobbleDrystone, "cobbleDrystone");
//Food Crops //Food Crops
onionCrop = (new onionCrop()); onionCrop = new onionCrop().setBlockName("onion");
GameRegistry.registerBlock(onionCrop, "onionCrop"); GameRegistry.registerBlock(onionCrop, "onionCrop");
cabbageCrop = (new cabbageCrop()); cabbageCrop = new cabbageCrop().setBlockName("cabbage");
GameRegistry.registerBlock(cabbageCrop, "cabbageCrop"); GameRegistry.registerBlock(cabbageCrop, "cabbageCrop");
} }
public void registerItems() { public void registerItems() {
@ -419,12 +423,14 @@ public class CinderLoE {
e.printStackTrace(); e.printStackTrace();
} }
// Food // Food
onion = new ItemSeedFood(3, 0.3f, onionCrop, Blocks.farmland).setCreativeTab((CreativeTabs)LOTRCreativeTabs.tabFood).setUnlocalizedName("lotr:onion"); onion = new ItemSeedFood(3, 0.3f, CinderLoE.onionCrop, Blocks.farmland).setUnlocalizedName("lotr:onion").setTextureName("lotr:onion");
cabbage = new ItemSeedFood(3, 0.3f, cabbageCrop, Blocks.farmland).setCreativeTab((CreativeTabs)LOTRCreativeTabs.tabFood).setUnlocalizedName("lotr:cabbage"); cabbage = new ItemSeedFood(3, 0.3f, CinderLoE.cabbageCrop, Blocks.farmland).setUnlocalizedName("lotr:cabbage").setTextureName("lotr:cabbage");;
spice = new LOTRItemFood(1, 0.0f, true).setDamageAmount(2).addPotionEffect(Potion.moveSpeed.id, 3).setUnlocalizedName("lotr:spice"); // spice = new CinderItemFood(1, 0.0f, false).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 10,0,100).setUnlocalizedName("lotr:spice");
spicedHam = new LOTRItemFood(9, 0.6f, true).setDamageAmount(2).addPotionEffect(Potion.moveSpeed.id, 60).setUnlocalizedName("lotr:spicedHam"); // spicedHam = new CinderItemFood(9, 0.6f, true).setdamageAmount(2).setPotionEffect(Potion.moveSpeed.id, 60, 0, 100).setUnlocalizedName("lotr:spicedHam");
pelmen = new LOTRItemFood(6, 1.0f, true).setUnlocalizedName("lotr:pelmen"); pelmen = new LOTRItemFood(6, 1.0f, true).setUnlocalizedName("lotr:pelmen").setTextureName("lotr:pelmen");
lightStew = new LOTRItemStew(6, 0.7f, true).addPotionEffect(Potion.damageBoost.id, 120).setUnlocalizedName("lotr:lightStew"); // 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 // Red Dwarf Spawns
redDwarfWarriorSpawnEgg = new CinderLoESpawnEgg(RedDwarfWarrior.class).setTextureName("lotr:spawn_egg"); redDwarfWarriorSpawnEgg = new CinderLoESpawnEgg(RedDwarfWarrior.class).setTextureName("lotr:spawn_egg");
redDwarfArbalestSpawnEgg = new CinderLoESpawnEgg(RedDwarfArbalest.class).setTextureName("lotr:spawn_egg"); redDwarfArbalestSpawnEgg = new CinderLoESpawnEgg(RedDwarfArbalest.class).setTextureName("lotr:spawn_egg");
@ -483,9 +489,10 @@ public class CinderLoE {
ItemRegistration.registerItem(onion, "onion", 89); ItemRegistration.registerItem(onion, "onion", 89);
ItemRegistration.registerItem(cabbage, "cabbage", 90); ItemRegistration.registerItem(cabbage, "cabbage", 90);
ItemRegistration.registerItem(pelmen, "pelmen", 91); ItemRegistration.registerItem(pelmen, "pelmen", 91);
ItemRegistration.registerItem(spice, "spice", 92); ItemRegistration.registerItem(lightStew, "lightStew", 92);
ItemRegistration.registerItem(spicedHam, "spicedHam", 93); // ItemRegistration.registerItem(spice, "spice", 93);
ItemRegistration.registerItem(lightStew, "lightStew", 94); // ItemRegistration.registerItem(spicedHam, "spicedHam", 94);
// ==Red Dwarf Eggs== // ==Red Dwarf Eggs==
ItemRegistration.registerItem(redDwarfWarriorSpawnEgg, "redDwarfWarriorSpawnEgg", 0); ItemRegistration.registerItem(redDwarfWarriorSpawnEgg, "redDwarfWarriorSpawnEgg", 0);
ItemRegistration.registerItem(redDwarfArbalestSpawnEgg, "redDwarfArbalestSpawnEgg", 1); ItemRegistration.registerItem(redDwarfArbalestSpawnEgg, "redDwarfArbalestSpawnEgg", 1);
@ -565,7 +572,7 @@ public class CinderLoE {
daggerAsh = (new LOTRItemDagger(MATERIAL_ASH)).addWeaponDamage(6.75F).setUnlocalizedName("lotr:daggerAsh").setTextureName("lotr:daggerAsh"); daggerAsh = (new LOTRItemDagger(MATERIAL_ASH)).addWeaponDamage(6.75F).setUnlocalizedName("lotr:daggerAsh").setTextureName("lotr:daggerAsh");
hammerAsh = (new LOTRItemHammer(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:hammerAsh").setTextureName("lotr:hammerAsh"); hammerAsh = (new LOTRItemHammer(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:hammerAsh").setTextureName("lotr:hammerAsh");
battleaxeAsh = (new LOTRItemBattleaxe(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:battleaxeAsh").setTextureName("lotr:battleaxeAsh"); battleaxeAsh = (new LOTRItemBattleaxe(MATERIAL_ASH)).addWeaponDamage(5.5F).setUnlocalizedName("lotr:battleaxeAsh").setTextureName("lotr:battleaxeAsh");
bowAsh = (new LOTRItemBow(MATERIAL_ASH)).setDrawTime(16).setUnlocalizedName("lotr:bowAsh").setTextureName("lotr:bowAsh"); bowAsh = (new LOTRItemBow(MATERIAL_ASH, 1.5)).setDrawTime(16).setUnlocalizedName("lotr:bowAsh").setTextureName("lotr:bowAsh");
pikeAsh = (new LOTRItemPike(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:pikeAsh").setTextureName("lotr:pikeAsh"); pikeAsh = (new LOTRItemPike(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:pikeAsh").setTextureName("lotr:pikeAsh");
spearAsh = (new LOTRItemSpear(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:spearAsh").setTextureName("lotr:spearAsh"); spearAsh = (new LOTRItemSpear(MATERIAL_ASH)).addWeaponDamage(5.0F).setUnlocalizedName("lotr:spearAsh").setTextureName("lotr:spearAsh");
@ -899,8 +906,8 @@ public class CinderLoE {
// == Food Items == // == Food Items ==
CinderCore.registerItemFallback(Item.getIdFromItem(onion), Item.getIdFromItem(LOTRMod.turnip), "cinder_loe", "1.2.1"); 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(cabbage), Item.getIdFromItem(LOTRMod.lettuce), "cinder_loe", "1.2.1");
CinderCore.registerItemFallback(Item.getIdFromItem(spice), Item.getIdFromItem(LOTRMod.charcoaldust), "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(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(pelmen), Item.getIdFromItem(LOTRMod.cram), "cinder_loe", "1.2.1");
CinderCore.registerItemFallback(Item.getIdFromItem(lightStew), Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2.1"); CinderCore.registerItemFallback(Item.getIdFromItem(lightStew), Item.getIdFromItem(LOTRMod.leekSoup), "cinder_loe", "1.2.1");

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.CinderLoE;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
@ -13,7 +14,7 @@ import net.minecraftforge.common.EnumPlantType;
public class cabbageCrop public class cabbageCrop
extends BlockCrops { extends BlockCrops {
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
private IIcon[] leekIcons; private IIcon[] cabbageIcons;
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) { public IIcon getIcon(int i, int j) {
@ -21,16 +22,16 @@ public class cabbageCrop
if (j == 6) { if (j == 6) {
j = 5; j = 5;
} }
return this.leekIcons[j >> 1]; return this.cabbageIcons[j >> 1];
} }
return this.leekIcons[3]; return this.cabbageIcons[3];
} }
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) { public void registerBlockIcons(IIconRegister iconregister) {
this.leekIcons = new IIcon[4]; this.cabbageIcons = new IIcon[4];
for (int i = 0; i < this.leekIcons.length; ++i) { for (int i = 0; i < this.cabbageIcons.length; ++i) {
this.leekIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i); this.cabbageIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i);
} }
} }

@ -1,5 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.CinderLoE;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import lotr.common.LOTRMod; import lotr.common.LOTRMod;
@ -13,7 +14,7 @@ import net.minecraftforge.common.EnumPlantType;
public class onionCrop public class onionCrop
extends BlockCrops { extends BlockCrops {
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
private IIcon[] leekIcons; private IIcon[] onionIcons;
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
public IIcon getIcon(int i, int j) { public IIcon getIcon(int i, int j) {
@ -21,19 +22,20 @@ public class onionCrop
if (j == 6) { if (j == 6) {
j = 5; j = 5;
} }
return this.leekIcons[j >> 1]; return this.onionIcons[j >> 1];
} }
return this.leekIcons[3]; return this.onionIcons[3];
} }
@SideOnly(value=Side.CLIENT) @SideOnly(value=Side.CLIENT)
public void registerBlockIcons(IIconRegister iconregister) { public void registerBlockIcons(IIconRegister iconregister) {
this.leekIcons = new IIcon[4]; this.onionIcons = new IIcon[4];
for (int i = 0; i < this.leekIcons.length; ++i) { for (int i = 0; i < this.onionIcons.length; ++i) {
this.leekIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i); this.onionIcons[i] = iconregister.registerIcon(this.getTextureName() + "_" + i);
} }
} }
public Item func_149866_i() { public Item func_149866_i() {
return CinderLoE.onion; return CinderLoE.onion;
} }

@ -0,0 +1,44 @@
package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.CinderLoE;
import lotr.common.LOTRAchievement;
import lotr.common.LOTRCreativeTabs;
import lotr.common.LOTRLevelData;
import lotr.common.LOTRMod;
import lotr.common.item.LOTRItemFood;
import lotr.common.item.LOTRItemSword;
import lotr.common.item.LOTRMaterial;
import lotr.common.item.LOTRWeaponStats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
public class CinderItemFood extends ItemFood {
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;
}
public ItemStack onEaten(ItemStack itemstack, World world, EntityPlayer entityplayer) {
if (this.damageAmount > 0) {
entityplayer.attackEntityFrom(DamageSource.magic, (float)this.damageAmount);
}
return super.onEaten(itemstack, world, entityplayer);
}
}

@ -40,6 +40,8 @@ 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:welfRelic.name=Horn of the Greenwood Stag
item.lotr:bonemold.name=Bonemold item.lotr:bonemold.name=Bonemold
item.lotr:helmetLimwaith.name=Limwaith Helmet item.lotr:helmetLimwaith.name=Limwaith Helmet
item.lotr:bodyLimwaith.name=Limwaith Chestplate item.lotr:bodyLimwaith.name=Limwaith Chestplate
@ -110,6 +112,7 @@ item.spawn_egg_limwaithshaman.name=Spawn Limwaith Shaman
item.spawn_egg_limwaithfishmonger.name=Spawn Limwaith Fishmonger item.spawn_egg_limwaithfishmonger.name=Spawn Limwaith Fishmonger
item.spawn_egg_limwaithbonewarrior.name=Spawn Limwaith Warrior item.spawn_egg_limwaithbonewarrior.name=Spawn Limwaith Warrior
entity.cinder_loe.RedDwarfSmith.name=Red Dwarf Smith
entity.cinder_loe.RedDwarfWarrior.name=Red Dwarf Warrior entity.cinder_loe.RedDwarfWarrior.name=Red Dwarf Warrior
entity.cinder_loe.RedDwarfArbalest.name=Red Dwarf Arbalest entity.cinder_loe.RedDwarfArbalest.name=Red Dwarf Arbalest
entity.cinder_loe.RedDwarfBannerBearer.name=Red Dwarf Banner Bearer entity.cinder_loe.RedDwarfBannerBearer.name=Red Dwarf Banner Bearer

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Loading…
Cancel
Save