Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -49,12 +49,12 @@
+ public ContainerLectern(int i, IInventory iinventory, IContainerProperties icontainerproperties, PlayerInventory playerinventory) {
+ // CraftBukkit end
super(Containers.LECTERN, i);
a(iinventory, 1);
a(icontainerproperties, 1);
checkContainerSize(iinventory, 1);
checkContainerDataCount(icontainerproperties, 1);
@@ -34,6 +61,7 @@
}
});
this.a(icontainerproperties);
this.addDataSlots(icontainerproperties);
+ player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
}
@@ -70,15 +70,15 @@
+ return false;
+ }
+ // CraftBukkit end
ItemStack itemstack = this.lectern.splitWithoutUpdate(0);
ItemStack itemstack = this.lectern.removeItemNoUpdate(0);
this.lectern.update();
this.lectern.setChanged();
@@ -81,6 +116,8 @@
@Override
public boolean canUse(EntityHuman entityhuman) {
public boolean stillValid(EntityHuman entityhuman) {
+ if (lectern instanceof LecternInventory && !((LecternInventory) lectern).getLectern().hasBook()) return false; // CraftBukkit
+ if (!this.checkReachable) return true; // CraftBukkit
return this.lectern.a(entityhuman);
return this.lectern.stillValid(entityhuman);
}