Jump to content

Recommended Posts

Posted

I am trying to make a new electricity system and when I try to find the tile entities around my block to determine the length of the wire it gives me an error, heres my code/error

                TileEntity var1 = worldObj.getBlockTileEntity(xCoord+1, yCoord, zCoord);
	TileEntity var2 = worldObj.getBlockTileEntity(xCoord-1, yCoord, zCoord);
	TileEntity var3 = worldObj.getBlockTileEntity(xCoord, yCoord+1, zCoord);
	TileEntity var4 = worldObj.getBlockTileEntity(xCoord, yCoord-1, zCoord);
	TileEntity var5 = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord+1);
	TileEntity var6 = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord-1);

2013-01-06 20:06:30 [iNFO] [sTDERR] java.lang.NullPointerException
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at kore.mods.korecraft.TileEntityWire.findDistance(TileEntityWire.java:68)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at kore.mods.korecraft.TileEntityWire.<init>(TileEntityWire.java:12)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at java.lang.Class.newInstance0(Unknown Source)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at java.lang.Class.newInstance(Unknown Source)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.tileentity.TileEntity.createAndLoadEntity(TileEntity.java:138)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.world.chunk.storage.AnvilChunkLoader.readChunkFromNBT(AnvilChunkLoader.java:418)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.world.chunk.storage.AnvilChunkLoader.checkedReadChunkFromNBT(AnvilChunkLoader.java:103)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadChunk(AnvilChunkLoader.java:83)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.world.gen.ChunkProviderServer.safeLoadChunk(ChunkProviderServer.java:182)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:118)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:310)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:84)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:100)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)
2013-01-06 20:06:30 [iNFO] [sTDERR] 	at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-01-06 20:06:30 [iNFO] [sTDOUT] Skipping TileEntity with id tileEntityWire

The Korecraft Mod

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.