Jump to content

[1.8][Unsolved]Container Gui Wont Show Anything but inventory and name


KingOfMiners

Recommended Posts

i cant get my melter as i'm calling  to show anything but Melter and the inventory below it

 

This is the block's class:

package com.moreoresmod.main.block;

import java.util.Random;

import com.moreoresmod.main.init.MoreOresModBlocks;
import com.moreoresmod.main.tileentity.TileEntityMelter;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class Melter extends BlockContainer
{
    public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
    private final boolean isBurning;
    private static boolean keepInventory;
    private static final String __OBFID = "CL_00000248";

    public Melter(boolean isBurning)
    {
        super(Material.rock);
        this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
        this.isBurning = isBurning;
    }

    public Item getItemDropped(IBlockState state, Random rand, int fortune)
    {
        return Item.getItemFromBlock(MoreOresModBlocks.melter);
    }

    public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
    {
        this.setDefaultFacing(worldIn, pos, state);
    }

    private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state)
    {
        if (!worldIn.isRemote)
        {
            Block block = worldIn.getBlockState(pos.north()).getBlock();
            Block block1 = worldIn.getBlockState(pos.south()).getBlock();
            Block block2 = worldIn.getBlockState(pos.west()).getBlock();
            Block block3 = worldIn.getBlockState(pos.east()).getBlock();
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

            worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
        }
    }

    @SideOnly(Side.CLIENT)
    public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
    {
        if (this.isBurning)
        {
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
            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;

            switch (Melter.SwitchEnumFacing.FACING_LOOKUP[enumfacing.ordinal()])
            {
                case 1:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case 2:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case 3:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case 4:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
            }
        }
    }

    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityMelter)
            {
                playerIn.displayGUIChest((TileEntityMelter)tileentity);
            }

            return true;
        }
    }

    public static void setState(boolean active, World worldIn, BlockPos pos)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);
        TileEntity tileentity = worldIn.getTileEntity(pos);
        keepInventory = true;

        if (active)
        {
            worldIn.setBlockState(pos, MoreOresModBlocks.melter.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
            worldIn.setBlockState(pos, MoreOresModBlocks.melter.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        }
        else
        {
            worldIn.setBlockState(pos, MoreOresModBlocks.melter.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
            worldIn.setBlockState(pos, MoreOresModBlocks.melter.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        }

        keepInventory = false;

        if (tileentity != null)
        {
            tileentity.validate();
            worldIn.setTileEntity(pos, tileentity);
        }
    }

    public TileEntity createNewTileEntity(World worldIn, int meta)
    {
        return new TileEntityMelter();
    }

    public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
    {
        return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
    }

    public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
    {
        worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);

        if (stack.hasDisplayName())
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityMelter)
            {
                ((TileEntityMelter)tileentity).setCustomInventoryName(stack.getDisplayName());
            }
        }
    }

    public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
    {
        if (!keepInventory)
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityMelter)
            {
                InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityMelter)tileentity);
                worldIn.updateComparatorOutputLevel(pos, this);
            }
        }

        super.breakBlock(worldIn, pos, state);
    }

    public boolean hasComparatorInputOverride()
    {
        return true;
    }

    public int getComparatorInputOverride(World worldIn, BlockPos pos)
    {
        return Container.calcRedstone(worldIn.getTileEntity(pos));
    }

    @SideOnly(Side.CLIENT)
    public Item getItem(World worldIn, BlockPos pos)
    {
        return Item.getItemFromBlock(Blocks.furnace);
    }

    public int getRenderType()
    {
        return 3;
    }

    @SideOnly(Side.CLIENT)
    public IBlockState getStateForEntityRender(IBlockState state)
    {
        return this.getDefaultState().withProperty(FACING, EnumFacing.SOUTH);
    }

    public IBlockState getStateFromMeta(int meta)
    {
        EnumFacing enumfacing = EnumFacing.getFront(meta);

        if (enumfacing.getAxis() == EnumFacing.Axis.Y)
        {
            enumfacing = EnumFacing.NORTH;
        }

        return this.getDefaultState().withProperty(FACING, enumfacing);
    }

    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

    protected BlockState createBlockState()
    {
        return new BlockState(this, new IProperty[] {FACING});
    }

    @SideOnly(Side.CLIENT)

    static final class SwitchEnumFacing
        {
            static final int[] FACING_LOOKUP = new int[EnumFacing.values().length];
            private static final String __OBFID = "CL_00002111";

            static
            {
                try
                {
                    FACING_LOOKUP[EnumFacing.WEST.ordinal()] = 1;
                }
                catch (NoSuchFieldError var4)
                {
                    ;
                }

                try
                {
                    FACING_LOOKUP[EnumFacing.EAST.ordinal()] = 2;
                }
                catch (NoSuchFieldError var3)
                {
                    ;
                }

                try
                {
                    FACING_LOOKUP[EnumFacing.NORTH.ordinal()] = 3;
                }
                catch (NoSuchFieldError var2)
                {
                    ;
                }

                try
                {
                    FACING_LOOKUP[EnumFacing.SOUTH.ordinal()] = 4;
                }
                catch (NoSuchFieldError var1)
                {
                    ;
                }
            }
        }
}

This is my TileEntity Class:

package com.moreoresmod.main.tileentity;

import com.moreoresmod.main.container.ContainerMelter;
import com.moreoresmod.main.tileentity.Recipes.MelterRecipes;
import com.moreoresmod.main.tileentity.slots.SlotMelterFuel;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.tileentity.TileEntityLockable;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class TileEntityMelter extends TileEntityLockable implements IUpdatePlayerListBox, ISidedInventory
{
    private static final int[] slotsTop = new int[] {0};
    private static final int[] slotsBottom = new int[] {2, 1};
    private static final int[] slotsSides = new int[] {1};
    private ItemStack[] melterItemStacks = new ItemStack[3];
    private int melterMeltTime;
    private int currentItemMeltTime;
    private int meltTime;
    private int totalMeltTime;
    private String melterCustomName;
    private static final String __OBFID = "CL_00000357";

    public int getSizeInventory()
    {
        return this.melterItemStacks.length;
    }

    public ItemStack getStackInSlot(int index)
    {
        return this.melterItemStacks[index];
    }

    public ItemStack decrStackSize(int index, int count)
    {
        if (this.melterItemStacks[index] != null)
        {
            ItemStack itemstack;

            if (this.melterItemStacks[index].stackSize <= count)
            {
                itemstack = this.melterItemStacks[index];
                this.melterItemStacks[index] = null;
                return itemstack;
            }
            else
            {
                itemstack = this.melterItemStacks[index].splitStack(count);

                if (this.melterItemStacks[index].stackSize == 0)
                {
                    this.melterItemStacks[index] = null;
                }

                return itemstack;
            }
        }
        else
        {
            return null;
        }
    }

    public ItemStack getStackInSlotOnClosing(int index)
    {
        if (this.melterItemStacks[index] != null)
        {
            ItemStack itemstack = this.melterItemStacks[index];
            this.melterItemStacks[index] = null;
            return itemstack;
        }
        else
        {
            return null;
        }
    }

    public void setInventorySlotContents(int index, ItemStack stack)
    {
        boolean flag = stack != null && stack.isItemEqual(this.melterItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.melterItemStacks[index]);
        this.melterItemStacks[index] = stack;

        if (stack != null && stack.stackSize > this.getInventoryStackLimit())
        {
            stack.stackSize = this.getInventoryStackLimit();
        }

        if (index == 0 && !flag)
        {
            this.totalMeltTime = this.func_174904_a(stack);
            this.meltTime = 0;
            this.markDirty();
        }
    }

    public String getName()
    {
        return this.hasCustomName() ? this.melterCustomName : "container.melter";
    }

    public boolean hasCustomName()
    {
        return this.melterCustomName != null && this.melterCustomName.length() > 0;
    }

    public void setCustomInventoryName(String p_145951_1_)
    {
        this.melterCustomName = p_145951_1_;
    }

    public void readFromNBT(NBTTagCompound compound)
    {
        super.readFromNBT(compound);
        NBTTagList nbttaglist = compound.getTagList("Items", 10);
        this.melterItemStacks = new ItemStack[this.getSizeInventory()];

        for (int i = 0; i < nbttaglist.tagCount(); ++i)
        {
            NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
            byte b0 = nbttagcompound1.getByte("Slot");

            if (b0 >= 0 && b0 < this.melterItemStacks.length)
            {
                this.melterItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
            }
        }

        this.melterMeltTime = compound.getShort("MeltTime");
        this.meltTime = compound.getShort("meltTime");
        this.totalMeltTime = compound.getShort("meltTimeTotal");
        this.currentItemMeltTime = getItemMeltTime(this.melterItemStacks[1]);

        if (compound.hasKey("CustomName", )
        {
            this.melterCustomName = compound.getString("CustomName");
        }
    }

    public void writeToNBT(NBTTagCompound compound)
    {
        super.writeToNBT(compound);
        compound.setShort("MeltTime", (short)this.melterMeltTime);
        compound.setShort("meltTime", (short)this.meltTime);
        compound.setShort("meltTimeTotal", (short)this.totalMeltTime);
        NBTTagList nbttaglist = new NBTTagList();

        for (int i = 0; i < this.melterItemStacks.length; ++i)
        {
            if (this.melterItemStacks[i] != null)
            {
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setByte("Slot", (byte)i);
                this.melterItemStacks[i].writeToNBT(nbttagcompound1);
                nbttaglist.appendTag(nbttagcompound1);
            }
        }

        compound.setTag("Items", nbttaglist);

        if (this.hasCustomName())
        {
            compound.setString("CustomName", this.melterCustomName);
        }
    }

    public int getInventoryStackLimit()
    {
        return 64;
    }

    public boolean isMelting()
    {
        return this.melterMeltTime > 0;
    }

    @SideOnly(Side.CLIENT)
    public static boolean isMelting(IInventory p_174903_0_)
    {
        return p_174903_0_.getField(0) > 0;
    }

    public void update()
    {
        boolean flag = this.isMelting();
        boolean flag1 = false;

        if (this.isMelting())
        {
            --this.melterMeltTime;
        }

        if (!this.worldObj.isRemote)
        {
            if (!this.isMelting() && (this.melterItemStacks[1] == null || this.melterItemStacks[0] == null))
            {
                if (!this.isMelting() && this.meltTime > 0)
                {
                    this.meltTime = MathHelper.clamp_int(this.meltTime - 2, 0, this.totalMeltTime);
                }
            }
            else
            {
                if (!this.isMelting() && this.canSmelt())
                {
                    this.currentItemMeltTime = this.melterMeltTime = getItemMeltTime(this.melterItemStacks[1]);

                    if (this.isMelting())
                    {
                        flag1 = true;

                        if (this.melterItemStacks[1] != null)
                        {
                            --this.melterItemStacks[1].stackSize;

                            if (this.melterItemStacks[1].stackSize == 0)
                            {
                                this.melterItemStacks[1] = melterItemStacks[1].getItem().getContainerItem(melterItemStacks[1]);
                            }
                        }
                    }
                }

                if (this.isMelting() && this.canSmelt())
                {
                    ++this.meltTime;

                    if (this.meltTime == this.totalMeltTime)
                    {
                        this.meltTime = 0;
                        this.totalMeltTime = this.func_174904_a(this.melterItemStacks[0]);
                        this.smeltItem();
                        flag1 = true;
                    }
                }
                else
                {
                    this.meltTime = 0;
                }
            }

            if (flag != this.isMelting())
            {
                flag1 = true;
                BlockFurnace.setState(this.isMelting(), this.worldObj, this.pos);
            }
        }

        if (flag1)
        {
            this.markDirty();
        }
    }

    public int func_174904_a(ItemStack p_174904_1_)
    {
        return 200;
    }

    private boolean canSmelt()
    {
        if (this.melterItemStacks[0] == null)
        {
            return false;
        }
        else
        {
            ItemStack itemstack = MelterRecipes.instance().getMeltingResult(this.melterItemStacks[0]);
            if (itemstack == null) return false;
            if (this.melterItemStacks[2] == null) return true;
            if (!this.melterItemStacks[2].isItemEqual(itemstack)) return false;
            int result = melterItemStacks[2].stackSize + itemstack.stackSize;
            return result <= getInventoryStackLimit() && result <= this.melterItemStacks[2].getMaxStackSize(); //Forge BugFix: Make it respect stack sizes properly.
        }
    }

    public void smeltItem()
    {
        if (this.canSmelt())
        {
            ItemStack itemstack = MelterRecipes.instance().getMeltingResult(this.melterItemStacks[0]);

            if (this.melterItemStacks[2] == null)
            {
                this.melterItemStacks[2] = itemstack.copy();
            }
            else if (this.melterItemStacks[2].getItem() == itemstack.getItem())
            {
                this.melterItemStacks[2].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items
            }

            if (this.melterItemStacks[0].getItem() == Item.getItemFromBlock(Blocks.sponge) && this.melterItemStacks[0].getMetadata() == 1 && this.melterItemStacks[1] != null && this.melterItemStacks[1].getItem() == Items.bucket)
            {
                this.melterItemStacks[1] = new ItemStack(Items.water_bucket);
            }

            --this.melterItemStacks[0].stackSize;

            if (this.melterItemStacks[0].stackSize <= 0)
            {
                this.melterItemStacks[0] = null;
            }
        }
    }

    public static int getItemMeltTime(ItemStack p_145952_0_)
    {
        if (p_145952_0_ == null)
        {
            return 0;
        }
        else
        {
            Item item = p_145952_0_.getItem();

            /*if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air)
            {
                Block block = Block.getBlockFromItem(item);

                if (block == Blocks.wooden_slab)
                {
                    return 150;
                }

                if (block.getMaterial() == Material.wood)
                {
                    return 300;
                }

                if (block == Blocks.coal_block)
                {
                    return 16000;
                }
            }*/
            if (item == Items.lava_bucket) return 20000;
            return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_);
        }
    }

    public static boolean isItemFuel(ItemStack p_145954_0_)
    {
        return getItemMeltTime(p_145954_0_) > 0;
    }

    public boolean isUseableByPlayer(EntityPlayer player)
    {
        return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
    }

    public void openInventory(EntityPlayer player) {}

    public void closeInventory(EntityPlayer player) {}

    public boolean isItemValidForSlot(int index, ItemStack stack)
    {
        return index == 2 ? false : (index != 1 ? true : isItemFuel(stack) || SlotMelterFuel.isBucket(stack));
    }

    public int[] getSlotsForFace(EnumFacing side)
    {
        return side == EnumFacing.DOWN ? slotsBottom : (side == EnumFacing.UP ? slotsTop : slotsSides);
    }

    public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction)
    {
        return this.isItemValidForSlot(index, itemStackIn);
    }

    public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction)
    {
        if (direction == EnumFacing.DOWN && index == 1)
        {
            Item item = stack.getItem();

            if (item != Items.water_bucket && item != Items.bucket)
            {
                return false;
            }
        }

        return true;
    }

    public String getGuiID()
    {
        return "moreoresmod:melter";
    }

    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
    {
        return new ContainerMelter(playerInventory, this);
    }

    public int getField(int id)
    {
        switch (id)
        {
            case 0:
                return this.melterMeltTime;
            case 1:
                return this.currentItemMeltTime;
            case 2:
                return this.meltTime;
            case 3:
                return this.totalMeltTime;
            default:
                return 0;
        }
    }

    public void setField(int id, int value)
    {
        switch (id)
        {
            case 0:
                this.melterMeltTime = value;
                break;
            case 1:
                this.currentItemMeltTime = value;
                break;
            case 2:
                this.meltTime = value;
                break;
            case 3:
                this.totalMeltTime = value;
        }
    }

    public int getFieldCount()
    {
        return 4;
    }

    public void clear()
    {
        for (int i = 0; i < this.melterItemStacks.length; ++i)
        {
            this.melterItemStacks[i] = null;
        }
    }
}

this is my Container Class:

package com.moreoresmod.main.container;

import com.moreoresmod.main.tileentity.TileEntityMelter;
import com.moreoresmod.main.tileentity.Recipes.MelterRecipes;
import com.moreoresmod.main.tileentity.slots.SlotMelterFuel;
import com.moreoresmod.main.tileentity.slots.SlotMelterOutput;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class ContainerMelter extends Container
{
    private final IInventory tileMelter;
    private int field_178152_f;
    private int field_178153_g;
    private int field_178154_h;
    private int field_178155_i;
    private static final String __OBFID = "CL_00001748";

    public ContainerMelter(InventoryPlayer p_i45794_1_, IInventory furnaceInventory)
    {
        this.tileMelter = furnaceInventory;
        this.addSlotToContainer(new Slot(furnaceInventory, 0, 56, 17));
        this.addSlotToContainer(new SlotMelterFuel(furnaceInventory, 1, 56, 53));
        this.addSlotToContainer(new SlotMelterOutput(p_i45794_1_.player, furnaceInventory, 2, 116, 35));
        int i;

        for (i = 0; i < 3; ++i)
        {
            for (int j = 0; j < 9; ++j)
            {
                this.addSlotToContainer(new Slot(p_i45794_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
            }
        }

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

    public void addCraftingToCrafters(ICrafting listener)
    {
        super.addCraftingToCrafters(listener);
        listener.func_175173_a(this, this.tileMelter);
    }

    public void detectAndSendChanges()
    {
        super.detectAndSendChanges();

        for (int i = 0; i < this.crafters.size(); ++i)
        {
            ICrafting icrafting = (ICrafting)this.crafters.get(i);

            if (this.field_178152_f != this.tileMelter.getField(2))
            {
                icrafting.sendProgressBarUpdate(this, 2, this.tileMelter.getField(2));
            }

            if (this.field_178154_h != this.tileMelter.getField(0))
            {
                icrafting.sendProgressBarUpdate(this, 0, this.tileMelter.getField(0));
            }

            if (this.field_178155_i != this.tileMelter.getField(1))
            {
                icrafting.sendProgressBarUpdate(this, 1, this.tileMelter.getField(1));
            }

            if (this.field_178153_g != this.tileMelter.getField(3))
            {
                icrafting.sendProgressBarUpdate(this, 3, this.tileMelter.getField(3));
            }
        }

        this.field_178152_f = this.tileMelter.getField(2);
        this.field_178154_h = this.tileMelter.getField(0);
        this.field_178155_i = this.tileMelter.getField(1);
        this.field_178153_g = this.tileMelter.getField(3);
    }

    @SideOnly(Side.CLIENT)
    public void updateProgressBar(int id, int data)
    {
        this.tileMelter.setField(id, data);
    }

    public boolean canInteractWith(EntityPlayer playerIn)
    {
        return this.tileMelter.isUseableByPlayer(playerIn);
    }

    public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
    {
        ItemStack itemstack = null;
        Slot slot = (Slot)this.inventorySlots.get(index);

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

            if (index == 2)
            {
                if (!this.mergeItemStack(itemstack1, 3, 39, true))
                {
                    return null;
                }

                slot.onSlotChange(itemstack1, itemstack);
            }
            else if (index != 1 && index != 0)
            {
                if (MelterRecipes.instance().getMeltingResult(itemstack1) != null)
                {
                    if (!this.mergeItemStack(itemstack1, 0, 1, false))
                    {
                        return null;
                    }
                }
                else if (TileEntityMelter.isItemFuel(itemstack1))
                {
                    if (!this.mergeItemStack(itemstack1, 1, 2, false))
                    {
                        return null;
                    }
                }
                else if (index >= 3 && index < 30)
                {
                    if (!this.mergeItemStack(itemstack1, 30, 39, false))
                    {
                        return null;
                    }
                }
                else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
                {
                    return null;
                }
            }
            else if (!this.mergeItemStack(itemstack1, 3, 39, false))
            {
                return null;
            }

            if (itemstack1.stackSize == 0)
            {
                slot.putStack((ItemStack)null);
            }
            else
            {
                slot.onSlotChanged();
            }

            if (itemstack1.stackSize == itemstack.stackSize)
            {
                return null;
            }

            slot.onPickupFromSlot(playerIn, itemstack1);
        }

        return itemstack;
    }
}

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hey there, how can I detect another mod that's also installed into Minecraft? I would like to detect the mod by it's modid when my mod is first loaded.  My goal with this would be to only register my mod-specific items only when the mod I'm trying to detect isn't installed. public MyMod() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); if (!ModIsInstalled("modid")) { RegistryHandler.init(); } }  
    • my server won't start and i can't understand why, here's the log the server outputs each time i try to run "run.bat" installed by "forge-1.18.2-40.2.10-installer" :   ----------------- [01oct.2023 19:58:45.981] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 40.2.10, --fml.mcVersion, 1.18.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220404.173914, -nogui] [01oct.2023 19:58:45.984] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.1.3+9.1.3+main.9b69c82a starting: java version 17.0.6 by Oracle Corporation [01oct.2023 19:58:46.282] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/rouss/OneDrive/Bureau/BDX%20server/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2314!/ Service=ModLauncher Env=SERVER [01oct.2023 19:58:47.839] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\rouss\OneDrive\Bureau\BDX server\libraries\net\minecraftforge\fmlcore\1.18.2-40.2.10\fmlcore-1.18.2-40.2.10.jar is missing mods.toml file [01oct.2023 19:58:47.843] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\rouss\OneDrive\Bureau\BDX server\libraries\net\minecraftforge\javafmllanguage\1.18.2-40.2.10\javafmllanguage-1.18.2-40.2.10.jar is missing mods.toml file [01oct.2023 19:58:47.847] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\rouss\OneDrive\Bureau\BDX server\libraries\net\minecraftforge\lowcodelanguage\1.18.2-40.2.10\lowcodelanguage-1.18.2-40.2.10.jar is missing mods.toml file [01oct.2023 19:58:47.850] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\rouss\OneDrive\Bureau\BDX server\libraries\net\minecraftforge\mclanguage\1.18.2-40.2.10\mclanguage-1.18.2-40.2.10.jar is missing mods.toml file [01oct.2023 19:58:48.017] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 9 dependencies adding them to mods collection [01oct.2023 19:58:53.405] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 [01oct.2023 19:58:53.685] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [ca.spottedleaf.starlight.mixin.MixinConnector] [01oct.2023 19:58:53.688] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.leobeliik.extremesoundmuffler.MixinConnector] [01oct.2023 19:58:53.691] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments [-nogui] [01oct.2023 19:58:53.718] [main/INFO] [Rubidium/]: Loaded configuration file for Rubidium: 28 options available, 0 override(s) found [01oct.2023 19:58:53.777] [main/INFO] [ModernFix/]: Loaded configuration file for ModernFix 5.7.4+mc1.18.2: 65 options available, 0 override(s) found [01oct.2023 19:58:53.778] [main/INFO] [ModernFix/]: Applying Nashorn fix [01oct.2023 19:58:53.796] [main/INFO] [ModernFix/]: Applied Forge config corruption patch [01oct.2023 19:58:53.821] [main/WARN] [mixin/]: Reference map 'morevillagers-forge-forge-refmap.json' for morevillagers.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.829] [main/WARN] [mixin/]: Reference map 'yungsbridges.refmap.json' for yungsbridges.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.830] [main/WARN] [mixin/]: Reference map 'yungsbridges.refmap.json' for yungsbridges_forge.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.846] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.848] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras_forge.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.867] [main/WARN] [mixin/]: Reference map 'compactmachines.refmap.json' for compactmachines.mixin.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.909] [main/WARN] [mixin/]: Reference map 'antiqueatlas-forge-refmap.json' for antiqueatlas.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.926] [main/WARN] [mixin/]: Reference map 'farmersrespite.refmap.json' for farmersrespite.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.976] [main/WARN] [mixin/]: Reference map 'cristellib-common-refmap.json' for cristellib-common.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.979] [main/WARN] [mixin/]: Reference map 'cristellib-forge-refmap.json' for cristellib.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.989] [main/WARN] [mixin/]: Reference map 'naturalist-forge-forge-refmap.json' for naturalist.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:53.998] [main/WARN] [mixin/]: Reference map 'insanelib.refmap.json' for insanelib.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:54.037] [main/WARN] [mixin/]: Reference map 'cupboard.refmap.json' for cupboard.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:54.044] [main/WARN] [mixin/]: Reference map 'createappliedkinetics.refmap.json' for createappliedkinetics.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:54.054] [main/WARN] [mixin/]: Reference map 'bloodmagic.refmap.json' for bloodmagic.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:54.060] [main/WARN] [mixin/]: Reference map 'nethersdelight.refmap.json' for nethersdelight.mixins.json could not be read. If this is a development environment you can ignore this message [01oct.2023 19:58:54.566] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Replaced 2 calls to Enchantment#getMaxLevel() in net/minecraft/world/inventory/AnvilMenu [01oct.2023 19:58:54.688] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER [01oct.2023 19:58:54.689] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/Minecraft (java.lang.RuntimeException: Attempted to load class net/minecraft/client/Minecraft for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:54.690] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.Minecraft was not found modernfix-common.mixins.json:bugfix.world_leaks.MinecraftMixin [01oct.2023 19:58:54.835] [main/WARN] [mixin/]: Error loading class: net/silentchaos512/gear/item/gear/GearCrossbowItem (java.lang.ClassNotFoundException: net.silentchaos512.gear.item.gear.GearCrossbowItem) [01oct.2023 19:58:55.060] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/resources/model/ModelBakery for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.061] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/resources/model/ModelBakery (java.lang.RuntimeException: Attempted to load class net/minecraft/client/resources/model/ModelBakery for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.063] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.resources.model.ModelBakery was not found lightspeed.mixins.json:model.ModelBakeryMixin [01oct.2023 19:58:55.080] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Patching FishingHook#catchingFish [01oct.2023 19:58:55.396] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/ItemInHandRenderer for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.397] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/ItemInHandRenderer (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/ItemInHandRenderer for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.399] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.ItemInHandRenderer was not found tetra.mixins.json:ItemInHandRendererMixin [01oct.2023 19:58:55.401] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/entity/player/PlayerRenderer for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.402] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/entity/player/PlayerRenderer (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/entity/player/PlayerRenderer for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.402] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.entity.player.PlayerRenderer was not found tetra.mixins.json:MixinPlayerRenderer [01oct.2023 19:58:55.450] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screens/inventory/AbstractContainerScreen for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.451] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/gui/screens/inventory/AbstractContainerScreen (java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/inventory/AbstractContainerScreen for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.452] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.gui.screens.inventory.AbstractContainerScreen was not found findme-common.mixins.json:MixinSlotRenderer [01oct.2023 19:58:55.454] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/particle/ParticleEngine for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.454] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/particle/ParticleEngine (java.lang.RuntimeException: Attempted to load class net/minecraft/client/particle/ParticleEngine for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.454] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.particle.ParticleEngine was not found findme-common.mixins.json:ParticleEngineAccessor [01oct.2023 19:58:55.653] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlasSprite for invalid dist DEDICATED_SERVER [01oct.2023 19:58:55.656] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/texture/TextureAtlasSprite (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlasSprite for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:55.658] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.texture.TextureAtlasSprite was not found modelfix.mixins.json:TextureAtlasSpriteMixin [01oct.2023 19:58:55.777] [main/INFO] [terralith/]: Loading config for 'terrablender-compatibility': TRUE [01oct.2023 19:58:55.785] [main/INFO] [terralith/]: Loading config for 'cursed-skylands': NONE [01oct.2023 19:58:55.796] [main/WARN] [mixin/]: Error loading class: vazkii/quark/addons/oddities/inventory/BackpackMenu (java.lang.ClassNotFoundException: vazkii.quark.addons.oddities.inventory.BackpackMenu) [01oct.2023 19:58:55.837] [main/WARN] [mixin/]: Error loading class: com/brewinandchewin/common/block/entity/KegBlockEntity (java.lang.ClassNotFoundException: com.brewinandchewin.common.block.entity.KegBlockEntity) [01oct.2023 19:58:55.838] [main/WARN] [mixin/]: @Mixin target com.brewinandchewin.common.block.entity.KegBlockEntity was not found create_central_kitchen.mixins.json:common.brewinandchewin.KegBlockEntityMixin [01oct.2023 19:58:55.906] [main/WARN] [mixin/]: Error loading class: com/sammy/minersdelight/content/block/copper_pot/CopperPotBlockEntity (java.lang.ClassNotFoundException: com.sammy.minersdelight.content.block.copper_pot.CopperPotBlockEntity) [01oct.2023 19:58:55.907] [main/WARN] [mixin/]: @Mixin target com.sammy.minersdelight.content.block.copper_pot.CopperPotBlockEntity was not found create_central_kitchen.mixins.json:common.minersdelight.CopperPotBlockEntityMixin [01oct.2023 19:58:55.916] [main/WARN] [mixin/]: Error loading class: com/teamabnormals/neapolitan/common/item/DrinkItem (java.lang.ClassNotFoundException: com.teamabnormals.neapolitan.common.item.DrinkItem) [01oct.2023 19:58:55.917] [main/WARN] [mixin/]: @Mixin target com.teamabnormals.neapolitan.common.item.DrinkItem was not found create_central_kitchen.mixins.json:common.neapolitan.DrinkItemMixin [01oct.2023 19:58:55.921] [main/WARN] [mixin/]: Error loading class: net/orcinus/overweightfarming/blocks/CropFullBlock (java.lang.ClassNotFoundException: net.orcinus.overweightfarming.blocks.CropFullBlock) [01oct.2023 19:58:55.923] [main/WARN] [mixin/]: @Mixin target net.orcinus.overweightfarming.blocks.CropFullBlock was not found create_central_kitchen.mixins.json:common.overweightfarming.CropFullBlockMixin [01oct.2023 19:58:56.026] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlas for invalid dist DEDICATED_SERVER [01oct.2023 19:58:56.027] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/renderer/texture/TextureAtlas (java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlas for invalid dist DEDICATED_SERVER) [01oct.2023 19:58:56.028] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.renderer.texture.TextureAtlas was not found fusion.mixins.json:modernfix.TextureAtlasMixinModernFix [01oct.2023 19:58:57.225] [main/INFO] [net.minecraft.server.Bootstrap/]: ModernFix reached bootstrap stage (12.75 s after launch) [01oct.2023 19:58:57.385] [main/INFO] [ModernFix/]: Injecting BlockStateBase cache population hook into getOpacityIfCached from ca.spottedleaf.starlight.mixin.common.blockstate.BlockStateBaseMixin [01oct.2023 19:58:57.386] [main/INFO] [ModernFix/]: Injecting BlockStateBase cache population hook into isConditionallyFullOpaque from ca.spottedleaf.starlight.mixin.common.blockstate.BlockStateBaseMixin [01oct.2023 19:58:58.171] [main/WARN] [mixin/]: Static binding violation: PRIVATE @Overwrite method m_47505_ in modernfix-common.mixins.json:perf.remove_biome_temperature_cache.BiomeMixin cannot reduce visibiliy of PUBLIC target method, visibility will be upgraded. [01oct.2023 19:58:58.173] [main/WARN] [mixin/]: Method overwrite conflict for m_47505_ in modernfix-common.mixins.json:perf.remove_biome_temperature_cache.BiomeMixin, previously written by com.abdelaziz.saturn.mixin.world.temperature_cache.BiomeMixin. Skipping method. [01oct.2023 19:58:59.058] [main/INFO] [net.minecraft.server.Bootstrap/]: Vanilla bootstrap took 1828 milliseconds [01oct.2023 19:58:59.593] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Replaced 2 calls to Enchantment#getMaxLevel() in net/minecraft/world/inventory/AnvilMenu [01oct.2023 19:58:59.596] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Replaced 1 calls to Enchantment#getMaxLevel() in com/mrcrayfish/goblintraders/Hooks [01oct.2023 19:59:00.209] [main/WARN] [mixin/]: @Redirect conflict. Skipping securitycraft.mixins.json:camera.ServerPlayerMixin->@Redirect::securitycraft$tick(Lnet/minecraft/server/level/ServerPlayer;DDDFF)V with priority 1100, already redirected by railways-common.mixins.json:conductor_possession.ServerPlayerMixin->@Redirect::snr$securitycraft$tick(Lnet/minecraft/server/level/ServerPlayer;DDDFF)V with priority 1200 [01oct.2023 19:59:00.650] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Patching FishingHook#catchingFish [01oct.2023 19:59:00.907] [main/WARN] [mixin/]: @ModifyConstant conflict. Skipping repurposed_structures.mixins.json:structures.StructurePoolMixin->@ModifyConstant::repurposedstructures_increaseWeightLimitDev(I)I with priority 1000, already redirected by yungsapi.mixins.json:IncreaseStructureWeightLimitMixin->@ModifyConstant::yungsapi_increaseWeightLimit(I)I with priority 1000 [01oct.2023 19:59:01.173] [main/INFO] [net.minecraftforge.coremod.CoreMod.apotheosis/COREMODLOG]: Replaced 2 calls to Enchantment#getMaxLevel() in net/minecraft/world/item/EnchantedBookItem [01oct.2023 19:59:01.316] [main/FATAL] [net.minecraftforge.fml.loading.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER [01oct.2023 19:59:01.317] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/KeyMapping (java.lang.RuntimeException: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER) ----------------- Would appreciate any kind of help also here's a mod list :  ----------------- alloyed-1.18.2-v1.5a.jar almostunified-forge-1.18.2-0.3.10.jar another_furniture-forge-1.2.2-1.18.2.jar antiqueatlas-7.1.1-forge-mc1.18.2.jar Apotheosis-1.18.2-5.8.1.jar appliedenergistics2-forge-11.7.6.jar Aquaculture-1.18.2-2.3.12.jar architectury-4.11.93-forge.jar ars_nouveau-1.18.2-2.9.0.jar artifacts-1.18.2-4.2.2.jar AttributeFix-Forge-1.18.2-14.0.2.jar baby_delight_1.0.1_forge_1.18.2.jar babyfat-forge-1.18.2-1.1.2.jar balm-3.2.6.jar BambooEverything-forge-1.3.8-build.45+mc1.18.2.jar baubley-heart-canisters-1.18.2-1.0.0.jar bettas_delight_1.2.0_forge_1.18.2.jar bettas-forge-1.18.2-1.1.0.jar BetterCompatibilityChecker-1.1.21-build.48+mc1.18.2.jar BiomesOPlenty-1.18.2-16.0.0.109-universal.jar blockui-1.18.2-0.0.71-ALPHA.jar BloodMagic-1.18.2-3.2.6-41.jar blue_skies-1.18.2-1.3.12.jar blueprint-1.18.2-5.5.0.jar Bookshelf-Forge-1.18.2-13.3.56.jar Botania-1.18.2-435.jar BrandonsCore-1.18.2-3.1.9.280-universal.jar bwncr-3.13.21.jar caelus-forge-1.18.1-3.0.0.2.jar cc-tweaked-1.18.2-1.101.3.jar cfm-7.0.0-pre35-1.18.2.jar champions-forge-1.18.2-2.1.6.3.jar charginggadgets-1.7.0.jar chipped-forge-1.18.2-2.0.1.jar citadel-1.11.3-1.18.2.jar cloth-config-6.5.102-forge.jar CodeChickenLib-1.18.2-4.1.4.488-universal.jar cofh_core-1.18.2-9.2.2.44.jar collective-1.18.2-6.66.jar comforts-forge-1.18.2-5.0.0.6.jar CommonCapabilities-1.18.2-2.9.0.jar compactmachines-4.5.0.jar connectedglass-1.1.8-forge-mc1.18.jar connectivity-1.18.2-3.2.jar constructionwand-1.18.2-2.9.jar Controlling-forge-1.18.2-9.0+23.jar cookingforblockheads-forge-1.18.2-12.2.0.jar corpse-1.18.2-1.0.1.jar craftingtweaks-forge-1.18.2-14.0.7.jar crashutilities-4.1.jar create_central_kitchen-1.18.2-for-create-0.5.1.e-1.3.9.b.jar create_enchantment_industry-1.18.2-for-create-0.5.1.e-1.2.6.c.jar create_misc_and_things_ 1.18.2_4.0A.jar create_ore_excavation_plus-0.2.2-1.18.2.jar create_recycle_1.0.2_forge_1.18.2.jar create_sabers-1.18.2-1.3.0.jar create-1.18.2-0.5.1.e.jar createaddition-1.18.2-1.0.0.jar createappliedkinetics-1.3.1-1.18.2.jar createarmoryv0.6BP.jar createbb-1.18.2-1.8.1.jar createbigcannons-forge-1.18.2-0.5.2.a.jar CreateCasing-1.18.2-1.4.2.jar create-chromaticreturn1.18.2_v1.1.jar create-chromaticreturn1.18.2_v1.4.1.jar create-confectionery1.18.2_v1.0.9.jar createdeco-1.3.3-1.18.2.jar createdieselgenerators-1.18.2-1.1d.jar Create-Dreams-n-Desires-1.18.2-0.1a.PREBETA.jar create-interiors-v0.3.1-1.18.2.jar createoreexcavation-1.1.1.jar create-stuff-additions1.18.2_v2.0.4a.jar creeperoverhaul-1.3.1-forge.jar cristellib-forge-1.0.0.jar Croptopia-1.18.2-FORGE-2.1.0.jar CTM-1.18.2-1.1.5+5.jar ctov-2.9.4.jar cupboard-1.18.2-1.5.jar curioofundying-forge-1.18-5.3.0.0.jar curios-forge-1.18.2-5.0.9.1.jar curiouselytra-forge-1.18.1-5.0.1.0.jar CyclopsCore-1.18.2-1.17.6.jar DarkPaintings-Forge-1.18.2-10.0.4.jar Ding-1.18.2-Forge-1.4.1.jar domum_ornamentum-1.18.2-1.0.50-ALPHA-universal.jar Draconic-Evolution-1.18.2-3.0.29.524-universal.jar dracovita_delight_1.0.2_forge_1.18.2.jar dragonseeker-1.1.1-1.18.2.jar DungeonCrawl-1.18.2-2.3.14.jar DungeonsArise-1.18.2-2.1.52-release.jar EasyAnvils-v3.0.0-1.18.2-Forge.jar EasyMagic-v3.3.0-1.18.2-Forge.jar ecologics-forge-1.18.2-1.7.11.jar EnchantmentDescriptions-Forge-1.18.2-10.0.12.jar EnderStorage-1.18.2-2.9.0.182-universal.jar engineersdecor-1.18.2-1.1.28.jar Entity_Collision_FPS_Fix-forge-1.18.2-1.0.0.jar entity_texture_features_forge_1.18.2-4.5.1.jar entityculling-forge-1.6.1-mc1.18.2.jar EvilCraft-1.18.2-1.2.22.jar expandability-6.0.0.jar ExtraDisks-1.18.2-2.1.0.jar ExtraStorage-1.18.2-2.2.1.jar ExtremeReactors2-1.18.2-2.0.71.jar extremesoundmuffler-3.30_forge-1.18.2.jar Fallingleaves-1.18.2-1.3.2.jar FarmersDelight-1.18.2-1.2.3.jar FarmersRespite-1.18.2-1.3.0.jar farmingforblockheads-forge-1.18.2-10.0.2.jar farmlife-1.18.2-1.0.1.jar farsight-1.18.2-1.9.jar FastFurnace-1.18.2-6.0.3.jar FastLeafDecay-28.jar Fastload-Reforged-mc1.18.2-3.4.0.jar FastSuite-1.18.2-3.0.2.jar FastWorkbench-1.18.2-6.1.1.jar feature_nbt_deadlock_be_gone_forge-2.0.0+1.18.2.jar ferritecore-4.2.2-forge.jar findme-3.0.6-forge.jar FluxNetworks-1.18.2-7.0.9.15.jar FpsReducer2-forge-1.18.2-2.0.jar FramedBlocks-5.11.5.jar ftb-essentials-1802.2.2-build.83.jar ftb-library-forge-1802.3.11-build.177.jar fusion-1.0.6-forge-mc1.18.jar galosphere_delight_1.1.0_forge_1.18.2.jar Galosphere-1.18.2-1.2.2-Forge.jar GatewaysToEternity-1.18.2-2.3.0.jar geckolib-forge-1.18-3.0.57.jar glassential-forge-1.18.2-1.2.3.jar gobber_delight_2.0.0_forge_1.18.2.jar Gobber2-Forge-1.18.2-2.6.37.jar goblintraders-1.8.0-1.18.2.jar gpumemleakfix-1.18.2-1.6.jar guardvillagers-1.18.2.1.4.3.jar HealthOverlay-1.18.2-6.3.4.jar hexerei-0.2.2.jar Highlighter-1.18.1-1.1.2.jar honeyexpansion-1.1.1.jar iceandfire-2.1.12-1.18.2.jar Iceberg-1.18.2-forge-1.0.49.jar ImmersiveEngineering-1.18.2-8.4.0-161.jar industrial-foregoing-1.18.2-3.3.1.6-10.jar InsaneLib-1.5.3-mc1.18.2.jar IntegratedDynamics-1.18.2-1.16.1.jar inventorysorter-1.18-19.0.0.jar ironchest-1.18.2-13.2.11.jar ironfurnaces-1.18.2-3.3.3.jar ItalianDelight-1.18.2 1.5+FIX.jar Jade-1.18.2-forge-5.3.0.jar jei-1.18.2-forge-10.2.1.1005.jar jeiintegration_1.18.2-9.0.0.37.jar JustEnoughProfessions-1.18.2-1.3.0.jar JustEnoughResources-1.18.2-0.14.1.171.jar kotlinforforge-3.12.0-all.jar kubejs-forge-1802.5.5-build.569.jar kubejs-mekanism-1802.1.3-build.8.jar kubejs-thermal-1802.1.5-build.16.jar L_Enders Cataclysm-0.51-changed Them -1.18.2.jar largemeals-1.18.2-2.0.jar lazydfu-1.0-1.18+.jar LegendaryTooltips-1.18.2-1.3.1.jar letmedespawn-1.18.x-1.19.x-forge-1.0.3.jar lightspeed-1.18.2-1.0.5.jar logprot-1.18.2-1.7.jar lootr-1.18.2-0.3.25.63.jar mahoutsukai-1.18.2-v1.34.57.jar Mantle-1.18.2-1.9.45.jar MaxHealthFix-Forge-1.18.2-5.0.4.jar mcjtylib-1.18-6.0.20.jar mcw-bridges-2.1.0-mc1.18.2forge.jar mcw-doors-1.1.0forge-mc1.18.2.jar mcw-fences-1.0.7-mc1.18.2forge.jar mcw-furniture-3.2.0-mc1.18.2forge.jar mcw-roofs-2.2.4-mc1.18.2forge.jar mcw-trapdoors-1.1.1-mc1.18.2forge.jar mcw-windows-2.2.0-mc1.18.2forge.jar MEGACells-1.4.2-1.18.2.jar Mekanism-1.18.2-10.2.5.465.jar MekanismAdditions-1.18.2-10.2.5.465.jar MekanismGenerators-1.18.2-10.2.5.465.jar MekanismTools-1.18.2-10.2.5.465.jar minecolonies-1.18.2-1.1.149-RELEASE.jar mininggadgets-1.11.1.jar MmmMmmMmmMmm-1.18.2-1.5.2.jar modelfix-1.8.jar modernfix-forge-5.7.4+mc1.18.2.jar modonomicon-1.18.2-1.33.1.jar molten_vents_custom_blocks.json molten_vents-1.18.2-2.0.3.jar MoreMekanismProcessing-1.18.2-2.5.jar moreoverlays-1.20.11-mc1.18.2.jar morevillagers-forge-1.18.2-3.3.2.jar MouseTweaks-forge-mc1.18-2.21.jar mowziesmobs-1.5.32.jar multi-piston-1.18.2-1.2.15-ALPHA.jar mutil-1.18.2-4.5.0.jar naturalist-forge-1.1.1-1.18.2.jar netherportalfix-forge-1.18.2-9.0.1.jar NethersDelight-1.18.2-2.2.0.jar nocubes_create_compats_1.0.0_forge_1.18.2.jar notenoughanimations-forge-1.6.0-mc1.18.2.jar observable-2.2.3-forge.jar occultism-1.18.2-1.84.0.jar Oh_The_Biomes_You'll_Go-forge-1.18.2-1.4.7.jar Paintings-forge-1.18.2-9.1.2.1.jar Patchouli-1.18.2-71.1.jar pipez-1.18.2-1.1.5.jar Placebo-1.18.2-6.6.7.jar plushies-1.2-1.18.2-forge.jar pneumaticcraft-repressurized-1.18.2-3.6.1-29.jar polymorph-forge-1.18.2-0.49.jar Powah-3.0.8.jar Prism-1.18.2-1.0.1.jar productivebees-1.18.2-0.9.3.0.jar ProgressiveBosses-3.6.6-mc1.18.2.jar PuzzlesLib-v3.5.8-1.18.2-Forge.jar ReAuth-1.18-Forge-4.0.7.jar refinedstorage-1.10.5.jar refinedstorageaddons-0.8.2.jar reliquary-1.18.2-2.0.19.1161.jar repurposed_structures_forge-5.1.14+1.18.2.jar rftoolsbase-1.18-3.0.12.jar rhino-forge-1802.2.1-build.255.jar right-click-harvest-3.2.0+1.18.2-forge.jar RSInfinityBooster-1.18.2-2.1+20.jar rsrequestify-2.2.0.jar rubidium_extras-1.18.2_v1.3.2.jar rubidium-0.5.6.jar saturn-mc1.18.2-0.0.4.jar savage_and_ravage-1.18.2-4.0.1.jar Serene Seasons-1.18.2-7.0.0.13.jar shutupexperimentalsettings-1.0.5.jar simplylight-1.18.2-1.4.5-build.43.jar SmartBrainLib-forge-1.18.2-1.9.jar smoothchunk-1.18.2-1.9.jar sophisticatedbackpacks-1.18.2-3.18.60.906.jar sophisticatedcore-1.18.2-0.5.87.416.jar sophisticatedstorage-1.18.2-0.8.42.599.jar spark-1.10.38-forge.jar spirit-forge-1.18.2-2.1.8.jar starlight-1.0.2+forge.546ae87.jar starterkit-1.18.2-5.2.jar Steam_Rails-1.4.4+forge-mc1.18.2-build.12.jar StorageDrawers-1.18.2-10.2.1.jar Structory-1.18.2-1.0.2.jar structure_gel-1.18.2-2.4.7.jar structureessentials-1.18.2-3.0.jar structurize-1.18.2-1.0.424-ALPHA.jar supermartijn642configlib-1.1.8-forge-mc1.18.jar supermartijn642corelib-1.1.13-forge-mc1.18.jar swingthroughgrass-1.18.2-1.9.1.jar TConstruct-1.18.2-3.6.4.113.jar TerraBlender-forge-1.18.2-1.2.0.126.jar Terralith_1.18.2_v2.2.4.jar tetra-1.18.2-4.10.1.jar thermal_cultivation-1.18.2-9.2.1.20.jar thermal_dynamics-1.18.2-9.2.2.19.jar thermal_expansion-1.18.2-9.2.1.22.jar thermal_foundation-1.18.2-9.2.1.53.jar thermal_innovation-1.18.2-9.2.1.19.jar thermal_integration-1.18.2-9.2.1.18.jar titanium-1.18.2-3.5.9-43.jar ToolBelt-1.18.2-1.18.9.jar torchmaster-18.2.1.jar towns_and_towers_forge-1.10.0.1+1.18.2.jar trashcans-1.0.18-forge-mc1.18.jar trashslot-forge-1.18.2-11.0.3.jar TravelersBackpack-1.18.2-7.1.42.jar twigs-1.1.4-patch4+1.18.2-forge.jar twilightforest-1.18.2-4.1.1494-universal.jar waystones-forge-1.18.2-10.2.1.jar WitherSkeletonTweaks-1.18.2-7.1.3.jar xnet-1.18-4.0.9.jar xptome-1.18.2-2.1.7.jar YungsApi-1.18.2-Forge-2.2.9.jar YungsBetterDesertTemples-1.18.2-Forge-1.3.1.jar YungsBetterDungeons-1.18.2-Forge-2.1.0.jar YungsBetterMineshafts-1.18.2-Forge-2.2.jar YungsBetterNetherFortresses-1.18.2-Forge-1.0.0.jar YungsBetterOceanMonuments-1.18.2-Forge-1.0.3.jar YungsBetterStrongholds-1.18.2-Forge-2.1.1.jar YungsBetterWitchHuts-1.18.2-Forge-1.0.1.jar YungsBridges-1.18.2-Forge-2.1.0.jar YungsExtras-1.18.2-Forge-2.1.0.jar ZeroCore2-1.18.2-2.1.39.jar [1.18.2] SecurityCraft v1.9.7.jar AdvancedPeripherals-1.18.2-0.7.31r.jar AE2-Things-1.0.5.jar AE2WTLib-11.6.3.jar AI-Improvements-1.18.2-0.5.2.jar alexsmobs-1.18.6.jar
    • Hey guys,    So I've been at this for quite a while. I currently play on a server with me and a buddy of mine. We have around 5-10 mods on there and they're pretty light on the system, however, we're looking to start getting into some serious modding on another server. As of right now the standard server has 2gb of ram allocated but I'm trying to increase it on the more heavily modded server to make sure it can keep up with the demand. I've allocated 8GB of RAM in the user_jvm_args.txt file # Xmx and Xms set the maximum and minimum RAM usage, respectively. # They can take any number, followed by an M or a G. # M means Megabyte, G means Gigabyte. # For example, to set the maximum to 3GB: -Xmx3G # To set the minimum to 2.5GB: -Xms2500M -Xms2G # A good default for a modded server is 4GB. # Uncomment the next line to set it. -Xmx8G but nothing changed as i expected event though I followed someone else's guidance, so i went into my run.bat file and was presented with this. @echo off REM Forge requires a configured set of both JVM and program arguments. REM Add custom JVM arguments to the user_jvm_args.txt REM Add custom program arguments {such as nogui} to this file in the next line before the %* or REM  pass them to this script directly java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.1.46/win_args.txt %* pause I've tried adding a few different arguments in there but when I run the bat file and the GUI pops up it reads that there's either an error or it cant find my Jar file which is in the Version file. I then take the Jar file and move it out of it so there is a direct route to make sure there's no confusion but I still get the same error. one example is  Error: Unable to initialize main class net.minecraft.server.Main Caused by: java.lang.NoClassDefFoundError: joptsimple/ValueConverter and the argument I'm using is  @echo off java -Xmx8G -Xms2G -jar server-1.20.1.jar --nogui PAUSE I've been at this for literally months, researching, learning and just trying different things out. I'm hoping someone can either just give me an argument that will work or explain what I need to do, just anything. I'd appreciate the help.   Your fellow gamer, B.
    • Aquatic Vanilla is one of the best Minecraft Servers dedicated to providing players with the best Minecraft server experience. Our number one goal is to provide a high quality and friendly experience for our players to enjoy.   JAVA EDITION ip: play.aquatic-vanilla.info BEDROCK EDITION ip: play.aquatic-vanilla.info port: 19132
    • Why I can't download Forge I've changed the Internet but it's still this.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.