Update to Minecraft 1.9

This commit is contained in:
md_5
2016-03-01 08:32:46 +11:00
parent e1ebe524a7
commit aa008dff0f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/server/EntityArmorStand.java
+++ b/net/minecraft/server/EntityArmorStand.java
@@ -2,6 +2,15 @@
@@ -4,6 +4,15 @@
import java.util.Arrays;
import java.util.List;
+// CraftBukkit start
@@ -15,19 +15,19 @@
+
public class EntityArmorStand extends EntityLiving {
private static final Vector3f a = new Vector3f(0.0F, 0.0F, 0.0F);
@@ -332,6 +341,22 @@
ItemStack itemstack1 = entityhuman.inventory.getItem(j);
private static final Vector3f bp = new Vector3f(0.0F, 0.0F, 0.0F);
@@ -360,6 +369,21 @@
if (itemstack1 == null || (this.bz & 1 << enumitemslot.c() + 8) == 0) {
if (itemstack1 != null || (this.bz & 1 << enumitemslot.c() + 16) == 0) {
ItemStack itemstack2;
+ // CraftBukkit start
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack);
+ org.bukkit.inventory.ItemStack playerHeldItem = CraftItemStack.asCraftMirror(itemstack1);
+ org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
+ org.bukkit.inventory.ItemStack playerHeldItem = CraftItemStack.asCraftMirror(itemstack);
+
+ Player player = (Player) entityhuman.getBukkitEntity();
+ ArmorStand self = (ArmorStand) this.getBukkitEntity();
+
+ EquipmentSlot slot = CraftEquipmentSlot.getSlot(i);
+ EquipmentSlot slot = CraftEquipmentSlot.getSlot(enumitemslot);
+ PlayerArmorStandManipulateEvent armorStandManipulateEvent = new PlayerArmorStandManipulateEvent(player,self,playerHeldItem,armorStandItem,slot);
+ this.world.getServer().getPluginManager().callEvent(armorStandManipulateEvent);
+
@@ -35,11 +35,10 @@
+ return;
+ }
+ // CraftBukkit end
+
if (entityhuman.abilities.canInstantlyBuild && (itemstack == null || itemstack.getItem() == Item.getItemOf(Blocks.AIR)) && itemstack1 != null) {
itemstack2 = itemstack1.cloneItemStack();
itemstack2.count = 1;
@@ -352,6 +377,11 @@
if (entityhuman.abilities.canInstantlyBuild && (itemstack1 == null || itemstack1.getItem() == Item.getItemOf(Blocks.AIR)) && itemstack != null) {
itemstack2 = itemstack.cloneItemStack();
@@ -381,6 +405,11 @@
}
public boolean damageEntity(DamageSource damagesource, float f) {
@@ -48,24 +47,6 @@
+ return false;
+ }
+ // CraftBukkit end
if (this.world.isClientSide) {
return false;
} else if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
@@ -616,7 +646,8 @@
return (this.datawatcher.getByte(10) & 8) != 0;
}
- private void n(boolean flag) {
+ // PAIL
+ public void n(boolean flag) { // CraftBukkit - public
byte b0 = this.datawatcher.getByte(10);
if (flag) {
@@ -628,6 +659,7 @@
this.datawatcher.watch(10, Byte.valueOf(b0));
}
+ // PAIL
public boolean s() {
return (this.datawatcher.getByte(10) & 16) != 0;
}
if (!this.world.isClientSide && !this.dead) {
if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
this.die();