Performance boost? I need help

Started by BlockBit on Sat, 09/12/2020 - 08:39

Topic category: Help with modding (Java Edition)

Last seen on 17:04, 24. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Performance boost? I need help
Sat, 09/12/2020 - 08:39

Im Creating a Mod right now and the mod has a block. When this block is next to grass the gras will be removed and the block will place there. Like a virus... Dont steel my Idea... 😋.

SO when it currupt bigger and bigger the game will start to freeze but i can move and build but i cant hit the animals and so... So i would ask can i make a procedure wich give a performance boost. I mean it stops to grow when im not in the near...

Last seen on 17:04, 24. Oct 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
And my other problem is,…
Sat, 09/12/2020 - 08:43

And my other problem is, when i save the world the world change to saving screen but it freeze so i can only close the programm. I think the virus grows when the world is on saving mode and it come to collisions. (i cant explain it in englisch) So i tried to make a procedure, when the world is loading set a variable to 1 when world is saving to 0 and the virusprocedure look/ whatch ? ... about the variable if it is 1, grow other stop

Last seen on 01:30, 25. Oct 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
your world is lagging…
Sun, 09/13/2020 - 13:43

your world is lagging because your block is doing things on world ticks and there are too many blocks. since the block will only replace grass blocks next to it, maybe replace the block itself with another block (that doesn't update on world ticks) if there are no more grass blocks next to it.