Jump to content

Slit_bodmod

Members
  • Posts

    76
  • Joined

  • Last visited

Posts posted by Slit_bodmod

  1. oh also earlier ChampionAsh5357 asked for the AT and Buildscript, I missed the Buildscript part. I assume you mean the build.gradle file which looks like this:

    plugins {
        id 'eclipse'
        id 'maven-publish'
        id 'net.minecraftforge.gradle' version '5.1.+'
        id 'org.parchmentmc.librarian.forgegradle' version '1.+'
    }
    
    version = '1.0'
    group = 'gaia' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
    archivesBaseName = 'gaia'
    
    // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
    java.toolchain.languageVersion = JavaLanguageVersion.of(17)
    
    println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
    minecraft {
        // The mappings can be changed at any time and must be in the following format.
        // Channel:   Version:
        // official   MCVersion             Official field/method names from Mojang mapping files
        // parchment  YYYY.MM.DD-MCVersion  Open community-sourced parameter names and javadocs layered on top of official
        //
        // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
        // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
        //
        // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
        // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started
        //
        // Use non-default mappings at your own risk. They may not always work.
        // Simply re-run your setup task after changing the mappings to update your workspace.
        mappings channel: 'parchment', version: '2022.11.27-1.19.2'
        accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
    
        // Default run configurations.
        // These can be tweaked, removed, or duplicated as needed.
        runs {
            client {
                workingDirectory project.file('run')
    
                // Recommended logging data for a userdev environment
                // The markers can be added/remove as needed separated by commas.
                // "SCAN": For mods scan.
                // "REGISTRIES": For firing of registry events.
                // "REGISTRYDUMP": For getting the contents of all registries.
                property 'forge.logging.markers', 'REGISTRIES'
    
                // Recommended logging level for the console
                // You can set various levels here.
                // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
                property 'forge.logging.console.level', 'debug'
    
                // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
                property 'forge.enabledGameTestNamespaces', 'examplemod'
    
                mods {
                    gaia {
                        source sourceSets.main
                    }
                }
            }
    
            server {
                workingDirectory project.file('run')
    
                property 'forge.logging.markers', 'REGISTRIES'
    
                property 'forge.logging.console.level', 'debug'
    
                property 'forge.enabledGameTestNamespaces', 'gaia'
    
                mods {
                    gaia {
                        source sourceSets.main
                    }
                }
            }
    
            // This run config launches GameTestServer and runs all registered gametests, then exits.
            // By default, the server will crash when no gametests are provided.
            // The gametest system is also enabled by default for other run configs under the /test command.
            gameTestServer {
                workingDirectory project.file('run')
    
                property 'forge.logging.markers', 'REGISTRIES'
    
                property 'forge.logging.console.level', 'debug'
    
                property 'forge.enabledGameTestNamespaces', 'gaia'
    
                mods {
                    gaia {
                        source sourceSets.main
                    }
                }
            }
    
            data {
                workingDirectory project.file('run')
    
                property 'forge.logging.markers', 'REGISTRIES'
    
                property 'forge.logging.console.level', 'debug'
    
                // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
                args '--mod', 'gaia', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
    
                mods {
                    examplemod {
                        source sourceSets.main
                    }
                }
            }
        }
    }
    
    // Include resources generated by data generators.
    sourceSets.main.resources { srcDir 'src/generated/resources' }
    
    repositories {
        // Put repositories for dependencies here
        // ForgeGradle automatically adds the Forge maven and Maven Central for you
    
        // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
        // flatDir {
        //     dir 'libs'
        // }
    }
    
    dependencies {
        // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
        // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
        // The userdev artifact is a special name and will get all sorts of transformations applied to it.
        minecraft 'net.minecraftforge:forge:1.19.2-43.1.47'
    
        // Real mod deobf dependency examples - these get remapped to your current mappings
        // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
        // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
        // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
    
        // Examples using mod jars from ./libs
        // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
    
        // For more info...
        // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
        // http://www.gradle.org/docs/current/userguide/dependency_management.html
    }
    
    // Example for how to get properties into the manifest for reading at runtime.
    jar {
        manifest {
            attributes([
                    "Specification-Title"     : "gaia",
                    "Specification-Vendor"    : "ray",
                    "Specification-Version"   : "1", // We are version 1 of ourselves
                    "Implementation-Title"    : project.name,
                    "Implementation-Version"  : project.jar.archiveVersion,
                    "Implementation-Vendor"   : "ray",
                    "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
            ])
        }
    }
    
    // Example configuration to allow publishing using the maven-publish plugin
    // This is the preferred method to reobfuscate your jar file
    jar.finalizedBy('reobfJar')
    // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
    // publish.dependsOn('reobfJar')
    
    publishing {
        publications {
            mavenJava(MavenPublication) {
                artifact jar
            }
        }
        repositories {
            maven {
                url "file://${project.projectDir}/mcmodsrepo"
            }
        }
    }
    
    tasks.withType(JavaCompile).configureEach {
        options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
    }

     

  2. ok, there has been very little progress on this and it has put a complete roadblock in the mod development due to the fact that suddenly IntelliJ is saying no to anything I want to do and I can't see the reason why. I assume this is to some extent a bug in ForgeGradle as as far I can tell I have done mostly the right thing in relation to this. Currently the log for the process that "Configure projects" process is not getting beyond looks like this...

    Quote

    Starting Gradle Daemon...
    Gradle Daemon started in 4 s 980 ms

    > Configure project :
    Java: 17.0.2, JVM: 17.0.2+8-LTS-86 (Oracle Corporation), Arch: x86_64
    Setting up MCP environment
    Initializing steps
    Executing steps
     > Running 'downloadManifest'
     > Running 'downloadJson'
     > Running 'downloadClient'
     > Running 'downloadServer'
     > Running 'extractServer'
     > Running 'downloadClientMappings'
     > Running 'mergeMappings'
     > Running 'stripClient'
     > Running 'stripServer'
     > Running 'merge'
     > Running 'listLibraries'

    this seems to want to run automatically when I open the project. What would people recommend in terms of actually progressing with mod development? Would creating a new project from scratch be liable to cause the same issue? Is it recommended that I post this to some kind of Forge bug tracker, and are there details I have missed? Is there a chance I am using an out of date Forge or Forge Gradle? and am unaware of it?

  3. Ok so since before I had quit Intellij while the "Gradle: Configure projects" background task was still running. It had been going for hours and was showing no sign of stopping. After reopening Intellij it was still running.

    I hit   File >> Invalidate Caches... >> Invalidate and Restart.

    The background task was still running and the code I was trying to AT was still private.

    I attempt to run genIntellijRuns and the background task just restarts, usually outputting a couple things to the Build Console, and then after about 20 mins of not outputting anything I stop with the red square and re run it. I get this error after 9 mins

    Quote

    Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Cannot resolve external dependency com.mojang:text2speech:1.16.7 because no repositories are defined.

    Quote

    /Users/jacobmaynardvesely/IdeaProjects/GaiaWorldMod/build/tmp/expandedArchives/forge-1.19.2-43.1.47-inject_src.jar_fefeffb20405ed28c1ddedf2c403aab7/mcp/client/Start.java:5: error: package net.minecraft.client.main does not exist
    import net.minecraft.client.main.Main;
                                    ^
    /Users/jacobmaynardvesely/IdeaProjects/GaiaWorldMod/build/tmp/expandedArchives/forge-1.19.2-43.1.47-inject_src.jar_fefeffb20405ed28c1ddedf2c403aab7/mcp/client/Start.java:17: error: cannot find symbol
            Main.main(concat(new String[]{"--version", "mcp", "--accessToken", "0", "--assetsDir", assets, "--assetIndex", "1.19", "--userProperties", "{}"}, args));
            ^
      symbol:   variable Main
      location: class Start

    Quote

    Could not resolve all files for configuration ':runtimeClasspathCopy'.
    > Could not find net.minecraftforge:forge:1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.
      Searched in the following locations:
        - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0/forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.pom
        - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0/forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.jar
      Required by:
          project :

    Possible solution:
     - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

    Mod[GenIntellijRuns] claims to still be running with no output. So I once again hit Load Gradle Changes and I get the same error again.

    I am at this point incredibly stumped as to what to do

    btw my AT file looks like this:

    public net.minecraft.world.level.levelgen.NoiseChunk m_209247_()Lnet/minecraft/world/level/block/state/BlockState; # getInterpolatedState
    public net.minecraft.world.level.levelgen.OreVeinifier m_209667_(Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/PositionalRandomFactory;)Lnet/minecraft/world/level/levelgen/NoiseChunk$BlockStateFiller; # create
    public net.minecraft.world.level.levelgen.OreVeinifier$VeinType
    public net.minecraft.world.level.levelgen.OreVeinifier$VeinType f_209674_ # minY
    public net.minecraft.world.level.levelgen.OreVeinifier$VeinType f_209675_ # maxY
    
    public net.minecraft.world.item.context.UseOnContext m_43718_()Lnet/minecraft/world/phys/BlockHitResult; # getHitResult

     

  4. ok after quitting and restarting I now get this crash report

    Quote

    A problem occurred configuring root project 'GaiaWorldMod'.
    > Could not resolve all files for configuration ':_compileJava_1'.
       > Could not find net.minecraft:client:1.19.2.
         Searched in the following locations:
           - https://maven.minecraftforge.net/net/minecraft/client/1.19.2/client-1.19.2.module
           - https://maven.minecraftforge.net/net/minecraft/client/1.19.2/client-1.19.2.pom
           - https://maven.minecraftforge.net/net/minecraft/client/1.19.2/client-1.19.2-extra.jar
           - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraft/client/1.19.2/client-1.19.2.pom
           - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraft/client/1.19.2/client-1.19.2-extra.jar
           - https://libraries.minecraft.net/net/minecraft/client/1.19.2/client-1.19.2-extra.jar
           - https://repo.maven.apache.org/maven2/net/minecraft/client/1.19.2/client-1.19.2.pom
         Required by:
             project :

    Possible solution:
     - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
     

     

  5. Hey, I tried adding an access transformer to my project, it's not the first one I've added. However this time when I tried refreshing the gradle project, and running genIntellijRuns, it crashes with this error:

    Quote

    Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Cannot resolve external dependency net.minecraftforge:accesstransformers:8.0.+ because no repositories are defined.

    Quote

    Could not resolve all files for configuration ':runtimeClasspathCopy'.
    > Could not find net.minecraftforge:forge:1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.
      Searched in the following locations:
        - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0/forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.pom
        - file:/Users/jacobmaynardvesely/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0/forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2_at_684e4ce2e16fa45d1ab59ef6be767caad8f3f6d0.jar
      Required by:
          project :

    Possible solution:
     - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
     

    The "Gradle: Configure projects" background task has also been running for almost 2 hours.

  6. So when I try and start up the client, right after the little app icon appears in my tool bar I get this very peculiar crash report:

    Quote

    [00:31:02] [Render thread/DEBUG] [ne.mi.cl.lo.ClientModLoader/CORE]: Generating PackInfo named mod:gaia for mod file /Users/jacobmaynardvesely/IdeaProjects/GaiaWorldMod/build/resources/main
    [00:31:02] [Render thread/DEBUG] [ne.mi.cl.lo.ClientModLoader/CORE]: Generating PackInfo named mod:forge for mod file /
    [00:31:03] [Render thread/INFO] [ne.mi.ga.ForgeGameTestHooks/]: Enabled Gametest Namespaces: [examplemod]
    [00:31:04] [Render thread/DEBUG] [os.ut.FileUtil/]: No oshi.architecture.properties file found from ClassLoader cpw.mods.modlauncher.TransformingClassLoader@60c8a093
    [00:31:04] [Render thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID bed60fb2-eef2-473d-a1de-574b51cbbf67
    ---- Minecraft Crash Report ----
    // But it works on my machine.

    Time: 2023-04-27 00:31:04
    Description: Initializing game

    java.lang.NoClassDefFoundError: com/mojang/text2speech/Narrator
        at net.minecraft.client.GameNarrator.<init>(GameNarrator.java:19) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.<init>(Minecraft.java:570) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.run(Main.java:176) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
        at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.2-43.1.47.jar%2393!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}
    Caused by: java.lang.ClassNotFoundException: com.mojang.text2speech.Narrator
        at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?] {}
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}
        at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) ~[securejarhandler-2.1.4.jar:?] {}
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}
        at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) ~[securejarhandler-2.1.4.jar:?] {}
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}
        ... 17 more


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

    -- Head --
    Thread: Render thread
    Stacktrace:
        at net.minecraft.client.GameNarrator.<init>(GameNarrator.java:19) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.<init>(Minecraft.java:570) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    -- Initialization --
    Details:
        Modules: 
    Stacktrace:
        at net.minecraft.client.main.Main.run(Main.java:176) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.main(Main.java:51) ~[forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1.19.2.jar%23179!/:?] {re:classloading,pl:runtimedistcleaner:A}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
        at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:25) ~[fmlloader-1.19.2-43.1.47.jar%2393!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%23106!/:?] {}
        at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


    -- System Details --
    Details:
        Minecraft Version: 1.19.2
        Minecraft Version ID: 1.19.2
        Operating System: Mac OS X (x86_64) version 10.15.7
        Java Version: 17.0.2, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
        Memory: 293600664 bytes (279 MiB) / 468713472 bytes (447 MiB) up to 1073741824 bytes (1024 MiB)
        CPUs: 4
        Processor Vendor: GenuineIntel
        Processor Name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
        Identifier: Intel64 Family 6 Model 58 Stepping 9
        Microarchitecture: Ivy Bridge (Client)
        Frequency (GHz): 2.50
        Number of physical packages: 1
        Number of physical CPUs: 2
        Number of logical CPUs: 4
        Graphics card #0 name: Intel HD Graphics 4000
        Graphics card #0 vendor: Intel
        Graphics card #0 VRAM (MB): 1536.00
        Graphics card #0 deviceId: 0x0166
        Graphics card #0 versionInfo: Revision ID: 0x0009
        Memory slot #0 capacity (MB): 2048.00
        Memory slot #0 clockSpeed (GHz): 1.60
        Memory slot #0 type: DDR3
        Memory slot #1 capacity (MB): 2048.00
        Memory slot #1 clockSpeed (GHz): 1.60
        Memory slot #1 type: DDR3
        Virtual memory max (MB): 7168.00
        Virtual memory used (MB): 5757.22
        Swap memory total (MB): 3072.00
        Swap memory used (MB): 2385.75
        JVM Flags: 1 total; -Xss1M
        Launched Version: MOD_DEV
        Backend library: LWJGL version 3.3.1 build 7
        Backend API: Intel HD Graphics 4000 OpenGL Engine GL version 4.1 INTEL-14.7.28, Intel Inc.
        Window size: <not initialized>
        GL Caps: Using framebuffer using OpenGL 3.2
        GL debug messages: <disabled>
        Using VBOs: Yes
        Is Modded: Definitely; Client brand changed to 'forge'
        Type: Client (map_client.txt)
        CPU: 4x Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
        ModLauncher: 10.0.8+10.0.8+main.0ef7e830
        ModLauncher launch target: forgeclientuserdev
        ModLauncher naming: mcp
        ModLauncher services: 
            mixin-0.8.5.jar mixin PLUGINSERVICE 
            eventbus-6.0.3.jar eventbus PLUGINSERVICE 
            fmlloader-1.19.2-43.1.47.jar slf4jfixer PLUGINSERVICE 
            fmlloader-1.19.2-43.1.47.jar object_holder_definalize PLUGINSERVICE 
            fmlloader-1.19.2-43.1.47.jar runtime_enum_extender PLUGINSERVICE 
            fmlloader-1.19.2-43.1.47.jar capability_token_subclass PLUGINSERVICE 
            accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE 
            fmlloader-1.19.2-43.1.47.jar runtimedistcleaner PLUGINSERVICE 
            modlauncher-10.0.8.jar mixin TRANSFORMATIONSERVICE 
            modlauncher-10.0.8.jar fml TRANSFORMATIONSERVICE 
        FML Language Providers: 
            minecraft@1.0
            lowcodefml@null
            javafml@null
        Mod List: 
            forge-1.19.2-43.1.47_mapped_parchment_2022.11.27-1|Minecraft                     |minecraft                     |1.19.2              |COMMON_SET|Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
            main                                              |Gaia World Gen                |gaia                          |0.0NONE             |COMMON_SET|Manifest: NOSIGNATURE
                                                              |Forge                         |forge                         |43.1.47             |COMMON_SET|Manifest: NOSIGNATURE
        Crash Report UUID: bed60fb2-eef2-473d-a1de-574b51cbbf67
        FML: 43.1
        Forge: net.minecraftforge:43.1.47
    [00:31:04] [Render thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 98198963-be94-4d78-aff1-1f2023a8dcaa
    #@!@# Game crashed! Crash report saved to: #@!@# /Users/jacobmaynardvesely/IdeaProjects/GaiaWorldMod/run/./crash-reports/crash-2023-04-27_00.31.04-client.txt

    Process finished with exit code 255
     

    Sure enough, I go into the GameNarrator class and the Narrator class does seem to be missing? Where has it gone? I didn't touch it. I haven't gone any where near this part of the code, I was adding some functionality to an Item? What?

     

  7. as far as I'm aware the access transformer is completely valid. It succesfully transformed the variable and my code still builds fine. The only issue is that Intellij is now not recognising the default libraries. But again it all seems to work fine.

     

    Quote

    public net.minecraft.world.level.levelgen.NoiseChunk m_209247_()Lnet/minecraft/world/level/block/state/BlockState; # getInterpolatedState public net.minecraft.world.level.levelgen.OreVeinifier m_209667_(Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/DensityFunction;Lnet/minecraft/world/level/levelgen/PositionalRandomFactory;)Lnet/minecraft/world/level/levelgen/NoiseChunk$BlockStateFiller; # create public net.minecraft.world.level.levelgen.OreVeinifier$VeinType public net.minecraft.world.level.levelgen.OreVeinifier$VeinType f_209674_ # minY public net.minecraft.world.level.levelgen.OreVeinifier$VeinType f_209675_ # maxY

     

  8. When I cmd-click to search for usages for any function. Intellij won't show up any usages that occur in vanilla code, which is annoying as that's usually what I'm looking to find out. It still shows up code I've written it just won't show the uses in any vanilla, forge, libraries, ext.

    This is a recent problem and I'm not entirely sure where to begin looking to fix this problem, I've quite and reopened intellij a few times, ran genIntellijRuns. I have a suspicion the problem started when I added access transformers but I'm not entirely sure.

  9. For future people curious about this.

    The debug screen is called DebugScreenOverlay and is not itself a screen rather than a GuiComponent (I'm still figuring out the functional difference). 

    The system I managed to use I think worked like this:

    RenderSystem.setShader(GameRenderer::getPositionTexShader);

    this tells minecraft you want to use a shader that draws textures, idk what the difference between this and other methods in GameRenderer are but this works

    RenderSystem.setShaderColor( _red, _green, _blue, _alpha);

    I guess you can colour textures as you render them if you need?

    RenderSystem.setShaderTexture(0, TEXTURE_LOCATION);

     

    register the texture you want, idk what that 0 does. It doesn't seem to be the gl texture id so who knows.

    this.blit(render_buffer, x, y, U, V, RESOLOUTION, RESOLOUTION);

    draw the texture to the appropriate place.

    I ended up going with a command which was super straightforward.

    I'm yet to figure out what that debug package is about, it seems to mostly seems to be classes that are never used, I assume for the devs but I wonder if there's a cool way to get it working properly.

  10. whoa dude, not asking you to spoon feed code to me. Asking some about some specific functionality of some classes because you seem more experienced and knowledgeable. Mostly pure curiosity questions cos I wanna learn more about how the system works.

    The exact functionality of blit is a little mysterious as like you said, information was being passed from other places and I can't seem to find other classes that use it along with DynamicTextures much (I was thinking maybe the debug screen but I've been looking for that for a while and can't find it anywhere). I tend to find all the render functions a bit abstract and I'm not that familiar with the set up of openGL nor Minecraft's abstractions of it so I was just trying to grasp what the underlying methodology was.

    My questions about the texture allocation and the client.renderer.debug package were pure curiosity questions that were related but not directly relevant. In both cases I feel like there's not really enough in the minecraft source code alone for me to go off of so If you can shed any light that wld be amazing but if not that's cool, they're more curiosities.

    As for my question about the simplest and easiest way to get this rendering in game. That was more of a request for a personal recomendation of which would be easiest. I could implement all 3 by digging through the source code, and I will if I have to, but I don't want all 3, am just curious which would be easiest in your opinion.

    I realise that my request to open a gui in the simplest way possible is a little weird but cos it's for a debugging tool, again it's not the means that's important to me but the simplicity and tho I don't know the minecraft code that well I know it can sometimes be very difficult to do straightforward things so thought you might be able to give your opinion.

     

     

  11. Ok thankyou very much, a few questions.

    From a brief look around I assume that NativeImage is essentially a representation of raw pixel data and DynamicTexture is essentially a class that wraps this into a minecraft usable texture.

    Would my process then to when my GUI is rendered for the first time, create a new DynamicTexture from a new NativeImage of the width and height I want, fill it in and then store the result it to my gui's class? kinda like this?

    (how do you make it be code again)

    public class SpecialRendererGui extends Screen {

    DynamicTexture TEXTURE = new DynamicTexture( new NativeImage( 128,128, true ));

    protected SpecialRendererGui(ITextComponent text) {

    super(text); //what is this text component for

    //for x,y in range 128... bla bla bla

    }

    public void render(PoseStack render_buffer) {

    //I'm struggling to figure out what to do here?

    } }

    I am having difficulty deciphering the blit function and how it's exactly getting ahold of the necessary data?

    Also do you know what the boolean in the NativeImage constructor does, it doesn't have a parameter name and seems to be used to differentiate a Malloc or Calloc which I didn't know java had? Is that about whether I want to set my data to black by default?

    Also from personal experience what do you think will be the simplest and easiest way to implement the screen popping up? through a command? a key? an item?

    Also pure curiosity questions, in digging through the client code I came across a package insider of client.renderer.debug, do you know what they are they look interesting and maybe kinda useful.

  12. Hi, I was looking for a solution for this seemingly straightforward task but it requires a lot of bits of knowledge in parts of the game I'm not super familiar with.

    I have an algorithm for generating a 128 * 128 grid of float values from an algorithm of mine.

    I would like a simple GUI that will simply plonk this (as a texture) on to the screen, and also ideally display the players position in the corner.

    How this gui is opened and closed is not important to me, a command, or a keystroke, whichever would be simplest.

    Ideally for performance I imagine the texture should only be generated once and then saved but I could be wrong.

    How might I go about doing this, both in terms of creating and placing the texture on to a gui and to somehow get the gui appearing in game.

  13. I'm basically just really sick of not having mappings for functions parameters, every-time I want to call a function, or understand what a function I've already called does, spending 5 minutes trying to work out that p_222587_0_ means x.

    So basically, is there any way to just straightforwardly fix this.

    I'm sure this is kinda a spectrum and for some people it's not rly a problem, but as someone who has a lot of difficulty reading and keeping track fo stuff in my head, It's just a real hassle and has become one of the biggest sources of friction while modding.

    But I reckoned it must be a common enough annoyance for basically all forge (and possibly other systems, idk how they work) modders that someone must have a solution that at the very least is easier than the issue it's trying to fix.

    Is there a way I can add onto mojmaps and are there already compiled mappings for all of the parameters, I know that the old forge mappings have some parameters listed but seeing as they don't have all methods or variables, and they're discontinued, it's not much of a trade off. Surely I'm not asking for too much to have mojmaps and also parameters with sensible names.

  14. hmm, I'm still getting a crash that looks like this:

    Quote

    [12:56:44] [Worker-Main-4/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeMap.getValue(net.minecraft.world.entity.ai.attributes.Attribute)" because the return value of "net.minecraft.world.entity.LivingEntity.getAttributes()" is null
        Index: 1
        Listeners:
            0: NORMAL
            1: ASM: class lotb.common.entities.ai.EntityAISetupManager onEntityConstructed(Lnet/minecraftforge/event/entity/EntityEvent$EntityConstructing;)V
    java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeMap.getValue(net.minecraft.world.entity.ai.attributes.Attribute)" because the return value of "net.minecraft.world.entity.LivingEntity.getAttributes()" is null
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.LivingEntity.getAttributeValue(LivingEntity.java:1806)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.ai.goal.target.TargetGoal.getFollowDistance(TargetGoal.java:77)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal.<init>(NearestAttackableTargetGoal.java:35)
        at TRANSFORMER/lotb@0.0NONE/lotb.common.entities.ai.EntityAISetupManager.onEntityConstructed(EntityAISetupManager.java:31)
        at net.minecraftforge.eventbus.ASMEventHandler_1_EntityAISetupManager_onEntityConstructed_EntityConstructing.invoke(.dynamic)
        at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
        at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
        at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.Entity.<init>(Entity.java:247)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:228)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.Mob.<init>(Mob.java:112)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:12)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.AgeableMob.<init>(AgeableMob.java:28)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.animal.Animal.<init>(Animal.java:37)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.TamableAnimal.<init>(TamableAnimal.java:29)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.animal.Cat.<init>(Cat.java:116)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.create(EntityType.java:460)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.lambda$create$1(EntityType.java:470)
        at java.base/java.util.Optional.map(Optional.java:260)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.create(EntityType.java:469)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.createEntityIgnoreException(StructureTemplate.java:442)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.addEntitiesToWorld(StructureTemplate.java:425)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.placeInWorld(StructureTemplate.java:343)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.feature.structures.SinglePoolElement.place(SinglePoolElement.java:112)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.place(PoolElementStructurePiece.java:88)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.postProcess(PoolElementStructurePiece.java:84)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.StructureStart.placeInChunk(StructureStart.java:87)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.biome.Biome.lambda$generate$21(Biome.java:244)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.PrimitiveIterator$OfLong.forEachRemaining(PrimitiveIterator.java:189)
        at MC-BOOTSTRAP/it.unimi.dsi.fastutil@8.2.1/it.unimi.dsi.fastutil.longs.LongIterator.forEachRemaining(LongIterator.java:53)
        at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.biome.Biome.generate(Biome.java:243)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(ChunkGenerator.java:245)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkStatus.lambda$static$10(ChunkStatus.java:87)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkStatus.generate(ChunkStatus.java:208)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$18(ChunkMap.java:517)
        at MC-BOOTSTRAP/datafixerupper@4.0.26/com.mojang.datafixers.util.Either$Left.map(Either.java:38)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$20(ChunkMap.java:515)
        at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1146)
        at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkTaskPriorityQueueSorter.lambda$message$1(ChunkTaskPriorityQueueSorter.java:58)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.pollTask(ProcessorMailbox.java:91)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.pollUntil(ProcessorMailbox.java:146)
        at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1434)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
     

    I can't figure out why the getAttributes would return null as it just returns the attributes field which is final and should always be set upon construction.

  15. 3 hours ago, diesieben07 said:

    Cloned your repository. Badger and deer failed to summon because you have not registered their attribute, with a completely different error that you have shown.

    Ah thankyou, yeah sometimes when it's not clear on the stacktrace where the problem started because of nullptrs or lambdas or something I find it quite difficult to work out where to look. Is this what caused the crash and can I simply fix it by adding something like:

    modEventBus.addListener(EntityAISetupManager::addEntityAttributes);

    to my LotbMod constructor

  16. Hi, I was in the middle of porting my mod to 1.17.1 and when adding the attributes to the entities my game would freeze and produce this crash report:

    Quote

    [15:54:36] [Server thread/ERROR]: Encountered an unexpected exception
    net.minecraft.ReportedException: Sending packet
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:887) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "p_129593_" is null
        at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
        ... 5 more
    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(

    Time: 07/12/2021, 15:54
    Description: Sending packet

    java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "p_129593_" is null
        at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?] {}
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?] {}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at java.lang.Thread.run(Thread.java:831) ~[?:?] {}


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

    -- Head --
    Thread: Render thread
    Stacktrace:
        at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    -- Packet being sent --
    Details:
        Packet class: ~~ERROR~~ NullPointerException: Cannot invoke "Object.getClass()" because "p_9832_" is null
    Stacktrace:
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?] {}
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?] {}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
        at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}


    -- Affected level --
    Details:
        All players: 1 total; [ServerPlayer['Dev'/65, l='ServerLevel[New World]', x=250.81, y=11.74, z=231.40]]
        Chunk stats: 2340
        Level dimension: minecraft:overworld
        Level spawn location: World: (16,4,176), Section: (at 0,4,0 in 1,0,11; chunk contains blocks 16,0,176 to 31,255,191), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
        Level time: 133518 game time, 3941 day time
        Level name: New World
        Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
        Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
        Known server brands: forge
        Level was modded: true
        Level storage version: 0x04ABD - Anvil
    Stacktrace:
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
        at java.lang.Thread.run(Thread.java:831) ~[?:?] {}


    -- System Details --
    Details:
        Minecraft Version: 1.17.1
        Minecraft Version ID: 1.17.1
        Operating System: Mac OS X (x86_64) version 10.15.4
        Java Version: 16.0.1, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
        Memory: 225463472 bytes (215 MiB) / 1073741824 bytes (1024 MiB) up to 1073741824 bytes (1024 MiB)
        CPUs: 4
        Processor Vendor: GenuineIntel
        Processor Name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
        Identifier: Intel64 Family 6 Model 58 Stepping 9
        Microarchitecture: Ivy Bridge (Client)
        Frequency (GHz): 2.50
        Number of physical packages: 1
        Number of physical CPUs: 2
        Number of logical CPUs: 4
        Graphics card #0 name: Intel HD Graphics 4000
        Graphics card #0 vendor: Intel
        Graphics card #0 VRAM (MB): 1536.00
        Graphics card #0 deviceId: 0x0166
        Graphics card #0 versionInfo: Revision ID: 0x0009
        Memory slot #0 capacity (MB): 2048.00
        Memory slot #0 clockSpeed (GHz): 1.60
        Memory slot #0 type: DDR3
        Memory slot #1 capacity (MB): 2048.00
        Memory slot #1 clockSpeed (GHz): 1.60
        Memory slot #1 type: DDR3
        Virtual memory max (MB): 8192.00
        Virtual memory used (MB): 6192.04
        Swap memory total (MB): 4096.00
        Swap memory used (MB): 3069.00
        JVM Flags: 1 total; -Xss1M
        Player Count: 1 / 8; [ServerPlayer['Dev'/65, l='ServerLevel[New World]', x=250.81, y=11.74, z=231.40]]
        Data Packs: vanilla, mod:lotb (incompatible), mod:forge
        Type: Integrated Server (map_client.txt)
        Is Modded: Definitely; Client brand changed to 'forge'
        ModLauncher: 9.0.7+91+master.8569cdf
        ModLauncher launch target: forgeclientuserdev
        ModLauncher naming: mcp
        ModLauncher services: 
             mixin PLUGINSERVICE 
             eventbus PLUGINSERVICE 
             object_holder_definalize PLUGINSERVICE 
             runtime_enum_extender PLUGINSERVICE 
             capability_token_subclass PLUGINSERVICE 
             capability_inject_definalize PLUGINSERVICE 
             accesstransformer PLUGINSERVICE 
             runtimedistcleaner PLUGINSERVICE 
             mixin TRANSFORMATIONSERVICE 
             fml TRANSFORMATIONSERVICE 
        FML Language Providers: 
            minecraft@1.0
            javafml@null
        Mod List: 
            forge-1.17.1-37.1.0_mapped_official_1.17.1.jar    |Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
            resources                                         |Lord Of The Blocks Mod        |lotb                          |0.0NONE             |DONE      |Manifest: NOSIGNATURE
                                                              |Forge                         |forge                         |37.1.0              |DONE      |Manifest: NOSIGNATURE
        Crash Report UUID: 5c4d99fd-0bb2-484a-8699-30af0d2e2550
        FML: 37.1
        Forge: net.minecraftforge:37.1.0
    #@!@# Game crashed! Crash report saved to: #@!@# ./crash-reports/crash-2021-12-07_15.54.36-server.txt

    Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

    I found it very difficult to actually begin working out where the source of the problem is and was wondering if anyone could help me track it down, the github for the latest sourcecode is currently https://github.com/slit-bodmod/LordOfTheBlocks if you want to have a look, or if you could just point me in the right direction, idk

  17. 15 hours ago, Draco18s said:

    Because door_block is a supplier and you called get() which gives you a new DoorBlock(ModBlockProperties.PLANKS), not the door block you registered.

    oh yeah that makes so much sense now. I feel like that's the kinda thing that's so simple I would have never have figured it out lol.

    Hmm so now I have to find a way to access the properties of an object that hasn't been constructed yet, in the supplier I'm handing to that object. That or back to the drawing board.

  18. Actually I thought I could be nice and tidy up the BlockItemRegister class a bit:

    public class BlockItemRegister<B extends Block> implements Supplier<B> {
    	public final Supplier<B> block;
    	public final Supplier<Item> item;
    
    	public BlockItemRegister(Supplier<B> _block, Supplier<Item> _item) {
    		block = _block;
    		item = _item;
    	}
    
    	public B get() {
    		return block.get();
    	}
    
    	//------------------ GEN FUNCS ------------------
    	public static <B extends Block> BlockItemRegister<B>  gen(String id, Supplier<B> _block) {
    		return gen(id, _block, ModItems.withTab(ItemGroup.TAB_BUILDING_BLOCKS));
    	}
    	public static <B extends Block> BlockItemRegister<B> gen(String id, Supplier<B> _block, Item.Properties prop) {
    		return gen(id, _block, () -> new BlockItem(_block.get(), prop) );
    	}
    	public static <B extends Block> BlockItemRegister<B> gen(String id, Supplier<B> _block, Supplier<Item> _item) {
    		return new BlockItemRegister<>( ModBlocks.registerBlock(id, _block ), ModItems.register(id, _item) );
    	}
    }

    And the plot thickens. this organisation of the BlockItemRegister breaks the working code I had, somehow, in the same way where the blockItemRegister itself holds the item but doesn't tie it to the block for block.asitem()

×
×
  • Create New...

Important Information

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