1.20-pre3

- Only mapping updates.
This commit is contained in:
modmuss50 2023-05-19 13:34:23 +01:00
parent 0bf4e42290
commit 63e9e1806d
6 changed files with 7 additions and 7 deletions
fabric-recipe-api-v1/src
main/java/net/fabricmc/fabric
testmod/java/net/fabricmc/fabric/test/recipe/ingredient
gradle.properties

View file

@ -74,7 +74,7 @@ abstract class CombinedIngredient implements CustomIngredient {
Ingredient[] ingredients = new Ingredient[values.size()];
for (int i = 0; i < values.size(); i++) {
ingredients[i] = Ingredient.method_52177(values.get(i));
ingredients[i] = Ingredient.fromJson(values.get(i));
}
return factory.apply(ingredients);

View file

@ -72,8 +72,8 @@ public class DifferenceIngredient implements CustomIngredient {
@Override
public DifferenceIngredient read(JsonObject json) {
Ingredient base = Ingredient.method_52177(json.get("base"));
Ingredient subtracted = Ingredient.method_52177(json.get("subtracted"));
Ingredient base = Ingredient.fromJson(json.get("base"));
Ingredient subtracted = Ingredient.fromJson(json.get("subtracted"));
return new DifferenceIngredient(base, subtracted);
}

View file

@ -109,7 +109,7 @@ public class NbtIngredient implements CustomIngredient {
@Override
public NbtIngredient read(JsonObject json) {
Ingredient base = Ingredient.method_52177(json.get("base"));
Ingredient base = Ingredient.fromJson(json.get("base"));
NbtCompound nbt = readNbt(json.get("nbt"));
boolean strict = JsonHelper.getBoolean(json, "strict", false);
return new NbtIngredient(base, nbt, strict);

View file

@ -44,7 +44,7 @@ public class IngredientMixin implements FabricIngredient {
target = "net/minecraft/recipe/Ingredient.entryFromJson (Lcom/google/gson/JsonObject;Z)Lnet/minecraft/recipe/Ingredient$Entry;",
ordinal = 0
),
method = "fromJson",
method = "fromJson(Lcom/google/gson/JsonElement;Z)Lnet/minecraft/recipe/Ingredient;",
cancellable = true
)
private static void injectFromJson(JsonElement json, boolean requireNotEmpty, CallbackInfoReturnable<Ingredient> cir) {

View file

@ -49,7 +49,7 @@ public class SerializationTests {
JsonElement json = JsonParser.parseString(ingredientJson);
try {
Ingredient.method_52177(json);
Ingredient.fromJson(json);
throw new GameTestException("Using a custom ingredient inside an array ingredient should have failed.");
} catch (IllegalArgumentException e) {
context.complete();

View file

@ -3,7 +3,7 @@ org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true
version=0.81.2
minecraft_version=1.20-pre2
minecraft_version=1.20-pre3
yarn_version=+build.1
loader_version=0.14.19
installer_version=0.11.1