mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-12-01 03:47:08 -05:00
parent
9e0c36bf7b
commit
3558ed2c30
2 changed files with 8 additions and 0 deletions
|
@ -83,7 +83,11 @@ public class RecipeContextImpl implements RecipeContext {
|
|||
if (object.get(RecipeConstants.ITEM) instanceof JsonPrimitive primitive) {
|
||||
ResourceLocation item = ResourceLocation.tryParse(primitive.getAsString());
|
||||
UnifyTag<Item> tag = getPreferredTagForItem(item);
|
||||
|
||||
if (tag != null) {
|
||||
// avoid replacing input items with tags in case the stone strata matters
|
||||
if (replacementMap.getStoneStrataHandler().isStoneStrataTag(tag)) return;
|
||||
|
||||
object.remove(RecipeConstants.ITEM);
|
||||
object.add(RecipeConstants.TAG, new JsonPrimitive(tag.location().toString()));
|
||||
}
|
||||
|
|
|
@ -103,4 +103,8 @@ public class ReplacementMap {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public StoneStrataHandler getStoneStrataHandler() {
|
||||
return stoneStrataHandler;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue