Jump to content

shieldbug1

Forge Modder
  • Posts

    404
  • Joined

  • Last visited

Everything posted by shieldbug1

  1. Yeah, after checking on the GitHub, the forge gradle asm API version also needs to be updated. Sadly, 1.8 isn't supported (yet).
  2. You don't need a custom item block, there's an overloaded version of getUnlocalizedName that has an integer (metadata) Just override that method.
  3. If you call addInformation, it will fill the list you pass with everything you need, not add it. You add information by overriding that method, but calling it is fine to get the information.
  4. Create a list and pass it to Item#addInformation
  5. Key bindings are only on the client, you have to register them through your client proxy, and send packets if you want to do anything on the server.
  6. Testing it for a while and every thing seems fine still - no crashes, mods still load and IClassTransformers still function fine. Is there anything else I should test before making the PR?
  7. I've forked the repository and made this commit and everything seems to work fine, I just have to test it some more before making a pull request. It doesn't seem like there's any extra support really needed, since all the accessing only occurs within the asm classes themselves, that do the appropriate api version checks.
  8. Your tile entity needs a no-arg constructor, I think. Don't set the world in the constructor, that happens automatically for you anyway.
  9. Is there anything I can do about this? I'd assume that if fml was to update the API it would probably be done on the 1.8 branch.
  10. Look at World#spawnEntityInWorld(Entity) and EntityFX.
  11. Okay, this is really weird. It's obviously using asm 5 now but it's still throwing the same exception. java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5 at org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:477) ~[asm-debug-all-5.0.3.jar:5.0.3] at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1416) ~[asm-debug-all-5.0.3.jar:5.0.3] at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017) ~[asm-debug-all-5.0.3.jar:5.0.3] at org.objectweb.asm.ClassReader.accept(ClassReader.java:693) ~[asm-debug-all-5.0.3.jar:5.0.3] at org.objectweb.asm.ClassReader.accept(ClassReader.java:506) ~[asm-debug-all-5.0.3.jar:5.0.3] at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:53) [ASMModParser.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:100) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.discover(DirectoryDiscoverer.java:53) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) [ContainerType.class:?] at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) [ModCandidate.class:?] at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:127) [ModDiscoverer.class:?] at cpw.mods.fml.common.Loader.identifyMods(Loader.java:347) [Loader.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:468) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25] at GradleStart.bounce(GradleStart.java:107) [start/:?] at GradleStart.startClient(GradleStart.java:100) [start/:?] at GradleStart.main(GradleStart.java:55) [start/:?] Edit: I'm using Forge 10.13.2.1232 (latest, I think), if that matters.
  12. You need to use the srg name in the obfuscated version of your mod. You can find them at C:\Users\{YOUR_USER}\.gradle\caches\minecraft\net\minecraftforge\forge\{VERSION}\srgs\mcp-srg.srg So for this one I took the time to find it for you, it's 'field_147694_f'. So your code would look like: return ReflectionHelper.getPrivateValue(SoundHandler.class, getSoundHandler(), "sndManager", "field_147694_f"); Also, if this method is being called frequently, consider saving the 'Field' instance somewhere, and just calling Field#get(Object) on it.
  13. I ran into this problem today: -snip- Caused by: java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5 -snip- I don't use asm at all, it's actually Forge loading my classes that's failing. I understand that for this specific problem I can just move my static interface method, but that's going against the whole point of me updating to Java 1.8, and I'm sure similar problems will occur with other Java 1.8 things later anyway. Is there any way I can get Forge to use asm 5? I could probably put it as a dependency in the build.gradle file, but would that make Forge use it? If not - is there a specific reason as to why Forge is still using asm4 over asm5?
  14. Is there anything I have to do to build for java 1.8? When I added sourceCompatibility and targetCompatibility, running the build command simply fails with Execution failed for task ':reobf'. > java.lang.IllegalArgumentException (no error message) And when running without them it tells me to 'use -source 8 or higher to enable ...'. This is the output from using --stacktract (with sourceCompatibility and targetCompatibility being 1.8 ): * What went wrong: Execution failed for task ':reobf'. > java.lang.IllegalArgumentException (no error message) * 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.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java: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(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.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(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.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(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at net.md_5.specialsource.JarRemapper.remapClassFile(JarRemapper.java:228) at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:189) at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.applySpecialSource(ObfArtifact.java:379) at net.minecraftforge.gradle.tasks.user.reobf.ObfArtifact.generate(ObfArtifact.java:348) at net.minecraftforge.gradle.tasks.user.reobf.ReobfTask.doTask(ReobfTask.java:298) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 44 more I honestly have never used Gradle before, so I do apologise in advance if I'm making some sort of stupidly obvious mistake. Edit: Just from the stack trace, I can see the error is at if (readShort(off + 6) > Opcodes.V1_ { throw new IllegalArgumentException(); } in the ClassReader constructor. I don't actually use ASM at all, so I'm not quite sure why this is happening. I'm gonna go look at the stacktrace some more and try figure out why this is happening. Edit 2: Even after looking through the ForgeGradle code on github, I'm honestly lost, as again - I've never worked with Gradle before.
  15. There is no event for block updates. How did you try addSubstitutionAlias? What exactly are you trying to do?
  16. Forge has been compatible with Java 8 for at least a month. Update to latest version. Also, please read the EAQ next time, before posting.
  17. How does this cause more lag? Things like duplicate code don't cause lag, just make some code harder to read. Any helper class would cause just as much as a 'Forge' helper class. Also, the progress bar on the main menu - In my opinion that's pure redundant. 'Improved Loading Screen'. Improved means better - and since Forge is a public library it has to be an obejctive better, as in 'faster' or 'uses less memory', not 'prettier' or 'cooler'. Some people may like it, some people may not - that's what we have mods for.
  18. Honestly, I don't see the point of any of these - they are either already implemented in some away, or can be implemented easily by the individual modder. If you really want to give it a try, I suggest making pull requests on the github for Forge and seeing what other people say about it. Also remember to make a different pull request for each feature, and follow the contribution guidelines.
×
×
  • Create New...

Important Information

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