pipez
pipez copied to clipboard
Clear NBT button for filters
Describe the solution you'd like When using a filter I know you can simply click into the NBT data field, select all, and delete all NBT data. But, would it be possible to add a clear NBT data button on the GUI, I think such a button would make it slightly simpler for some users.
Additional context
private Button clearNBTButton;
public void setMaterialNBT(@Nullable String nbt) {
if (nbt != null) {
this.nbt.setValue(nbt);
} else {
this.nbt.setValue("");
}
}
and
protected void init() {
...
addRenderableWidget(item);
// Clear nbt Button
clearNBTButton = new Button(leftPos + 6, topPos + 48, 20, 20, new TextComponent("C"), button -> {
setMaterialNBT("");
});
addRenderableWidget(clearNBTButton);
in FilterScreen.java?
Yeah that would be great
As well as a 'clear NBT Data' button, it would be great if the 'match exact NBT data/match only provided tags' button cycled through the three modes i.e. added an 'ignore NBT mode' (which also greys out the NBT Data field, without clearing it).
This would also solve the labels of that button being misleading: currently the button toggles between "match exact NBT data" and "match only provided tags" but "match only provided tags" still filters based on the existence of NBT. I would expect "match only provided tags" to ignore anything in the 'NBT Data' field, and only filter items based on matching the 'Item/Tag' field!
Having a clearer way of only moving those items that dont have an enchant would be great. Now if got the issue that i have broken non enchanted items in the same inventory as those that have enchants and i only want to throw away those without enchants.