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/item/ItemBoat.java
+++ b/net/minecraft/world/item/ItemBoat.java
@@ -60,6 +60,13 @@
@@ -61,6 +61,13 @@
}
if (movingobjectpositionblock.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
@@ -14,7 +14,7 @@
EntityBoat entityboat = this.getBoat(world, movingobjectpositionblock, itemstack, entityhuman);
entityboat.setVariant(this.type);
@@ -68,7 +75,15 @@
@@ -69,7 +76,15 @@
return InteractionResultWrapper.fail(itemstack);
} else {
if (!world.isClientSide) {
@@ -28,15 +28,15 @@
+ return InteractionResultWrapper.pass(itemstack);
+ }
+ // CraftBukkit end
world.gameEvent((Entity) entityhuman, GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation());
if (!entityhuman.getAbilities().instabuild) {
itemstack.shrink(1);
@@ -86,7 +101,7 @@
world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation());
itemstack.consume(1, entityhuman);
}
@@ -85,7 +100,7 @@
private EntityBoat getBoat(World world, MovingObjectPosition movingobjectposition, ItemStack itemstack, EntityHuman entityhuman) {
Vec3D vec3d = movingobjectposition.getLocation();
- Object object = this.hasChest ? new ChestBoat(world, vec3d.x, vec3d.y, vec3d.z) : new EntityBoat(world, vec3d.x, vec3d.y, vec3d.z);
+ EntityBoat object = this.hasChest ? new ChestBoat(world, vec3d.x, vec3d.y, vec3d.z) : new EntityBoat(world, vec3d.x, vec3d.y, vec3d.z); // CraftBukkit - decompile error
if (world instanceof WorldServer) {
WorldServer worldserver = (WorldServer) world;
if (world instanceof WorldServer worldserver) {
EntityTypes.createDefaultStackConfig(worldserver, itemstack, entityhuman).accept(object);