mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Update to Minecraft Server 1.2
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
ff4b91655a
commit
c695452813
6 changed files with 12 additions and 12 deletions
|
@ -23,7 +23,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>minecraft-server</artifactId>
|
<artifactId>minecraft-server</artifactId>
|
||||||
<version>1.1_02</version>
|
<version>1.2</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class CraftBlock implements Block {
|
||||||
this.z = z;
|
this.z = z;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.light = (byte)world.getHandle().i(x, y, z);
|
this.light = (byte)world.getHandle().j(x, y, z);
|
||||||
this.chunk = (CraftChunk)world.getChunkAt(x << 4, z << 4);
|
this.chunk = (CraftChunk)world.getChunkAt(x << 4, z << 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class CraftBlock implements Block {
|
||||||
*/
|
*/
|
||||||
public boolean setTypeID(final int type) {
|
public boolean setTypeID(final int type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return world.getHandle().d(x, y, z, type);
|
return world.getHandle().e(x, y, z, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -259,9 +259,9 @@ public class CraftBlock implements Block {
|
||||||
Material material = getType();
|
Material material = getType();
|
||||||
|
|
||||||
switch (material) {
|
switch (material) {
|
||||||
case Sign:
|
case SIGN:
|
||||||
case SignPost:
|
case SIGN_POST:
|
||||||
case WallSign:
|
case WALL_SIGN:
|
||||||
return new CraftSign(this);
|
return new CraftSign(this);
|
||||||
default:
|
default:
|
||||||
return new CraftBlockState(this);
|
return new CraftBlockState(this);
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class CraftInventory implements org.bukkit.Inventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return getInventory().a();
|
return getInventory().h_();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -42,7 +42,7 @@ public class CraftInventory implements org.bukkit.Inventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItem(int index, ItemStack item) {
|
public void setItem(int index, ItemStack item) {
|
||||||
getInventory().a( index, new net.minecraft.server.ItemStack( item.getTypeID(), item.getAmount()));
|
getInventory().a( index, new net.minecraft.server.ItemStack( item.getTypeID(), item.getAmount(), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(int materialId) {
|
public boolean contains(int materialId) {
|
||||||
|
@ -121,7 +121,7 @@ public class CraftInventory implements org.bukkit.Inventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int firstEmpty() {
|
public int firstEmpty() {
|
||||||
return first(Material.Air);
|
return first(Material.AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int firstPartial(int materialId) {
|
public int firstPartial(int materialId) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class CraftItemStack extends ItemStack {
|
||||||
item = null;
|
item = null;
|
||||||
} else {
|
} else {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
item = new net.minecraft.server.ItemStack(type);
|
item = new net.minecraft.server.ItemStack(type, 1, 0);
|
||||||
super.setAmount(1);
|
super.setAmount(1);
|
||||||
} else {
|
} else {
|
||||||
item.c = type;
|
item.c = type;
|
||||||
|
|
|
@ -213,7 +213,7 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileEntity getTileEntityAt(final int x, final int y, final int z) {
|
public TileEntity getTileEntityAt(final int x, final int y, final int z) {
|
||||||
return world.l(x, y, z);
|
return world.m(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class CraftBlockState implements BlockState {
|
||||||
*/
|
*/
|
||||||
public void setTypeID(final int type) {
|
public void setTypeID(final int type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
world.getHandle().d(x, y, z, type);
|
world.getHandle().e(x, y, z, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue