Jump to content

AutoRepairing Tools : 1 Durability every 15 seconds. How? Help :)


Deadlyapples

Recommended Posts

Hi guys. My mod is progressing and I am learning so much from the nice guys on these forums!

I have been working on implementing an auto repair system on my tools so when they reach a certain tier of tool material they start to repair their durability at a rate of 1 durability every 15 seconds. However it ended up preventing the tools from taking damage and then they stopped working, unable to break any blocks what so ever. This was put together by looking at some other peoples opensource code with repair class and methods but I scrapped it because it just wasn't working.

 

I tried setting up an onUpdate method that would check the tools NBT data looking for its tool tier level and whether it had been repaired recently. Then setting it up so that once it is at the max tier and that the int of when it had been repaired has reach a limit it sets currentMaxDurability = currentMaxDurability + 1. But that didn't work either.

 

I have searched the forums for something related but I am yet to find anything that is remotely helpful.

 

I was wondering if anyone has a simple solution or some sort of example? I looked at some Artifacts code and that didn't help either.

 

Any help would be appreciated :) !

Link to comment
Share on other sites

It would be really helpful if you showed us whatever code you had tried, rather than just a description, but it sounds like "currentMaxDurability = currentMaxDurability + 1" has nothing to do with the ItemStack. You need to actually reduce the damage on the stack, because damage is added until it reaches max damage at which point it breaks.

 

Perhaps try something like this, but be sure to include your other checks as needed:

if (stack.getItemDamage() > 0) {
stack.setItemDamage(stack.getItemDamage() - 1);
}

Link to comment
Share on other sites

Yeah sorry. That isnt any where near how my code works I was just showing an example. A way that I think about it thats all.

 

 

I am just struggling with creating a loop which checks the items NBT data and does stuff from there.

 

Just gunna give this another go and report back. :3

 

 

 

Link to comment
Share on other sites

Riiiight, This is what I am trying to use but the results are odd.

 

@Override
    public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
        int del = par1ItemStack.stackTagCompound.getInteger("repairDelay");
//if repairDelay Variable is greater than 0. Reduce its number by 1. Repeating
        if (del > 0) {
            --del;
// once the variable del is 0 then
        } else if (par1ItemStack.getItemDamage() > 0) {
// tool's damage is reduced by 1
// causing the tool to regenerate durability
            par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
            if (par5)
                del = 200;
            else
                del = 1200;
        }
        par1ItemStack.stackTagCompound.setInteger("repairDelay", del);
    }

 

 

When I use this, my tools end up not working at all. Its like the delay that is set up causes the tools to not work until the delay int becomes 0 then it works for 1 second, then the tool stops working again for a short period of time.

Link to comment
Share on other sites

That's pretty bizarre, but if I recall correctly you are doing a lot of custom stuff with your tool class. You didn't happen to override the "public int getDamage(ItemStack stack)" method, did you? If so, that may be part of the issue.

 

On a side note, I would probably check if (stack.getItemDamage() > 0) as the very first step in the onUpdate method, with everything else inside of that, since you only care about damaged stacks trying to repair.

Link to comment
Share on other sites

I could post all my code if you would prefer. But yes I change my max Damage based on NBT data points that build up as the tools are used.

 

@Override
    public IIcon getIconIndex(ItemStack thisItem) {
        NBTTagCompound evopoints = thisItem.getTagCompound();
        if (evopoints == null) {
            evopoints = new NBTTagCompound();
        }
        if (!evopoints.hasKey("evolutionPoints")) {
            evopoints.setInteger("evolutionPoints", 0);
        }
        thisItem.setTagCompound(evopoints);
        //NBTTagCompound repairDelay = thisItem.getTagCompound();
      //  if (repairDelay == null) {
      //      repairDelay = new NBTTagCompound();
      //  }
      //  if (!repairDelay.hasKey("repairDelay")) {
     //       repairDelay.setInteger("repairDelay", 1133);
      //  }
        thisItem.setTagCompound(evopoints);
        if (evopoints.getInteger("evolutionPoints") >= tier2Level && (evopoints.getInteger("evolutionPoints") < tier3Level)) {
            this.efficiencyOnProperMaterial = toolEffTier2;
            this.setMaxDamage(toolMaxDurTier2);
            return itemIconFleshBound;
        } else if (evopoints.getInteger("evolutionPoints") >= tier3Level && (evopoints.getInteger("evolutionPoints") < tier4Level)) {
            this.efficiencyOnProperMaterial = toolEffTier3;
            this.setMaxDamage(toolMaxDurTier3);
            return itemIconHideCoated;
        } else if (evopoints.getInteger("evolutionPoints") >= tier4Level) {
            this.efficiencyOnProperMaterial = toolEffTier4;
            this.setMaxDamage(toolMaxDurTier4);
            return itemIconScaleArmored;
        } else {
            this.efficiencyOnProperMaterial = toolEfficiency;
            this.setMaxDamage(toolMaxDurability);
            return itemIconFusedBone;
        }
    }

 

Thats the part where I adjust the maximum damage / durability of the tools depending on when a number limit is reached. :/

 

 

Link to comment
Share on other sites

Where can I set the NBT data changes then? Because I can't work out a good spot to have the durability and efficiency change then. :/

 

@Override
    public IIcon getIcon(ItemStack thisItem, int pass) {
        NBTTagCompound evopoints = thisItem.getTagCompound();
        if (evopoints == null) {
            evopoints = new NBTTagCompound();
        }
        if (!evopoints.hasKey("evolutionPoints")) {
            evopoints.setInteger("evolutionPoints", 0);
        }
        thisItem.setTagCompound(evopoints);
        if (evopoints.getInteger("evolutionPoints") >= tier2Level && (evopoints.getInteger("evolutionPoints") < tier3Level)) {
            return itemIconFleshBound;
        } else if (evopoints.getInteger("evolutionPoints") >= tier3Level && (evopoints.getInteger("evolutionPoints") < tier4Level)) {
            return itemIconHideCoated;
        } else if (evopoints.getInteger("evolutionPoints") >= tier4Level) {
            return itemIconScaleArmored;
        } else {
            this.efficiencyOnProperMaterial = toolEfficiency;
            return itemIconFusedBone;
        }
    }

    @Override
    public IIcon getIconIndex(ItemStack thisItem) {
        NBTTagCompound evopoints = thisItem.getTagCompound();
        if (evopoints == null) {
            evopoints = new NBTTagCompound();
        }
        if (!evopoints.hasKey("evolutionPoints")) {
            evopoints.setInteger("evolutionPoints", 0);
        }
        thisItem.setTagCompound(evopoints);
        thisItem.setTagCompound(evopoints);
        if (evopoints.getInteger("evolutionPoints") >= tier2Level && (evopoints.getInteger("evolutionPoints") < tier3Level)) {
            this.efficiencyOnProperMaterial = toolEffTier2;
            this.setMaxDamage(toolMaxDurTier2);
            return itemIconFleshBound;
        } else if (evopoints.getInteger("evolutionPoints") >= tier3Level && (evopoints.getInteger("evolutionPoints") < tier4Level)) {
            this.efficiencyOnProperMaterial = toolEffTier3;
            this.setMaxDamage(toolMaxDurTier3);
            return itemIconHideCoated;
        } else if (evopoints.getInteger("evolutionPoints") >= tier4Level) {
            this.efficiencyOnProperMaterial = toolEffTier4;
            this.setMaxDamage(toolMaxDurTier4);
            return itemIconScaleArmored;
        } else {
            this.efficiencyOnProperMaterial = toolEfficiency;
            this.setMaxDamage(toolMaxDurability);
            return itemIconFusedBone;
        }

 

So is all of that read only / client side? :/

 

If so I need a good suggestion as to where I can place my updates of this.setMaxDamage and this.efficiencyOnProperMaterial because I am a bit stuck hehe. Atm it all works fine, no issues, Untill it comes to the repairing stuff. :/

Link to comment
Share on other sites

Right. Im gunna post my code up for the 1 tool. The Pickaxe.

 

REDACTED!

 

 

REDACTED!

 

That is just 1 one too. Beware! My code will burn your eyes and cause you to become enraged.

 

 

 

I tried this code out atm and the onUpdate causes my tool to not work at all. Untill the delay caused by the onUpdate is finished. :/ But the tools doo repair now. They just dont work :P

Link to comment
Share on other sites

@Override
    public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
        int del = 5000;
        while (del > 0) { --del;}

        if (par1ItemStack.getItemDamage() > 0 && del == 0)
        {
            System.out.println("Repairing");
            par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
           del = 5000;
        }

 

Like this I can mine but the tool repairs instantly. Arghhgh :P

Link to comment
Share on other sites

BOLLOCKS!

 


---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 28/03/14 21:07
Description: Ticking player

java.lang.NullPointerException: Ticking player
at com.aappleyard.evolvinggearmod.tools.FusedBonePickaxe.onUpdate(FusedBonePickaxe.java:171)
at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:468)
at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:357)
at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:643)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:360)
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:363)
at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:334)
at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:218)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:242)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:190)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:763)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:651)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:530)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:788)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at com.aappleyard.evolvinggearmod.tools.FusedBonePickaxe.onUpdate(FusedBonePickaxe.java:171)
at net.minecraft.item.ItemStack.updateAnimation(ItemStack.java:468)
at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:357)
at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:643)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856)
at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:360)

-- Player being ticked --
Details:
Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
Entity ID: 265
Entity Name: Aappleyard
Entity's Exact location: 200.70, 70.00, 142.88
Entity's Block location: World: (200,70,142), Chunk: (at 8,4,14 in 12,8; contains blocks 192,0,128 to 207,255,143), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Entity's Momentum: 0.00, -0.08, 0.00
Stacktrace:
at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:363)
at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:334)
at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37)
at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:218)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:242)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@57ad78bb
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:190)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:763)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:651)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:530)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:788)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 909130352 bytes (867 MB) / 1038024704 bytes (989 MB) up to 3113877504 bytes (2969 MB)
JVM Flags: 3 total; -Xincgc -Xmx3G -Xms1024M
AABB Pool Size: 2942 (164752 bytes; 0 MB) allocated, 2798 (156688 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.01-pre FML v7.2.129.1047 Minecraft Forge 10.12.0.1047 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.129.1047} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1047.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.0.1047} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1047.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
evolvinggearmod{1.0} [evolvinggearmod] (Evolving Gear Mod Wth IntelliJ) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 1366 (76496 bytes; 0 MB) allocated, 1351 (75656 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Aappleyard'/265, l='New World', x=200.70, y=70.00, z=142.88]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

 

Can't work out what its trying to tell me.

Link to comment
Share on other sites


@Override
    public void onUpdate(ItemStack stack, World world, Entity par3Entity, int par4, boolean par5) {
        NBTTagCompound  evopoints = stack.getTagCompound();
        int ToolTier = evopoints.getInteger("ToolTier"); <---- LINE 171
        int currentDamage = stack.getItemDamage();

        if (currentDamage >=50 )
        {

            if (damage <= 349) {
                damage++;
            }

            System.out.println(damage);
            if (damage == 350) {
                if (ToolTier == 0) {
                    stack.damageItem(-1, (EntityPlayer) par3Entity);
                    damage = 0;
                } else if (ToolTier == 1) {
                    stack.damageItem(-2, (EntityPlayer) par3Entity);
                    damage = 0;

                } else if (ToolTier == 2) {
                    stack.damageItem(-3, (EntityPlayer) par3Entity);
                    damage = 0;

                } else if (ToolTier == 3) {
                    stack.damageItem(-4, (EntityPlayer) par3Entity);
                    damage = 0;

                } else {

                    System.out.println("damage is now 1000");
                }
            }
        }
        else {System.out.println("No Damage yet"); }
    }
}

 

This works making the tools repair but now when I try and craft them in a crafting bench and pick up the item it causes this crash, then it crashes every time I log in again.

Link to comment
Share on other sites

Can someone confirm something for me?

 

 

here are two lines of code

 

 

this.setMaxDamage(toolMaxDurTier2);

 

This line is to set the tools durability to a variable assigned to toolMaxDurTier2;

 

stack.setMaxDamage(toolMaxDurTier2);

 

THis line does the same execept it sets that individual stacks durability to toolMaxDurTier2;

 

 

 

I know that stack.setMaxDamage doesn't work but is there a way to get the same results because at the moment my code is setting all my items to the same durability rather than it setting just the one item / stack to a different durability. ?

 

 

OR

 

Do I handle it a different way? Because of the way my tools work I cannot set up multiple tools. Each tool has several states, like leveling up tiers in minecraft. Think wood to stone to iron to diamond. Except this is all contained within 1 tool. As the tool is used to grows and changes into a better form, more powerful. I wanted to have it so the durability changes as the tool grows too however I noticed that this current setup causes all of the one type of tool to change durability :/ atleast I think it does.

 

 

Will do more testing but advice would be appreciated :D

Link to comment
Share on other sites

Right I have a few ideas I want to pass across people and see what they think.

 

My issue is that I cannot have 1 tool have multiple durability levels which change at specific points related to NBT data on just that one item stack. If I change a tools max durability it changes the entire item class rather than just the stack.

 

My other issue is that I don't know how to have the item also have a different efficiency level which change at specific points related to NBT data without it also effecting the whole item class. etc etc

 

My idea for solutions.

 

 

1. I use NBT data to work out tools durability. If the NBT data holding durability info and NBT data holding current durability level are the same then the tool breaks. That's fine I can do that. My only issue is that the item won't have a durability bar that moves across as it takes damage. Is there any way of making a bar which fills out showing the items durability level related to the items NBT data not the vanilla minecraft durability data?

 

2. I forget the idea of having a tiered tool with multiple durability levels, efficiency levels and just have it all remain the same. The only change is its texture and other stats. (Rather not give in and do this easy option)

Link to comment
Share on other sites


// when Block Destroyed
    @Override
    public boolean onBlockDestroyed(ItemStack stack, World world, Block blockID, int x, int y, int z, EntityLivingBase entity) {
        // If correct item
        if (stack.getItem() != null && stack.getItem() == EvolvingGearMod.FusedBonePickaxe) {
            // Create 2 NBT tags. Evolution Points and Evolution Meter Points
            System.out.println("Broke A Block with pickaxe");
            NBTTagCompound evopoints = stack.getTagCompound();
            if (evopoints == null) {
                evopoints = new NBTTagCompound();
            }
            if (!evopoints.hasKey("evolutionPoints")) {
                evopoints.setInteger("evolutionPoints", 0);
            }
            stack.setTagCompound(evopoints);


            NBTTagCompound toolDmg = stack.getTagCompound();
            if (toolDmg == null) {
                toolDmg = new NBTTagCompound();
            }
            if (!toolDmg.hasKey("ToolDmg")) {
                toolDmg.setInteger("ToolDmg", 0);
            }
            //stack.setTagCompound(toolDmg);


            NBTTagCompound toolMaxDura = stack.getTagCompound();
            if (toolMaxDura == null) {
                toolMaxDura = new NBTTagCompound();
            }
            if (!toolMaxDura.hasKey("ToolMaxDura")) {
                toolMaxDura.setInteger("ToolMaxDura", 0);
            }
            //stack.setTagCompound(toolMaxDura);
            // Increase evo points + 1
            evopoints.setInteger("evolutionPoints", evopoints.getInteger("evolutionPoints") + 1);
            //Damage Item NBT
            toolDmg.setInteger("ToolDmg", toolDmg.getInteger("ToolDmg") + 1);
            System.out.println(toolDmg.getInteger("ToolDmg") + " is the tools dmg. ");
            System.out.println(toolMaxDura.getInteger("ToolMaxDura") + " is the tools max durability.");
        }
        return blockDestroyed;
    }

 

 

That is getting called 2 times in a row causing me issues. No idea why either :/

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

    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.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.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     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)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 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.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
    • If you are using AMD/ATI, get the latest drivers from their website - do not update via system  
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
  • Topics

×
×
  • Create New...

Important Information

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