Update to Minecraft 1.10

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-06-09 11:43:49 +10:00
parent 604d9373c0
commit a39b7e5f3a
161 changed files with 1176 additions and 1147 deletions

View File

@@ -34,8 +34,8 @@
+ return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ());
+ }
};
private World world;
private BlockPosition position;
public World world;
private final BlockPosition position;
@@ -23,6 +41,10 @@
public int[] costs = new int[3];
public int[] h = new int[] { -1, -1, -1};
@@ -150,19 +150,19 @@
if (!entityhuman.abilities.canInstantlyBuild) {
itemstack1.count -= j;
if (itemstack1.count <= 0) {
@@ -227,6 +297,11 @@
@@ -228,6 +298,11 @@
public void b(EntityHuman entityhuman) {
super.b(entityhuman);
+ // CraftBukkit Start - If an enchantable was opened from a null location, set the world to the player's world, preventing a crash
+ if(this.world == null) {
+ if (this.world == null) {
+ this.world = entityhuman.getWorld();
+ }
+ // CraftBukkit end
if (!this.world.isClientSide) {
for (int i = 0; i < this.enchantSlots.getSize(); ++i) {
ItemStack itemstack = this.enchantSlots.splitWithoutUpdate(i);
@@ -240,6 +315,7 @@
@@ -241,6 +316,7 @@
}
public boolean a(EntityHuman entityhuman) {
@@ -170,7 +170,7 @@
return this.world.getType(this.position).getBlock() != Blocks.ENCHANTING_TABLE ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
}
@@ -293,4 +369,17 @@
@@ -294,4 +370,17 @@
return itemstack;
}