Update CraftBukkit to Minecraft 1.7.10

By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
CraftBukkit/Spigot
2014-06-26 13:05:08 -05:00
parent 645fe18f1f
commit 79e5718f39
35 changed files with 112 additions and 113 deletions

View File

@@ -23,7 +23,7 @@ public class BlockStateListPopulator {
public void setTypeAndData(int x, int y, int z, Block block, int data, int light) {
BlockState state = world.getBlockAt(x, y, z).getState();
state.setTypeId(Block.b(block));
state.setTypeId(Block.getId(block));
state.setRawData((byte) data);
list.add(state);
}
@@ -39,7 +39,7 @@ public class BlockStateListPopulator {
public void setType(int x, int y, int z, Block block) {
BlockState state = world.getBlockAt(x, y, z).getState();
state.setTypeId(Block.b(block));
state.setTypeId(Block.getId(block));
list.add(state);
}

View File

@@ -110,7 +110,7 @@ public final class CraftChatMessage {
currentChatComponent = new ChatComponentText("");
list.add(currentChatComponent);
}
currentChatComponent.a(addition);
currentChatComponent.addSibling(addition);
}
private IChatBaseComponent[] getOutput() {

View File

@@ -9,17 +9,17 @@ public final class CraftDamageSource extends DamageSource {
// Check ignoresArmor
if (original.ignoresArmor()) {
newSource.k();
newSource.setIgnoreArmor();
}
// Check magic
if (original.s()) {
newSource.t();
if (original.isMagic()) {
newSource.setMagic();
}
// Check fire
if (original.isExplosion()) {
newSource.n();
newSource.setExplosion();
}
return newSource;

View File

@@ -39,34 +39,34 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Deprecated
// A bad method for bad magic.
public static int getId(Block block) {
return Block.b(block);
return Block.getId(block);
}
public static Material getMaterial(Block block) {
return Material.getMaterial(Block.b(block));
return Material.getMaterial(Block.getId(block));
}
public static Item getItem(Material material) {
// TODO: Don't use ID
Item item = Item.d(material.getId());
Item item = Item.getById(material.getId());
return item;
}
@Deprecated
// A bad method for bad magic.
public static Item getItem(int id) {
return Item.d(id);
return Item.getById(id);
}
@Deprecated
// A bad method for bad magic.
public static int getId(Item item) {
return Item.b(item);
return Item.getId(item);
}
public static Material getMaterial(Item item) {
// TODO: Don't use ID
Material material = Material.getMaterial(Item.b(item));
Material material = Material.getMaterial(Item.getId(item));
if (material == null) {
return Material.AIR;
@@ -77,7 +77,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
public static Block getBlock(Material material) {
// TODO: Don't use ID
Block block = Block.e(material.getId());
Block block = Block.getById(material.getId());
if (block == null) {
return Blocks.AIR;
@@ -88,7 +88,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public Material getMaterialFromInternalName(String name) {
return getMaterial((Item) Item.REGISTRY.a(name));
return getMaterial((Item) Item.REGISTRY.get(name));
}
@Override
@@ -120,7 +120,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public List<String> tabCompleteInternalStatisticOrAchievementName(String token, List<String> completions) {
List<String> matches = new ArrayList<String>();
Iterator iterator = StatisticList.b.iterator();
Iterator iterator = StatisticList.stats.iterator();
while (iterator.hasNext()) {
String statistic = ((net.minecraft.server.Statistic) iterator.next()).name;
if (statistic.startsWith(token)) {

View File

@@ -61,7 +61,7 @@ public class StructureGrowDelegate implements BlockChangeDelegate {
public boolean isEmpty(int x, int y, int z) {
for (BlockState state : blocks) {
if (state.getX() == x && state.getY() == y && state.getZ() == z) {
return Block.e(state.getTypeId()) == Blocks.AIR;
return Block.getById(state.getTypeId()) == Blocks.AIR;
}
}