Update to Minecraft 1.11

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-11-17 12:41:03 +11:00
parent 49bc1c57f9
commit 4e412ab4e3
279 changed files with 3722 additions and 2992 deletions

View File

@@ -12,13 +12,11 @@
public class ItemArmor extends Item {
private static final int[] n = new int[] { 13, 15, 16, 11};
@@ -32,7 +37,33 @@
} else {
@@ -33,6 +38,32 @@
EntityLiving entityliving = (EntityLiving) list.get(0);
EnumItemSlot enumitemslot = EntityInsentient.d(itemstack);
- ItemStack itemstack1 = itemstack.cloneItemStack();
ItemStack itemstack1 = itemstack.cloneAndSubtract(1);
+ // CraftBukkit start
+ ItemStack itemstack1 = itemstack.cloneAndSubtract(1);
+ World world = isourceblock.getWorld();
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -29,12 +27,12 @@
+ }
+
+ if (event.isCancelled()) {
+ itemstack.count++;
+ itemstack.add(1);
+ return itemstack;
+ }
+
+ if (!event.getItem().equals(craftItem)) {
+ itemstack.count++;
+ itemstack.add(1);
+ // Chain to handler for new item
+ ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
+ IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
@@ -45,14 +43,5 @@
+ }
+ // CraftBukkit end
itemstack1.count = 1;
entityliving.setSlot(enumitemslot, itemstack1);
@@ -40,7 +71,7 @@
((EntityInsentient) entityliving).a(enumitemslot, 2.0F);
}
- --itemstack.count;
+ // --itemstack.count; // CraftBukkit - handled above
return itemstack;
}
}
if (entityliving instanceof EntityInsentient) {