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

@@ -381,7 +381,7 @@ public class CraftBlock implements Block {
private boolean itemCausesDrops(ItemStack item) {
net.minecraft.server.Block block = this.getNMSBlock();
net.minecraft.server.Item itemType = item != null ? net.minecraft.server.Item.d(item.getTypeId()) : null;
net.minecraft.server.Item itemType = item != null ? net.minecraft.server.Item.getById(item.getTypeId()) : null;
return block != null && (block.getMaterial().isAlwaysDestroyable() || (itemType != null && itemType.canDestroySpecialBlock(block)));
}
@@ -428,7 +428,7 @@ public class CraftBlock implements Block {
nmsStack.setTag(new NBTTagCompound());
NBTTagCompound nbttagcompound = new NBTTagCompound();
GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile());
GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile());
nmsStack.getTag().set("SkullOwner", nbttagcompound);
}
@@ -458,7 +458,7 @@ public class CraftBlock implements Block {
/* Build biome index based lookup table for BiomeBase to Biome mapping */
static {
BIOME_MAPPING = new Biome[BiomeBase.n().length];
BIOME_MAPPING = new Biome[BiomeBase.getBiomes().length];
BIOMEBASE_MAPPING = new BiomeBase[Biome.values().length];
BIOME_MAPPING[BiomeBase.OCEAN.id] = Biome.OCEAN;
BIOME_MAPPING[BiomeBase.PLAINS.id] = Biome.PLAINS;

View File

@@ -15,8 +15,8 @@ public class CraftCommandBlock extends CraftBlockState implements CommandBlock {
CraftWorld world = (CraftWorld) block.getWorld();
commandBlock = (TileEntityCommand) world.getTileEntityAt(getX(), getY(), getZ());
command = commandBlock.a().e;
name = commandBlock.a().getName();
command = commandBlock.getCommandBlock().getCommand();
name = commandBlock.getCommandBlock().getName();
}
public String getCommand() {
@@ -39,8 +39,8 @@ public class CraftCommandBlock extends CraftBlockState implements CommandBlock {
boolean result = super.update(force, applyPhysics);
if (result) {
commandBlock.a().a(command);
commandBlock.a().b(name);
commandBlock.getCommandBlock().setCommand(command);
commandBlock.getCommandBlock().setName(name);
}
return result;

View File

@@ -19,16 +19,16 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
@Deprecated
public CreatureType getCreatureType() {
return CreatureType.fromName(spawner.a().getMobName());
return CreatureType.fromName(spawner.getSpawner().getMobName());
}
public EntityType getSpawnedType() {
return EntityType.fromName(spawner.a().getMobName());
return EntityType.fromName(spawner.getSpawner().getMobName());
}
@Deprecated
public void setCreatureType(CreatureType creatureType) {
spawner.a().a(creatureType.getName());
spawner.getSpawner().setMobName(creatureType.getName());
}
public void setSpawnedType(EntityType entityType) {
@@ -36,12 +36,12 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
throw new IllegalArgumentException("Can't spawn EntityType " + entityType + " from mobspawners!");
}
spawner.a().a(entityType.getName());
spawner.getSpawner().setMobName(entityType.getName());
}
@Deprecated
public String getCreatureTypeId() {
return spawner.a().getMobName();
return spawner.getSpawner().getMobName();
}
@Deprecated
@@ -50,7 +50,7 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
}
public String getCreatureTypeName() {
return spawner.a().getMobName();
return spawner.getSpawner().getMobName();
}
public void setCreatureTypeByName(String creatureType) {
@@ -63,11 +63,11 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
}
public int getDelay() {
return spawner.a().spawnDelay;
return spawner.getSpawner().spawnDelay;
}
public void setDelay(int delay) {
spawner.a().spawnDelay = delay;
spawner.getSpawner().spawnDelay = delay;
}
}

View File

@@ -53,7 +53,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
Block block = getBlock();
if (block.getType() == Material.NOTE_BLOCK) {
world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument, note);
world.getHandle().playBlockAction(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument, note);
return true;
} else {
return false;
@@ -65,7 +65,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
Block block = getBlock();
if (block.getType() == Material.NOTE_BLOCK) {
world.getHandle().playNote(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
world.getHandle().playBlockAction(getX(), getY(), getZ(), CraftMagicNumbers.getBlock(block), instrument.getType(), note.getId());
return true;
} else {
return false;

View File

@@ -152,7 +152,7 @@ public class CraftSkull extends CraftBlockState implements Skull {
return false;
}
GameProfile profile = MinecraftServer.getServer().getUserCache().a(name);
GameProfile profile = MinecraftServer.getServer().getUserCache().getProfile(name);
if (profile == null) {
return false;
}