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

Problems with Streams and BlockPos


Syric
 Share

Recommended Posts

Posted (edited)

I'm trying to write a method that produces a Map<BlockPos, Double> containing every block within a certain radius of a given point and their distance to that point. However, it has a very strange problem: if there are 30 blocks within that radius, it will add each of those 30 blocks to the output map... and then return a map contianing 30 copies of a single block, which isn't even within the radius provided. (It's the block with the highest x,y,z coordinates in the original box.)

Does anyone know what's going wrong here? My apologies if this turns out to be me misusing streams rather than an actual Forge issue, but I think there's an equal chance that I'm misunderstanding BlockPos.betweenClosedStream() instead.

   @Override
    public Map<BlockPos, Double> blockMap() {
        //Create a box
        int variation = (int) Math.ceil(radius);
        BlockPos pos1 = new BlockPos(origin.getX()-variation, origin.getY()-variation,origin.getZ()-variation);
        BlockPos pos2 = new BlockPos(origin.getX()+variation, origin.getY()+variation, origin.getZ()+variation);
      	//(pos2 is the block that I end up with many copies of in the map)

        //Put all blocks within that box into a map if they pass a filter
        //Create a map to collect outputs in
        HashMap<BlockPos, Double> output = new HashMap<BlockPos, Double>();
        //Create a stream of blocks
        BlockPos.betweenClosedStream(pos1, pos2)
                //Filter out ones that don't match our criteria
                .filter(c -> distance(c) <= radius)

                //Put the remaining ones into a map:
                .forEach(c -> {
                    //Put the block into the map
                    output.put(c, (double) distance(c));

//                    Log that you've done this. This indicates that many different elements are being placed into the map.
                    LogUtils.getLogger().info("Placing " + c.toShortString() + " into pattern map");
                    LogUtils.getLogger().info("Pattern map has " + output.entrySet().size() + " elements");
                    StringBuilder sb1 = new StringBuilder("Sphere pattern blocks: ");
                    for (BlockPos pos : output.keySet()) {
                        sb1.append("(").append(pos.toShortString()).append("), ");
                    }
                    LogUtils.getLogger().info(sb1.toString());
                });

        //After the loop, do the *exact same* printing of the output. This suddenly shows that the output
        //is full of many copies of the *same* block, which shouldn't even have passed the filter.
        //It's either the first or last block to have been passed into the stream, not sure.
        LogUtils.getLogger().info("Generated a sphere pattern. It has " + output.entrySet().size() + " elements.");
        LogUtils.getLogger().info("Sphere pattern blocks: ");
        StringBuilder sb = new StringBuilder();
        for (BlockPos pos : output.keySet()) {
            sb.append("(").append(pos.toShortString()).append("), ");
        }
        LogUtils.getLogger().info(sb.toString());

        //Return
        return output;
    }

The log then looks like this:

https://imgur.com/4IPVU7i

Edited by Syric
Link to comment
Share on other sites

The BlockPos instances produced by the various Stream and Iterable methods on BlockPos must not be used beyond the iteration, i.e. they must not escape the iteration loop at all. Under the hood Minecraft uses a special MutableBlockPos instance and reuses it throughout the loop. If you want to store the BlockPos for later you must call BlockPos#immutable on it.

  • Thanks 1
Link to comment
Share on other sites

Posted (edited)

So I would do something like this? Just checking that I understand what you mean by calling #immutable.

BlockPos.betweenClosedStream(pos1, pos2)
                //Filter out ones that don't match our criteria
                .filter(c -> distance(c) <= radius)

                //Put the remaining ones into a map:
                .forEach(c -> {
                    //Put the block into the map
                    output.put(c.immutable(), (double) distance(c));
                });

Edit: yep, that worked. Thank you!

Edited by Syric
Link to comment
Share on other sites

I am sure many are confused when you used the javadoc convention for naming methods.

Hobbiest programmers have probably never written javadoc. 🙂

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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
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.

 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.