Update to Minecraft 1.20.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-12-06 03:40:00 +11:00
parent afdb1d9bc3
commit 8398e12b34
256 changed files with 2745 additions and 1911 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BlockButtonAbstract.java
+++ b/net/minecraft/world/level/block/BlockButtonAbstract.java
@@ -27,6 +27,11 @@
@@ -33,6 +33,11 @@
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
@@ -11,8 +11,8 @@
+
public class BlockButtonAbstract extends BlockAttachable {
public static final BlockStateBoolean POWERED = BlockProperties.POWERED;
@@ -108,6 +113,19 @@
public static final MapCodec<BlockButtonAbstract> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
@@ -124,6 +129,19 @@
if ((Boolean) iblockdata.getValue(BlockButtonAbstract.POWERED)) {
return EnumInteractionResult.CONSUME;
} else {
@@ -32,12 +32,12 @@
this.press(iblockdata, world, blockposition);
this.playSound(entityhuman, world, blockposition, true);
world.gameEvent((Entity) entityhuman, GameEvent.BLOCK_ACTIVATE, blockposition);
@@ -170,11 +188,36 @@
@@ -195,11 +213,36 @@
}
protected void checkPressed(IBlockData iblockdata, World world, BlockPosition blockposition) {
- EntityArrow entityarrow = this.arrowsCanPress ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse((Object) null) : null;
+ EntityArrow entityarrow = this.arrowsCanPress ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse(null) : null; // CraftBukkit - decompile error
- EntityArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse((Object) null) : null;
+ EntityArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse(null) : null; // CraftBukkit - decompile error
boolean flag = entityarrow != null;
boolean flag1 = (Boolean) iblockdata.getValue(BlockButtonAbstract.POWERED);