mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
By: md_5 <git@md-5.net>
This commit is contained in:
parent
7cdd598517
commit
10e81b4c37
1 changed files with 15 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
package org.bukkit.craftbukkit.block.impl;
|
package org.bukkit.craftbukkit.block.impl;
|
||||||
|
|
||||||
public final class CraftBarrel extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.Directional {
|
public final class CraftBarrel extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Barrel, org.bukkit.block.data.Directional, org.bukkit.block.data.Openable {
|
||||||
|
|
||||||
public CraftBarrel() {
|
public CraftBarrel() {
|
||||||
super();
|
super();
|
||||||
|
@ -31,4 +31,18 @@ public final class CraftBarrel extends org.bukkit.craftbukkit.block.data.CraftBl
|
||||||
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
|
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
|
||||||
return getValues(FACING, org.bukkit.block.BlockFace.class);
|
return getValues(FACING, org.bukkit.block.BlockFace.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// org.bukkit.craftbukkit.block.data.CraftOpenable
|
||||||
|
|
||||||
|
private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockBarrel.class, "open");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpen() {
|
||||||
|
return get(OPEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setOpen(boolean open) {
|
||||||
|
set(OPEN, open);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue