mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityZombie.java
|
||||
+++ b/net/minecraft/server/EntityZombie.java
|
||||
@@ -5,6 +5,13 @@
|
||||
@@ -6,6 +6,13 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -13,36 +13,36 @@
|
||||
+
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
@@ -133,7 +140,14 @@
|
||||
}
|
||||
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
@@ -182,7 +189,14 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
- this.setOnFire(8);
|
||||
+ // CraftBukkit start
|
||||
+ EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), 8);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
if (flag) {
|
||||
- this.setOnFire(8);
|
||||
+ // CraftBukkit start
|
||||
+ EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), 8);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.setOnFire(event.getDuration());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.setOnFire(event.getDuration());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -167,8 +181,8 @@
|
||||
|
||||
@@ -251,8 +265,8 @@
|
||||
if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
|
||||
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.b((Entity) entityzombie, entityzombie.getBoundingBox()) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
- this.world.addEntity(entityzombie);
|
||||
- entityzombie.setGoalTarget(entityliving);
|
||||
+ this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
|
||||
+ entityzombie.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true);
|
||||
entityzombie.prepare(this.world.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
|
||||
this.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
@@ -191,7 +205,14 @@
|
||||
float f = this.world.D(new BlockPosition(this)).b();
|
||||
+ entityzombie.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit
|
||||
entityzombie.prepare(this.world.getDamageScaler(new BlockPosition(entityzombie)), (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
this.getAttributeInstance(EntityZombie.c).b(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.getAttributeInstance(EntityZombie.c).b(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
@@ -275,7 +289,14 @@
|
||||
float f = this.world.getDamageScaler(new BlockPosition(this)).b();
|
||||
|
||||
if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) {
|
||||
- entity.setOnFire(2 * (int) f);
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,7 +305,7 @@
|
||||
@@ -371,7 +392,7 @@
|
||||
entityzombievillager.setCustomNameVisible(entityvillager.getCustomNameVisible());
|
||||
}
|
||||
|
||||
@@ -66,16 +66,16 @@
|
||||
this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0);
|
||||
}
|
||||
|
||||
@@ -334,7 +355,7 @@
|
||||
@@ -421,7 +442,7 @@
|
||||
entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null);
|
||||
entitychicken1.p(true);
|
||||
entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.s(true);
|
||||
- this.world.addEntity(entitychicken1);
|
||||
+ this.world.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit
|
||||
this.startRiding(entitychicken1);
|
||||
}
|
||||
}
|
||||
@@ -392,7 +413,7 @@
|
||||
@@ -494,7 +515,7 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
@@ -84,7 +84,7 @@
|
||||
if (damagesource.getEntity() instanceof EntityCreeper) {
|
||||
EntityCreeper entitycreeper = (EntityCreeper) damagesource.getEntity();
|
||||
|
||||
@@ -405,6 +426,7 @@
|
||||
@@ -507,6 +528,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user