3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

SPIGOT-2793: Revert Nameable changes

Dieser Commit ist enthalten in:
md_5 2016-11-19 03:10:04 +11:00
Ursprung 88eede85cc
Commit f15e07b1a9
10 geänderte Dateien mit 7 neuen und 68 gelöschten Zeilen

Datei anzeigen

@ -1,14 +1,5 @@
--- a/net/minecraft/server/BlockShulkerBox.java --- a/net/minecraft/server/BlockShulkerBox.java
+++ b/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 @@ @@ -89,7 +89,32 @@
tileentityshulkerbox.d(entityhuman); tileentityshulkerbox.d(entityhuman);
} }

Datei anzeigen

@ -15,7 +15,7 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; 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 CraftWorld world;
private final TileEntityBeacon beacon; private final TileEntityBeacon beacon;

Datei anzeigen

@ -59,14 +59,4 @@ public class CraftBrewingStand extends CraftContainer implements BrewingStand {
public void setFuelLevel(int level) { public void setFuelLevel(int level) {
brewingStand.setProperty(1, 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
}
} }

Datei anzeigen

@ -11,7 +11,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest; import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
import org.bukkit.inventory.Inventory; 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 CraftWorld world;
private final TileEntityChest chest; private final TileEntityChest chest;

Datei anzeigen

@ -14,7 +14,7 @@ import org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
import org.bukkit.projectiles.BlockProjectileSource; 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 CraftWorld world;
private final TileEntityDispenser dispenser; private final TileEntityDispenser dispenser;

Datei anzeigen

@ -12,7 +12,7 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.inventory.Inventory; 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 CraftWorld world;
private final TileEntityDropper dropper; private final TileEntityDropper dropper;

Datei anzeigen

@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace; import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
import org.bukkit.inventory.FurnaceInventory; import org.bukkit.inventory.FurnaceInventory;
public class CraftFurnace extends CraftLootable implements Furnace { public class CraftFurnace extends CraftContainer implements Furnace {
private final TileEntityFurnace furnace; private final TileEntityFurnace furnace;
public CraftFurnace(final Block block) { public CraftFurnace(final Block block) {

Datei anzeigen

@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
public class CraftHopper extends CraftLootable implements Hopper { public class CraftHopper extends CraftContainer implements Hopper {
private final TileEntityHopper hopper; private final TileEntityHopper hopper;
public CraftHopper(final Block block) { public CraftHopper(final Block block) {

Datei anzeigen

@ -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
}
}

Datei anzeigen

@ -1,9 +1,7 @@
package org.bukkit.craftbukkit.block; package org.bukkit.craftbukkit.block;
import net.minecraft.server.BlockShulkerBox;
import net.minecraft.server.TileEntity; import net.minecraft.server.TileEntity;
import net.minecraft.server.TileEntityShulkerBox; import net.minecraft.server.TileEntityShulkerBox;
import org.bukkit.DyeColor;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.ShulkerBox; import org.bukkit.block.ShulkerBox;
@ -11,7 +9,7 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventory; import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.inventory.Inventory; 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 CraftWorld world;
private final TileEntityShulkerBox box; private final TileEntityShulkerBox box;
@ -39,9 +37,4 @@ public class CraftShulkerBox extends CraftLootable implements ShulkerBox {
public Inventory getInventory() { public Inventory getInventory() {
return new CraftInventory(box); return new CraftInventory(box);
} }
@Override
public DyeColor getColor() {
return DyeColor.getByWoolData((byte) ((BlockShulkerBox) box.getBlock()).b.getColorIndex());
}
} }