mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
SPIGOT-4947: Allow setting the content on a lectern
This commit is contained in:
parent
09d00e9f90
commit
5a02707175
@ -63,7 +63,19 @@
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 1;
|
||||
@@ -53,7 +104,7 @@
|
||||
@@ -49,11 +100,18 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void setItem(int i, ItemStack itemstack) {}
|
||||
+ // CraftBukkit start
|
||||
+ public void setItem(int i, ItemStack itemstack) {
|
||||
+ if (i == 0) {
|
||||
+ TileEntityLectern.this.a(itemstack); // PAIL rename setBook
|
||||
+ BlockLectern.a(TileEntityLectern.this.getWorld(), TileEntityLectern.this.getPosition(), TileEntityLectern.this.getBlock(), TileEntityLectern.this.f()); // PAIL rename a -> setHasBook, f -> hasBook
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@Override
|
||||
public int getMaxStackSize() {
|
||||
@ -72,7 +84,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,6 +209,32 @@
|
||||
@@ -158,6 +216,32 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@ -105,7 +117,7 @@
|
||||
private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) {
|
||||
String s;
|
||||
Object object;
|
||||
@@ -172,7 +249,8 @@
|
||||
@@ -172,7 +256,8 @@
|
||||
|
||||
Vec3D vec3d = new Vec3D((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D);
|
||||
|
||||
@ -115,7 +127,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -206,7 +284,7 @@
|
||||
@@ -206,7 +291,7 @@
|
||||
|
||||
@Override
|
||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||
|
Loading…
Reference in New Issue
Block a user