1.12.2 High network usage
MarcasRealAccount opened this issue ยท 1 comments
I have a quantum crafter which takes a long time to process.
So I use watch of flowing time's from projecte to speed it up, which gives 18 extra ticks to close tile entities.
But if I put use too many I begin to get network lag from the server, which doesn't happen with any other mods.
So I'm just saying the way you send information to every player near the blocks is a really dumb idea.
The way you should do it is:
- Send a state change when it happens
- Send progress and inventory when the gui is open
Please don't think I'm trying to be a bad person.
I'm just recommending you not to use the method you use for sending information to the player, since it will create a lot of network lag when a player is close to it.
As the method you use sends the whole Tile Entity
This problem can also be found when having a lot of Quantum Tanks, Quantum Storage Units or Quantum Crafters (Have only tested those).
If you need a point of reference of how you should do it: use the vanilla TileEntityFurnace as an example, it only sends a state change once it starts burning and once it is empty of fuel.
And if you look at ContainerFurnace, it detects a change in value and sends it to the client.
And in GuiFurnace when it gets the progress it gets a field from a IInventory interface.
That is how you should do progress bars and state changes since it only sends data when it has to.