Update forge 40.0.36
This commit is contained in:
parent
dd338d5a45
commit
11a4d57122
|
@ -8,7 +8,6 @@ import com.google.gson.JsonParseException;
|
|||
import io.izzel.arclight.common.bridge.core.inventory.IInventoryBridge;
|
||||
import io.izzel.arclight.common.bridge.core.item.crafting.RecipeManagerBridge;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
|
@ -20,6 +19,7 @@ import net.minecraft.world.item.crafting.RecipeManager;
|
|||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.common.crafting.conditions.ICondition;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -38,8 +38,9 @@ public abstract class RecipeManagerMixin implements RecipeManagerBridge {
|
|||
@Shadow protected abstract <C extends Container, T extends Recipe<C>> Map<ResourceLocation, Recipe<C>> byType(RecipeType<T> recipeTypeIn);
|
||||
@Shadow private boolean hasErrors;
|
||||
@Shadow @Final private static Logger LOGGER;
|
||||
@Shadow public static Recipe<?> fromJson(ResourceLocation recipeId, JsonObject json) { return null; }
|
||||
@Shadow(remap = false) public static Recipe<?> fromJson(ResourceLocation recipeId, JsonObject json, ICondition.IContext context) { return null; }
|
||||
@Shadow private Map<ResourceLocation, Recipe<?>> byName;
|
||||
@Shadow(remap = false) @Final private ICondition.IContext context;
|
||||
// @formatter:on
|
||||
|
||||
/**
|
||||
|
@ -63,11 +64,11 @@ public abstract class RecipeManagerMixin implements RecipeManagerBridge {
|
|||
continue; //Forge: filter anything beginning with "_" as it's used for metadata.
|
||||
|
||||
try {
|
||||
if (entry.getValue().isJsonObject() && !CraftingHelper.processConditions(entry.getValue().getAsJsonObject(), "conditions")) {
|
||||
if (entry.getValue().isJsonObject() && !CraftingHelper.processConditions(entry.getValue().getAsJsonObject(), "conditions", this.context)) {
|
||||
LOGGER.info("Skipping loading recipe {} as it's conditions were not met", resourcelocation);
|
||||
continue;
|
||||
}
|
||||
Recipe<?> irecipe = fromJson(resourcelocation, GsonHelper.convertToJsonObject(entry.getValue(), "top element"));
|
||||
Recipe<?> irecipe = fromJson(resourcelocation, GsonHelper.convertToJsonObject(entry.getValue(), "top element"), this.context);
|
||||
if (irecipe == null) {
|
||||
LOGGER.info("Skipping loading recipe {} as it's serializer returned null", resourcelocation);
|
||||
continue;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
allprojects {
|
||||
group 'io.izzel.arclight'
|
||||
version '1.0.2'
|
||||
version '1.0.3-SNAPSHOT'
|
||||
|
||||
def getGitHash = { ->
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
|
@ -14,7 +14,7 @@ allprojects {
|
|||
ext {
|
||||
agpVersion = '1.22'
|
||||
minecraftVersion = '1.18.2'
|
||||
forgeVersion = '40.0.12'
|
||||
forgeVersion = '40.0.36'
|
||||
apiVersion = '1.2.6'
|
||||
toolsVersion = '1.3.+'
|
||||
mixinVersion = '0.8.5'
|
||||
|
|
Loading…
Reference in New Issue
Block a user