mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-22 02:25:56 +01:00
Merge pull request #333 from BentoBoxWorld/332_non-items_in_the_level_value_menu
Fixes an issue where items can be a block but not an item #332
This commit is contained in:
commit
e7563b2f1c
@ -58,6 +58,7 @@ public class ValuePanel
|
||||
this.activeFilter = Filter.NAME_ASC;
|
||||
this.materialRecordList = Arrays.stream(Material.values()).
|
||||
filter(Material::isBlock).
|
||||
filter(Material::isItem). // Remove things like PITCHER_CROP
|
||||
filter(m -> !m.name().startsWith("LEGACY_")).
|
||||
filter(this.addon.getBlockConfig()::isNotHiddenBlock).
|
||||
map(material ->
|
||||
@ -584,6 +585,7 @@ public class ValuePanel
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
int index = this.pageIndex * slot.amountMap().getOrDefault(BLOCK, 1) + slot.slot();
|
||||
|
||||
if (index >= this.elementList.size())
|
||||
|
Loading…
Reference in New Issue
Block a user