Started by
BlockBit
on
Topic category: Help with Minecraft modding (Java Edition)
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...
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
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.
Try putting it in if get entity in square meter type playet, idk how will that turn out