Skip to content

Conversation

JustAHuman-xD
Copy link
Contributor

@JustAHuman-xD JustAHuman-xD commented Oct 5, 2025

Relies on #352

Adds the multiblock refresh event which is needed to finish pylonmc/pylon-base#255

Also fixes an issue with the packet based entities, turns out the id provider gets overwritten by the init method for some reason, so had to move its assignment to after initializing, also stopped tracking platform entities as we don't need to.

This also reworks the EntityHolderBlock so that it can handle entities that get created/destroyed, it now lets entities track which block they are connected to and fixed phantom blocks not having their entities removed.

This also fixes an issue with both entity holder and ticker where broken blocks would be forever held in memory, as they were only removed on unload, not also on break.

Finally it fixes phantom blocks retaining the block texture entity and removes entity libs platform entity tracking (what would automatically notify packet entities that a viewer left), this is primarily for more control and better performance.

@Seggan
Copy link
Member

Seggan commented Oct 5, 2025

What does refresh mean for multiblocks?

@JustAHuman-xD
Copy link
Contributor Author

What does refresh mean for multiblocks?

To quote the existing kdoc

Called when the multiblock is refreshed (i.e., was formed before, and still is).
This happens when something causes the Multiblock to re-check if it is formed,
and it still is.

@JustAHuman-xD JustAHuman-xD changed the title MultiblockRefreshEvent, id provider fix MultiblockRefreshEvent and a few fixes Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track entities that should be tied to a block and remove them if their block disappears

2 participants