mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
SPIGOT-3003: Fix custom dropper / beacons.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d66b605829
commit
d6082cde7f
1 changed files with 22 additions and 0 deletions
|
@ -125,6 +125,7 @@ public class CraftContainer extends Container {
|
||||||
setupChest(top, bottom);
|
setupChest(top, bottom);
|
||||||
break;
|
break;
|
||||||
case DISPENSER:
|
case DISPENSER:
|
||||||
|
case DROPPER:
|
||||||
setupDispenser(top, bottom);
|
setupDispenser(top, bottom);
|
||||||
break;
|
break;
|
||||||
case FURNACE:
|
case FURNACE:
|
||||||
|
@ -146,6 +147,9 @@ public class CraftContainer extends Container {
|
||||||
case ANVIL:
|
case ANVIL:
|
||||||
setupAnvil(top, bottom);
|
setupAnvil(top, bottom);
|
||||||
break;
|
break;
|
||||||
|
case BEACON:
|
||||||
|
setupBeacon(top, bottom);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,6 +328,24 @@ public class CraftContainer extends Container {
|
||||||
// End copy from ContainerAnvil
|
// End copy from ContainerAnvil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupBeacon(IInventory top, IInventory bottom) {
|
||||||
|
// This code is copied from ContainerBeacon
|
||||||
|
this.a(new Slot(top, 0, 136, 110));
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 3; ++i) {
|
||||||
|
for (int j = 0; j < 9; ++j) {
|
||||||
|
this.a(new Slot(bottom, j + i * 9 + 9, 36 + j * 18, 137 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < 9; ++i) {
|
||||||
|
this.a(new Slot(bottom, i, 36 + i * 18, 195));
|
||||||
|
}
|
||||||
|
// End copy from ContainerBeacon
|
||||||
|
}
|
||||||
|
|
||||||
public boolean a(EntityHuman entity) {
|
public boolean a(EntityHuman entity) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue