IchBekommeDasNichtHin
Grünschnabel
Wie in der Überschrift steht funktioniert die Parameterübergabe nicht.
Ich hab mal nur die wichtigsten Zeilen hingeschrieben.
Das müsste eigentlich relativ selbsterklärend sein, weshalb ich nicht weiß was ich hier so großartig schreiben soll.
Danke im vorraus
P.S. Ich hab es mit this.item_fireCarrot und Elementary.item_fireCarrot bei der Übergabe probiert, alles funktioniert nicht.
bei der if abfrage kommt true raus, wenn ich die Variable aber konstant festlege funktioniert es
Ich hab mal nur die wichtigsten Zeilen hingeschrieben.
Das müsste eigentlich relativ selbsterklärend sein, weshalb ich nicht weiß was ich hier so großartig schreiben soll.
Danke im vorraus

P.S. Ich hab es mit this.item_fireCarrot und Elementary.item_fireCarrot bei der Übergabe probiert, alles funktioniert nicht.
bei der if abfrage kommt true raus, wenn ich die Variable aber konstant festlege funktioniert es
Java:
private Item seed = Elementary.item_fireCarrot;
Java:
public class ElementaryCraft {
public static Item item_fireCarrot;
public static Item item_firePotato;
public static Block Block_fireCarrot;
public static Block Block_firePotato;
item_fireCarrot = new ItemFoodPotion(20, 1.0F, false, Block_fireCarrot, Block_fireland).setUnlocalizedName("fireCarrot").setTextureName(ElementaryCraft.MODID + ":fireCarrot");
item_firePotato = new ItemFoodPotion(20, 1.0F, false, Block_firePotato, Block_fireland).setUnlocalizedName("firePotato").setTextureName(ElementaryCraft.MODID + ":firePotato");
Block_fireCarrot = new BlockElementaryCrop(this.item_fireCarrot, ElementaryCraft.item_fireCarrot, "fireCarrots", Elements.fire , 4).setBlockName("fireCarrots");
Block_firePotato = new BlockElementaryCrop(item_firePotato, item_firePotato, "firePotatoes", Elements.fire, 4).setBlockName("firePotatoes");
}
Java:
public class BlockElementaryCrop extends BlockElementaryCropsBase
{
@SideOnly(Side.CLIENT)
private IIcon[] icon;
private String name;
private Item seed;
private Item crop;
private Elements element;
private int meta;
public BlockElementaryCrop(Item seed1, Item crop, String name, Elements element, int meta){
if(seed1 == null)
System.out.println(true); // in der Console kommt true
this.name = name;
this.seed = seed1;
this.crop = crop;
this.meta = meta;
this.element = element;
this.setCreativeTab(ElementaryCraft.CT_ElementaryCraft);
this.setLightLevel(1F);
}
}