Skip to content

Commit

Permalink
Fix issue with Entity and Block selecting GUIs.
Browse files Browse the repository at this point in the history
Items were not selected unless player use right click. Not it will work correctly.
  • Loading branch information
BONNe committed Jun 16, 2019
1 parent e0610c1 commit 1a70ee3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@ private PanelItem createMaterialButton(Material material)
{
this.selectedMaterials.remove(material);
}

panel.getInventory().setItem(slot, this.createMaterialButton(material).getItem());
}
else
{
this.selectedMaterials.add(material);
this.consumer.accept(true, this.selectedMaterials);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,12 @@ private PanelItem createEntityButton(EntityType entity)
{
this.selectedEntities.remove(entity);
}

panel.getInventory().setItem(slot, this.createEntityButton(entity).getItem());
}
else
{
this.selectedEntities.add(entity);
this.consumer.accept(true, this.selectedEntities);
}

Expand Down

0 comments on commit 1a70ee3

Please sign in to comment.