Merge remote-tracking branch 'origin/1.20' into 1.21.1
This commit is contained in:
commit
d47e412011
|
|
@ -162,9 +162,7 @@ public abstract class IngredientMixin implements ExtendedIngredient {
|
||||||
private ItemStack[] computeItemsArray() {
|
private ItemStack[] computeItemsArray() {
|
||||||
// Fast path for case with one item
|
// Fast path for case with one item
|
||||||
if (this.values.length == 1) {
|
if (this.values.length == 1) {
|
||||||
if (this.values[0] instanceof Ingredient.ItemValue itemValue) {
|
if (this.values[0] instanceof Ingredient.TagValue tagValue && mfix$areTagsAvailable()) {
|
||||||
return new ItemStack[] { itemValue.item() };
|
|
||||||
} else if (this.values[0] instanceof Ingredient.TagValue tagValue && mfix$areTagsAvailable()) {
|
|
||||||
var tag = BuiltInRegistries.ITEM.getTag(tagValue.tag());
|
var tag = BuiltInRegistries.ITEM.getTag(tagValue.tag());
|
||||||
if (tag.isPresent() && tag.get().size() > 0) {
|
if (tag.isPresent() && tag.get().size() > 0) {
|
||||||
var holderSet = tag.get();
|
var holderSet = tag.get();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user