Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit e494f2894e - Show all commits

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/FarmBlock.java
+++ b/net/minecraft/world/level/block/FarmBlock.java
@@ -95,31 +_,56 @@
@@ -95,31 +_,59 @@
@Override
protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
int moistureValue = state.getValue(MOISTURE);
@@ -53,8 +53,11 @@
public static void turnToDirt(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(level, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
+ return;
+ if (entity == null) {
+ if (org.bukkit.craftbukkit.event.CraftEventFactory
+ .callBlockFadeEvent(level, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
+ return;
+ }
+ }
+ // CraftBukkit end
BlockState blockState = pushEntitiesUp(state, Blocks.DIRT.defaultBlockState(), level, pos);