use of net.minecraft.recipe.Ingredient in project nbt-crafting by Siphalor.
the class MixinRecipeFinder$Filter method method_7422.
/**
* @reason Builds the idToAmountMap but with calls to ingredient matches
* @author Siphalor
*/
@Overwrite
private int[] method_7422() {
owner = NbtCrafting.lastRecipeFinder;
IntCollection ints = new IntAVLTreeSet();
for (int id : owner.idToAmountMap.keySet()) {
for (Ingredient ingredient : ingredients) {
if (ingredient.test(RecipeFinder.getStackFromId(id)))
ints.add(id);
}
}
return ints.toIntArray();
}
use of net.minecraft.recipe.Ingredient in project nbt-crafting by Siphalor.
the class CauldronRecipe method from.
public static CauldronRecipe from(PacketByteBuf packetByteBuf) {
Identifier identifier = packetByteBuf.readIdentifier();
Ingredient input = Ingredient.fromPacket(packetByteBuf);
ItemStack output = packetByteBuf.readItemStack();
int levels = packetByteBuf.readShort();
return new CauldronRecipe(identifier, input, output, levels);
}
Aggregations