Skip to content

Fire pit callback ghostloads chunks #2

Description

@thiakil

https://github.com/Turkey2349/Progression-Tweaks/blob/1d1acd25f40895462fd7bbc4ef9fe6946bf36196/src/main/java/com/theprogrammingturkey/progressiontweaks/blocks/tileentities/TileFirePit.java#L54

You must check world.isBlockLoaded before you get a TileEntity, otherwise it can cause chunks to load unnecessarily.

20180523060319

There are also various issues with using TileFirePit.this in your anonymous class. It will cause the instance to stay in memory, and since it contains a world reference, you could cause the whole world to remain in memory!

The only things you seem to need in this callback are the position and a weak reference to the world.

I also hope that your Scheduler class clears tasks on server stop. Mostly for single player worlds' sake.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions