How To Despawn Portal In Forge?

Get the portal block coordinates

Replace the portal blocks with air using `world.setBlockState(pos, Blocks.AIR.getDefaultState())`

If needed, remove the surrounding frame blocks manually

If the portal is a Nether portal, break one obsidian frame block to invalidate it

Call `world.updateNeighborsAlways(pos, Blocks.AIR)` after removing blocks

For custom portals, remove any tile entities or portal state data tied to the portal

Run the block removal on the server side only

Use a loop to clear every portal block in the portal area

If the portal auto-regenerates, cancel or remove the event or tick logic that recreates it

Suggested for You

Trending Today