More 1.20 work.

This commit is contained in:
modmuss50 2023-05-11 20:41:47 +01:00 committed by modmuss
parent 133f64ac9f
commit 42d9a0445c
53 changed files with 317 additions and 243 deletions

View file

@ -25,7 +25,7 @@
package reborncore.common.recipes;
import com.google.gson.JsonObject;
import net.minecraft.class_8566;
import net.minecraft.inventory.RecipeInputInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.RecipeSerializer;
@ -66,7 +66,7 @@ public class PaddedShapedRecipe extends ShapedRecipe {
}
@Override
public boolean matches(class_8566 craftingInventory, World world) {
public boolean matches(RecipeInputInventory craftingInventory, World world) {
for(int i = 0; i <= craftingInventory.getWidth() - this.getWidth(); ++i) {
for(int j = 0; j <= craftingInventory.getHeight() - this.getHeight(); ++j) {
if (this.matchesPattern(craftingInventory, i, j, false)) {

View file

@ -3,7 +3,7 @@ accessWidener v2 named
accessible method net/minecraft/recipe/ShapedRecipe readSymbols (Lcom/google/gson/JsonObject;)Ljava/util/Map;
accessible method net/minecraft/recipe/ShapedRecipe getPattern (Lcom/google/gson/JsonArray;)[Ljava/lang/String;
accessible method net/minecraft/recipe/ShapedRecipe createPatternMatrix ([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/util/collection/DefaultedList;
accessible method net/minecraft/recipe/ShapedRecipe matchesPattern (Lnet/minecraft/class_8566;IIZ)Z
accessible method net/minecraft/recipe/ShapedRecipe matchesPattern (Lnet/minecraft/inventory/RecipeInputInventory;IIZ)Z
accessible class net/minecraft/data/server/recipe/ShapedRecipeJsonBuilder$ShapedRecipeJsonProvider
accessible method net/minecraft/data/server/recipe/ShapedRecipeJsonBuilder validate (Lnet/minecraft/util/Identifier;)V