Update to Minecraft 1.13.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-10-23 06:00:00 +11:00
parent 6fe7587c8f
commit a194267323
47 changed files with 184 additions and 262 deletions

View File

@@ -21,9 +21,9 @@
}
@@ -169,8 +173,8 @@
this.j = this.l();
this.target = this.l();
this.k = null;
} else if (this.j == null) {
} else if (this.target == null) {
- List list = this.world.a(EntityLiving.class, this.k(), (entityliving) -> {
- return entityliving instanceof IMonster && entityliving.ao();
+ List list = this.world.a(EntityLiving.class, this.k(), (Predicate<EntityLiving>) (entitylivingx) -> { // CraftBukkit - decompile error
@@ -34,19 +34,19 @@
@@ -181,8 +185,13 @@
}
if (this.j != null) {
- this.world.a((EntityHuman) null, this.j.locX, this.j.locY, this.j.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
- this.j.damageEntity(DamageSource.MAGIC, 4.0F);
if (this.target != null) {
- this.world.a((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
- this.target.damageEntity(DamageSource.MAGIC, 4.0F);
+ // CraftBukkit start
+ CraftEventFactory.blockDamage = CraftBlock.at(this.world, this.position);
+ if (this.j.damageEntity(DamageSource.MAGIC, 4.0F)) {
+ this.world.a((EntityHuman) null, this.j.locX, this.j.locY, this.j.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
+ if (this.target.damageEntity(DamageSource.MAGIC, 4.0F)) {
+ this.world.a((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
+ }
+ CraftEventFactory.blockDamage = null;
+ // CraftBukkit end
}
if (entityliving != this.j) {
if (entityliving != this.target) {
@@ -215,7 +224,7 @@
@Nullable