[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. 
So an open barrel is not the same as an open door.

But the block state "open" is missing since the introduction of barrels in Minecraft 1.14.

Generated at Sat Dec 13 15:22:43 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.