mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
[ci skip] Formatting fixes
This commit is contained in:
parent
78337830c6
commit
ce33ca56a9
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,6 @@ import org.geysermc.connector.network.translators.inventory.updater.ContainerInv
|
||||||
* Droppers and dispensers
|
* Droppers and dispensers
|
||||||
*/
|
*/
|
||||||
public class Generic3X3InventoryTranslator extends AbstractBlockInventoryTranslator {
|
public class Generic3X3InventoryTranslator extends AbstractBlockInventoryTranslator {
|
||||||
|
|
||||||
public Generic3X3InventoryTranslator() {
|
public Generic3X3InventoryTranslator() {
|
||||||
super(9, "minecraft:dispenser[facing=north,triggered=false]", ContainerType.DISPENSER, ContainerInventoryUpdater.INSTANCE,
|
super(9, "minecraft:dispenser[facing=north,triggered=false]", ContainerType.DISPENSER, ContainerInventoryUpdater.INSTANCE,
|
||||||
"minecraft:dropper");
|
"minecraft:dropper");
|
||||||
|
@ -55,6 +54,7 @@ public class Generic3X3InventoryTranslator extends AbstractBlockInventoryTransla
|
||||||
public void openInventory(GeyserSession session, Inventory inventory) {
|
public void openInventory(GeyserSession session, Inventory inventory) {
|
||||||
ContainerOpenPacket containerOpenPacket = new ContainerOpenPacket();
|
ContainerOpenPacket containerOpenPacket = new ContainerOpenPacket();
|
||||||
containerOpenPacket.setId((byte) inventory.getId());
|
containerOpenPacket.setId((byte) inventory.getId());
|
||||||
|
// Required for opening the real block - otherwise, if the container type is incorrect, it refuses to open
|
||||||
containerOpenPacket.setType(((Generic3X3Container) inventory).isDropper() ? ContainerType.DROPPER : ContainerType.DISPENSER);
|
containerOpenPacket.setType(((Generic3X3Container) inventory).isDropper() ? ContainerType.DROPPER : ContainerType.DISPENSER);
|
||||||
containerOpenPacket.setBlockPosition(inventory.getHolderPosition());
|
containerOpenPacket.setBlockPosition(inventory.getHolderPosition());
|
||||||
containerOpenPacket.setUniqueEntityId(inventory.getHolderId());
|
containerOpenPacket.setUniqueEntityId(inventory.getHolderId());
|
||||||
|
|
Loading…
Reference in a new issue