CommandHelper icon indicating copy to clipboard operation
CommandHelper copied to clipboard

all_tile_entities() and tile_entity_type addition?

Open LadyCailinBot opened this issue 8 years ago • 3 comments
trafficstars

CMDHELPER-3146 - Reported by Raven0

Any possibility for these to be added, at least just for grabbing info? Better than to scan full chunk to see if X tile entity(like spawner,dispenser, dropper etc) is in it.

Should function same as all_entities() and entity_type() functions, only you would get list of tile entities in the first one, and by using it's ID(if all_tile_entities() would return that), you get it's type in other function.

getTileEntities() method already exists in spigot API, but not really sure about others.

Related spigot libraries: Chunk: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Chunk.html BlockState: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/BlockState.html

LadyCailinBot avatar Nov 27 '16 23:11 LadyCailinBot

Comment by PseudoKnight

A tile entity list would be of location arrays, not ids. You'd then have to use get_block_at() to get the material type.

LadyCailinBot avatar Nov 28 '16 00:11 LadyCailinBot

Comment by Raven0

That would work too, still better than scanning each individual block in chunk.

LadyCailinBot avatar Nov 28 '16 09:11 LadyCailinBot

Comment by Raven0

Just checking, any word on this? :)

LadyCailinBot avatar Apr 06 '17 11:04 LadyCailinBot