Jump to content

Recommended Posts

Posted

Hello all. I have a Container that functions similarly to a crafting table; however, you craft things using Matter.

 

There is a problem. You can only craft once, and after that, the container becomes unusable until the game is restarted (See attachment).

 

Honestly, I've been working at this for hours on end, and I haven't got anywhere.

 

ContainerAssembler.java

 
 
 
Quote

package com.obcletter.chemicanalyzer.inventory;

import com.obcletter.chemicanalyzer.init.ModBlocks;
import com.obcletter.chemicanalyzer.recipes.AssemblerFactory.AssemblerRecipe;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCraftResult;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.network.play.server.SPacketSetSlot;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.ForgeRegistries;

public class ContainerAssembler extends Container {

	/**
	 * Crafting Matrix, seems to have dun <strong> D I E D</strong>
	 */
	public InventoryCrafting craftMatrix = new InventoryCrafting(this, 3, 3);
	public InventoryMatter matter = new InventoryMatter(this, craftMatrix);
	/**
	 * Result of the craft
	 */
	public InventoryCraftResult craftResult = new InventoryCraftResult();

	/**
	 * Position of the assembler
	 */
	private BlockPos pos;
	/**
	 * The current world
	 */
	private World world;
	/**
	 * The player using the assembler
	 */
	private EntityPlayer player;

	private SlotAssembler assemblerSlot;

	/**
	 * Constructor, mostly for initializing slots
	 * 
	 * @param playerInv
	 *            Player inventory
	 * @param worldIn
	 *            World
	 * @param pos
	 *            Position of the assembler
	 */
	public ContainerAssembler(InventoryPlayer playerInv, World worldIn, BlockPos pos) {
		this.world = worldIn;
		this.player = playerInv.player;
		this.assemblerSlot = new SlotAssembler(this, playerInv.player, this.craftMatrix, this.craftResult, this.matter,
				0, 125, 52, this.windowId);
		this.addSlotToContainer(this.assemblerSlot);

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

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

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

	public void update() {

	}

	@Override
	public boolean canInteractWith(EntityPlayer playerIn) {
		if (this.pos != null && this.world.getBlockState(this.pos).getBlock() != ModBlocks.assembler) {
			return false;
		} else if (this.pos != null) {
			return playerIn.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D,
					(double) this.pos.getZ() + 0.5D) <= 64.0D;
		} else {
			return true;
		}
	}

	public void onContainerClosed(EntityPlayer playerIn) {
		super.onContainerClosed(playerIn);

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

	@Override
	public void onCraftMatrixChanged(IInventory inventoryIn) {
		if (!this.world.isRemote) {
			EntityPlayerMP entityplayermp = (EntityPlayerMP) this.player;
			ItemStack itemstack = ItemStack.EMPTY;
			for (ResourceLocation location : ForgeRegistries.RECIPES.getKeys()) {
				IRecipe recipe = ForgeRegistries.RECIPES.getValue(location);
				if (recipe != null && recipe instanceof AssemblerRecipe) {
					((AssemblerRecipe) recipe).setMatterSlot(matter);
					this.craftResult.setRecipeUsed(recipe);
					itemstack = recipe.getCraftingResult(this.craftMatrix);
					((AssemblerRecipe) recipe).setMatterSlot(null);
					assemblerSlot.setCurrentRecipe(((AssemblerRecipe) recipe));
				}
			}
			this.craftResult.setInventorySlotContents(0, itemstack);
			entityplayermp.connection.sendPacket(new SPacketSetSlot(this.windowId, 0, itemstack));
		}
	}

	@Override
	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 >= 10 && 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;
	}

	public boolean canMergeSlot(ItemStack stack, Slot slotIn) {
		return slotIn.inventory != this.craftResult && super.canMergeSlot(stack, slotIn);
	}
}

 

 

InventoryMatter.java

 
 
 
Quote

package com.obcletter.chemicanalyzer.inventory;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;

public class InventoryMatter implements IInventory {

	private final NonNullList<ItemStack> stackList;

	private Container eventHandler;
	private InventoryCrafting crafting;

	public InventoryMatter(Container eventHandler, InventoryCrafting crafting) {
		this.stackList = NonNullList.withSize(1, ItemStack.EMPTY);
		this.eventHandler = eventHandler;
		this.crafting = crafting;
	}

	@Override
	public String getName() {
		return "container.matter";
	}

	@Override
	public boolean hasCustomName() {
		return false;
	}

	@Override
	public ITextComponent getDisplayName() {
		return (ITextComponent) (this.hasCustomName() ? new TextComponentString(this.getName())
				: new TextComponentTranslation(this.getName(), new Object[0]));
	}

	@Override
	public int getSizeInventory() {
		return 1;
	}

	@Override
	public boolean isEmpty() {
		if (stackList.get(0).isEmpty())
			return true;
		return false;
	}

	@Override
	public ItemStack getStackInSlot(int index) {
		return stackList.get(index);
	}

	@Override
	public ItemStack decrStackSize(int index, int count) {
		ItemStack itemstack = ItemStackHelper.getAndSplit(this.stackList, 0, count);

		if (!itemstack.isEmpty()) {
			this.eventHandler.onCraftMatrixChanged(crafting);
		}

		return itemstack;
	}

	@Override
	public ItemStack removeStackFromSlot(int index) {
		return ItemStackHelper.getAndRemove(stackList, 0);
	}

	@Override
	public void setInventorySlotContents(int index, ItemStack stack) {
		stackList.set(0, stack);
		this.eventHandler.onCraftMatrixChanged(crafting);
	}

	@Override
	public int getInventoryStackLimit() {
		return 64;
	}

	@Override
	public void markDirty() {
	}

	@Override
	public boolean isUsableByPlayer(EntityPlayer player) {
		return true;
	}

	@Override
	public void openInventory(EntityPlayer player) {
	}

	@Override
	public void closeInventory(EntityPlayer player) {
	}

	@Override
	public boolean isItemValidForSlot(int index, ItemStack stack) {
		return true;
	}

	@Override
	public int getField(int id) {
		return 0;
	}

	@Override
	public void setField(int id, int value) {

	}

	@Override
	public int getFieldCount() {
		return 0;
	}

	@Override
	public void clear() {
		this.stackList.clear();
	}

}

 

 

SlotAssembler.java

 
 
 
 
 
 
Quote

package com.obcletter.chemicanalyzer.inventory;

import com.obcletter.chemicanalyzer.recipes.AssemblerFactory.AssemblerRecipe;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCraftResult;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;

public class SlotAssembler extends Slot {
	/** The craft matrix inventory linked to this result slot. */
	private final InventoryCrafting craftMatrix;

	private final InventoryMatter matter;
	/** The player that is using the GUI where this slot resides. */
	private final EntityPlayer player;

	private AssemblerRecipe currentRecipe;
	private Container eventHandler;

	private int windowid;
	/**
	 * The number of items that have been crafted so far. Gets passed to
	 * ItemStack.onCrafting before being reset.
	 */
	private int amountCrafted;

	public SlotAssembler(Container eventHandler, EntityPlayer player, InventoryCrafting craftingInventory,
			IInventory inventoryIn, InventoryMatter matter, int slotIndex, int xPosition, int yPosition, int windowid) {
		super(inventoryIn, slotIndex, xPosition, yPosition);
		this.eventHandler = eventHandler;
		this.player = player;
		this.craftMatrix = craftingInventory;
		this.matter = matter;
		this.windowid = windowid;
	}

	/**
	 * Check if the stack is allowed to be placed in this slot, used for armor slots
	 * as well as furnace fuel.
	 */
	public boolean isItemValid(ItemStack stack) {
		return false;
	}

	/**
	 * Decrease the size of the stack in slot (first int arg) by the amount of the
	 * second int arg. Returns the new stack.
	 */
	public ItemStack decrStackSize(int amount) {
		if (this.getHasStack()) {
			this.amountCrafted += Math.min(amount, this.getStack().getCount());
		}

		return super.decrStackSize(amount);
	}

	/**
	 * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not
	 * ore and wood. Typically increases an internal count then calls
	 * onCrafting(item).
	 */
	protected void onCrafting(ItemStack stack, int amount) {
		this.amountCrafted += amount;
		this.onCrafting(stack);
	}

	protected void onSwapCraft(int p_190900_1_) {
		this.amountCrafted += p_190900_1_;
	}

	/**
	 * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not
	 * ore and wood.
	 */
	protected void onCrafting(ItemStack stack) {
		if (this.amountCrafted > 0) {
			stack.onCrafting(this.player.world, this.player, this.amountCrafted);
			net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(this.player, stack,
					craftMatrix);
		}
	}

	public ItemStack onTake(EntityPlayer thePlayer, ItemStack stack) {
		this.onCrafting(stack);
		InventoryCraftResult inventorycraftresult = (InventoryCraftResult) this.inventory;
		if (this.currentRecipe != null) {
			matter.decrStackSize(0, this.currentRecipe.getRequiredMatter());
		}
		inventorycraftresult.setRecipeUsed((IRecipe) null);
		eventHandler.onCraftMatrixChanged(craftMatrix);
		return stack;
	}

	public void setCurrentRecipe(AssemblerRecipe currentRecipe) {
		this.currentRecipe = currentRecipe;
	}
}

 

 

GuiAssembler.java (probably the most pointless one to showcase)

 
 
 
Quote

package com.obcletter.chemicanalyzer.client.gui.inventory;

import com.obcletter.chemicanalyzer.ModMain;
import com.obcletter.chemicanalyzer.inventory.ContainerAssembler;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class GuiAssembler extends GuiContainer {
	private static final ResourceLocation ASSEMBLER_GUI_TEXTURES = new ResourceLocation(
			ModMain.MODID + ":textures/gui/assembler.png");

	public GuiAssembler(InventoryPlayer playerInv, World worldIn, BlockPos pos) {
		super(new ContainerAssembler(playerInv, worldIn, pos));
	}

	@Override
	protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
		super.drawDefaultBackground();
		this.mc.getTextureManager().bindTexture(ASSEMBLER_GUI_TEXTURES);
		int i = this.guiLeft;
		int j = (this.height - this.ySize) / 2;
		this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);
	}

	@Override
	protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
		this.fontRenderer.drawString(I18n.format("container.assembler"), 28, 6, 4210752);
		this.fontRenderer.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
	}
}

 

 

Hi! I'm a Java programmer but barely know anything Minecraft related. 

Posted

I'm not familiar with the cause, but it'd probably help if you clarified this:

 
 
 
5 hours ago, OBCLetter said:

 There is a problem. You can only craft once, and after that, the container becomes unusable until the game is restarted (See attachment).

By unusable do you mean that you can't open the GUI again or that the crafting ability doesn't work?

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i tested without the mod and now i get this    ---- Minecraft Crash Report ---- WARNING: coremods are present:   IELoadingPlugin (ImmersiveEngineering-core-0.12-98.jar)   AdvancedRocketryPlugin (AdvancedRocketry-1.12.2-2.0.0-17.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.11.jar)   MekanismCoremod (Mekanism-1.12.2-9.8.3.390.jar)   SuperMartijn642's Core Lib Plugin (_supermartijn642corelib-1.1.17a-forge-mc1.12.jar)   AppleCore (AppleCore-mc1.12.2-3.4.0.jar)   MaterialTweakerPlugin (MaterialTweaker-1.1.1.jar)   CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   MixinLoader (LootTweaker-0.4.1+MC1.12.2.jar) Contact their authors BEFORE contacting forge // Surprise! Haha. Well, this is awkward. Time: 11/29/24 5:39 PM Description: Initializing game java.lang.NoClassDefFoundError: com/supermartijn642/rechiseled/registration/data/RegistrationFusionModelProvider     at com.supermartijn642.rechiseled.api.registration.RechiseledRegistration.get(RechiseledRegistration.java:26)     at com.supermartijn642.rechiseled.Rechiseled.<clinit>(Rechiseled.java:37)     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:348)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:539)     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.ClassNotFoundException: com.supermartijn642.rechiseled.registration.data.RegistrationFusionModelProvider     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 40 more Caused by: java.lang.NoClassDefFoundError: com/supermartijn642/fusion/api/provider/FusionModelProvider     at java.lang.ClassLoader.defineClass1(Native Method)     at java.lang.ClassLoader.defineClass(ClassLoader.java:756)     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)     ... 42 more Caused by: java.lang.ClassNotFoundException: com.supermartijn642.fusion.api.provider.FusionModelProvider     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 46 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace:     at com.supermartijn642.rechiseled.api.registration.RechiseledRegistration.get(RechiseledRegistration.java:26)     at com.supermartijn642.rechiseled.Rechiseled.<clinit>(Rechiseled.java:37)     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Class.java:348)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:539)     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) -- Initialization -- Details: Stacktrace:     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 6.6.54-05528-gdd4efe62d86b     Java Version: 1.8.0_432, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 261355088 bytes (249 MB) / 671088640 bytes (640 MB) up to 1073741824 bytes (1024 MB)     JVM Flags: 7 total; -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2859 59 mods loaded, 58 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                        | Version                      | Source                                           | Signature                                |     |:----- |:------------------------- |:---------------------------- |:------------------------------------------------ |:---------------------------------------- |     | LC    | minecraft                 | 1.12.2                       | minecraft.jar                                    | None                                     |     | LC    | mcp                       | 9.42                         | minecraft.jar                                    | None                                     |     | LC    | FML                       | 8.0.99.99                    | forge-1.12.2-14.23.5.2859.jar                    | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge                     | 14.23.5.2859                 | forge-1.12.2-14.23.5.2859.jar                    | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | securitycraft             | v1.9.11                      | [1.12.2] SecurityCraft v1.9.11.jar               | None                                     |     | LC    | supermartijn642corelib    | 1.1.17a                      | _supermartijn642corelib-1.1.17a-forge-mc1.12.jar | None                                     |     | LC    | ic2                       | 2.8.170-ex112                | industrialcraft-2-2.8.170-ex112.jar              | de041f9f6187debbc77034a344134053277aa3b0 |     | LC    | immersiveengineering      | 0.12-98                      | ImmersiveEngineering-0.12-98.jar                 | None                                     |     | LC    | libvulpes                 | 0.4.2.-25                    | LibVulpes-1.12.2-0.4.2-25-universal.jar          | None                                     |     | LC    | advancedrocketry          | 1.12.2-2.0.0-17              | AdvancedRocketry-1.12.2-2.0.0-17.jar             | None                                     |     | LC    | crafttweaker              | 4.1.20                       | CraftTweaker2-1.12-4.1.20.699.jar                | None                                     |     | LC    | advancedtweakery          | 1.2                          | AdvancedTweakery-1.2.jar                         | None                                     |     | LC    | applecore                 | 3.4.0                        | AppleCore-mc1.12.2-3.4.0.jar                     | None                                     |     | LC    | base                      | 3.14.0                       | base-1.12.2-3.14.0.jar                           | None                                     |     | LC    | biometweaker              | 3.2.369                      | BiomeTweaker-1.12.2-3.2.369.jar                  | 631f326344f7f5fd7df7eb940760ebd52b7c9c17 |     | LC    | bookshelf                 | 2.3.590                      | Bookshelf-1.12.2-2.3.590.jar                     | d476d1b22b218a10d845928d1665d45fce301b27 |     | LC    | buildinggadgets           | 2.8.4                        | BuildingGadgets-2.8.4.jar                        | None                                     |     | LC    | ctm                       | MC1.12.2-1.0.2.31            | CTM-MC1.12.2-1.0.2.31.jar                        | None                                     |     | LC    | chisel                    | MC1.12.2-1.0.2.45            | Chisel-MC1.12.2-1.0.2.45.jar                     | None                                     |     | LC    | cyclopscore               | 1.6.7                        | CyclopsCore-1.12.2-1.6.7.jar                     | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | commoncapabilities        | 2.4.8                        | CommonCapabilities-1.12.2-2.4.8.jar              | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | simplecore                | 1.7.3.4                      | simplecore-1.12.2-1.7.3.4.jar                    | None                                     |     | LC    | fusion                    | 2.4.1.11                     | fusion-1.12.2-2.4.1.11.jar                       | None                                     |     | LC    | connectedglass            | 1.1.12                       | connectedglass-1.1.12-forge-mc1.12.jar           | None                                     |     | LC    | contenttweaker            | 1.12.2-4.10.0                | ContentTweaker-1.12.2-4.10.0.jar                 | None                                     |     | LC    | controlling               | 3.0.10                       | Controlling-3.0.12.4.jar                         | None                                     |     | LC    | cotro                     | @VERSION@                    | CoTRO-1.12.2-1.0.1.jar                           | None                                     |     | LC    | ctgui                     | 1.0.0                        | CraftTweaker2-1.12-4.1.20.699.jar                | None                                     |     | LC    | crafttweakerjei           | 2.0.3                        | CraftTweaker2-1.12-4.1.20.699.jar                | None                                     |     | LC    | crafttweakerutils         | 0.6                          | crafttweakerutils-0.6.jar                        | None                                     |     | LC    | ctintegration             | 1.7.2                        | ctintegration-1.7.2.jar                          | None                                     |     | LC    | darkutils                 | 1.8.230                      | DarkUtils-1.12.2-1.8.230.jar                     | d476d1b22b218a10d845928d1665d45fce301b27 |     | LC    | elevatorid                | 1.3.12                       | ElevatorMod-1.12.2-1.3.12.jar                    | None                                     |     | LC    | zerocore                  | 1.12.2-0.1.2.9               | zerocore-1.12.2-0.1.2.9.jar                      | None                                     |     | LC    | bigreactors               | 1.12.2-0.4.5.68              | ExtremeReactors-1.12.2-0.4.5.68.jar              | None                                     |     | LC    | havook                    | 1.0.0                        | havook.jar                                       | None                                     |     | LC    | hungertweaker             | 1.3.0                        | HungerTweaker-1.12.2-1.3.0.jar                   | None                                     |     | LC    | integrateddynamics        | 1.1.11                       | IntegratedDynamics-1.12.2-1.1.11.jar             | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | integratedcrafting        | 1.0.10                       | IntegratedCrafting-1.12.2-1.0.10.jar             | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | integrateddynamicscompat  | 1.0.0                        | IntegratedDynamics-1.12.2-1.1.11.jar             | None                                     |     | LC    | integratedterminals       | 1.0.14                       | IntegratedTerminals-1.12.2-1.0.14.jar            | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | integratedterminalscompat | 1.0.0                        | IntegratedTerminals-1.12.2-1.0.14.jar            | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | integratedtunnels         | 1.6.14                       | IntegratedTunnels-1.12.2-1.6.14.jar              | bd0353b3e8a2810d60dd584e256e364bc3bedd44 |     | LC    | integratedtunnelscompat   | 1.0.0                        | IntegratedTunnels-1.12.2-1.6.14.jar              | None                                     |     | LC    | loottweaker               | 0.4.1                        | LootTweaker-0.4.1+MC1.12.2.jar                   | None                                     |     | LC    | materialtweaker           | 1.1.1                        | MaterialTweaker-1.1.1.jar                        | None                                     |     | LC    | mekanism                  | 1.12.2-9.8.3.390             | Mekanism-1.12.2-9.8.3.390.jar                    | None                                     |     | LC    | mekatweaker               | 1.2.0                        | mekatweaker-1.12-1.2.0.jar                       | None                                     |     | LC    | mtlib                     | 3.0.7                        | MTLib-3.0.7.jar                                  | None                                     |     | LC    | modtweaker                | 4.0.19                       | modtweaker-4.0.20.11.jar                         | None                                     |     | LC    | refinedstorage            | 2.3.2                        | morerefinedstorage-2.3.2.jar                     | None                                     |     | L     | rechiseled                | 1.1.6                        | rechiseled-1.1.6-forge-mc1.12.jar                | None                                     |     | L     | refinedstorageaddons      | 0.4.5                        | refinedstorageaddons-0.4.5.jar                   | None                                     |     | L     | supermartijn642configlib  | 1.1.6                        | supermartijn642configlib-1.1.8-forge-mc1.12.jar  | None                                     |     | L     | gircredstone              | ${version}                   | TC-Redstone-1.12.2-3.2.3.jar                     | None                                     |     | L     | worldedit                 | 6.1.10-SNAPSHOT              | WorldEdit-1.12.2.jar                             | None                                     |     | L     | worldeditcuife2           | 2.2.0-mf-1.12.2-14.23.5.2768 | WorldEdit-CUI-Forge-Edition-Mod-1.12.2.jar       | None                                     |     | L     | ic2_tweaker               | 0.2.1+build.4                | ic2-tweaker-0.2.1+build.4.jar                    | None                                     |     | UD    | advancedrocketrycore      | 1                            | minecraft.jar                                    | None                                     |     Loaded coremods (and transformers):  IELoadingPlugin (ImmersiveEngineering-core-0.12-98.jar)   blusunrize.immersiveengineering.common.asm.IEClassTransformer AdvancedRocketryPlugin (AdvancedRocketry-1.12.2-2.0.0-17.jar)   zmaster587.advancedRocketry.asm.ClassTransformer SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.11.jar)    MekanismCoremod (Mekanism-1.12.2-9.8.3.390.jar)   mekanism.coremod.KeybindingMigrationHelper SuperMartijn642's Core Lib Plugin (_supermartijn642corelib-1.1.17a-forge-mc1.12.jar)    AppleCore (AppleCore-mc1.12.2-3.4.0.jar)   squeek.applecore.asm.TransformerModuleHandler MaterialTweakerPlugin (MaterialTweaker-1.1.1.jar)    CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   team.chisel.ctm.client.asm.CTMTransformer MixinLoader (LootTweaker-0.4.1+MC1.12.2.jar)        GL info: ' Vendor: 'Mesa/X.org' Version: '4.3 (Compatibility Profile) Mesa 22.3.6' Renderer: 'virgl (Mesa Intel(R) UHD Graphics 600 (GLK 2))'     Launched Version: 1.12.2-forge-14.23.5.2859     LWJGL: 2.9.4     OpenGL: virgl (Mesa Intel(R) UHD Graphics 600 (GLK 2)) GL version 4.3 (Compatibility Profile) Mesa 22.3.6, Mesa/X.org     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'fml,forge'     Type: Client (map_client.txt)     Resource Packs:      Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 2x Intel(R) Celeron(R) N4020 CPU @ 1.10GHz
    • Also check the worldsave / serverconfig folder If there is no such file, make a test without this mod  
    • Hi, I've been having trouble trying to use forge as it shows a black screen when I open the game, but I can still interact with it and hear the music.  I've done all of the step by steps and most common fixes like updating drivers, keeping up to date with Java, deleting and reinstalling minecraft, restarting my computer MANY times, even smaller things like splash.properties (I didn't have that file so I added it and set it to false thinking it would do something, definitely not) and making sure to prioritize my rtx 3070 in the settings but with no luck. Minecraft works as intended when I uninstall forge and I also don't have any mods currently, it just gives me this issue when I install forge. I also increased the ram usage, made sure my hardware isn't full or anything, and even changed the resolution in hopes it would fix things. I checked my antivirus and firewall but that isn't the issue either. Trust me, I've done everything I can think of. For some reason the black screen does flicker a little into the main menu, but obviously unplayable. I couldn't even make my way to the settings with how little it flickered. I'm not sure if it flickered randomly or if it was because I was messing around moving and clicking a bunch, I didn't really test it that much.  
  • Topics

×
×
  • Create New...

Important Information

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