Woot

Woot

24M Downloads

[1.9] Look at uses of markDirty

Ipsis opened this issue ยท 2 comments

commented

Need to ensure that I'm using markDirty correctly.
From reading, it is used when the TE data has changed and needs to be saved.
I take it from this that anything that you save in NBT for the TE must set markDirty when it changes or you may lose that change on a reload.

commented

So a chunk will only be saved if it is dirty. Aside from other checks and time since last save, the other one if isModified. This can be set from setChunkModified->markChunkDirty->markDirty.

So the justification for this bug is:

If you change the NBT of your TE, then you have to call markDirty to ensure that the chunk is saved and you change is not lost.

So I'll rework my code to ensure that all changes to NBT data in by TEs, call markDirty.

commented