Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BigDripleafBlock.java
+++ b/net/minecraft/world/level/block/BigDripleafBlock.java
@@ -42,6 +42,11 @@
@@ -43,6 +43,11 @@
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
import net.minecraft.world.phys.shapes.VoxelShapes;
@@ -12,17 +12,17 @@
public class BigDripleafBlock extends BlockFacingHorizontal implements IBlockFragilePlantElement, IBlockWaterlogged {
public static final MapCodec<BigDripleafBlock> CODEC = simpleCodec(BigDripleafBlock::new);
@@ -116,7 +121,7 @@
@@ -117,7 +122,7 @@
@Override
public void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
protected void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
- this.setTiltAndScheduleTick(iblockdata, world, movingobjectpositionblock.getBlockPos(), Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN);
+ this.setTiltAndScheduleTick(iblockdata, world, movingobjectpositionblock.getBlockPos(), Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN, iprojectile); // CraftBukkit
}
@Override
@@ -175,7 +180,20 @@
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
@@ -176,7 +181,20 @@
protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
if (!world.isClientSide) {
if (iblockdata.getValue(BigDripleafBlock.TILT) == Tilt.NONE && canEntityTilt(blockposition, entity) && !world.hasNeighborSignal(blockposition)) {
- this.setTiltAndScheduleTick(iblockdata, world, blockposition, Tilt.UNSTABLE, (SoundEffect) null);
@@ -43,7 +43,7 @@
}
}
@@ -189,9 +207,9 @@
@@ -190,9 +208,9 @@
Tilt tilt = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
if (tilt == Tilt.UNSTABLE) {
@@ -55,7 +55,7 @@
} else if (tilt == Tilt.FULL) {
resetTilt(iblockdata, worldserver, blockposition);
}
@@ -217,8 +235,10 @@
@@ -218,8 +236,10 @@
return entity.onGround() && entity.position().y > (double) ((float) blockposition.getY() + 0.6875F);
}
@@ -68,7 +68,7 @@
if (soundeffect != null) {
playTiltSound(world, blockposition, soundeffect);
}
@@ -232,14 +252,21 @@
@@ -233,14 +253,21 @@
}
private static void resetTilt(IBlockData iblockdata, World world, BlockPosition blockposition) {
@@ -92,8 +92,8 @@
Tilt tilt1 = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BigDripleafBlock.TILT, tilt), 2);
@@ -247,6 +274,7 @@
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, blockposition);
@@ -248,6 +275,7 @@
world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, blockposition);
}
+ return true; // CraftBukkit