geforkt von Mirrors/Paper
SPIGOT-4947: Allow setting the content on a lectern
Dieser Commit ist enthalten in:
Ursprung
09d00e9f90
Commit
5a02707175
@ -63,7 +63,19 @@
|
|||||||
@Override
|
@Override
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return 1;
|
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
|
@Override
|
||||||
public int getMaxStackSize() {
|
public int getMaxStackSize() {
|
||||||
@ -72,7 +84,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -158,6 +209,32 @@
|
@@ -158,6 +216,32 @@
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +117,7 @@
|
|||||||
private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) {
|
private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) {
|
||||||
String s;
|
String s;
|
||||||
Object object;
|
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);
|
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
|
@Override
|
||||||
@@ -206,7 +284,7 @@
|
@@ -206,7 +291,7 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren