mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-20 23:03:48 -07:00
@@ -35,9 +35,9 @@
|
||||
this.b = generatoraccess;
|
||||
this.c = blockposition;
|
||||
@@ -282,6 +285,7 @@
|
||||
this.a = iblockdata;
|
||||
this.b = generatoraccess;
|
||||
this.c = blockposition;
|
||||
this.blockData = iblockdata;
|
||||
this.generatorAccess = generatoraccess;
|
||||
this.blockPosition = blockposition;
|
||||
+ this.bukkitOwner = new CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
|
||||
}
|
||||
|
||||
@@ -46,15 +46,15 @@
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
- BlockComposter.d(this.a, this.b, this.c);
|
||||
- this.d = true;
|
||||
- BlockComposter.d(this.blockData, this.generatorAccess, this.blockPosition);
|
||||
- this.emptied = true;
|
||||
+ // CraftBukkit start - allow putting items back (eg cancelled InventoryMoveItemEvent)
|
||||
+ if (this.isNotEmpty()) {
|
||||
+ BlockComposter.d(this.a, this.b, this.c);
|
||||
+ this.d = true;
|
||||
+ if (this.isEmpty()) {
|
||||
+ BlockComposter.d(this.blockData, this.generatorAccess, this.blockPosition);
|
||||
+ this.emptied = true;
|
||||
+ } else {
|
||||
+ this.b.setTypeAndData(this.c, this.a, 3);
|
||||
+ this.d = false;
|
||||
+ this.generatorAccess.setTypeAndData(this.blockPosition, this.blockData, 3);
|
||||
+ this.emptied = false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
Reference in New Issue
Block a user