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

(SOLVED)MovingSound, ITickableSound and SoundManager: starting-stopping sounds.


Darkona
 Share

Recommended Posts

Hello fellow modders and Forge coders.

 

In trying to implement a looping, moving sound, I came across a seemingly unresolvable problem.

If you use a MovingSound to, let's say, make a constant jetpack sound on a player, that moves with it, you're better off using a moving sound, logically, than making very short, continuous calls to world.playsound();

 

Case example:

The sound should start when the player turns the jetpack on and stops when he turns it off, but it should loop as long as the jetpack is working.

This can be apparently done by implementing a custom Moving sound, with the "loop" variable set to true, and an onUpdate() method setting the position of the sound to the player. No mystery here. The problem arises when you want to make the sound stop. Let's call setDonePlaying() when the jetpack is off, to indicate the system that the sound should stop.

 

Then we go to the SoundManager class, where all the sounds are processed for playing.

In the updateAllSounds method, there is a check for isDonePlaying(), and if it is set to true, there's a call to stopSound().

Making the call to stopSound() does indeed stop it, but for some reason you are not able to start it again, not even creating a new Isound object and telling SoundHandler to play it.

 

The sound manager has two methods for stopping sounds, "stopAllSounds" and "stopSound".

 

updateAllSounds() iterates across multiple lists of sounds:

- playingSounds

- tickableSounds

- delayedSounds

and others.

 

updateAllSounds does iterate over all these lists and removes the sound appropiately from each of them, as well as executes paulscode's removeSource(), so I'm at a loss at what could be preventing the sound from being played again. For some reason a reference to the ResouceLocation where the sound file is, stays around somewhere and prevents the sound from being played again, until some time has passed.

 

Any insight on this matter would be very appreciatted.

Link to comment
Share on other sites

Apparently the fact of analyzing (again) the whole deal, made me realize the answer!

 

I'll leave the solution here to help others:

 

When the updateAllSounds method detects a sound that has donePlaying set to true, it does indeed stop the sound, and it also removes the source.

HOWEVER, if the repeat variable is set to true, it will add it to the delayedSounds list AFTER it stops it and removes the source. So it will muck up the whole playing lists, making you unable to start or stop the sound again.

 

To avoid this, if your sound is a looping one, you must set the repeat variable to false as well as the donePlaying to true, at the same time.

 

Below is my CopterPackSound class, that works corectly and can be started, stopped and loops as long as the item is in use.

 

Note that it is better in my opinion to override both the fields and all the methods you need to ensure that the ones in your class are the ones actually being called. I know its not THAT necessary in some cases due to inheritance, but I find this approach a "safer" route.

 

public class CopterPackSound extends MovingSound
{

    public EntityPlayer thePlayer;
    protected boolean repeat = true;
    protected int repeatDelay = 0;

    protected float pitch;

    public CopterPackSound()
    {
        super(new ResourceLocation(ModInfo.MOD_ID, "helicopter"));
        this.repeat = true;
        this.volume = 0.8f;
        this.pitch = 1.0F;
    }

    public CopterPackSound(EntityPlayer player)
    {
        super(new ResourceLocation(ModInfo.MOD_ID, "helicopter"));
        volume = 0.8f;
        pitch = 1.0F;
        thePlayer = player;
        LogHelper.info("Sound Created");
    }

    public void setDonePlaying()
    {
        this.repeat = false;
        this.donePlaying = true;
        this.repeatDelay = 0;
    }

    @Override
    public boolean isDonePlaying()
    {
        return this.donePlaying;
    }

    @Override
    public void update()
    {
        ItemStack copter = Wearing.getWearingCopter(thePlayer);
        byte status = 0;
       if(thePlayer == null || thePlayer.worldObj == null)
        {
            setDonePlaying();
        }
        if (copter != null&& copter.hasTagCompound() && copter.getTagCompound().hasKey("status"))
        {
            status = copter.getTagCompound().getByte("status");
            if (status == ItemCopterPack.OFF_MODE)
            {
                setDonePlaying();
            }else{
                if(status == ItemCopterPack.HOVER_MODE)
                {
                    pitch = (thePlayer.motionY == 0) ? 1.0f : (thePlayer.motionY > 0) ? 1.2f : 0.8f;
                }
                else
                {
                    pitch = (thePlayer.onGround || thePlayer.motionY == 0) ?  0.8f : (thePlayer.isSneaking()) ? 0.8f : (thePlayer.motionY > 0) ? 1.2f : 1.0F;
                }
            }
        }else{
            setDonePlaying();
        }
        xPosF = (float)thePlayer.posX;
        yPosF = (float)thePlayer.posY;
        zPosF = (float)thePlayer.posZ;
    }

    @Override
    public boolean canRepeat()
    {
        return this.repeat;
    }

    @Override
    public float getVolume()
    {
        return this.volume;
    }

    @Override
    public float getPitch()
    {
        return this.pitch;
    }

    @Override
    public int getRepeatDelay(){ return this.repeatDelay; }

    @Override
    public AttenuationType getAttenuationType()
    {
        return AttenuationType.LINEAR;
    }

Link to comment
Share on other sites

  • 1 year later...

Don't hijack old threads. Make your own.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm currently playing through Harmonious Engineering 3 with a couple of extra mods installed. Today when I was playing, I suddenly realized I couldn't mine, at all. It's been a little while since the last time I was mining as I'd just been crafting components for machines so I've no idea when it started.  However I can't find a solution. It's like the game doesn't recognize any pickaxe as a pickaxe? Like a drill item worked, but nothing else has been able to mine stone. Dirt is fine, wood is fine, but anything meant for pickaxes is like mining with a open hand, it doesn't even drop. Please let me know how to fix this.
    • Hey, I'm having the exact same issue! Grass, wood, dirt anything not meant for pickaxes works fine. But all pickaxes are just duds. Have you found a solution? What mods do you have?
    • I uninstalled and reinstalled java Forge everything. PLEASE HELP         MultiMC version: 0.6.16-3431 Launched instance in online mode authserver.mojang.com resolves to:     [13.224.172.64, 13.224.172.45, 13.224.172.35, 13.224.172.48] session.minecraft.net resolves to:     [34.199.236.154, 35.153.153.200, 100.24.172.95] textures.minecraft.net resolves to:     [13.225.142.59, 13.225.142.74, 13.225.142.86, 13.225.142.90] api.mojang.com resolves to:     [13.224.174.34, 13.224.174.30, 13.224.174.27, 13.224.174.77] Minecraft folder is: C:/Program Files (x86)/mmc-stable-win32/MultiMC/instances/1.16.5/.minecraft Java path is: C:/Program Files/Common Files/Oracle/Java/javapath/javaw.exe Checking Java version... Java is version 18.0.2.1, using 64-bit architecture, from Oracle Corporation. Main Class:   io.github.zekerzhayard.forgewrapper.installer.Main Native path:   C:/Program Files (x86)/mmc-stable-win32/MultiMC/instances/1.16.5/natives Traits: traits FirstThreadOnMacOS traits XR:Initial Libraries:   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/patchy/1.3.9/patchy-1.3.9.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/google/guava/guava/21.0/guava-21.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/authlib/2.1.28/authlib-2.1.28.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/logging/log4j/log4j-api/2.16.0/log4j-api-2.16.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/logging/log4j/log4j-core/2.16.0/log4j-core-2.16.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/io/github/zekerzhayard/ForgeWrapper/mmc3/ForgeWrapper-mmc3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/forge/1.16.5-36.2.34/forge-1.16.5-36.2.34-launcher.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/ow2/asm/asm/9.1/asm-9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/ow2/asm/asm-commons/9.1/asm-commons-9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/ow2/asm/asm-tree/9.1/asm-tree-9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/ow2/asm/asm-util/9.1/asm-util-9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/ow2/asm/asm-analysis/9.1/asm-analysis-9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/cpw/mods/modlauncher/8.1.3/modlauncher-8.1.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/cpw/mods/grossjava9hacks/1.3.3/grossjava9hacks-1.3.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/accesstransformers/3.0.1/accesstransformers-3.0.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/eventbus/4.0.0/eventbus-4.0.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/forgespi/3.2.0/forgespi-3.2.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/coremods/4.0.6/coremods-4.0.6.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/electronwill/night-config/core/3.6.3/core-3.6.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/electronwill/night-config/toml/3.6.3/toml-3.6.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/jline/jline/3.12.1/jline-3.12.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/apache/maven/maven-artifact/3.6.3/maven-artifact-3.6.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/net/minecraftforge/nashorn-core-compat/15.1.1.1/nashorn-core-compat-15.1.1.1.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/minecraft/1.16.5/minecraft-1.16.5-client.jar Native libraries:   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2-natives-windows.jar   C:/Program Files (x86)/mmc-stable-win32/MultiMC/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3-natives-windows.jar Mods:   [❌] abnormals_core-1.16.5-3.3.1.jar (disabled)   [❌] alchemistry-1.16.5-1.jar (disabled)   [❌] alexsmobs-1.12.1.jar (disabled)   [❌] alib-1.16.4-1.jar (disabled)   [❌] appliedenergistics2-8.4.7.jar (disabled)   [❌] Aquaculture-1.16.5-2.1.22.jar (disabled)   [❌] architectury-1.32.66.jar (disabled)   [❌] astral-1.9.20.jar (disabled)   [❌] astralsorcery-1.16.5-1.14.1.jar (disabled)   [❌] Atum-1.16.5-2.2.12.jar (disabled)   [❌] BloodMagic-1.16.4-3.1.7-27.jar (disabled)   [❌] blue_skies-1.16.5-1.1.3.jar (disabled)   [❌] Botania-1.16.5-420.2.jar (disabled)   [❌] cavebiomeapi-1.16.5-1.4.2.jar (disabled)   [❌] chemlib-1.16.5-2.jar (disabled)   [❌] citadel-1.8.1-1.16.5.jar (disabled)   [❌] CNB-1.16.3_5-1.2.11.jar (disabled)   [❌] collective-1.16.5-4.56.jar (disabled)   [❌] CoroUtil-1.16.5-1.2.37.jar (disabled)   [❌] corpse-1.16.5-1.0.6.jar (disabled)   [❌] Croptopia-1.16.5-FORGE-2.0.5.jar (disabled)   [❌] Cucumber-1.16.5-4.1.12.jar (disabled)   [❌] curios-forge-1.16.5-4.0.8.2.jar (disabled)   [❌] CyclopsCore-1.16.5-1.13.0.jar (disabled)   [✔️] dalekmod-v65.1.0   [❌] darkerdepths-1.16.5-1.1.4.jar (disabled)   [❌] dpanvil-1.16.5-1.3.1.jar (disabled)   [❌] DungeonsArise-1.16.5-2.1.49-beta.jar (disabled)   [❌] eidolon-0.2.7.jar (disabled)   [❌] elementalcraft-1.16.5-2.7.17.jar (disabled)   [❌] endergetic-1.16.5-3.0.2.jar (disabled)   [❌] EvilCraft-1.16.5-1.1.17.jar (disabled)   [❌] forbidden_arcanus-16.2.3.jar (disabled)   [❌] FpsReducer-forge-1.24-mc1.16.5.jar (disabled)   [❌] geckolib-forge-1.16.5-3.0.61.jar (disabled)   [❌] jei-1.16.5-7.7.1.152 (1).jar (disabled)   [❌] lootr-1.16.5-0.1.14.45.jar (disabled)   [❌] malum-1.16.5-0.3.0.jar (disabled)   [❌] mcjtylib-1.16-5.1.8.jar (disabled)   [❌] mininggadgets-1.7.5.jar (disabled)   [❌] mowziesmobs-1.5.25.jar (disabled)   [❌] MysticalAgriculture-1.16.5-4.2.6.jar (disabled)   [❌] mysticalworld-1.16.5-0.3.6.27.jar (disabled)   [❌] observerlib-1.16.5-1.5.3.jar (disabled)   [❌] occultism-1.16.5-1.29.1.jar (disabled)   [❌] OptiFine_1.16.5_HD_U_G7_MOD.jar (disabled)   [❌] outvoted-1.16.5-1.2.4.jar (disabled)   [❌] Patchouli-1.16.4-53.3.jar (disabled)   [❌] reliquary-1.16.5-1.3.5.1124.jar (disabled)   [❌] rftoolsbase-1.16-2.1.5.jar (disabled)   [❌] SereneSeasons-1.16.5-4.0.1.126-universal.jar (disabled)   [❌] snowundertrees-1.16.5-v1.3.jar (disabled)   [❌] Space-BossTools-1.16.5-5.5e.jar (disabled)   [❌] structure_gel-1.16.5-1.7.8.jar (disabled)   [❌] TheAbyss2+2.2.3-4+1.16.5.jar (disabled)   [❌] treeharvester_1.16.5-5.1.jar (disabled)   [❌] twilightforest-1.16.5-4.0.870-universal.jar (disabled)   [❌] UndeadExpansion_2.0.4_1.16.5_b.jar (disabled)   [❌] untamedwilds-1.16.5-1.5.8.jar (disabled)   [❌] upgrade_aquatic-1.16.5-3.1.2.jar (disabled)   [❌] valhelsia_core-16.0.12.jar (disabled)   [❌] valhelsia_core-16.0.15 (1).jar (disabled)   [❌] valhelsia_core-16.0.15.jar (disabled)   [❌] VampiresNeedUmbrellas-1.16.5-1.1.5.jar (disabled)   [❌] Vampirism-1.16.5-1.9.0-alpha+20220911-1727.jar (disabled)   [❌] VampirismIntegrations-1.16.5-1.6.1.jar (disabled)   [❌] whisperwoods-1.16.5-2.1.1-forge.jar (disabled)   [❌] witherstormmod-1.16.5-1.0.2.4.jar (disabled)   [❌] wizardstaff-1.16.5-1.8.1.jar (disabled)   [❌] xnet-1.16-3.0.17.jar (disabled)   [❌] zombieawareness-1.16.5-1.12.jar (disabled) Params:   --username  --version 1.16.5 --gameDir C:/Program Files (x86)/mmc-stable-win32/MultiMC/instances/1.16.5/.minecraft --assetsDir C:/Program Files (x86)/mmc-stable-win32/MultiMC/assets --assetIndex 1.16 --uuid  --accessToken  --userType  --versionType release --launchTarget fmlclient --fml.forgeVersion 36.2.34 --fml.mcVersion 1.16.5 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20210115.111550 Window size: 854 x 480 Java Arguments: [-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump, -Xms512m, -Xmx10024m, -Duser.language=en] Minecraft process ID: 21620 Using onesix launcher. Checking: MC_SLIM Checking: MAPPINGS Checking: MC_EXTRA Checking: PATCHED Checking: MC_SRG 2022-10-05 01:30:33,088 main WARN Advanced terminal features are not available in this environment [01:30:33] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, Player599, --version, 1.16.5, --gameDir, C:/Program Files (x86)/mmc-stable-win32/MultiMC/instances/1.16.5/.minecraft, --assetsDir, C:/Program Files (x86)/mmc-stable-win32/MultiMC/assets, --assetIndex, 1.16, --uuid, <PROFILE ID>, --accessToken, ????????, --userType, msa, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 36.2.34, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210115.111550, --width, 854, --height, 480] [01:30:33] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 18.0.2.1 by Oracle Corporation [01:30:33] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [01:30:33] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/C:/Program%20Files%20(x86)/mmc-stable-win32/MultiMC/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar Service=ModLauncher Env=CLIENT [01:30:34] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 15:73 token recognition error at: ';' [01:30:34] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, 1.16.5, --gameDir, C:\Program Files (x86)\mmc-stable-win32\MultiMC\instances\1.16.5\.minecraft, --assetsDir, C:\Program Files (x86)\mmc-stable-win32\MultiMC\assets, --uuid, <PROFILE ID>, --username, Player599, --assetIndex, 1.16, --accessToken, ????????, --userType, msa, --versionType, release, --width, 854, --height, 480] [01:30:35] [main/WARN] [mixin/]: Error loading class: java/lang/invoke/MethodHandles$Lookup (java.lang.IllegalArgumentException: Class file major version 62 is not supported by active ASM (version 9.0 supports class version 61), reading java.lang.invoke.MethodHandles$Lookup) [01:30:38] [pool-3-thread-1/WARN] [mixin/]: Error loading class: java/util/Optional (java.lang.IllegalArgumentException: Class file major version 62 is not supported by active ASM (version 9.0 supports class version 61), reading java.util.Optional) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:213]: Failed to start Minecraft: [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]: java.lang.reflect.InvocationTargetException [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at java.base/java.lang.reflect.Method.invoke(Method.java:577) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at org.multimc.EntryPoint.listen(EntryPoint.java:143) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launch:245]:     at org.multimc.EntryPoint.main(EntryPoint.java:34) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]: Caused by: java.lang.reflect.InvocationTargetException [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]:     at java.base/java.lang.reflect.Method.invoke(Method.java:577) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]:     at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:57) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [01:30:38] [main/INFO] [STDERR/]: [org.multimc.onesix.OneSixLauncher:launchWithMainClass:214]:     ... 5 more [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]: Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:658]:     ... 8 more [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]: Caused by: java.lang.reflect.InvocationTargetException [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]:     at java.base/java.lang.reflect.Method.invoke(Method.java:577) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]:     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:681]:     ... 13 more [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]: Caused by: java.lang.RuntimeException: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraftforge.fml.loading.BackgroundWaiter.runAndTick(BackgroundWaiter.java:43) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.client.main.Main.main(Main.java:123) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     ... 16 more [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:154) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.util.registry.Registry.func_218353_F(Registry.java:159) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.util.registry.Registry.lambda$static$51(Registry.java:466) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.util.registry.Registry.<clinit>(Registry.java:465) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.util.registry.Bootstrap.func_151354_b(Bootstrap.java:38) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at net.minecraft.client.main.Main.lambda$main$0(Main.java:123) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at java.base/java.lang.Thread.run(Thread.java:833) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]: Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: java.util.Optional [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:754) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:739) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:310) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:280) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1288) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) [01:30:38] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:723]:     ... 21 more [01:30:38] [main/INFO] [STDOUT/]: [org.multimc.EntryPoint:main:37]: Exiting with -1 Process exited with code -1 (0xffffffffffffffff). Please note that usually neither the exit code, nor its description are enough to diagnose issues! Always upload the entire log and not just the exit code. Clipboard copy at: 05 Oct 2022 01:31:07 +1100  
    • @BogieninYou almost definitely shouldn't be setting the base value, that pretty much completely negates the point of the attribute system. You should add attribute modifiers to the entity instead.   @FantaLaToneI think you should be able to just add multiple attribute modifiers to the effect, although I haven't actually done it before. If not you can override the methods in the effect class to add/remove the modifiers (by UUID) when the effect is added/removed from an entity.
    • How are you attempting to download the file? Are you downloading a .jar file? Do you have Java installed on your machine?
  • Topics

×
×
  • Create New...

Important Information

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