Jump to content

[1.8] Exuction failed for task ':reobf'. Try run with --stacktrace PLEASE ANSWER


Recommended Posts

Posted

Here:

 

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>gradlew build

****************************

Powered By MCP:

http://mcp.ocean-labs.de/

Searge, ProfMobius, Fesh0r,

R4wk, ZeuX, IngisKahn, bspkrs

MCP Data version : snapshot_nodoc_20141130

****************************

:downloadClient SKIPPED

:downloadServer SKIPPED

:getVersionJson

:extractUserDev UP-TO-DATE

:mergeJars SKIPPED

:applyBinPatches SKIPPED

:downloadMcpTools SKIPPED

:extractMcpData UP-TO-DATE

:genSrgs SKIPPED

:deobfBinJar SKIPPED

:compileApiJava UP-TO-DATE

:processApiResources UP-TO-DATE

:apiClasses UP-TO-DATE

:sourceMainJava UP-TO-DATE

:compileJava UP-TO-DATE

:processResources UP-TO-DATE

:classes UP-TO-DATE

:jar UP-TO-DATE

:compileTestJava UP-TO-DATE

:processTestResources UP-TO-DATE

:testClasses UP-TO-DATE

:test UP-TO-DATE

:reobf FAILED

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':reobf'.

> MALFORMED

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug

option to get more log output.

 

BUILD FAILED

 

Total time: 32.488 secs

 

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>--stacktrace

Der Befehl "--stacktrace" ist entweder falsch geschrieben oder

konnte nicht gefunden werden.

 

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>gradlew build --stacktrace

 

****************************

Powered By MCP:

http://mcp.ocean-labs.de/

Searge, ProfMobius, Fesh0r,

R4wk, ZeuX, IngisKahn, bspkrs

MCP Data version : snapshot_nodoc_20141130

****************************

:downloadClient SKIPPED

:downloadServer SKIPPED

:getVersionJson

:extractUserDev UP-TO-DATE

:mergeJars SKIPPED

:applyBinPatches SKIPPED

:downloadMcpTools SKIPPED

:extractMcpData UP-TO-DATE

:genSrgs SKIPPED

:deobfBinJar SKIPPED

:compileApiJava UP-TO-DATE

:processApiResources UP-TO-DATE

:apiClasses UP-TO-DATE

:sourceMainJava UP-TO-DATE

:compileJava UP-TO-DATE

:processResources UP-TO-DATE

:classes UP-TO-DATE

:jar UP-TO-DATE

:compileTestJava UP-TO-DATE

:processTestResources UP-TO-DATE

:testClasses UP-TO-DATE

:test UP-TO-DATE

:reobf FAILED

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':reobf'.

> MALFORMED

 

* Try:

Run with --info or --debug option to get more log output.

 

* Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':reobf'.

 

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex

ecuteActions(ExecuteActionsTaskExecuter.java:69)

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex

ecute(ExecuteActionsTaskExecuter.java:46)

        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec

uter.execute(PostExecutionAnalysisTaskExecuter.java:35)

        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec

ute(SkipUpToDateTaskExecuter.java:64)

        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut

e(ValidatingTaskExecuter.java:58)

        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu

ter.execute(SkipEmptySourceFilesTaskExecuter.java:42)

        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter

.execute(SkipTaskWithNoActionsExecuter.java:52)

        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut

e(SkipOnlyIfTaskExecuter.java:53)

        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter

.execute(ExecuteAtMostOnceTaskExecuter.java:43)

        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur

e(AbstractTask.java:296)

        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW

orker.executeTask(AbstractTaskPlanExecutor.java:79)

        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW

orker.processTask(AbstractTaskPlanExecutor.java:63)

        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW

orker.run(AbstractTaskPlanExecutor.java:51)

        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul

tTaskPlanExecutor.java:23)

        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau

ltTaskGraphExecuter.java:86)

        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask

ExecutionAction.java:29)

        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute

r.java:61)

        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec

uter.java:23)

        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu

ter.java:67)

        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx

ecutionAction.java:32)

        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute

r.java:61)

        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute

r.java:54)

        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default

GradleLauncher.java:148)

        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle

Launcher.java:105)

        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun

cher.java:85)

        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon

troller.run(InProcessBuildActionExecuter.java:81)

        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav

a:33)

        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav

a:24)

        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce

ssBuildActionExecuter.java:39)

        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce

ssBuildActionExecuter.java:29)

        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)

        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav

a:171)

        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.

execute(CommandLineActionFactory.java:237)

        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.

execute(CommandLineActionFactory.java:210)

        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti

meValidationAction.java:35)

        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti

meValidationAction.java:24)

        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(

CommandLineActionFactory.java:206)

        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(

CommandLineActionFactory.java:169)

        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep

ortingAction.java:33)

        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep

ortingAction.java:22)

        at org.gradle.launcher.Main.doAction(Main.java:33)

        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots

trap.java:54)

        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j

ava:35)

        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja

va:30)

        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)

        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)

Caused by: java.lang.IllegalArgumentException: MALFORMED

        at net.md_5.specialsource.Jar.collectJarFiles(Jar.java:169)

        at net.md_5.specialsource.Jar.init(Jar.java:229)

        at net.md_5.specialsource.Jar.init(Jar.java:206)

        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.applySpecialSo

urce(ObfArtifact.java:375)

        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.generate(ObfAr

tifact.java:349)

        at net.minecraftforge.gradle.tasks.user.reobf.ReobfTask.doTask(ReobfTask

.java:313)

        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)

        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF

actory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)

        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF

actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)

        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF

actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)

        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra

ctTask.java:570)

        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra

ctTask.java:553)

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex

ecuteAction(ExecuteActionsTaskExecuter.java:80)

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex

ecuteActions(ExecuteActionsTaskExecuter.java:61)

        ... 47 more

 

 

BUILD FAILED

 

Total time: 33.266 secs

 

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>

 

Posted

so?

 

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>gradlew build
****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : snapshot_nodoc_20141130
****************************
:downloadClient SKIPPED
:downloadServer SKIPPED
:getVersionJson
:extractUserDev UP-TO-DATE
:mergeJars SKIPPED
:applyBinPatches SKIPPED
:downloadMcpTools SKIPPED
:extractMcpData UP-TO-DATE
:genSrgs SKIPPED
:deobfBinJar SKIPPED
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:reobf FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reobf'.
> MALFORMED

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 32.488 secs

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>--stacktrace
Der Befehl "--stacktrace" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>gradlew build --stacktrace

****************************
Powered By MCP:
http://mcp.ocean-labs.de/
Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
MCP Data version : snapshot_nodoc_20141130
****************************
:downloadClient SKIPPED
:downloadServer SKIPPED
:getVersionJson
:extractUserDev UP-TO-DATE
:mergeJars SKIPPED
:applyBinPatches SKIPPED
:downloadMcpTools SKIPPED
:extractMcpData UP-TO-DATE
:genSrgs SKIPPED
:deobfBinJar SKIPPED
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:reobf FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reobf'.
> MALFORMED

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':reobf'.

        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
e(AbstractTask.java:296)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.executeTask(AbstractTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.processTask(AbstractTaskPlanExecutor.java:63)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.run(AbstractTaskPlanExecutor.java:51)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
tTaskPlanExecutor.java:23)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
ltTaskGraphExecuter.java:86)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:29)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
        at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExec
uter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:67)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:61)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:54)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:148)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:105)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:85)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:81)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:33)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:24)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:39)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:29)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
a:171)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
Caused by: java.lang.IllegalArgumentException: MALFORMED
        at net.md_5.specialsource.Jar.collectJarFiles(Jar.java:169)
        at net.md_5.specialsource.Jar.init(Jar.java:229)
        at net.md_5.specialsource.Jar.init(Jar.java:206)
        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.applySpecialSo
urce(ObfArtifact.java:375)
        at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.generate(ObfAr
tifact.java:349)
        at net.minecraftforge.gradle.tasks.user.reobf.ReobfTask.doTask(ReobfTask
.java:313)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra
ctTask.java:570)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra
ctTask.java:553)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:61)
        ... 47 more


BUILD FAILED

Total time: 33.266 secs

C:\Users\Matthias\Downloads\eclipse\Bombastic-Mod-1.8>

[code]

Posted

Aaaa you know, what?

About 1 year ago i had exactly the same problem, and i found nothing on forums too (but i haven't created a thread, i don't know why). So i leftmodding...

After 2 moths or so, i decided to retry, but as all by workspaces were "unsetted up", i updated java, jdk and forge... AND IT WORKED!!!

So... try do all this things:

[*]update java to the LATEST VERSION

[*]update jdk to the LATEST VERSION

[*]donwload latest forge-src

[*]try installing it in new space first (use commands that you want (gradlew setupDecompWorkspace/setupDevWorkspace --refresh-dependecies + gradlew eclipse)

[*]now try exporting it right direcltly (yes, empty folder)

[*]if it works, try copy src folder from your mod and exporting

If it will not work... I just don't know what to say...

  • 2 years later...
Posted

Give gradle more RAM

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
On 9/27/2017 at 3:50 PM, diesieben07 said:

Exactly what he said.

 

You do know how to operate google though, yes?

yeah

 

i started over and barely added an item and it worked

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • You probably used jd-gui to open it, didn't you? Nothing wrong with that, I also made that mistake, except that Notch was a smart guy and he obfuscated the code. That's why you only see files called "a", "b", "c" and then a file that combines them all. As I said, use RetroMCP to deobfuscate the code so that you will 100% understand it and be able to navigate it.
    • Decompiling minecraft indev, infdev, alpha, beta or whichever legacy version is really easy. I'm not a plug, I just also got interested in modding legacy versions (Infdev to be specific). Use https://github.com/MCPHackers/RetroMCP-Java Once you install their client and the Zulu Architecture that they say they recommend (or use your own Java). I encountered some problems, so I run it with: "java -jar RetroMCP-Java-CLI.jar". You should run it in a seperate folder (not in downloads), otherwise the files and folders will go all over the place. How to use RetroMCP: Type setup (every time you want change version), copy-paste the version number from their list (they support indev), write "decompile" and done! The code will now be deobfuscated and filenames will be normal, instead of "a", "b" and "c"! Hope I helped you, but I don't expect you to reply, as this discussion is 9 years old! What a piece of history!  
    • I know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
  • Topics

×
×
  • Create New...

Important Information

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