From 1400103b2fd30b701730712518ee3acc1c866e60 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 9 Dec 2019 12:52:46 +1100 Subject: [PATCH] SPIGOT-5417: Campfire should implement Directional By: md_5 --- .../craftbukkit/block/impl/CraftCampfire.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java index a9fcc7ab9d..9761b082e9 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java @@ -3,7 +3,7 @@ */ package org.bukkit.craftbukkit.block.impl; -public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Campfire, org.bukkit.block.data.Lightable, org.bukkit.block.data.Waterlogged { +public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.CraftBlockData implements org.bukkit.block.data.type.Campfire, org.bukkit.block.data.Directional, org.bukkit.block.data.Lightable, org.bukkit.block.data.Waterlogged { public CraftCampfire() { super(); @@ -27,6 +27,25 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft set(SIGNAL_FIRE, signalFire); } + // org.bukkit.craftbukkit.block.data.CraftDirectional + + private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockCampfire.class, "facing"); + + @Override + public org.bukkit.block.BlockFace getFacing() { + return get(FACING, org.bukkit.block.BlockFace.class); + } + + @Override + public void setFacing(org.bukkit.block.BlockFace facing) { + set(FACING, facing); + } + + @Override + public java.util.Set getFaces() { + return getValues(FACING, org.bukkit.block.BlockFace.class); + } + // org.bukkit.craftbukkit.block.data.CraftLightable private static final net.minecraft.server.BlockStateBoolean LIT = getBoolean(net.minecraft.server.BlockCampfire.class, "lit");