yarn icon indicating copy to clipboard operation
yarn copied to clipboard

BlockEntity::markDirty replacement names

Open shadowfacts opened this issue 5 years ago • 2 comments

The general consensus in Discord was that markDirty isn't great as it doesn't indicate what is marked as dirty. The method actually only indicates that the chunk containing the BE needs to be saved to disk, not that (contrary to common belief) update packets should be sent to clients.

The two proposed options so far:

  • scheduleSave
  • markChanged

shadowfacts avatar Dec 24 '18 23:12 shadowfacts

either one 👍

Prospector avatar Dec 25 '18 20:12 Prospector

I was going to open an issue for this, but realized this already exists. +1 for finding something better than markDirty, especially for block entities where it additionally fires a comparator update. Although we will have to use the same for Inventory as well.

Ideally the mapping would convey that we go from "no guaranteed save" to "guaranteed save".

Technici4n avatar Jul 19 '21 08:07 Technici4n