[SPIGOT-7069] Material.BARREL has Directional data class, should also be Openable Created: 18/Jun/22 Updated: 25/Dec/24 Resolved: 10/Jul/22 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | mastercoms | Assignee: | md_5 |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Version: | 1.19 |
| Guidelines Read: | Yes |
| Description |
|
minecraft:barrel has both facing and open properties, so Material.BARREL should have its own Barrel data interface in org.bukkit.block.data.type, which extends both Directional and Openable, instead of directly using the Directional interface. |
| Comments |
| Comment by mastercoms [ 18/Jun/22 ] |
|
Yeah, that makes sense! |
| Comment by Black Hole [ 18/Jun/22 ] |
|
When I wrote door I was referring to "door-like block". Like something that you can walk throw if open. But since vanilla uses the same property for it might be better to go along with it and change the JavaDoc. |
| Comment by mastercoms [ 18/Jun/22 ] |
|
The Barrel block uses the same open block property as doors, trap doors and fence gates, which all have their own interfaces and use Openable. If plugins need to distinguish between a door and other blocks, they would already need to be using the Door interface. |
| Comment by Black Hole [ 18/Jun/22 ] |
|
The Openable interface refers to a "door-like block". Extending this interface will confuse plugins looking for open doors. But the block state "open" is missing since the introduction of barrels in Minecraft 1.14. |