what contain the line 84 of TileEntityPipe and can you upload the entire crash on pastebin and link it here?
- Gunnthorian
- Registered Member
-
Member for 11 years, 10 months, and 5 days
Last active Mon, Dec, 11 2017 16:10:35
- 0 Followers
- 88 Total Posts
- 1 Thank
-
1
andry08 posted a message on [SOLVED] need help with packets - all of the same tileentities render the same and update the samePosted in: Modification Development -
1
andry08 posted a message on [SOLVED] need help with packets - all of the same tileentities render the same and update the samePosted in: Modification Developmentops for the readInt() my bad
i thinked they was number (because i wasn't looking at your code when realising the packet) because the var name num(ber)1 ecc
for the sync problem you have to call sync() when you finished to check neighbours:
public void checkForNeighbors() { World world = this.worldObj; int x = this.xCoord; int y = this.yCoord; int z = this.zCoord; if (world.getBlock(x - 1, y, z) == GunnCraftBlocks.Pipe){ num1 = true; System.out.println("tested block left true"); } if (world.getBlock(x + 1, y, z) == GunnCraftBlocks.Pipe){ num2 = true; System.out.println("tested block right true"); } if (world.getBlock(x, y, z - 1) == GunnCraftBlocks.Pipe){ num3 = true; System.out.println("tested block front true"); } if (world.getBlock(x, y, z + 1) == GunnCraftBlocks.Pipe){ num4 = true; System.out.println("tested block back true"); } if (world.getBlock(x, y + 1, z) == GunnCraftBlocks.Pipe){ num5 = true; System.out.println("tested block top true"); } if (world.getBlock(x, y - 1, z) == GunnCraftBlocks.Pipe){ num6 = true; System.out.println("tested block bottom true"); } sync() }
P.S.
I don't know where you call the check but i suggest you to do this in your block to update only when necessary (calling it every tick would lag the server cause to getBlock iteraction):
@Override public void onNeighborBlockChange(World world, int x, int y, int z, Block par5) { if (!world.isRemote) { TileEntityPipe tileEntity = (TileEntityPipe) world.getTileEntity(x, y, z); if (tileEntity != null) { tileEntity.checkForNeighbors(); } } }
P.S. I modified checkForNeighbors to take the tile world and coords because pass other coords wouldn't make any sense considering it saves the vars into an instance of tile
-
1
andry08 posted a message on [SOLVED] need help with packets - all of the same tileentities render the same and update the samePosted in: Modification Developmentas I wrote before you need to create a message, i posted to you only the handler.
I edited the handler.java and now it is the complete message https://gist.github.com/andry08/1efedbb708310e4d5a5d
And this is the MessagesHandler that miss https://gist.github.com/andry08/4408c68c532f531a398c
P.S. Rename the Handler.java to something like MessageSyncTile.java (because the handler is a subclass) and for TargetPoint you have only to import it from cpw.mods.fml.common.network.NetworkRegistry.TargetPoint
-
1
andry08 posted a message on [SOLVED] need help with packets - all of the same tileentities render the same and update the samePosted in: Modification DevelopmentYou need to sync the server tile entity with the client, ths code may help you:
https://gist.github.com/andry08/1efedbb708310e4d5a5d (you have to create a message, this is going to be the handler)
https://gist.github.com/andry08/4ab90d2632b981d5d63e (you have to put this in your tile)
you have to change
MessagesHandler.dispatcher.sendToAllAround(new MessageSyncTile(bos), new TargetPoint(this.worldObj.provider.dimensionId, this.xCoord, this.yCoord, this.zCoord, 8));
to your custom messages handler and your custom packet
-
1
sky_01 posted a message on [CLOSED(look for my other forum post)]Not able to check neighboring blocks before renderingPosted in: Modification DevelopmentAs far as I can tell, you're not calling checkForNeighbors anywhere. Instead, you're rendering everything immediately. In you're TESR, you do this:
this.model.renderModel1(0.0625F); this.model.renderModel2(0.0625F); this.model.renderModel3(0.0625F);
You are not checking any conditions before calling these functions. Try adding this just before the above block:
this.model.checkForNeighbors(entity.getWorld(), doublex, doubley, doublez, Random)
btw, there is no reason to pass a Random instance. You don't use it anyway.
I would also recommend changing num1, num2, and num3 to booleans (true-false values) and renaming to shouldRender1, shouldRender2, and shouldRender3 (or some other descriptive name).
-
1
WingsOfFlame159 posted a message on Whitelisted server snapshot 13w41aPosted in: PC Servers
dont have a microphoneQuote from Gunnthorian
could you guys get skype - its free - and add me my skype is once again Gunnthorian
Hope to see you soon on the server!
This is the link to Skype http://www.skype.com/en/
-
1
Alexzander007 posted a message on Whitelisted server snapshot 13w41aok then waitPosted in: PC Servers -
1
WingsOfFlame159 posted a message on Whitelisted server snapshot 13w41aPosted in: PC Servers
i do have the latest snapshot... -
1
Alexzander007 posted a message on Whitelisted server snapshot 13w41awell I think we should just wait.Posted in: PC Servers -
1
Alexzander007 posted a message on Whitelisted server snapshot 13w41awhat do you have in mind?Posted in: PC Servers - To post a comment, please login.
1
ohhh not even built in? dang even tho if you get skype you can message people and see who is online thats why i mainly like it.