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

@@ -1,19 +1,20 @@
--- a/net/minecraft/server/EntityArrow.java
+++ b/net/minecraft/server/EntityArrow.java
@@ -5,6 +5,12 @@
@@ -5,6 +5,13 @@
import java.util.List;
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
+import org.bukkit.event.entity.EntityCombustEvent;
+import org.bukkit.event.player.PlayerPickupArrowEvent;
+// CraftBukkit end
+
public abstract class EntityArrow extends Entity implements IProjectile {
private static final Predicate<Entity> f = Predicates.and(new Predicate[] { IEntitySelector.e, IEntitySelector.a, new Predicate() {
@@ -50,6 +56,7 @@
@@ -50,6 +57,7 @@
public EntityArrow(World world, EntityLiving entityliving) {
this(world, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.10000000149011612D, entityliving.locZ);
this.shooter = entityliving;
@@ -21,7 +22,7 @@
if (entityliving instanceof EntityHuman) {
this.fromPlayer = EntityArrow.PickupStatus.ALLOWED;
}
@@ -236,7 +243,7 @@
@@ -236,7 +244,7 @@
protected void a(MovingObjectPosition movingobjectposition) {
Entity entity = movingobjectposition.entity;
@@ -30,7 +31,7 @@
if (entity != null) {
float f = MathHelper.sqrt(this.motX * this.motX + this.motY * this.motY + this.motZ * this.motZ);
int i = MathHelper.f((double) f * this.damage);
@@ -254,7 +261,13 @@
@@ -254,7 +262,13 @@
}
if (this.isBurning() && !(entity instanceof EntityEnderman)) {
@@ -45,7 +46,7 @@
}
if (entity.damageEntity(damagesource, (float) i)) {
@@ -410,6 +423,20 @@
@@ -422,6 +436,20 @@
public void d(EntityHuman entityhuman) {
if (!this.world.isClientSide && this.inGround && this.shake <= 0) {
@@ -66,16 +67,19 @@
boolean flag = this.fromPlayer == EntityArrow.PickupStatus.ALLOWED || this.fromPlayer == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.abilities.canInstantlyBuild;
if (this.fromPlayer == EntityArrow.PickupStatus.ALLOWED && !entityhuman.inventory.pickup(this.j())) {
@@ -468,6 +495,12 @@
return (b0 & 1) != 0;
}
@@ -493,7 +521,14 @@
}
+ // CraftBukkit start
+ public boolean isInGround() {
+ return inGround;
+ }
+ // CraftBukkit end
if (EnchantmentManager.a(Enchantments.ARROW_FIRE, entityliving) > 0) {
- this.setOnFire(100);
+ // CraftBukkit start - call EntityCombustEvent
+ EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), 100);
+ this.world.getServer().getPluginManager().callEvent(event);
+
public static enum PickupStatus {
+ if (!event.isCancelled()) {
+ this.setOnFire(event.getDuration());
+ }
+ // CraftBukkit end
}
DISALLOWED, ALLOWED, CREATIVE_ONLY;
}