Hey guys, i was just wondering, how do you use the api to make a block emit eu/t. I was told that the api has everything needed to make a block emit eu/t. For now, i just want it to emit. Constantly. I have tried and tried to get this to work but no matter what i do, it doesn't work. Yes, I do have a TE thank you very much. I really think that someone needs to make a tutorial on this stuff... I mean really. Anyway, sorry for my childish rant. Go ahead and shoot me down. Cya.
Using the api to make a generator block?
- sci4me
- Closed
-
-
You probably didn't add the TE to the energynet
-
EnergyNet.getForWorld(worldObj).addTileEntity(this);
in the constructor of the TE? Or somewhere else?
Here is what happens when I place the block:
http://pastebin.com/49U3cxCfCode
Display MoreMods loaded: 6ModLoader 1.2.5mod_CodeChickenCore 0.5.2mod_MinecraftForge 3.1.3.105mod_NotEnoughItems 1.2.2.4mod_ApiTest 1.0mod_IC2 v1.95 Minecraft has crashed! ---------------------- Minecraft has stopped running because it encountered a problem. --- BEGIN ERROR REPORT a6f57901 --------Generated 7/7/12 4:19 PM Minecraft: Minecraft 1.2.5OS: Windows 7 (amd64) version 6.1Java: 1.7.0_04, Oracle CorporationVM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle CorporationLWJGL: 2.8.3OpenGL: AMD Radeon HD 6530D Graphics version 4.1.11079 Compatibility Profile Context, ATI Technologies Inc. java.lang.RuntimeException: java.lang.NullPointerException at ic2.api.EnergyNet.addTileEntity(EnergyNet.java:38) at TileEntityGenTest.<init>(TileEntityGenTest.java:13) at BlockGeneratorTest.genEntity(BlockGeneratorTest.java:13) at BlockGeneratorTest.c(BlockGeneratorTest.java:19) at vd.a(ItemBlock.java:90) at aan.a(SourceFile:88) at aff.a(PlayerControllerCreative.java:92) at net.minecraft.client.Minecraft.c(Minecraft.java:1352) at net.minecraft.client.Minecraft.k(Minecraft.java:1794) at net.minecraft.client.Minecraft.x(Minecraft.java:819) at net.minecraft.client.Minecraft.run(Minecraft.java:747) at java.lang.Thread.run(Unknown Source)Caused by: java.lang.NullPointerException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at ic2.api.EnergyNet.addTileEntity(EnergyNet.java:36) ... 11 more--- END ERROR REPORT 7f39024 ----------
EDIT: http://pastebin.com/PmVgnpRd is my TE code.
-
Wow. Guess what I did wrong? extends BlockContainer not Block. I must be the biggest IDIOT on EARTH!