Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

benfah

Members
  • Joined

  • Last visited

  1. Hi guys, I ran into a problem where I set up a flatDir repository in the 'libs' folder of my project containing a mod jar I want to compile together with my mod. I tried to implement the jar by wrapping it with the 'fg.deobf' function. Yet when I'm trying to boot up Minecraft, I get a NoSuchFieldError of 'field_208148_A', which seems to me that the deobfuscation has somehow not worked, because normally there is a mapping name for that field. build.gradle: buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'me.benfah' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'doorsofinfinity' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. minecraft { // The mappings can be changed at any time, and must be in the following format. // snapshot_YYYYMMDD Snapshot are built nightly. // stable_# Stables are built at the discretion of the MCP team. // 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: 'snapshot', version: '20190719-1.14.3' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // 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 property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } server { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } data { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') mods { examplemod { source sourceSets.main } } } } } repositories { flatDir { dirs 'libs' } } dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's 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.15.2-31.1.0' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version" // Real examples // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' implementation fg.deobf(name: 'immersive-portals-0.18') // 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 by the runtime.. jar { manifest { attributes([ "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } // Example configuration to allow publishing using the maven-publish task // we define a custom artifact that is sourced from the reobfJar output task // and then declare that to be published // Note you'll need to add a repository here def reobfFile = file("$buildDir/reobfJar/output.jar") def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar' builtBy 'reobfJar' } publishing { publications { mavenJava(MavenPublication) { artifact reobfArtifact } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } } Thanks in advance!
  2. But what else am I supposed to do if this class doesn't have some kind of Event or Hook?
  3. Nevermind, the classes are only being transformed when they are used.
  4. Hi, I made a simple ClassTransformer that prints out the transformedName: import net.minecraft.launchwrapper.IClassTransformer; public class TestClassTransformer implements IClassTransformer { @Override public byte[] transform(String name, String transformedName, byte[] basicClass) { System.out.println(transformedName); return basicClass; } } The class names are being printed, however the class I want to transform (net.minecraft.world.gen.feature.WorldGenEndPodium) doesn't appear on this list. The fml-client-latest.log shows all the results. Try to search for the class. Why does this happen and how can I make the class transformable? Thanks in advance. fml-client-latest.log
  5. Hey guys, I have a question. Is it possible to disable layers at every time that are in the .json files, like "layer0" and "layer1" in the spawn egg .json file. I know that this has something to do with IBakedModelQuad or something like that, but i don't know how to use that Thanks in advance
  6. Nvm. I got it working ^^ StatCollector#translateToLocal("UNLOCALIZED STRING IN LANG FILE");
  7. Hey Guys, Do you know how to add own unlocalized strings to Minecraft, so that you can change them in the *.lang files? Thanks in advance
  8. Ok, that worked, thank you
  9. Hey Guys, do anybody know how to use more than 2 render passes? I searched a lot of projects on GitHub, but I don't know how to do it Thanks in advance.
  10. Ok, I know the sword gets rendered, but a bit buggy:
  11. I can't show you code, because I have no. In the handleRenderType method I've tried other things "returnType == || type == ItemRenderType.EQUIPPED ItemRenderType.INVENTORY;" but that not worked
  12. I read code of other render classes like EnderZoo, it was inverted. in first Person, It got rendered like I want. but in the inventory it use just two render passes. I've tried other things in the handleRenderType Method. But it don't work
  13. Ok, I've fixed it, but another problem occurs, "if(pass == 2)" get not called. Do you know why the problem occurs?
  14. Ok, I figured out the problem, but i don't know how to fix it. It seems that the renderPass is the problem, because it renders anything fine "if(pass == 0)", but "if(pass == 1)" just get not called or something like that, pls help

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.