Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -24,8 +24,8 @@
this.target = this.x();
this.k = null;
} else if (this.target == null) {
- List<EntityLiving> list = this.world.a(EntityLiving.class, this.v(), (entityliving1) -> {
+ List<EntityLiving> list = this.world.a(EntityLiving.class, this.v(), (java.util.function.Predicate<EntityLiving>) (entityliving1) -> { // CraftBukkit - decompile error
- List<EntityLiving> list = this.world.a(EntityLiving.class, this.m(), (entityliving1) -> {
+ List<EntityLiving> list = this.world.a(EntityLiving.class, this.m(), (java.util.function.Predicate<EntityLiving>) (entityliving1) -> { // CraftBukkit - decompile error
return entityliving1 instanceof IMonster && entityliving1.isInWaterOrRain();
});
@@ -33,12 +33,12 @@
}
if (this.target != null) {
- this.world.playSound((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
- this.world.playSound((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.target.damageEntity(DamageSource.MAGIC, 4.0F)) {
+ this.world.playSound((EntityHuman) null, this.target.locX, this.target.locY, this.target.locZ, SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
+ this.world.playSound((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
@@ -49,8 +49,8 @@
@Nullable
private EntityLiving x() {
- List<EntityLiving> list = this.world.a(EntityLiving.class, this.v(), (entityliving) -> {
+ List<EntityLiving> list = this.world.a(EntityLiving.class, this.v(), (java.util.function.Predicate<EntityLiving>) (entityliving) -> { // CraftBukkit - decompile error
- List<EntityLiving> list = this.world.a(EntityLiving.class, this.m(), (entityliving) -> {
+ List<EntityLiving> list = this.world.a(EntityLiving.class, this.m(), (java.util.function.Predicate<EntityLiving>) (entityliving) -> { // CraftBukkit - decompile error
return entityliving.getUniqueID().equals(this.k);
});