The problem is that CraftTweaker's functions always load chunks for calls like world.getBlockState(). So, each time i want to tick the portal, it would call getBlockState and actually work as chunk loader.
Please, add function to check if block is in loaded chunk.
With such function I could check if portal is in loaded chunk and tick it only if loaded.
Using
CraftTweaker
andZenUtils
I made Portal Spread mechanic.When portal is spawned, it saved with
setCustomWorldData()
. Then I iterate all portals inonWorldTick
event.https://github.com/friendlyhj/ZenUtils/assets/936618/8269985d-15e3-4890-a3eb-502891566044
The problem is that
CraftTweaker
's functions always load chunks for calls likeworld.getBlockState()
. So, each time i want to tick the portal, it would callgetBlockState
and actually work as chunk loader.Please, add function to check if block is in loaded chunk.
With such function I could check if portal is in loaded chunk and tick it only if loaded.