From 1949f5835d51366cae7b7379b91917c0808d4b84 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 27 Apr 2019 09:33:00 +1000 Subject: [PATCH] SPIGOT-4778: Bell Attachment is missing --- .../block/data/type/CraftBell.java | 19 +++++++++++++++++++ .../craftbukkit/block/impl/CraftBell.java | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java new file mode 100644 index 0000000000..a94dd1cee0 --- /dev/null +++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java @@ -0,0 +1,19 @@ +package org.bukkit.craftbukkit.block.data.type; + +import org.bukkit.block.data.type.Bell; +import org.bukkit.craftbukkit.block.data.CraftBlockData; + +public abstract class CraftBell extends CraftBlockData implements Bell { + + private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum("attachment"); + + @Override + public Attachment getAttachment() { + return get(ATTACHMENT, Attachment.class); + } + + @Override + public void setAttachment(Attachment leaves) { + set(ATTACHMENT, leaves); + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java index 12c4c46330..526af161bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java +++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java @@ -13,6 +13,20 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc super(state); } + // org.bukkit.craftbukkit.block.data.type.CraftBell + + private static final net.minecraft.server.BlockStateEnum ATTACHMENT = getEnum(net.minecraft.server.BlockBell.class, "attachment"); + + @Override + public Attachment getAttachment() { + return get(ATTACHMENT, Attachment.class); + } + + @Override + public void setAttachment(Attachment leaves) { + set(ATTACHMENT, leaves); + } + // org.bukkit.craftbukkit.block.data.CraftDirectional private static final net.minecraft.server.BlockStateEnum FACING = getEnum(net.minecraft.server.BlockBell.class, "facing");