It it even possible.. identify natural blocks?

Is it possible in any way (any realistic way) to be able to distinguish a naturally occuring, spawned by the map generator block from one placed by a player? Extend this idea to sand/gravel being dropped into a final spot instead of placing.

I can only imagine keeping a database of every ‘touched’ block location- if its been broken or placed, that coordinate is now ‘non-native’ (even if you break a dirt and replace it with dirt again) – or going more specific, with block-activity at that location, the first touch a dirt break… once a dirt-place occurs, then wipe the location from the db as it is ‘like default’ restored.

Does sponge and its data system provide the potential for something a bit more elegant, or would it be just as bad or worse data-storage related?

Sponge does in fact keep track of the ‘owner’ of a block, however it is not yet accessible. I’m not sure if this works for falling sand, but I know there are plans to expose this data in the API (SoonTm).

@meguy26 actually they recently added this to the API: https://github.com/SpongePowered/SpongeAPI/blob/master/src/main/java/org/spongepowered/api/block/BlockSnapshot.java#L124

@ZephireNZ
WOO HOO! GO SPONGE TEAM!

1 Like

Well… thats a heck of an easy solution IF that is what the purpose of that method is for…
Not to mention the ability to simplify chest-locking plugins and such :slightly_smiling:

Unsure about edge cases like gravel falling, but yes, that is one usecase of the owner tracking system :slight_smile: Thank blood if you get a chance.