SPIGOT-6480: Players cannot take books from lecterns that were opened by plugins
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
@@ -27,9 +27,63 @@
|
||||
@@ -27,9 +27,67 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -60,13 +60,17 @@
|
||||
+ public InventoryHolder getOwner() {
|
||||
+ return (Lectern) TileEntityLectern.this.getOwner();
|
||||
+ }
|
||||
+
|
||||
+ public TileEntityLectern getLectern() {
|
||||
+ return TileEntityLectern.this;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
- public final IInventory inventory = new IInventory() {
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 1;
|
||||
@@ -74,11 +128,20 @@
|
||||
@@ -74,11 +132,20 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +93,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +223,7 @@
|
||||
@@ -160,7 +227,7 @@
|
||||
if (j != this.page) {
|
||||
this.page = j;
|
||||
this.update();
|
||||
@@ -98,7 +102,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,6 +246,32 @@
|
||||
@@ -183,6 +250,32 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -131,7 +135,7 @@
|
||||
private CommandListenerWrapper a(@Nullable EntityHuman entityhuman) {
|
||||
String s;
|
||||
Object object;
|
||||
@@ -197,7 +286,8 @@
|
||||
@@ -197,7 +290,8 @@
|
||||
|
||||
Vec3D vec3d = Vec3D.a((BaseBlockPosition) this.position);
|
||||
|
||||
@@ -141,7 +145,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,7 +326,7 @@
|
||||
@@ -236,7 +330,7 @@
|
||||
|
||||
@Override
|
||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||
|
||||
Reference in New Issue
Block a user