Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BlockSweetBerryBush.java
+++ b/net/minecraft/world/level/block/BlockSweetBerryBush.java
@@ -30,6 +30,13 @@
@@ -29,6 +29,13 @@
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
@@ -14,7 +14,7 @@
public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement {
public static final MapCodec<BlockSweetBerryBush> CODEC = simpleCodec(BlockSweetBerryBush::new);
@@ -71,7 +78,7 @@
@@ -70,7 +77,7 @@
if (i < 3 && randomsource.nextInt(5) == 0 && worldserver.getRawBrightness(blockposition.above(), 0) >= 9) {
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockSweetBerryBush.AGE, i + 1);
@@ -23,16 +23,16 @@
worldserver.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
}
@@ -86,7 +93,7 @@
double d1 = Math.abs(entity.getZ() - entity.zOld);
@@ -91,7 +98,7 @@
double d1 = Math.abs(vec3d.z());
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
- entity.hurt(world.damageSources().sweetBerryBush(), 1.0F);
+ entity.hurt(world.damageSources().sweetBerryBush().directBlock(world, blockposition), 1.0F); // CraftBukkit
}
}
if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
- entity.hurtServer(worldserver, world.damageSources().sweetBerryBush(), 1.0F);
+ entity.hurtServer(worldserver, world.damageSources().sweetBerryBush().directBlock(world, blockposition), 1.0F); // CraftBukkit
}
}
@@ -109,7 +116,15 @@
@@ -118,7 +125,15 @@
if (i > 1) {
int j = 1 + world.random.nextInt(2);