diff --git a/nms-patches/BlockShulkerBox.patch b/nms-patches/BlockShulkerBox.patch index 7799d7d9ab..ef6b04cde6 100644 --- a/nms-patches/BlockShulkerBox.patch +++ b/nms-patches/BlockShulkerBox.patch @@ -1,14 +1,5 @@ --- a/net/minecraft/server/BlockShulkerBox.java +++ b/net/minecraft/server/BlockShulkerBox.java -@@ -3,7 +3,7 @@ - public class BlockShulkerBox extends BlockTileEntity { - - public static final BlockStateEnum a = BlockStateDirection.of("facing"); -- private final EnumColor b; -+ public final EnumColor b; // PAIL: public, rename - - public BlockShulkerBox(EnumColor enumcolor) { - super(Material.STONE, MaterialMapColor.b); @@ -89,7 +89,32 @@ tileentityshulkerbox.d(entityhuman); } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java index 3107e28d03..7dc2978e19 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java @@ -15,7 +15,7 @@ import org.bukkit.inventory.Inventory; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; -public class CraftBeacon extends CraftLootable implements Beacon { +public class CraftBeacon extends CraftContainer implements Beacon { private final CraftWorld world; private final TileEntityBeacon beacon; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java index e8a66359e5..fbebeab056 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java @@ -59,14 +59,4 @@ public class CraftBrewingStand extends CraftContainer implements BrewingStand { public void setFuelLevel(int level) { brewingStand.setProperty(1, level); } - - @Override - public String getCustomName() { - return brewingStand.hasCustomName() ? brewingStand.getName() : null; - } - - @Override - public void setCustomName(String name) { - brewingStand.a(name); // PAIL: setCustomName - } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java index 3de7e14d80..f15c26bc1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java @@ -11,7 +11,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest; import org.bukkit.inventory.Inventory; -public class CraftChest extends CraftLootable implements Chest { +public class CraftChest extends CraftContainer implements Chest { private final CraftWorld world; private final TileEntityChest chest; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java index cc0d28f217..003381a68b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java @@ -14,7 +14,7 @@ import org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource; import org.bukkit.inventory.Inventory; import org.bukkit.projectiles.BlockProjectileSource; -public class CraftDispenser extends CraftLootable implements Dispenser { +public class CraftDispenser extends CraftContainer implements Dispenser { private final CraftWorld world; private final TileEntityDispenser dispenser; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java index 8786d049e7..a29eaf9a28 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java @@ -12,7 +12,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.inventory.Inventory; -public class CraftDropper extends CraftLootable implements Dropper { +public class CraftDropper extends CraftContainer implements Dropper { private final CraftWorld world; private final TileEntityDropper dropper; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java index ce978ddc13..eb723c80a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java @@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace; import org.bukkit.inventory.FurnaceInventory; -public class CraftFurnace extends CraftLootable implements Furnace { +public class CraftFurnace extends CraftContainer implements Furnace { private final TileEntityFurnace furnace; public CraftFurnace(final Block block) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java index b7a04bd847..f155790d1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java @@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.inventory.Inventory; -public class CraftHopper extends CraftLootable implements Hopper { +public class CraftHopper extends CraftContainer implements Hopper { private final TileEntityHopper hopper; public CraftHopper(final Block block) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java deleted file mode 100644 index 6e5ed2dae1..0000000000 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.bukkit.craftbukkit.block; - -import net.minecraft.server.TileEntity; -import net.minecraft.server.TileEntityLootable; -import org.bukkit.Material; -import org.bukkit.Nameable; -import org.bukkit.block.Block; -import org.bukkit.craftbukkit.CraftWorld; - -public class CraftLootable extends CraftContainer implements Nameable { - - private final TileEntityLootable te; - - public CraftLootable(Block block) { - super(block); - - te = (TileEntityLootable) ((CraftWorld) block.getWorld()).getTileEntityAt(getX(), getY(), getZ()); - } - - public CraftLootable(Material material, TileEntity tileEntity) { - super(material, tileEntity); - - te = (TileEntityLootable) tileEntity; - } - - @Override - public String getCustomName() { - return te.hasCustomName() ? te.getName() : null; - } - - @Override - public void setCustomName(String name) { - te.a(name); // PAIL: setCustomName - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java index 8a7ce92bf7..4ed318319c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java @@ -1,9 +1,7 @@ package org.bukkit.craftbukkit.block; -import net.minecraft.server.BlockShulkerBox; import net.minecraft.server.TileEntity; import net.minecraft.server.TileEntityShulkerBox; -import org.bukkit.DyeColor; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.ShulkerBox; @@ -11,7 +9,7 @@ import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.inventory.Inventory; -public class CraftShulkerBox extends CraftLootable implements ShulkerBox { +public class CraftShulkerBox extends CraftContainer implements ShulkerBox { private final CraftWorld world; private final TileEntityShulkerBox box; @@ -39,9 +37,4 @@ public class CraftShulkerBox extends CraftLootable implements ShulkerBox { public Inventory getInventory() { return new CraftInventory(box); } - - @Override - public DyeColor getColor() { - return DyeColor.getByWoolData((byte) ((BlockShulkerBox) box.getBlock()).b.getColorIndex()); - } }