Yes your offer is very good but I have a lot of ideas like ... (no, I can't tell you what I want to add, cause you may steal my ideas ) and your API isn't good to do what I want. Don't think that your mod is poor(it's really cool) but I want to make my own code with my own troubles.
And yes I've got trouble.
My Tile Entity is null (I have no idea how to write my problem cause I'm not English)
I have never wrote any Tile Entity, so maybe I did it wrong.
Please, could you help me with TileEntity and how to add it to block and how to get from it a variable.
Here is my code:
TileEntityVoltage:
package net.minecraft.src;
import java.util.Random;
public class TileEntityVoltage extends TileEntity {
private float Voltage;
public TileEntityVoltage()
{
Voltage = 0.0F;
}
public void setVoltage(float f)
{
Voltage = f;
}
public float getVoltage()
{
return this.Voltage;
}
}
and in blockCabble:
public TileEntity getBlockEntity()
{
return new TileEntityVoltage();
}
public void setBlockVoltage(World world, int i, int j, int k)
{
TileEntity Voltage = world.getBlockTileEntity(i, j, k);
if(world.getBlockId(i, j, k + 1) == mod_Electricity.blockBattery.blockID && world.getBlockMetadata(i, j, k + 1) == 2)
{
TileEntity Voltage2 = world.getBlockTileEntity(i, j, k + 1);
Voltage.setVoltage(Voltage2.getVoltage());
}
}
And when I place
if (Voltage == null)
ModLoader.getMinecraftInstance().thePlayer.addChatMessage("NULL!!!!!");
On chat i hav NULL!!!!!!
And of course i put into my mod_
ModLoader.registerTileEntity(net.minecraft.src.TileEntityVoltage.class, "TileEntityVoltage");