Jump to content

Sending packets for itemstacks in tile entities?


Zeretul4

Recommended Posts

Hey everyone, I'm still working on my custom furnace and I almost have it working. It has multiple outputs and for some reason the GUI is being really glitchy about it. I'm having issues similar to when certain variables were no updating and I worked it out by sending packets in the container class. Well now the itemstacks are acting similarly.

 

The way it works is that a single item goes in through the input slot, then one of several possible outputs are randomly chosen to go into the first available output slot of 15. When i throw a stack in and let it process, what looks like is happening is that 2 are coming out from one item but only one of them is real. I know it's working fine because as soon as i try to take something out or save and quit minecraft, the whole inventory fixes itself and gets rid of all the fake items. I'm pretty sure the issue is with nbt data not being sent to the GUI, all I really need to know is how to update the output slots like i did with other variables. Thanks!

Link to comment
Share on other sites

Please show the code of your TileEntity and ContainerBlock please

 

Sure thing!

 

Tile Entity

package zeretul4.geology.grinder;

import java.util.HashMap;

import zeretul4.geology.Geology;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityGrinder extends TileEntity implements IInventory {

        private ItemStack[] inv;
        public int grindTime = 0;
        public int bladeLevel = 0;
        public int fuelLevel = 0;
        public int burnTime = 0;
        public final int maxFuel = 10000;

        public TileEntityGrinder(){
                inv = new ItemStack[18];
        }
        
        @Override
        public void updateEntity() {
        	
        	bladeLevel = 0;
        	if (getStackInSlot(0) != null){
        		int tempLevel = getBladeLevel();
        		if (tempLevel != -1)
        			bladeLevel = tempLevel;
        	}
        	
        	if(burnTime > 0){
        		if (fuelLevel < maxFuel)
        			fuelLevel++;
        		burnTime--;
        	}        	
        	else if (fuelLevel < maxFuel && getStackInSlot(2) != null){
        		burnTime = 1000;
        		decrStackSize(2, 1);        		        		
        	} 
        	
        	if (fuelLevel > 0 && canGrind()){
        		fuelLevel--;
        		grindTime += 2;
        		if (grindTime >= 200){
        			grindTime = 0;
        			grindItem();
        		}
        	}
        	else
        		grindTime = 0;
        	
        }
        
        private int getBladeLevel(){
        	ItemStack item = getStackInSlot(0);
        	if (item == null)
        		return -1;
        	if (item.itemID == Geology.cobbleBlade.itemID)
        		return 1;
        	return -1;
        }
        
        private boolean checkIfFuel(){
        	ItemStack item = getStackInSlot(2);
        	if (item == null)
        		return false;
        	int id = item.itemID;
        	if (id == Item.coal.itemID)
        		return true;
        	
        	return false;
        }
        
        
        public boolean canGrind(){
        	
        	ItemStack input = getStackInSlot(1);
        	
        	if (!RecipesGrinder.checkRecipeExists(input)) // recipes does not exist
        		return false;
        	if (checkIfRoomForOutput()) // if there is room for any outputs
        		return true;
        		
        	return false;
        }
        
        private boolean checkIfRoomForOutput(){
        	for (int i = 0; i < 15; i++){
        		ItemStack stack = getStackInSlot(i + 3);
        		if (stack == null)
        			return true;
        	}
        	return false;
        }
        
        private void grindItem(){
        	ItemStack input = getStackInSlot(1).copy(); // get the input
        	ItemStack output = RecipesGrinder.getOutputRandom(input, false);
		decrStackSize(1, 1);// RecipesGrinder.getInput(input).stackSize);

		int outputIndex = 2;
		boolean foundIndex = false;
		while(!foundIndex){
			outputIndex++;
			if (getStackInSlot(outputIndex) == null){ // just set if empty
				setInventorySlotContents(outputIndex, output.copy());
				foundIndex = true;
			}
			else if (getStackInSlot(outputIndex).itemID == output.itemID){ // otherwise increase by proper amount
				getStackInSlot(outputIndex).stackSize++;// += output.stackSize;
				foundIndex = true;
			}
		}		

        }
       
        @Override
        public int getSizeInventory() {
                return inv.length;
        }

        @Override
        public ItemStack getStackInSlot(int slot) {
                return inv[slot];
        }
       
        @Override
        public void setInventorySlotContents(int slot, ItemStack stack) {
                inv[slot] = stack;
                if (stack != null && stack.stackSize > getInventoryStackLimit()) {
                        stack.stackSize = getInventoryStackLimit();
                }              
        }

        @Override
        public ItemStack decrStackSize(int slot, int amt) {
                ItemStack stack = getStackInSlot(slot);
                if (stack != null) {
                        if (stack.stackSize <= amt) {
                                setInventorySlotContents(slot, null);
                        } else {
                                stack = stack.splitStack(amt);
                                if (stack.stackSize == 0) {
                                        setInventorySlotContents(slot, null);
                                }
                        }
                }
                return stack;
        }

        @Override
        public ItemStack getStackInSlotOnClosing(int slot) {
                ItemStack stack = getStackInSlot(slot);
                if (stack != null) {
                        setInventorySlotContents(slot, null);
                }
                return stack;
        }
       
        @Override
        public int getInventoryStackLimit() {
                return 64;
        }

        @Override
        public boolean isUseableByPlayer(EntityPlayer player) {
                return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this &&
                player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64;
        }

        @Override
        public void openChest() {}

        @Override
        public void closeChest() {}
               
        @Override
        public void readFromNBT(NBTTagCompound tagCompound) {
        	// working code for setting itemstacks, commenting this out breaks the furnace so i know this is being called
                super.readFromNBT(tagCompound);
                NBTTagList tagList = tagCompound.getTagList("Inventory");
                for (int i = 0; i < tagList.tagCount(); i++) {
                        NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
                        byte slot = tag.getByte("Slot");
                        if (slot >= 0 && slot < inv.length) {
                                inv[slot] = ItemStack.loadItemStackFromNBT(tag);
                        }
                } //(ends here)
                

                this.fuelLevel = tagCompound.getInteger("Fuel");
                this.burnTime = tagCompound.getInteger("BurnTime");
                this.bladeLevel = tagCompound.getInteger("BladeLevel");
                this.grindTime = tagCompound.getInteger("GrindTime");
        }

        @Override
        public void writeToNBT(NBTTagCompound tagCompound) {
                super.writeToNBT(tagCompound);
                
                tagCompound.setInteger("Fuel", fuelLevel);
                tagCompound.setInteger("BurnTime", burnTime);
                tagCompound.setInteger("BladeLevel", bladeLevel);
                tagCompound.setInteger("GrindTime", grindTime);
                               
                NBTTagList itemList = new NBTTagList();
                for (int i = 0; i < inv.length; i++) {
                        ItemStack stack = inv[i];
                        if (stack != null) {
                                NBTTagCompound tag = new NBTTagCompound();
                                tag.setByte("Slot", (byte) i);
                                stack.writeToNBT(tag);
                                itemList.appendTag(tag);
                        }
                }
                tagCompound.setTag("Inventory", itemList);        

        } 

        @Override
        public String getInvName() {
                return "zeretul4.geology.grinder.tileEntityGrinder";
        }
        
        @SideOnly(Side.CLIENT)
        public int getGrindTimeScaled(int par1) {
            return this.grindTime * par1 / 200;
        }
        
        @SideOnly(Side.CLIENT)
        public int getBurnTimeScaled(int par1) {
            return this.burnTime * par1 / 1000;
        }
}

 

and container

package zeretul4.geology.grinder;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
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.Slot;
import net.minecraft.item.ItemStack;

public class ContainerGrinder extends Container {

        protected TileEntityGrinder tileEntity;  
        private final static int slots = 18;
        private int lastFuelLevel = 0;
        private int lastBurnTime = 0;
        private int lastBladeLevel = 0;
        private int lastGrindTime = 0;
        private ItemStack[] lastOutputs = new ItemStack[15];

        public ContainerGrinder (InventoryPlayer inventoryPlayer, TileEntityGrinder te){
                tileEntity = te;

                                
                addSlotToContainer(new Slot(tileEntity, 0, 36, 14)); // blade slot
                addSlotToContainer(new Slot(tileEntity, 1, 36, 35)); // input
                addSlotToContainer(new Slot(tileEntity, 2, 36, 56)); // fuel
                
                // 15 output slots
                addSlotToContainer(new Slot(tileEntity, 3, 80, 17));
                addSlotToContainer(new Slot(tileEntity, 4, 98, 17));
                addSlotToContainer(new Slot(tileEntity, 5, 116, 17));
                addSlotToContainer(new Slot(tileEntity, 6, 134, 17));
                addSlotToContainer(new Slot(tileEntity, 7, 152, 17));
                addSlotToContainer(new Slot(tileEntity, 8, 80, 35));
                addSlotToContainer(new Slot(tileEntity, 9, 98, 35));
                addSlotToContainer(new Slot(tileEntity, 10, 116, 35));
                addSlotToContainer(new Slot(tileEntity, 11, 134, 35));
                addSlotToContainer(new Slot(tileEntity, 12, 152, 35));
                addSlotToContainer(new Slot(tileEntity, 13, 80, 53));
                addSlotToContainer(new Slot(tileEntity, 14, 98, 53));
                addSlotToContainer(new Slot(tileEntity, 15, 116, 53));
                addSlotToContainer(new Slot(tileEntity, 16, 134, 53));
                addSlotToContainer(new Slot(tileEntity, 17, 152, 53));

                //commonly used vanilla code that adds the player's inventory
                bindPlayerInventory(inventoryPlayer);
        }
        
        public void addCraftingToCrafters(ICrafting par1ICrafting)
        {
            super.addCraftingToCrafters(par1ICrafting);
            par1ICrafting.sendProgressBarUpdate(this, 0, this.tileEntity.fuelLevel);
            par1ICrafting.sendProgressBarUpdate(this, 1, this.tileEntity.burnTime);
            par1ICrafting.sendProgressBarUpdate(this, 2, this.tileEntity.bladeLevel);
            par1ICrafting.sendProgressBarUpdate(this, 3, this.tileEntity.grindTime);
            for (int i = 0; i < 15; i++){
            	par1ICrafting.sendSlotContents(this, i + 4, tileEntity.getStackInSlot(i + 3));
            }
        }
        
        public void detectAndSendChanges()
        {
            super.detectAndSendChanges();

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

                if (this.lastFuelLevel != this.tileEntity.fuelLevel)
                {
                    var2.sendProgressBarUpdate(this, 0, this.tileEntity.fuelLevel);
                }
                if (this.lastBurnTime != this.tileEntity.burnTime)
                {
                    var2.sendProgressBarUpdate(this, 1, this.tileEntity.burnTime);
                }
                if (this.lastBladeLevel != this.tileEntity.bladeLevel)
                {
                    var2.sendProgressBarUpdate(this, 2, this.tileEntity.bladeLevel);
                }
                if (this.lastBladeLevel != this.tileEntity.grindTime)
                {
                    var2.sendProgressBarUpdate(this, 3, this.tileEntity.grindTime);
                }

                for (int i = 0; i < 15; i++){
                	var2.sendSlotContents(this, i + 4, tileEntity.getStackInSlot(i + 3));
                }

            }

            this.lastFuelLevel = this.tileEntity.fuelLevel;
            this.lastBurnTime = this.tileEntity.burnTime;
            this.lastBladeLevel = this.tileEntity.bladeLevel;
            this.lastGrindTime = this.tileEntity.grindTime;
            for (int i = 0; i < 15; i++){
            	this.lastOutputs[i] = this.tileEntity.getStackInSlot(i + 3);
            }
        }
        
        @SideOnly(Side.CLIENT)
        public void updateProgressBar(int par1, int par2)
        {
            if (par1 == 0)
            {
                this.tileEntity.fuelLevel = par2;
            }
            if (par1 == 1)
            {
                this.tileEntity.burnTime = par2;
            }
            if (par1 == 2)
            {
                this.tileEntity.bladeLevel = par2;
            }
            if (par1 == 3)
            {
                this.tileEntity.grindTime = par2;
            }           
        }
        
      //  @SideOnly(Side.CLIENT)
       // public void updateProgressBar(int par1, ItemStack par2)
       // {
       // 	for (int i = 0; i < 15; i++){
        //    	if (par1 == i + 4)
         //   		this.tileEntity.setInventorySlotContents(i + 3, par2);
          //  }
       // }
        

        @Override
        public boolean canInteractWith(EntityPlayer player) {
                return tileEntity.isUseableByPlayer(player);
        }


        protected void bindPlayerInventory(InventoryPlayer inventoryPlayer) {
                for (int i = 0; i < 3; i++) {
                        for (int j = 0; j < 9; j++) {
                                addSlotToContainer(new Slot(inventoryPlayer, j + i * 9 + 9,
                                                8 + j * 18, 84 + i * 18));
                        }
                }
                for (int i = 0; i < 9; i++) {
                        addSlotToContainer(new Slot(inventoryPlayer, i, 8 + i * 18, 142));
                }
        }

        @Override
        public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
                ItemStack stack = null;
                Slot slotObject = (Slot) inventorySlots.get(slot);

                //null checks and checks if the item can be stacked (maxStackSize > 1)
                if (slotObject != null && slotObject.getHasStack()) {
                        ItemStack stackInSlot = slotObject.getStack();
                        stack = stackInSlot.copy();

                        //merges the item into player inventory since its in the tileEntity
                        if (slot < slots) {
                                if (!this.mergeItemStack(stackInSlot, slots, 36 + slots, true)) {
                                        return null;
                                }
                        }
                        //places it into the tileEntity is possible since its in the player inventory
                        else if (!this.mergeItemStack(stackInSlot, 0, slots, false)) {
                                return null;
                        }

                        if (stackInSlot.stackSize == 0) {
                                slotObject.putStack(null);
                        } else {
                                slotObject.onSlotChanged();
                        }

                        if (stackInSlot.stackSize == stack.stackSize) {
                                return null;
                        }
                        slotObject.onPickupFromSlot(player, stackInSlot);
                }
                return stack;
        }
}

Link to comment
Share on other sites

I am not 100% sure but I think you need to call onInventoryChanged();

 

package zeretul4.geology.grinder;

import java.util.HashMap;

import zeretul4.geology.Geology;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityGrinder extends TileEntity implements IInventory {


        
        @Override
        public void updateEntity() {
  boolean pleaseUpdateMe = false;
         if (fuelLevel > 0 && canGrind()){
          fuelLevel--;
          grindTime += 2;
          if (grindTime >= 200){
           grindTime = 0;
           grindItem();
               pleaseUpdateMe = true;
          }
         }
         else
          grindTime = 0;
         if(pleaseUpdateMe) onInventoryChanged();
        }
}

Link to comment
Share on other sites

I am not 100% sure but I think you need to call onInventoryChanged();

 

package zeretul4.geology.grinder;

import java.util.HashMap;

import zeretul4.geology.Geology;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityGrinder extends TileEntity implements IInventory {


        
        @Override
        public void updateEntity() {
  boolean pleaseUpdateMe = false;
         if (fuelLevel > 0 && canGrind()){
          fuelLevel--;
          grindTime += 2;
          if (grindTime >= 200){
           grindTime = 0;
           grindItem();
               pleaseUpdateMe = true;
          }
         }
         else
          grindTime = 0;
         if(pleaseUpdateMe) onInventoryChanged();
        }
}

 

Hmm, this didn't do anything at all. I'm pretty sure it's an issue with the gui because I had a similar issue with ints doing their job, but not showing up on the gui. I got that worked out by sending int packets, I just don't know how to do the same for inventory slots.

 

Here's the gui code.

 

package zeretul4.geology.grinder;

import java.util.Random;

import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;

import org.lwjgl.opengl.GL11;

import zeretul4.geology.Geology;

public class GuiGrinder extends GuiContainer {

	TileEntityGrinder te;
	String[] bladeQuality = { "", "Poor" };
	Random rand = new Random();

        public GuiGrinder (InventoryPlayer inventoryPlayer,
        		TileEntityGrinder tileEntity) {
                //the container is instanciated and passed to the superclass for handling
                super(new ContainerGrinder(inventoryPlayer, tileEntity));
                te = tileEntity;
        }

        @Override
        protected void drawGuiContainerForegroundLayer(int param1, int param2) {
                //draw text and stuff here
                //the parameters for drawString are: string, x, y, color
                fontRenderer.drawString("Grinder", 90, 4, 4210752); 
                fontRenderer.drawString("Blade: ", 4, 18, 4210752);
                fontRenderer.drawString(bladeQuality[te.bladeLevel], 4, 26, 4210752);
                fontRenderer.drawString("Fuel: ", 4, 38, 4210752);
                fontRenderer.drawString("" + te.fuelLevel, 4, 46, 4210752);
                //draws "Inventory" or your regional equivalent
                fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 94 + 2, 4210752);
        }

        @Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2,
                        int par3) {
                //draw your Gui here, only thing you need to change is the path
                int texture = mc.renderEngine.getTexture("/zeretul4/geology/grinder/grinder.png");
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                this.mc.renderEngine.bindTexture(texture);
                int x = (width - xSize) / 2;
                int y = (height - ySize) / 2;
                this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
                
                int var7 = this.te.getGrindTimeScaled(24);
                this.drawTexturedModalRect(x + 54, y + 34, 176, 14, var7 + 1, 16);
                
                if (te.burnTime > 0){
                	int var8 = this.te.getBurnTimeScaled(12);
                	this.drawTexturedModalRect(x + 58, y + 57 + 12 - var8, 176, 12 - var8, 14, var8 + 2);
                }
        }

}

Link to comment
Share on other sites

I still think my first answer is correct except you need to detect if its server side or not

 

using

 

update things needed by your gui outside of the if statment below
if (!worldObj.isRemote)
	{
                      //do everything thats serverside here for example when grinding your item it needs to be in here
grindItem();
and then onInventoryChanged(); //on serverside this will update slots and send to client
                 }

Link to comment
Share on other sites

I still think my first answer is correct except you need to detect if its server side or not

 

using

 

update things needed by your gui outside of the if statment below
if (!worldObj.isRemote)
	{
                      //do everything thats serverside here for example when grinding your item it needs to be in here
grindItem();
and then onInventoryChanged(); //on serverside this will update slots and send to client
                 }

 

Yes! This fixed it. Thanks a lot for the help!

Link to comment
Share on other sites

Join the conversation

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

Guest
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

    • Hi all, I am a beginner when it comes to Minecraft modding and ChatGPT has run out its course in ways of being helpful. The mod itself runs fine within the IntelliJ IDE environment and performs exactly how I'd like it to. However, after compiling all necessary elements of my mod using gradlew build, and gradlew shadowJar and putting it into the mods folder (both with and without other mods present) it simply doesn't show up in my mods list and is therefore rendered useless. The mods functionality is pretty basic; fetch embeds from a certain Discord channel sent by a certain user and relay them into the client-sided Minecraft chat with slight modifications to the formatting.   ExampleMod.java: https://hastebin.com/share/yizizojodi.java build.gradle: https://hastebin.com/share/yowukonoju.java   Any help is appreciated - thank you! /S
    • full failure report   Execution failed for task ':runData'. > Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin\java.exe'' finished with non-zero exit value 1 * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':runData'.     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)     at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:147)     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)     at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)     at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)     at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)     at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)     at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)     at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)     at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)     at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49) Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin\java.exe'' finished with non-zero exit value 1     at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:415)     at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:52)     at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:165)     at net.minecraftforge.gradle.common.util.runs.MinecraftRunTask.exec(MinecraftRunTask.java:56)     at jdk.internal.reflect.GeneratedMethodAccessor533.invoke(Unknown Source)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)     at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)     at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)     at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)     at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)     at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)     at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:227)     at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:210)     at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:193)     at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)     at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)     at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)     at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)     at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)     at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)     at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)     at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)     at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)     at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)     at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)     at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)     at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)     at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)     at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)     at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)     at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)     at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)     at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)     at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:166)     at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:70)     at org.gradle.internal.Either$Right.fold(Either.java:175)     at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)     at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)     at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)     at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)     at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)     at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)     at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)     at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)     at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)     at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)     at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)     at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)     at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)     at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)     at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)     at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)     at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)     at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:94)     at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:49)     at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)     at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)     at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)     at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:81)     at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)     at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)     at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)     at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)     at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)     at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)     at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)     at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)     at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)     at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:287)     at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)     at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)     at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)     at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)     at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)     at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)     at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)     at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)     at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)     at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)     at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)     at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)     at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)     at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)     at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)     at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:317)     at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)     at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)     at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
    • MC version :1.20.6 forge version: 50.0.26 mapping channel: parchment mapping version: 2024.05.01-1.20.6 Caused by: java.lang.module.FindException: Module jopt.simple not found, required by cpw.mods.modlauncher i get this error when trying to launch my dev environment
    • Hello There! When this video goes out I will already have graduated and this is the story on how and why I am graduating college yet again after only one year!   
  • Topics

×
×
  • Create New...

Important Information

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