
Slit_bodmod
Members-
Posts
76 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Slit_bodmod's Achievements

Stone Miner (3/8)
0
Reputation
-
genIntellijRuns crashes after accessTransformer inclusion
Slit_bodmod replied to Slit_bodmod's topic in ForgeGradle
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 } -
genIntellijRuns crashes after accessTransformer inclusion
Slit_bodmod replied to Slit_bodmod's topic in ForgeGradle
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... 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? -
genIntellijRuns crashes after accessTransformer inclusion
Slit_bodmod replied to Slit_bodmod's topic in ForgeGradle
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 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 -
What are the Steps to create a custom Event?
Slit_bodmod replied to Jonas Handtke's topic in Modder Support
LivingAttackEvent is called inside the hurt function of LivingEntity. this means that whenever a living entity is attacked, forge will create an instance of new LivingAttackEvent and hand it to all subscribed functions -
genIntellijRuns crashes after accessTransformer inclusion
Slit_bodmod replied to Slit_bodmod's topic in ForgeGradle
ok after quitting and restarting I now get this crash report -
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: The "Gradle: Configure projects" background task has also been running for almost 2 hours.
-
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: 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?
-
Source code not showing code usages in intellij
Slit_bodmod replied to Slit_bodmod's topic in ForgeGradle
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. -
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.
-
How to create a simple single texture gui
Slit_bodmod replied to Slit_bodmod's topic in Modder Support
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. -
How to create a simple single texture gui
Slit_bodmod replied to Slit_bodmod's topic in Modder Support
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. -
How to create a simple single texture gui
Slit_bodmod replied to Slit_bodmod's topic in Modder Support
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. -
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.
-
Ah thankyou, this is very helpful, I see it has java docs as well which is nice
-
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.