This commit is contained in:
Warrior committed 2025-03-12 21:20:39 +01:00
1 parent 4fb84d6047
commit 6e5effa052
2 files changed
+5 -32

No files matched your search

@@ -1,19 +0,0 @@
From 3aeeaf31b7a7f888f54e47826e8ec0ddbe65c4bf Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 14:37:42 +0100
Subject: [PATCH] paper File Patches
diff --git a/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java b/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
index 6993dfdf55b68ecd82c614010e5f2c272a6c6d4a..66580946785d67e080ca898fe5379bd81491b970 100644
--- a/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
+++ b/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
@@ -20,7 +20,7 @@ public class SitWhenOrderedToGoal extends Goal {
@Override
public boolean canUse() {
if (!this.mob.isTame()) {
- return false;
+ return this.mob.isOrderedToSit() && this.mob.getTarget() == null; // CraftBukkit - Allow sitting for wild animals
} else if (this.mob.isInWaterOrBubble()) {
return false;
} else if (!this.mob.onGround()) {
@@ -1,14 +1,6 @@
From 3aeeaf31b7a7f888f54e47826e8ec0ddbe65c4bf Mon Sep 17 00:00:00 2001
From: File <noreply+automated@papermc.io>
Date: Sun, 20 Apr 1997 14:37:42 +0100
Subject: [PATCH] paper File Patches
diff --git a/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
index d5eb2e98d27d6089efa437361f3c093a72dfca15..e84893780b533b1ecb3675606b5c2daf7339b861 100644
--- a/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
+++ b/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
@@ -26,6 +26,11 @@ public class EatBlockGoal extends Goal {
@@ -26,6 +_,11 @@
@Override
public boolean canUse() {
@@ -20,19 +12,19 @@ index d5eb2e98d27d6089efa437361f3c093a72dfca15..e84893780b533b1ecb3675606b5c2daf
if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) {
return false;
} else {
@@ -60,8 +65,9 @@ public class EatBlockGoal extends Goal {
@@ -60,8 +_,9 @@
this.eatAnimationTick = Math.max(0, this.eatAnimationTick - 1);
if (this.eatAnimationTick == this.adjustedTickDelay(4)) {
BlockPos blockPos = this.mob.blockPosition();
- if (IS_TALL_GRASS.test(this.level.getBlockState(blockPos))) {
- if (IS_EDIBLE.test(this.level.getBlockState(blockPos))) {
- if (getServerLevel(this.level).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
+ final BlockState blockState = this.level.getBlockState(blockPos); // Paper - fix wrong block state
+ if (IS_TALL_GRASS.test(blockState)) { // Paper - fix wrong block state
+ if (IS_EDIBLE.test(blockState)) { // Paper - fix wrong block state
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockPos, blockState.getFluidState().createLegacyBlock(), !getServerLevel(this.level).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit // Paper - fix wrong block state
this.level.destroyBlock(blockPos, false);
}
@@ -69,7 +75,7 @@ public class EatBlockGoal extends Goal {
@@ -69,7 +_,7 @@
} else {
BlockPos blockPos1 = blockPos.below();
if (this.level.getBlockState(blockPos1).is(Blocks.GRASS_BLOCK)) {