Jump to content

Recommended Posts

Posted

I should mention that this is in a tile entity, and is part of a linking system based off my power cables and plasma pipes in the main LabStuff mod. However, it works with two, but when you add a third, the game crashes

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

I wouldn't think so. This is only called if their are adjacent tubes, and then I have this

TileEntity posX = worldObj.getTileEntity(xCoord+1, yCoord, zCoord);
	TileEntity posZ = worldObj.getTileEntity(xCoord, yCoord, zCoord+1);
	TileEntity negX = worldObj.getTileEntity(xCoord-1, yCoord, zCoord);
	TileEntity negZ = worldObj.getTileEntity(xCoord, yCoord, zCoord-1);
	if(posX instanceof TileEntityAcceleratorTube && posX != null && !posX.equals(src))
		return (TileEntityAcceleratorTube)posX;
	if(posZ instanceof TileEntityAcceleratorTube && posZ != null && !posZ.equals(src))
		return (TileEntityAcceleratorTube)posZ;
	if(negX instanceof TileEntityAcceleratorTube && negX != null && !negX.equals(src))
		return (TileEntityAcceleratorTube)negX;
	if(negZ instanceof TileEntityAcceleratorTube && negZ != null && !negZ.equals(src))
		return (TileEntityAcceleratorTube)negZ;
	return null;

to find the next block in the sequence.But this is, again, only run if their are adjaecent blocks.

I pass in the parameters from my render, which figures out what kind of shape the tube is(straight on x,y, or z, corner, three way, four way, five way, all way, no way, one way), to my tile entity, it calculates what it is based on that(the render figures out whether there is a connection up, down, N,E,S,W), and updates the network accoridingly. If it's alone, it's invalid, and does nothing.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

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.