Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12.2]Problems with custom Recipes


_Cruelar_
 Share

Recommended Posts

Somehow I managed to make a custom Craftingstation and custom Recipes. However I'm also able to craft them with the normal workbench. As my craftingstation is more expensive as a Workbench and is limited to 5 input slots this is quite annoying. So how would I avoid that other crafting stations can use this recipe? And also I don't want my Craftingstation to craft normal recipes. How would I do that.

My Code:

Block:

package com.cruelar.cruelars_triforcemod.blocks;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.inventory.cruelars_triforcemod;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;
import java.util.Random;

public class BlockCookingPot extends Block
{
    public static final int GUI_ID = 3;
    public static PropertyBool IS_BURNING=PropertyBool.create("is_burning");

    public BlockCookingPot()
    {
        super(Material.IRON);
        this.setRegistryName("cooking_pot");
        this.setUnlocalizedName(Cruelars_Triforcemod_Core.MODID+".cooking_pot");
        this.setCreativeTab(cruelars_triforcemod.CRUELARS_TRIFORCEMOD);
    }

    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, new IProperty[]{IS_BURNING});
    }

    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getStateFromMeta(int meta) {
        return getDefaultState()
                .withProperty(IS_BURNING, (meta & 2)>0);

    }

    @Override
    public int getMetaFromState(IBlockState blockState) {
        int i = 0;
        if ((boolean)blockState.getValue(IS_BURNING)){
            i |= 2;
        }
        return i;
    }

    @Override
    public int quantityDropped(Random random){
        return 0;
    }
    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

    public boolean isBed(IBlockState state, IBlockAccess world, BlockPos pos, @Nullable Entity player)
    {
        return true;
    }

    /**
     * Called when the block is right clicked by a player.
     */
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    {
        if (worldIn.isRemote)
        {
            return true;
        } else {
            ItemStack itemStack=playerIn.getHeldItem(hand);
            ItemStack itemStack1=null;
            if (!state.getValue(IS_BURNING)) {
                if (playerIn.getHeldItem(hand).getItem() == Items.FLINT_AND_STEEL) {
                    if (!playerIn.isCreative()) {
                        playerIn.getHeldItem(hand).damageItem(1, playerIn);
                    }
                    worldIn.setBlockState(pos, state.cycleProperty(IS_BURNING));
                }
                }else if (state.getValue(IS_BURNING)) {
                playerIn.openGui(Cruelars_Triforcemod_Core.instance, GUI_ID, worldIn, pos.getX(), pos.getY(),pos.getZ());
            }

            return true;
        }
    }

    @Override
    @SuppressWarnings("deprecation")
    public int getLightValue(IBlockState state)
    {
        return state.getValue(IS_BURNING)?15:0;
    }

    @SideOnly(Side.CLIENT)
    @Override
    public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
    {
        if (stateIn.getValue(IS_BURNING))
        {
            double d0 = (double)pos.getX() + 0.5D;
            double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
            double d2 = (double)pos.getZ() + 0.5D;
            double d3 = 0.52D;
            double d4 = rand.nextDouble() * 0.6D - 0.3D;

            if (rand.nextDouble() < 0.1D)
            {
                worldIn.playSound((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);
            }
            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D);
            worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D);
        }
    }

    @SideOnly(Side.CLIENT)
    @SuppressWarnings("deprecation")
    @Override
    public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos blockPos, EnumFacing side){
        return false;
    }

    @SuppressWarnings("deprecation")
    @Override
    public boolean isBlockNormalCube(IBlockState blockState){
        return false;
    }

    @SuppressWarnings("deprecation")
    @Override
    public boolean isOpaqueCube(IBlockState blockState){
        return false;
    }
}

Gui:

package com.cruelar.cruelars_triforcemod.gui;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.inventory.Cooking_Pot_Container;
import com.cruelar.cruelars_triforcemod.inventory.Pedestal_Of_Time_Container;
import com.cruelar.cruelars_triforcemod.tileentity.Pedestal_Of_Time_TileEntity;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;

public class Cooking_Pot_GUI extends GuiContainer {
    public static final int WIDTH = 176;
    public static final int HEIGHT = 166;

    private static final ResourceLocation background = new ResourceLocation(Cruelars_Triforcemod_Core.MODID, "textures/gui/cooking_pot_gui.png");

    public Cooking_Pot_GUI(Cooking_Pot_Container container) {
        super(container);

        xSize = WIDTH;
        ySize = HEIGHT;
    }

    public void drawScreen(int mouseX, int mouseY, float partialTicks)
    {
        this.drawDefaultBackground();
        super.drawScreen(mouseX, mouseY, partialTicks);
        this.renderHoveredToolTip(mouseX, mouseY);
    }

    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
        mc.getTextureManager().bindTexture(background);
        drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
    }
}

Container:

package com.cruelar.cruelars_triforcemod.inventory;

import com.cruelar.cruelars_triforcemod.blocks.BlockCookingPot;
import com.cruelar.cruelars_triforcemod.init.ModBlocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.*;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class Cooking_Pot_Container extends Container
{
    /** The crafting matrix inventory (5x1). */
    public InventoryCrafting craftMatrix = new InventoryCrafting(this, 5, 1);
    public InventoryCraftResult craftResult = new InventoryCraftResult();
    private final World world;
    /** Position of the workbench */
    private final BlockPos pos;
    private final EntityPlayer player;

    public Cooking_Pot_Container(InventoryPlayer playerInventory, World worldIn, BlockPos posIn)
    {
        this.world = worldIn;
        this.pos = posIn;
        this.player = playerInventory.player;
        this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 80, 58));

        for (int i = 0; i < 1; ++i)
        {
            for (int j = 0; j < 5; ++j)
            {
                this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 3, 44 + j * 18, 17 + i * 18));
            }
        }

        for (int k = 0; k < 3; ++k)
        {
            for (int i1 = 0; i1 < 9; ++i1)
            {
                this.addSlotToContainer(new Slot(playerInventory, i1 + k * 9 + 9, 8 + i1 * 18, 84 + k * 18));
            }
        }

        for (int l = 0; l < 9; ++l)
        {
            this.addSlotToContainer(new Slot(playerInventory, l, 8 + l * 18, 142));
        }
    }

    public InventoryCrafting getCraftMatrix() {
        return craftMatrix;
    }

    /**
     * Callback for when the crafting matrix is changed.
     */
    public void onCraftMatrixChanged(IInventory inventoryIn)
    {
        this.detectAndSendChanges();
        this.slotChangedCraftingGrid(this.world, this.player, this.craftMatrix, this.craftResult);
    }

    /**
     * Called when the container is closed.
     */
    public void onContainerClosed(EntityPlayer playerIn)
    {
        super.onContainerClosed(playerIn);

        if (!this.world.isRemote)
        {
            this.clearContainer(playerIn, this.world, this.craftMatrix);
        }
    }

    /**
     * Determines whether supplied player can use this container
     */
    public boolean canInteractWith(EntityPlayer playerIn)
    {
        if (!(this.world.getBlockState(this.pos).getBlock() instanceof BlockCookingPot))
        {
            return false;
        }
        else
        {
            return playerIn.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
        }
    }

    /**
     * Handle when the stack in slot {@code index} is shift-clicked. Normally this moves the stack between the player
     * inventory and the other inventory(s).
     */
    public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
    {
        ItemStack itemstack = ItemStack.EMPTY;
        Slot slot = this.inventorySlots.get(index);

        if (slot != null && slot.getHasStack())
        {
            ItemStack itemstack1 = slot.getStack();
            itemstack = itemstack1.copy();

            if (index == 0)
            {
                itemstack1.getItem().onCreated(itemstack1, this.world, playerIn);

                if (!this.mergeItemStack(itemstack1, 10, 46, true))
                {
                    return ItemStack.EMPTY;
                }

                slot.onSlotChange(itemstack1, itemstack);
            }
            else if (index >= 6 && index < 37)
            {
                if (!this.mergeItemStack(itemstack1, 37, 46, false))
                {
                    return ItemStack.EMPTY;
                }
            }
            else if (index >= 37 && index < 46)
            {
                if (!this.mergeItemStack(itemstack1, 10, 37, false))
                {
                    return ItemStack.EMPTY;
                }
            }
            else if (!this.mergeItemStack(itemstack1, 10, 46, false))
            {
                return ItemStack.EMPTY;
            }

            if (itemstack1.isEmpty())
            {
                slot.putStack(ItemStack.EMPTY);
            }
            else
            {
                slot.onSlotChanged();
            }

            if (itemstack1.getCount() == itemstack.getCount())
            {
                return ItemStack.EMPTY;
            }

            ItemStack itemstack2 = slot.onTake(playerIn, itemstack1);

            if (index == 0)
            {
                playerIn.dropItem(itemstack2, false);
            }
        }

        return itemstack;
    }

    /**
     * Called to determine if the current slot is valid for the stack merging (double-click) code. The stack passed in
     * is null for the initial slot that was double-clicked.
     */
    public boolean canMergeSlot(ItemStack stack, Slot slotIn)
    {
        return slotIn.inventory != this.craftResult && super.canMergeSlot(stack, slotIn);
    }
}

Recipes:

package com.cruelar.cruelars_triforcemod.recipes;

import com.google.common.collect.Lists;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.common.crafting.JsonContext;

import java.util.List;

public class CookingPotRecipes extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {

    /** Is the ItemStack that you get when craft the recipe. */
    private final ItemStack recipeOutput;
    /** Is a List of ItemStack that composes the recipe. */
    public final NonNullList<Ingredient> recipeItems;
    private final String group;
    private final boolean isSimple;

    public CookingPotRecipes(String group, ItemStack output, NonNullList<Ingredient> ingredients)
    {
        this.group = group;
        this.recipeOutput = output;
        this.recipeItems = ingredients;
        boolean simple = true;
        for (Ingredient i : ingredients)
            simple &= i.isSimple();
        this.isSimple = simple;
    }

    @Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }

            if (ingredientCount != this.recipeItems.size())
                return false;

            if (this.isSimple)
                return recipeItemHelper.canCraft(this, null);

            return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
    }

    public static CookingPotRecipes deserialize(JsonObject json)
    {
        String s = JsonUtils.getString(json, "group", "");
        NonNullList<Ingredient> nonnulllist = deserializeIngredients(JsonUtils.getJsonArray(json, "ingredients"));

        if (nonnulllist.isEmpty())
        {
            throw new JsonParseException("No ingredients for cooking_pot recipe");
        }
        else if (nonnulllist.size() > 5)
        {
            throw new JsonParseException("Too many ingredients for cooking_pot recipe");
        }
        else
        {
            ItemStack itemstack = ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
            return new CookingPotRecipes(s, itemstack, nonnulllist);
        }
    }

    public static NonNullList<Ingredient> deserializeIngredients(JsonArray array)
    {
        NonNullList<Ingredient> nonnulllist = NonNullList.<Ingredient>create();

        for (int i = 0; i < array.size(); ++i)
        {
            Ingredient ingredient = ShapedRecipes.deserializeIngredient(array.get(i));

            if (ingredient != Ingredient.EMPTY)
            {
                nonnulllist.add(ingredient);
            }
        }

        return nonnulllist;
    }

    @Override
    public ItemStack getCraftingResult(InventoryCrafting inv) {
        return this.recipeOutput.copy();
    }

    @Override
    public boolean canFit(int width, int height) {
        return width * height >= this.recipeItems.size();
    }

    @Override
    public ItemStack getRecipeOutput() {
        return this.recipeOutput;
    }

    @Override
    public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
        NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>withSize(inv.getSizeInventory(), ItemStack.EMPTY);

        for (int i = 0; i < nonnulllist.size(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
        }

        return nonnulllist;
    }

    @Override
    public NonNullList<Ingredient> getIngredients() {
        return this.recipeItems;
    }

    @Override
    public String getGroup() {
        return this.group;
    }

    public static class Factory implements IRecipeFactory {
        @Override
        public IRecipe parse(JsonContext context, JsonObject json) {
            final NonNullList<Ingredient> ingredients = deserializeIngredients(json.getAsJsonArray("ingredients"));
            final ItemStack result = CraftingHelper.getItemStack(JsonUtils.getJsonObject(json, "result"), context);

            return new CookingPotRecipes(JsonUtils.getString(json, "group", "cruelars_triforcemod:cooking_pot"), result,ingredients);
        }
    }
}

Testrecipe(works on both workbench and my craftingstation):

{
  "result": {
    "item": "minecraft:golden_apple",
    "data":0
  },
  "type": "cruelars_triforcemod:cooking_pot",
  "ingredients": [
    {
      "item": "minecraft:apple"
    },
    {
      "item": "minecraft:apple"
    },
    {
      "item": "minecraft:apple"
    },
    {
      "item": "minecraft:apple"
    },
    {
      "item": "minecraft:apple"
    }
  ]
}

_factories.json

{
  "recipes": {
    "cooking_pot":"com.cruelar.cruelars_triforcemod.recipes.CookingPotRecipes$Factory"
  }
}

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Your IRecipe class doesn't attempt to distinguish the crafting bench from your cooking pot.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

How? I didn't find a way to check for my InventoryCrafting called craftMatrix. Isn't static and can't make it static.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Less slots, more slots, a different class...

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Okay maybe I'm just an idiot but could you explain  that. How would I get the Class of my Workbench or Container using InventoryCrafting?

Here's what I tried:

@Override
    public boolean matches(InventoryCrafting inv, World worldIn) {

            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
        if (inv == Cooking_Pot_Container.INSTANCE.craftMatrix){
            if (ingredientCount != this.recipeItems.size())
                return false;

            if (this.isSimple)
                return recipeItemHelper.canCraft(this, null);

            return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
        }else{
            return false;
        }

    }

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Well the crafting matrix is 5x1, you should be able to detect that fairly easily.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

So like this?

@Override
    public boolean matches(InventoryCrafting inv, World worldIn) {

            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
        if (inv.getWidth()==5&&inv.getHeight()==1){
            if (ingredientCount != this.recipeItems.size())
                return false;

            if (this.isSimple)
                return recipeItemHelper.canCraft(this, null);

            return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
        }else{
            return false;
        }

    }

This indeed works but would every other mods workbench with this size also be able to use it?

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Alternatively the InventoryCrafting has a Container field named eventHandler that holds the reference to the parent container of the inventory. Reflect that field, get it's value and check if it is your container(or better yet a common interface of some kind to allow other mods to potentially implement custom crafters for your recipes)

  • Thanks 1
Link to comment
Share on other sites

@V0idWa1k3r this is a really good idea but i need some help on how to do this as I'm never used ReflectionHelper so far.

What I have after reading this topic.

@Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
        Field container=ReflectionHelper.findField(InventoryCrafting.class,"eventHandler");

            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
            try {
                if (container.get(InventoryCrafting.eventHandler) ){//<-Not sure what to put here. Also IntelliJ yells at me that eventHandler is private
                    if (ingredientCount != this.recipeItems.size())
                        return false;

                    if (this.isSimple)
                        return recipeItemHelper.canCraft(this, null);

                    return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
                }else{
                    return false;
                }
            }catch (IllegalAccessException e){
                e.printStackTrace();
                throw new RuntimeException("Get Crafting Container failed!");
            }

    }

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

14 minutes ago, _Cruelar_ said:

Field container=ReflectionHelper.findField(InventoryCrafting.class,"eventHandler");

This must be static and final. And you also must provide a SRG name otherwise this will not work in a non-dev environment.

 

15 minutes ago, _Cruelar_ said:

container.get(InventoryCrafting.eventHandler)

Java's docs on reflection. The get method takes an instance of the class that field belongs to to get the value for that specific instance. Then check if the object you get is an instance of your container/interface.

 

17 minutes ago, _Cruelar_ said:

Also IntelliJ yells at me that eventHandler is private

You must set the field to be accessible before getting it's value since it's private using Field#setAccessible. 

Link to comment
Share on other sites

ReflectionHelper also has a method called GetPrivateValue which does it for you.

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

How do I get a Instance of InventoryCrafting and how should I make it static final? I can't assign a value to the field in my method then. Also where do I get the source names?

@Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
        final Field container=ReflectionHelper.findField(InventoryCrafting.class,"eventHandler",/*source name*/);
        container.setAccessible(true);
            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
            try {
                if (container.get(/*InventoryCrafting instance*/)instanceof ICookingPot){
                    if (ingredientCount != this.recipeItems.size())
                        return false;

                    if (this.isSimple)
                        return recipeItemHelper.canCraft(this, null);

                    return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
                }else{
                    return false;
                }
            }catch (IllegalAccessException e){
                e.printStackTrace();
                throw new RuntimeException("Get Crafting Container failed!");
            }

    }

Soory if I'm an idiot but I never did something like that started modding around 3  months ago

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Posted same moment as Draco.

Still

4 minutes ago, _Cruelar_ said:

Also where do I get the source names?

Except that it seems to work.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

5 minutes ago, _Cruelar_ said:

final Field container=ReflectionHelper.findField(InventoryCrafting.class,"eventHandler",/*source name*/);

This should be outside your method. It should be static and final at the class level, like all other static fields.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Yes indeed should have thought of that. Got confused by the huge amount of code in there I not fully understand.

I use getPrivateValue now. seems to work. I only need the source name now(I think)

package com.cruelar.cruelars_triforcemod.recipes;

import com.cruelar.cruelars_triforcemod.inventory.ICookingPot;
import com.google.common.collect.Lists;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.common.crafting.JsonContext;
import net.minecraftforge.fml.relauncher.ReflectionHelper;

import java.lang.reflect.Field;
import java.util.List;

public class CookingPotRecipes extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {

    /** Is the ItemStack that you get when craft the recipe. */
    private final ItemStack recipeOutput;
    /** Is a List of ItemStack that composes the recipe. */
    public final NonNullList<Ingredient> recipeItems;
    private final String group;
    private final boolean isSimple;

    public CookingPotRecipes(String group, ItemStack output, NonNullList<Ingredient> ingredients)
    {
        this.group = group;
        this.recipeOutput = output;
        this.recipeItems = ingredients;
        boolean simple = true;
        for (Ingredient i : ingredients)
            simple &= i.isSimple();
        this.isSimple = simple;
    }

    @Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
        Container iCookingPot=(Container) ReflectionHelper.getPrivateValue(InventoryCrafting.class, inv,"eventHandler");
            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
                if (iCookingPot instanceof ICookingPot){
                    if (ingredientCount != this.recipeItems.size())
                        return false;

                    if (this.isSimple)
                        return recipeItemHelper.canCraft(this, null);

                    return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
                }else{
                    return false;
                }


    }

    public static CookingPotRecipes deserialize(JsonObject json)
    {
        String s = JsonUtils.getString(json, "group", "");
        NonNullList<Ingredient> nonnulllist = deserializeIngredients(JsonUtils.getJsonArray(json, "ingredients"));

        if (nonnulllist.isEmpty())
        {
            throw new JsonParseException("No ingredients for cooking_pot recipe");
        }
        else if (nonnulllist.size() > 5)
        {
            throw new JsonParseException("Too many ingredients for cooking_pot recipe");
        }
        else
        {
            ItemStack itemstack = ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
            return new CookingPotRecipes(s, itemstack, nonnulllist);
        }
    }

    public static NonNullList<Ingredient> deserializeIngredients(JsonArray array)
    {
        NonNullList<Ingredient> nonnulllist = NonNullList.<Ingredient>create();

        for (int i = 0; i < array.size(); ++i)
        {
            Ingredient ingredient = ShapedRecipes.deserializeIngredient(array.get(i));

            if (ingredient != Ingredient.EMPTY)
            {
                nonnulllist.add(ingredient);
            }
        }

        return nonnulllist;
    }

    @Override
    public ItemStack getCraftingResult(InventoryCrafting inv) {
        return this.recipeOutput.copy();
    }

    @Override
    public boolean canFit(int width, int height) {
        return width * height >= this.recipeItems.size();
    }

    @Override
    public ItemStack getRecipeOutput() {
        return this.recipeOutput;
    }

    @Override
    public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
        NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>withSize(inv.getSizeInventory(), ItemStack.EMPTY);

        for (int i = 0; i < nonnulllist.size(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
        }

        return nonnulllist;
    }

    @Override
    public NonNullList<Ingredient> getIngredients() {
        return this.recipeItems;
    }

    @Override
    public String getGroup() {
        return this.group;
    }

    public static class Factory implements IRecipeFactory {
        @Override
        public IRecipe parse(JsonContext context, JsonObject json) {
            return deserialize(json);
        }
    }
}

 

Edited by _Cruelar_

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

More like this?

package com.cruelar.cruelars_triforcemod.recipes;

import com.cruelar.cruelars_triforcemod.inventory.ICookingPot;
import com.google.common.collect.Lists;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.common.crafting.JsonContext;
import net.minecraftforge.fml.relauncher.ReflectionHelper;

import java.lang.reflect.Field;
import java.util.List;

public class CookingPotRecipes extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {

    /** Is the ItemStack that you get when craft the recipe. */
    private final ItemStack recipeOutput;
    /** Is a List of ItemStack that composes the recipe. */
    public final NonNullList<Ingredient> recipeItems;
    private final String group;
    private final boolean isSimple;
    public static final Field container = ReflectionHelper.findField(InventoryCrafting.class,"eventHandler","field_70465_c");

    public CookingPotRecipes(String group, ItemStack output, NonNullList<Ingredient> ingredients)
    {
        this.group = group;
        this.recipeOutput = output;
        this.recipeItems = ingredients;
        boolean simple = true;
        for (Ingredient i : ingredients)
            simple &= i.isSimple();
        this.isSimple = simple;
    }

    @Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
        try {
            if ((Container)container.get(inv) instanceof ICookingPot){
                if (ingredientCount != this.recipeItems.size())
                    return false;

                if (this.isSimple)
                    return recipeItemHelper.canCraft(this, null);

                return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
            }else{
                return false;
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            throw new RuntimeException("Fatal error occurred during recipe checking");
        }


    }

    public static CookingPotRecipes deserialize(JsonObject json)
    {
        String s = JsonUtils.getString(json, "group", "");
        NonNullList<Ingredient> nonnulllist = deserializeIngredients(JsonUtils.getJsonArray(json, "ingredients"));

        if (nonnulllist.isEmpty())
        {
            throw new JsonParseException("No ingredients for cooking_pot recipe");
        }
        else if (nonnulllist.size() > 5)
        {
            throw new JsonParseException("Too many ingredients for cooking_pot recipe");
        }
        else
        {
            ItemStack itemstack = ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
            return new CookingPotRecipes(s, itemstack, nonnulllist);
        }
    }

    public static NonNullList<Ingredient> deserializeIngredients(JsonArray array)
    {
        NonNullList<Ingredient> nonnulllist = NonNullList.<Ingredient>create();

        for (int i = 0; i < array.size(); ++i)
        {
            Ingredient ingredient = ShapedRecipes.deserializeIngredient(array.get(i));

            if (ingredient != Ingredient.EMPTY)
            {
                nonnulllist.add(ingredient);
            }
        }

        return nonnulllist;
    }

    @Override
    public ItemStack getCraftingResult(InventoryCrafting inv) {
        return this.recipeOutput.copy();
    }

    @Override
    public boolean canFit(int width, int height) {
        return width * height >= this.recipeItems.size();
    }

    @Override
    public ItemStack getRecipeOutput() {
        return this.recipeOutput;
    }

    @Override
    public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
        NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>withSize(inv.getSizeInventory(), ItemStack.EMPTY);

        for (int i = 0; i < nonnulllist.size(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
        }

        return nonnulllist;
    }

    @Override
    public NonNullList<Ingredient> getIngredients() {
        return this.recipeItems;
    }

    @Override
    public String getGroup() {
        return this.group;
    }

    /**
     * Example JSON recipe:<br>
     * &emsp;{<br>
     * &emsp;&emsp;"result": {<br>
     * &emsp;&emsp;&emsp;"item": "minecraft:golden_apple",<br>
     * &emsp;&emsp;&emsp;"data":0<br>
     * &emsp;&emsp;},<br>
     * &emsp;&emsp;"type": "cruelars_triforcemod:cooking_pot",<br>
     * &emsp;&emsp;"ingredients": [<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;}<br>
     * &emsp;&emsp;]<br>
     * &emsp;}<br>
     */

    public static class Factory implements IRecipeFactory {
        @Override
        public IRecipe parse(JsonContext context, JsonObject json) {
            return deserialize(json);
        }
    }
}

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Is there a way to say that he can take more than the Recipe request? So like slots 1 to 4 are filled with the needed items and the slot 5 has an additional item.

My Current code:

package com.cruelar.cruelars_triforcemod.recipes;

import com.cruelar.cruelars_triforcemod.init.ModBlocks;
import com.cruelar.cruelars_triforcemod.init.ModItems;
import com.cruelar.cruelars_triforcemod.inventory.ICookingPot;
import com.google.common.collect.Lists;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.common.crafting.JsonContext;
import net.minecraftforge.fml.relauncher.ReflectionHelper;

import java.lang.reflect.Field;
import java.util.List;

public class CookingPotRecipes extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {

    /** Is the ItemStack that you get when craft the recipe. */
    private final ItemStack recipeOutput;
    /** Is a List of ItemStack that composes the recipe. */
    public final NonNullList<Ingredient> recipeItems;
    private final String group;
    private final boolean isSimple;
    public static final Field container = ReflectionHelper.findField(InventoryCrafting.class,"eventHandler","field_70465_c");

    public CookingPotRecipes(String group, ItemStack output, NonNullList<Ingredient> ingredients)
    {
        this.group = group;
        this.recipeOutput = output;
        this.recipeItems = ingredients;
        boolean simple = true;
        for (Ingredient i : ingredients)
            simple &= i.isSimple();
        this.isSimple = simple;
    }

    @Override
    public boolean matches(InventoryCrafting inv, World worldIn) {
            int ingredientCount = 0;
            net.minecraft.client.util.RecipeItemHelper recipeItemHelper = new net.minecraft.client.util.RecipeItemHelper();
            List<ItemStack> inputs = Lists.newArrayList();
            List<ItemStack> inputs2;
            for (int i = 0; i < inv.getHeight(); ++i) {
                for (int j = 0; j < inv.getWidth(); ++j) {
                    ItemStack itemstack = inv.getStackInRowAndColumn(j, i);

                    if (!itemstack.isEmpty()) {
                        ++ingredientCount;
                        if (this.isSimple)
                            recipeItemHelper.accountStack(itemstack, 1);
                        else
                            inputs.add(itemstack);
                    }
                }
            }
        try {
            if ((Container)container.get(inv) instanceof ICookingPot){

                if (this.isSimple)
                    return recipeItemHelper.canCraft(this, null);
                if(net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null) {
                    return true;
                }else {
                    inputs2=inputs;
                    inputs2.remove(0);
                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null){
                        return true;
                    }else {
                        inputs2 = inputs;
                        inputs2.remove(1);
                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                            return true;
                        } else {
                            inputs2 = inputs;
                            inputs2.remove(2);
                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                return true;
                            } else {
                                inputs2 = inputs;
                                inputs2.remove(3);
                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                    return true;
                                }else {
                                    inputs2 = inputs;
                                    inputs2.remove(4);
                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                        return true;
                                    }else {
                                        inputs2 = inputs;
                                        inputs2.remove(0);
                                        inputs2.remove(1);
                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                            return true;
                                        }else {
                                            inputs2 = inputs;
                                            inputs2.remove(0);
                                            inputs2.remove(2);
                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                return true;
                                            }else {
                                                inputs2 = inputs;
                                                inputs2.remove(0);
                                                inputs2.remove(3);
                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                    return true;
                                                }else {
                                                    inputs2 = inputs;
                                                    inputs2.remove(0);
                                                    inputs2.remove(4);
                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                        return true;
                                                    }else {
                                                        inputs2 = inputs;
                                                        inputs2.remove(1);
                                                        inputs2.remove(2);
                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                            return true;
                                                        }else {
                                                            inputs2 = inputs;
                                                            inputs2.remove(1);
                                                            inputs2.remove(3);
                                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                return true;
                                                            }else {
                                                                inputs2 = inputs;
                                                                inputs2.remove(1);
                                                                inputs2.remove(4);
                                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                    return true;
                                                                }else {
                                                                    inputs2 = inputs;
                                                                    inputs2.remove(2);
                                                                    inputs2.remove(3);
                                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                        return true;
                                                                    }else {
                                                                        inputs2 = inputs;
                                                                        inputs2.remove(2);
                                                                        inputs2.remove(4);
                                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                            return true;
                                                                        }else {
                                                                            inputs2 = inputs;
                                                                            inputs2.remove(3);
                                                                            inputs2.remove(4);
                                                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                return true;
                                                                            }else {
                                                                                inputs2 = inputs;
                                                                                inputs2.remove(0);
                                                                                inputs2.remove(1);
                                                                                inputs2.remove(2);
                                                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                    return true;
                                                                                }else {
                                                                                    inputs2 = inputs;
                                                                                    inputs2.remove(0);
                                                                                    inputs2.remove(1);
                                                                                    inputs2.remove(3);
                                                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                        return true;
                                                                                    }else {
                                                                                        inputs2 = inputs;
                                                                                        inputs2.remove(0);
                                                                                        inputs2.remove(1);
                                                                                        inputs2.remove(4);
                                                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                            return true;
                                                                                        }else {
                                                                                            inputs2 = inputs;
                                                                                            inputs2.remove(0);
                                                                                            inputs2.remove(2);
                                                                                            inputs2.remove(3);
                                                                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                return true;
                                                                                            }else {
                                                                                                inputs2 = inputs;
                                                                                                inputs2.remove(0);
                                                                                                inputs2.remove(2);
                                                                                                inputs2.remove(4);
                                                                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                    return true;
                                                                                                }else {
                                                                                                    inputs2 = inputs;
                                                                                                    inputs2.remove(0);
                                                                                                    inputs2.remove(3);
                                                                                                    inputs2.remove(4);
                                                                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                        return true;
                                                                                                    }else {
                                                                                                        inputs2 = inputs;
                                                                                                        inputs2.remove(1);
                                                                                                        inputs2.remove(2);
                                                                                                        inputs2.remove(3);
                                                                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                            return true;
                                                                                                        }else {
                                                                                                            inputs2 = inputs;
                                                                                                            inputs2.remove(1);
                                                                                                            inputs2.remove(2);
                                                                                                            inputs2.remove(4);
                                                                                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                return true;
                                                                                                            }else {
                                                                                                                inputs2 = inputs;
                                                                                                                inputs2.remove(1);
                                                                                                                inputs2.remove(3);
                                                                                                                inputs2.remove(4);
                                                                                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                    return true;
                                                                                                                }else {
                                                                                                                    inputs2 = inputs;
                                                                                                                    inputs2.remove(2);
                                                                                                                    inputs2.remove(3);
                                                                                                                    inputs2.remove(4);
                                                                                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                        return true;
                                                                                                                    }else {
                                                                                                                        inputs2 = inputs;
                                                                                                                        inputs2.remove(0);
                                                                                                                        inputs2.remove(1);
                                                                                                                        inputs2.remove(2);
                                                                                                                        inputs2.remove(3);
                                                                                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                            return true;
                                                                                                                        }else {
                                                                                                                            inputs2 = inputs;
                                                                                                                            inputs2.remove(0);
                                                                                                                            inputs2.remove(1);
                                                                                                                            inputs2.remove(2);
                                                                                                                            inputs2.remove(4);
                                                                                                                            if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                                return true;
                                                                                                                            }else {
                                                                                                                                inputs2 = inputs;
                                                                                                                                inputs2.remove(0);
                                                                                                                                inputs2.remove(1);
                                                                                                                                inputs2.remove(3);
                                                                                                                                inputs2.remove(4);
                                                                                                                                if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                                    return true;
                                                                                                                                }else {
                                                                                                                                    inputs2 = inputs;
                                                                                                                                    inputs2.remove(0);
                                                                                                                                    inputs2.remove(2);
                                                                                                                                    inputs2.remove(3);
                                                                                                                                    inputs2.remove(4);
                                                                                                                                    if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                                        return true;
                                                                                                                                    }else {
                                                                                                                                        inputs2 = inputs;
                                                                                                                                        inputs2.remove(1);
                                                                                                                                        inputs2.remove(2);
                                                                                                                                        inputs2.remove(3);
                                                                                                                                        inputs2.remove(4);
                                                                                                                                        if (net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs2, this.recipeItems) != null) {
                                                                                                                                            return true;
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }else{
                return net.minecraftforge.common.util.RecipeMatcher.findMatches(inputs, this.recipeItems) != null;
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            throw new RuntimeException("Fatal error occurred during recipe checking");
        }
        return false;

    }

    public static CookingPotRecipes deserialize(JsonObject json)
    {
        String s = JsonUtils.getString(json, "group", "");
        NonNullList<Ingredient> nonnulllist = deserializeIngredients(JsonUtils.getJsonArray(json, "ingredients"));

        if (nonnulllist.isEmpty())
        {
            throw new JsonParseException("No ingredients for cooking_pot recipe");
        }
        else if (nonnulllist.size() > 5)
        {
            throw new JsonParseException("Too many ingredients for cooking_pot recipe");
        }
        else
        {
            boolean hard=false;
            boolean nonFood=false;
            ItemStack itemstack=ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
            String[] items=new String[5];
            for (int i=0;i<nonnulllist.size();i++){
                if (CookingPotDataBase.isHard(nonnulllist.get(i).getMatchingStacks()[0])){
                    hard=true;
                    break;
                }
                if (CookingPotDataBase.isNoUse(nonnulllist.get(i).getMatchingStacks()[0])){
                    nonFood=true;
                    break;
                }
                if (CookingPotDataBase.isFood(nonnulllist.get(i).getMatchingStacks()[0])){

                    if (CookingPotDataBase.isFruit(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="fruit";
                    }
                    if (CookingPotDataBase.isMushroom(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="mushroom";
                    }
                    if (CookingPotDataBase.isVegetable(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="vegetable";
                    }
                    if (CookingPotDataBase.isRedMeat(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="red_meat";
                    }
                    if (CookingPotDataBase.isPoultry(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="poultry";
                    }
                    if (CookingPotDataBase.isCrap(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="crap";
                    }
                    if (CookingPotDataBase.isFishOrSnail(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="fish_or_snail";
                    }
                    if (CookingPotDataBase.isMisc(nonnulllist.get(i).getMatchingStacks()[0])&&nonnulllist.get(i).getMatchingStacks()[0].getItem()!=Items.MILK_BUCKET){
                        items[i]="misc";
                    }
                    if (CookingPotDataBase.isFlowerOrHerb(nonnulllist.get(i).getMatchingStacks()[0])){
                        items[i]="flower_or_herb";
                    }
                }
            }
            if (hard){
                itemstack=new ItemStack(ModItems.rock_hard_food);
            }else if (nonFood) {
                itemstack = new ItemStack(ModItems.dubios_food);
            }else if (items[0]!=null&&items[1]!=null&&items[2]!=null&&items[3]!=null&&items[4]!=null){
                if (items[0].equals("misc")&&items[1].equals("misc")&&items[2].equals("misc")&&items[3].equals("misc")&&items[4].equals("misc")) {
                    itemstack = new ItemStack(ModItems.dubios_food);
                }
            }else if (items[0]!=null&&items[1]!=null&&items[2]!=null&&items[3]!=null){
                if (items[0].equals("misc")&&items[1].equals("misc")&&items[2].equals("misc")&&items[3].equals("misc")) {
                    itemstack = new ItemStack(ModItems.dubios_food);
                }
            }else if (items[0]!=null&&items[1]!=null&&items[2]!=null){
                if (items[0].equals("misc")&&items[1].equals("misc")&&items[2].equals("misc")) {
                    itemstack = new ItemStack(ModItems.dubios_food);
                }
            }else if (items[0]!=null&&items[1]!=null){
                if (items[0].equals("misc")&&items[1].equals("misc")) {
                    itemstack = new ItemStack(ModItems.dubios_food);
                }
            }else if (items[0]!=null){
                if (items[0].equals("misc")) {
                    itemstack = new ItemStack(ModItems.dubios_food);
                }
            }
            else {
                itemstack = ShapedRecipes.deserializeItem(JsonUtils.getJsonObject(json, "result"), true);
            }
            if (itemstack.getItem() instanceof ItemCookingPotResult){
                int HP=0;
                for (Ingredient aNonnulllist : nonnulllist) {
                    HP += CookingPotDataBase.getHealAmount(aNonnulllist.getMatchingStacks()[0]);
                }
                ((ItemCookingPotResult)itemstack.getItem()).getTagCompoundSafe(itemstack).setInteger("cruelars_triforcemod.heal_amount",HP);
            }
            return new CookingPotRecipes(s, itemstack, nonnulllist);
        }
    }

    public static NonNullList<Ingredient> deserializeIngredients(JsonArray array)
    {
        NonNullList<Ingredient> nonnulllist = NonNullList.<Ingredient>create();

        for (int i = 0; i < array.size(); ++i)
        {
            Ingredient ingredient = ShapedRecipes.deserializeIngredient(array.get(i));

            if (ingredient != Ingredient.EMPTY)
            {
                nonnulllist.add(ingredient);
            }
        }

        return nonnulllist;
    }

    @Override
    public ItemStack getCraftingResult(InventoryCrafting inv) {
        return this.recipeOutput.copy();
    }

    @Override
    public boolean canFit(int width, int height) {
        return width * height >= this.recipeItems.size();
    }

    @Override
    public ItemStack getRecipeOutput() {
        return this.recipeOutput;
    }

    @Override
    public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
        NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>withSize(inv.getSizeInventory(), ItemStack.EMPTY);

        for (int i = 0; i < nonnulllist.size(); ++i)
        {
            ItemStack itemstack = inv.getStackInSlot(i);

            nonnulllist.set(i, net.minecraftforge.common.ForgeHooks.getContainerItem(itemstack));
        }

        return nonnulllist;
    }

    @Override
    public NonNullList<Ingredient> getIngredients() {
        return this.recipeItems;
    }

    @Override
    public String getGroup() {
        return this.group;
    }

    /**
     * Example JSON recipe:<br>
     * &emsp;{<br>
     * &emsp;&emsp;"result": {<br>
     * &emsp;&emsp;&emsp;"item": "minecraft:golden_apple",<br>
     * &emsp;&emsp;&emsp;"data":0<br>
     * &emsp;&emsp;},<br>
     * &emsp;&emsp;"type": "cruelars_triforcemod:cooking_pot",<br>
     * &emsp;&emsp;"ingredients": [<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;},<br>
     * &emsp;&emsp;&emsp;{<br>
     * &emsp;&emsp;&emsp;&emsp;"item": "minecraft:apple"<br>
     * &emsp;&emsp;&emsp;}<br>
     * &emsp;&emsp;]<br>
     * &emsp;}<br>
     */

    public static class Factory implements IRecipeFactory {
        @Override
        public IRecipe parse(JsonContext context, JsonObject json) {
            return deserialize(json);
        }
    }
}

This works but has the Problem that the recipes which start with a come before those who start with b etc.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.16.5 forge server I used for me and a friend doesnt work. Un/Reinstalled Java 8 64bits and thats when it didnt work. Everything except this 1.16.5 forge server. All my other server versions work. (1.5.2 ~ 1.16.4) RLCRAFT modded server 1.12.2 works. Debug log: https://github.com/telodxpd/stress.git Crash log: C:\Users\User\Desktop\1.16.5 forge>"C:\Program Files\Java\jre1.8.0_321\bin\java.exe" -Xmx3G -jar forge.jar 2022-01-19 11:03:39,915 main WARN Advanced terminal features are not available in this environment [11:03:39] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.8, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge] [11:03:40] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_321 by Oracle Corporation [11:03:40] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [11:03:40] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/C:/Users/User/Desktop/1.16.5%20forge/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar Service=ModLauncher Env=SERVER [11:03:41] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, .] [11:03:41] [main/ERROR] [mixin/]: Error loading companion plugin class [me.shedaniel.architectury.plugin.forge.ArchitecturyMixinPlugin] for mixin config [architectury.mixins.json]. The plugin may be out of date: NoSuchMethodError:sun.security.util.ManifestEntryVerifier.<init>(Ljava/util/jar/Manifest;)V java.lang.NoSuchMethodError: sun.security.util.ManifestEntryVerifier.<init>(Ljava/util/jar/Manifest;)V         at cpw.mods.modlauncher.SecureJarHandler.createCodeSource(SecureJarHandler.java:66) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:275) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?] {}         at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_321] {}         at java.lang.Class.forName0(Native Method) ~[?:1.8.0_321] {}         at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_321] {}         at org.spongepowered.asm.service.modlauncher.ModLauncherClassProvider.findClass(ModLauncherClassProvider.java:76) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.PluginHandle.<init>(PluginHandle.java:96) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinConfig.onSelect(MixinConfig.java:706) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinProcessor.selectConfigs(MixinProcessor.java:498) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinProcessor.select(MixinProcessor.java:460) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinProcessor.checkSelect(MixinProcessor.java:438) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:290) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.4.jar:0.8.4+Jenkins-b308.git-2accda5000f7602229606b39437565542cc6fba4] {}         at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) ~[modlauncher-8.0.9.jar:8.0.9+86+master.3cf110c] {}         at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.0.9.jar:?] {}         at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_321] {}         at java.lang.Class.forName0(Native Method) ~[?:1.8.0_321] {}         at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_321] {}         at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) ~[forge.jar:36.2] {}         at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {}         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [forge.jar:?] {}         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [forge.jar:?] {}         at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) [forge.jar:?] {} [11:03:41] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screen/CreateWorldScreen for invalid dist DEDICATED_SERVER [11:03:41] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/gui/screen/CreateWorldScreen (java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/CreateWorldScreen for invalid dist DEDICATED_SERVER) [11:03:41] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.gui.screen.CreateWorldScreen was not found mixins.defaultoptions.json:CreateWorldScreenAccessor [11:03:41] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/GameSettings for invalid dist DEDICATED_SERVER [11:03:41] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/GameSettings (java.lang.RuntimeException: Attempted to load class net/minecraft/client/GameSettings for invalid dist DEDICATED_SERVER) [11:03:41] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.GameSettings was not found mixins.defaultoptions.json:GameSettingsMixin Exception in thread "main" [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NoSuchMethodError: sun.security.util.ManifestEntryVerifier.<init>(Ljava/util/jar/Manifest;)V [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.SecureJarHandler.createCodeSource(SecureJarHandler.java:66) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:275) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.Class.forName0(Native Method) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.Class.forName(Unknown Source) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [11:03:41] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) C:\Users\User\Desktop\1.16.5 forge>PAUSE
    • Amazing Players, Staff and Server.. I been playing on this server for a few years now and all the others don't come close to how much fun I have on here.. 
    • Yeah I realize I have a lot of mods. and that also might be my problem.  
    • So when I try to scope with a gun in a server it will say saving game then crash   ---- Minecraft Crash Report ---- // I let you down. Sorry :( Time: 1/18/22 7:57 PM Description: Unexpected error java.lang.ArrayIndexOutOfBoundsException: 9     at net.minecraft.client.MouseHelper.localvar$zhh001$sensitivity(MouseHelper.java:1044) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198028_a(MouseHelper.java:244) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198022_b(MouseHelper.java:232) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_228033_f_(MouseHelper.java:177) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$10564/1266407562.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(SourceFile:94) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at net.minecraft.client.MouseHelper.func_228032_e_(MouseHelper.java:176) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$10338/1089852811.invoke(Unknown Source) ~[?:?] {}     at org.lwjgl.glfw.GLFWCursorPosCallbackI.callback(GLFWCursorPosCallbackI.java:37) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}     at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at com.mojang.blaze3d.systems.RenderSystem.flipFrame(SourceFile:102) ~[?:?] {re:classloading,re:mixin}     at net.minecraft.client.MainWindow.func_227802_e_(MainWindow.java:305) ~[?:?] {re:classloading,pl:runtimedistcleaner:A,re:mixin,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:997) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {re:computing_frames}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.9.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$486/396821493.call(Unknown Source) [forge-1.16.5-36.2.9.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at net.minecraft.client.MouseHelper.localvar$zhh001$sensitivity(MouseHelper.java:1044) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198028_a(MouseHelper.java:244) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198022_b(MouseHelper.java:232) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_228033_f_(MouseHelper.java:177) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$10564/1266407562.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(SourceFile:94) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at net.minecraft.client.MouseHelper.func_228032_e_(MouseHelper.java:176) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:cgm.mixins.json:client.MouseHelperMixin,pl:mixin:APP:tac.mixins.json:client.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$10338/1089852811.invoke(Unknown Source) ~[?:?] {}     at org.lwjgl.glfw.GLFWCursorPosCallbackI.callback(GLFWCursorPosCallbackI.java:37) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}     at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at com.mojang.blaze3d.systems.RenderSystem.flipFrame(SourceFile:102) ~[?:?] {re:classloading,re:mixin} -- Affected level -- Details:     All players: 1 total; [ClientPlayerEntity['Asuramaru_Tempes'/14455, l='ClientLevel', x=462.70, y=79.00, z=530.76]]     Chunk stats: Client Chunk Cache: 729, 441     Level dimension: minecraft:overworld     Level spawn location: World: (-224,63,176), Chunk: (at 0,3,0 in -14,11; contains blocks -224,0,176 to -209,255,191), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)     Level time: 3196542 game time, 3556298 day time     Server brand: forge     Server type: Non-integrated multiplayer server Stacktrace:     at net.minecraft.client.world.ClientWorld.func_72914_a(ClientWorld.java:447) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:abnormals_core.mixins.json:client.ClientWorldMixin,pl:mixin:APP:endergetic.mixins.json:ClientWorldMixin,pl:mixin:APP:architectury.mixins.json:MixinClientLevel,pl:mixin:APP:enhancedcelestials.mixins.json:client.MixinClientWorld,pl:mixin:APP:create.mixins.json:BreakProgressMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2030) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:628) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {re:computing_frames}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.9.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$486/396821493.call(Unknown Source) [forge-1.16.5-36.2.9.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} -- System Details -- Details:     Minecraft Version: 1.16.5     Minecraft Version ID: 1.16.5     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 506481952 bytes (483 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)     CPUs: 8     JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -XX:+IgnoreUnrecognizedVMOptions -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     ModLauncher: 8.0.9+86+master.3cf110c     ModLauncher launch target: fmlclient     ModLauncher naming: srg     ModLauncher services:          /mixin-0.8.4.jar mixin PLUGINSERVICE          /eventbus-4.0.0.jar eventbus PLUGINSERVICE          /forge-1.16.5-36.2.9.jar object_holder_definalize PLUGINSERVICE          /forge-1.16.5-36.2.9.jar runtime_enum_extender PLUGINSERVICE          /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE          /forge-1.16.5-36.2.9.jar capability_inject_definalize PLUGINSERVICE          /forge-1.16.5-36.2.9.jar runtimedistcleaner PLUGINSERVICE          /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE          /forge-1.16.5-36.2.9.jar fml TRANSFORMATIONSERVICE      FML: 36.2     Forge: net.minecraftforge:36.2.9     FML Language Providers:          javafml@36.2         minecraft@1     Mod List:          mowziesmobs-1.5.19.jar                            |Mowzie's Mobs                 |mowziesmobs                   |1.5.19              |DONE      |Manifest: NOSIGNATURE         cgm-1.1.0-1.16.5.jar                              |MrCrayfish's Gun Mod          |cgm                           |1.1.0               |DONE      |Manifest: NOSIGNATURE         brewevolution0.2.1.jar                            |Brewevolution                 |brewevolution                 |0.2.1               |DONE      |Manifest: NOSIGNATURE         jei-1.16.5-7.7.1.139.jar                          |Just Enough Items             |jei                           |7.7.1.139           |DONE      |Manifest: NOSIGNATURE         Pehkui-3.1.01.16.5-forge.jar                      |Pehkui                        |pehkui                        |3.1.0+1.16.5-forge  |DONE      |Manifest: NOSIGNATURE         abnormals_core-1.16.5-3.3.0.jar                   |Abnormals Core                |abnormals_core                |3.3.0               |DONE      |Manifest: NOSIGNATURE         seals-1.16.3-2.1.2.jar                            |Seals                         |seals                         |2.1.2               |DONE      |Manifest: NOSIGNATURE         caelus-forge-1.16.5-2.1.3.2.jar                   |Caelus API                    |caelus                        |1.16.5-2.1.3.2      |DONE      |Manifest: NOSIGNATURE         timeless_and_classics-gun_mod-0.1.4.1-1.16.5.jar  |Timeless and Classics         |tac                           |1.0.0               |DONE      |Manifest: NOSIGNATURE         Waystones_1.16.5-7.6.4.jar                        |Waystones                     |waystones                     |7.6.4               |DONE      |Manifest: NOSIGNATURE         citadel-1.8.1-1.16.5.jar                          |Citadel                       |citadel                       |1.8.1               |DONE      |Manifest: NOSIGNATURE         alexsmobs-1.12.1.jar                              |Alex's Mobs                   |alexsmobs                     |1.12.1              |DONE      |Manifest: NOSIGNATURE         NaturesCompass-1.16.5-1.9.0.jar                   |Nature's Compass              |naturescompass                |1.16.5-1.9.0        |DONE      |Manifest: NOSIGNATURE         Artifacts-1.16.5-2.10.4.jar                       |Artifacts                     |artifacts                     |1.16.5-2.10.4       |DONE      |Manifest: NOSIGNATURE         configured-1.5.1-1.16.5.jar                       |Configured                    |configured                    |1.5.1               |DONE      |Manifest: NOSIGNATURE         additional-guns-0.4.2-1.16.5.jar                  |Additional Guns               |additionalguns                |0.4.2               |DONE      |Manifest: NOSIGNATURE         OuterEnd-0.2.14.jar                               |The Outer End                 |outer_end                     |0.2.9               |DONE      |Manifest: NOSIGNATURE         decorative_blocks-1.16.4-1.7.2.jar                |Decorative Blocks             |decorative_blocks             |1.7.2               |DONE      |Manifest: NOSIGNATURE         DungeonCrawl-1.16.5-2.3.5.jar                     |Dungeon Crawl                 |dungeoncrawl                  |2.3.5               |DONE      |Manifest: NOSIGNATURE         sophisticatedbackpacks-1.16.5-3.15.1.503.jar      |Sophisticated Backpacks       |sophisticatedbackpacks        |1.16.5-3.15.1.503   |DONE      |Manifest: NOSIGNATURE         iceandfire-2.1.9-1.16.5.jar                       |Ice and Fire                  |iceandfire                    |2.1.9-1.16.5        |DONE      |Manifest: NOSIGNATURE         walljump-forge-1.16.4-1.3.7.jar                   |Wall-Jump!                    |walljump                      |1.16.4-1.3.7        |DONE      |Manifest: NOSIGNATURE         forge-1.16.5-36.2.9-universal.jar                 |Forge                         |forge                         |36.2.9              |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         supplementaries-1.16.5-0.18.0.jar                 |Supplementaries               |supplementaries               |0.18.0              |DONE      |Manifest: NOSIGNATURE         selene-1.16.5-1.9.0.jar                           |Selene                        |selene                        |1.16.5-1.0          |DONE      |Manifest: NOSIGNATURE         antiqueatlas-6.0.1-forge-mc1.16.5.jar             |Antique Atlas                 |antiqueatlas                  |6.0.1-forge-mc1.16.5|DONE      |Manifest: NOSIGNATURE         collection-of-singiro-1.0.3d.jar                  |Collection of Singiro         |collectionofsingiro           |1.0                 |DONE      |Manifest: NOSIGNATURE         forge-1.16.5-36.2.9-client.jar                    |Minecraft                     |minecraft                     |1.16.5              |DONE      |Manifest: NOSIGNATURE         upgrade_aquatic-1.16.5-3.1.2.jar                  |Upgrade Aquatic               |upgrade_aquatic               |3.1.2               |DONE      |Manifest: NOSIGNATURE         endergetic-1.16.4-3.0.0.jar                       |The Endergetic Expansion      |endergetic                    |3.0.0               |DONE      |Manifest: NOSIGNATURE         FarmersDelight-1.16.5-0.5.4.jar                   |Farmer's Delight              |farmersdelight                |1.16.5-0.5.4        |DONE      |Manifest: NOSIGNATURE         voicechat-forge-1.16.5-1.8.0.jar                  |Simple Voice Chat             |voicechat                     |1.16.5-1.8.0        |DONE      |Manifest: NOSIGNATURE         decorative_blocks_abnormals-1.2.jar               |Decorative Blocks Abnormals   |decorative_blocks_abnormals   |1.2                 |DONE      |Manifest: NOSIGNATURE         astikorcarts-1.16.5-1.1.1.jar                     |AstikorCarts                  |astikorcarts                  |1.1.1               |DONE      |Manifest: NOSIGNATURE         flywheel-1.16-0.2.5.jar                           |Flywheel                      |flywheel                      |1.16-0.2.5          |DONE      |Manifest: NOSIGNATURE         create-mc1.16.5_v0.3.2g.jar                       |Create                        |create                        |v0.3.2g             |DONE      |Manifest: NOSIGNATURE         curios-forge-1.16.5-4.0.7.0.jar                   |Curios API                    |curios                        |1.16.5-4.0.7.0      |DONE      |Manifest: NOSIGNATURE         SpartanShields-1.16.5-2.1.2.jar                   |Spartan Shields               |spartanshields                |2.1.2               |DONE      |Manifest: NOSIGNATURE         Patchouli-1.16.4-53.2.jar                         |Patchouli                     |patchouli                     |1.16.4-53.2         |DONE      |Manifest: NOSIGNATURE         Origins-1.16.5-0.7.3.9-forge.jar                  |Origins                       |origins                       |0.7.3.9             |DONE      |Manifest: NOSIGNATURE         Mantle-1.16.5-1.6.147.jar                         |Mantle                        |mantle                        |1.6.147             |DONE      |Manifest: NOSIGNATURE         Inspirations-1.16.5-1.2.3.38.jar                  |Inspirations                  |inspirations                  |1.2.3.38            |DONE      |Manifest: NOSIGNATURE         AutoRegLib-1.6-49.jar                             |AutoRegLib                    |autoreglib                    |1.6-49              |DONE      |Manifest: NOSIGNATURE         Quark-r2.4-321.jar                                |Quark                         |quark                         |r2.4-321            |DONE      |Manifest: NOSIGNATURE         sit-1.16.5-v1.3.1.jar                             |Sit                           |sit                           |v1.3.1              |DONE      |Manifest: NOSIGNATURE         obfuscate-0.6.2-1.16.3.jar                        |Obfuscate                     |obfuscate                     |0.6.2               |DONE      |Manifest: e1:59:1a:56:ec:97:b3:d0:b3:4b:25:06:1f:83:b0:f4:fd:0c:24:e3:6d:ea:94:b1:9f:22:b0:38:13:60:88:ea         SpartanWeaponry-1.16.4-2.1.0-beta-4.jar           |Spartan Weaponry              |spartanweaponry               |2.1.0 beta 4        |DONE      |Manifest: NOSIGNATURE         nethers_delight-2.1.jar                           |Nethers Delight               |nethers_delight               |2.1                 |DONE      |Manifest: NOSIGNATURE         cfm-7.0.0pre22-1.16.3.jar                         |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre22         |DONE      |Manifest: NOSIGNATURE         architectury-1.28.48.jar                          |Architectury                  |architectury                  |1.28.48             |DONE      |Manifest: NOSIGNATURE         cloth-config-4.13.49-forge.jar                    |Cloth Config v4 API           |cloth-config                  |4.13.49             |DONE      |Manifest: NOSIGNATURE         enhancedcelestials-2.0.9-1.16.5.jar               |Enhanced Celestials           |enhancedcelestials            |2.0.9-1.16.5        |DONE      |Manifest: NOSIGNATURE         smallships-1.16.5-1.10.3.jar                      |Small Ships Mod               |smallships                    |1.10.3              |DONE      |Manifest: NOSIGNATURE         expandability-2.0.1-forge.jar                     |ExpandAbility                 |expandability                 |2.0.1               |DONE      |Manifest: NOSIGNATURE         DynamicTrees-1.16.5-0.10.0-Beta26.jar             |Dynamic Trees                 |dynamictrees                  |1.16.5-0.10.0-Beta26|DONE      |Manifest: NOSIGNATURE         DarkPaintings-1.16.5-6.0.10.jar                   |DarkPaintings                 |darkpaintings                 |6.0.10              |DONE      |Manifest: eb:c4:b1:67:8b:f9:0c:db:dc:4f:01:b1:8e:61:64:39:4c:10:85:0b:a6:c4:c7:48:f0:fa:95:f2:cb:08:3a:e5     Crash Report UUID: 8297032c-df60-44be-a1d5-e8795f15a658     Patchouli open book context: n/a     Launched Version: 1.16.5-forge-36.2.9     Backend library: LWJGL version 3.2.2 build 10     Backend API: Intel(R) UHD Graphics GL version 4.6.0 - Build 26.20.100.7985, Intel     GL Caps: Using framebuffer using OpenGL 3.0     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     Graphics mode: fast     Resource Packs: vanilla, file/3.0.3v_VisualEnchantments.zip     Current Language: English (US)     CPU: 8x Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
    • Every time I play on my Aternos server which is running forge 1.18.1 (39.0.44), I get an: Internal Error: java.net.SocketExecption, however the strange part is, when I join my friend's server, which is running Spigot, it works just fine. My Forge client is running 39.0.17 by the way, however it is also on 1.18.1. The weird thing is, my friend (running the same version of forge and Minecraft) can join just fine and it works every time for him, we have the same exact mods installed too, so, I don't know why it's not working. If anyone knows, please help! Also, just a few days prior, when the "Shrink" mod wasn't installed, I could join just fine, and it worked.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.