mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
SPIGOT-2793: Revert Nameable changes
This commit is contained in:
parent
88eede85cc
commit
f15e07b1a9
@ -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<EnumDirection> 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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user