Conversation
a9b08cf to
96ac382
Compare
96ac382 to
0218ea0
Compare
0218ea0 to
2bc7474
Compare
| public BlockMaterial getMaterial(BlockType blockType) { | ||
| Material mat = BukkitAdapter.adapt(blockType); | ||
| public BlockMaterial getMaterial(BlockState blockState) { | ||
| Material mat = BukkitAdapter.adapt(blockState.getBlockType()); |
There was a problem hiding this comment.
I'm a little unsure we can safely do this? It currently looks like this code just caches the BlockMaterial against a BlockType, using whatever BlockState is first given to it. Meaning we're not actually getting this data on a per-state basis.
I feel it should either be implemented properly to work on a per-state basis, or at the very least always use the default state rather than "whichever is passed first" for better consistency.
There was a problem hiding this comment.
Ideally, materials should be cached based on WorldEdit BlockState, or its Bukkit equivalent.
What's the equivalent of WorldEdit's BlockState in Bukkit?
Alternatively, is there a reason not to use WorldEdit's BlockState as a key for materialMap?
This excludes, for instance, rose bushes, which are #fullcube, but are visually smaller.
2bc7474 to
46d5a63
Compare
Uh oh!
There was an error while loading. Please reload this page.