Jump to content

Gradually removing lots of blocks, RAM getting filled and not cleared


AwesomeDomi

Recommended Posts

I am making a TNT mod, and to make my extremely powerful TNT possible to blow up on most devices, I made my code remove a lower amount of blocks multiple times instead of everything at once, however I do not know how to prevent the RAM from constantly getting filled up. For example: my current strongest explosion can destroy 5B blocks when I allocate all 80GB of RAM, but even when I pause it (which I implemented), the RAM never starts clearing out, even when I leave the world it stays, and does not clear until I exit the game.
I use world.setBlock(new BlockPos(realx, realy, realz), Blocks.AIR.defaultBlockState(), 3); for my block removal.

How can I fix this? (Forge 1.19.2)

Edited by AwesomeDomi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.