Fix a bunch of vanilla bugs

https://bugs.mojang.com/browse/MC-253721
  wrong msg for opping multiple players

https://bugs.mojang.com/browse/MC-248588
  respect mob griefing gamerule for draining water cauldrons

https://bugs.mojang.com/browse/MC-244739
  play goat eating sound for last item in stack

https://bugs.mojang.com/browse/MC-243057
  ignore furnace fuel slot in recipe book click

https://bugs.mojang.com/browse/MC-147659
  Some witch huts spawn the incorrect cat
  Note: Marked as Won't Fix, makes 0 sense

https://bugs.mojang.com/browse/MC-179072
  Creepers do not defuse when switching from Survival to Creative/Spectator

https://bugs.mojang.com/browse/MC-259571
  Fix changeGameModeForPlayer to use gameModeForPlayer

https://bugs.mojang.com/browse/MC-262422
  Fix lightning being able to hit spectators

https://bugs.mojang.com/browse/MC-263999
  Fix mobs breaking doors not spawning block break particles

https://bugs.mojang.com/browse/MC-210802
  Fixes sheep eating blocks outside of ticking range

https://bugs.mojang.com/browse/MC-123848
  Fixes item frames dropping items above when pointing down

https://bugs.mojang.com/browse/MC-174630
  Fix secondary beacon effect remaining after switching effect

https://bugs.mojang.com/browse/MC-153086
  Fix the beacon deactivation sound always playing when broken

https://bugs.mojang.com/browse/MC-200092
  Fix yaw being ignored for a player's first spawn pos

https://bugs.mojang.com/browse/MC-158900
  Fix error when joining after tempban expired

https://bugs.mojang.com/browse/MC-99075
  Fix inventory desync within spawn protected area

https://bugs.mojang.com/browse/MC-273635
  Fix TrialSpawner forgets assigned mob when placed by player

== AT ==
public net/minecraft/world/entity/Mob leashInfoTag
public net/minecraft/server/level/ChunkMap anyPlayerCloseEnoughForSpawning(Lnet/minecraft/world/level/ChunkPos;)Z

Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
Jake Potrebic
2022-07-11 11:56:41 -07:00
parent 492ebf1459
commit 0b9ef3701e
20 changed files with 256 additions and 83 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
+++ b/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
@@ -72,6 +72,12 @@
@@ -72,9 +72,16 @@
}
if (this.breakTime == this.getDoorBreakTime() && this.isValidDifficulty(this.mob.level().getDifficulty())) {
@@ -10,6 +10,11 @@
+ return;
+ }
+ // CraftBukkit end
+ final net.minecraft.world.level.block.state.BlockState oldState = this.mob.level().getBlockState(this.doorPos); // Paper - fix MC-263999
this.mob.level().removeBlock(this.doorPos, false);
this.mob.level().levelEvent(1021, this.doorPos, 0);
this.mob.level().levelEvent(2001, this.doorPos, Block.getId(this.mob.level().getBlockState(this.doorPos)));
- this.mob.level().levelEvent(2001, this.doorPos, Block.getId(this.mob.level().getBlockState(this.doorPos)));
+ this.mob.level().levelEvent(2001, this.doorPos, Block.getId(oldState)); // Paper - fix MC-263999
}
}

View File

@@ -11,7 +11,19 @@
public class EatBlockGoal extends Goal {
private static final int EAT_ANIMATION_TICKS = 40;
@@ -63,8 +67,9 @@
@@ -27,6 +31,11 @@
@Override
public boolean canUse() {
+ // Paper start - Fix MC-210802
+ if (!((net.minecraft.server.level.ServerLevel) this.level).chunkSource.chunkMap.anyPlayerCloseEnoughForSpawning(this.mob.chunkPosition())) {
+ return false;
+ }
+ // Paper end
if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) {
return false;
} else {
@@ -63,8 +72,9 @@
if (this.eatAnimationTick == this.adjustedTickDelay(4)) {
BlockPos blockposition = this.mob.blockPosition();
@@ -23,7 +35,7 @@
this.level.destroyBlock(blockposition, false);
}
@@ -73,7 +78,7 @@
@@ -73,7 +83,7 @@
BlockPos blockposition1 = blockposition.below();
if (this.level.getBlockState(blockposition1).is(Blocks.GRASS_BLOCK)) {

View File

@@ -0,0 +1,17 @@
--- a/net/minecraft/world/entity/ai/goal/SwellGoal.java
+++ b/net/minecraft/world/entity/ai/goal/SwellGoal.java
@@ -21,7 +21,14 @@
return this.creeper.getSwellDir() > 0 || livingEntity != null && this.creeper.distanceToSqr(livingEntity) < 9.0;
}
+ // Paper start - Fix MC-179072
@Override
+ public boolean canContinueToUse() {
+ return !net.minecraft.world.entity.EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(this.creeper.getTarget()) && canUse();
+ }
+ // Paper end
+
+ @Override
public void start() {
this.creeper.getNavigation().stop();
this.target = this.creeper.getTarget();