Fix issue with Entity and Block selecting GUIs.

Items were not selected unless player use right click. Not it will work correctly.
This commit is contained in:
BONNe 2019-06-16 11:43:05 +03:00
parent e0610c1800
commit 1a70ee3ad8
2 changed files with 6 additions and 0 deletions

View File

@ -191,9 +191,12 @@ public class SelectBlocksGUI
{ {
this.selectedMaterials.remove(material); this.selectedMaterials.remove(material);
} }
panel.getInventory().setItem(slot, this.createMaterialButton(material).getItem());
} }
else else
{ {
this.selectedMaterials.add(material);
this.consumer.accept(true, this.selectedMaterials); this.consumer.accept(true, this.selectedMaterials);
} }

View File

@ -184,9 +184,12 @@ public class SelectEntityGUI
{ {
this.selectedEntities.remove(entity); this.selectedEntities.remove(entity);
} }
panel.getInventory().setItem(slot, this.createEntityButton(entity).getItem());
} }
else else
{ {
this.selectedEntities.add(entity);
this.consumer.accept(true, this.selectedEntities); this.consumer.accept(true, this.selectedEntities);
} }