Are there any examples of the usage of Accessor Transformers? I've run into a case where they are actually what I need, but I can't find very much documentation about them. All I have been able to figure out on my own by looking at the LiteLoader source is I need to decorate some class and register it in some JSON file, but I am not sure if that is correct (and if it is, it's still not enough information to find out on my own). I've googled tons, I've used those example code searching websites, but there's nothing.
edit: er, I just went back to the last time you answered one of my questions, and you said theres info in the JavaDoc... sorry. I just had IDEA generate a reference for those now.
I tried your mod and it doesn't work. I pressed the button and nothing happens. Are there additional hotkeys that need to be pressed to activate the selected shader? I'm very confused and frustrated. I really want this to work.
Edit: Never mind, I figured it out. Your mod is incompatible with Optifine. You... should probably fix that if you can.
I'm not sure if I can make it compatible with Optifine... all the methods I use for loading shaders are methods in the vanilla game. If Optifine messes with those, there's nothing I can do ;-; Sorry. I'll put a note on the Cursefore page, though.
It would be cool if, when it found a valid entry, it would add a button to the list. I realize that's a bit more difficult, but it would still be cool.
Additionally would there be a way that a list could be added by the pack maker, and have the mod try to load that file specifically? That way the mod wouldn't have to try to find and index non-vanilla content. It could just look for a single file and read all of the lines from it. Ideally this would work similarly to the language files where all lines in all loaded packs would be cumulative rather than the top list replacing all others.
Just spitballing ideas. I really appreciate that you've made these.
I'm busy for the next couple of days, but after that I'm going to get to work making this pack compatible with your mods.
Oh, one other suggestion: Link to your mods from each other. That way if someone stumbles upon either of them they can find the other. Give yourself some cross-promotion and help people find the version that's more in line with what they want to use.
If I used the first method, I would mean I'd have to save everything it found to a config file, like I am doing for saving the current shader between relaunches. And I absolutely hate dealing with File IO. I don't know if I am just incompetent, or if File IO is actually a pain in the butt ;-; Similar with the second method.
Also, I deleted the old Forge version... I figured it would be better to have people use the better, more functional version since the Forge version kinda sucked
The config menu is slightly funky: All the vanilla shaders have buttons, but since I couldn't find a way to dynamically find all the currently loaded resources (and therefore be able to find all the extra shaders for them), I couldn't add buttons for anything else. So, instead, to load shaders under different names, you can use the textbox.
The text in the textbox will turn red and not save the input if the shader is not found (this I can do for non-vanilla shaders, because reasons...), but if the name is valid and found, it'll stay white and let you save.
And, your settings will remain between game sessions and you wont have to reload the shaders every time you start the game!
I'm also learning how to use use LiteLoader & rewrite the mod for LiteLoader instead of Forge. Hopefully that version won't be nearly as buggy (because, to be honest, my implementation is super janky. ex, you need to run the command every time you load the game), and it'll have a nice little config menu instead of a command.
How would I go about it using mixins? From what I've read here, they can only be used to overwrite/add methods and fields. (sorry if my questions are stupid, by the way)
I want to access a private method from another class. I think what I need are access transformers, but I can only find documentation for using them in Forge and Sponge. I did try the Sponge method anyways, but of course, didn't work. I think I could also use mixins, and I got mixins working, but not for changing private methods to public methods. I've also been totally unable to find any example code for access transformers. Are there any resources to help me figure out how to do this?
Hey Mumfrey,
I am trying to set up a liteloader dev workspace. I have downloaded the lastest source for Liteloader 1.10.2 from gitlab, but when I run "gradle", I get this error:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/strontium/Desktop/Lite/LiteLoader-1.10.2-afdeb24462f1554e399b1e40ece6de70034d6d6d/build.gradle' line: 29
* What went wrong:
A problem occurred evaluating root project 'LiteLoader-1.10.2-afdeb24462f1554e399b1e40ece6de70034d6d6d'.
> Failed to apply plugin [class 'com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin']
> Could not create task of type 'ShadowJar'.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'LiteLoader-1.10.2-afdeb24462f1554e399b1e40ece6de70034d6d6d'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:177)
at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:182)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:540)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:124)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:40)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [class 'com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:153)
at org.gradle.api.internal.plugins.DefaultPluginManager.addImperativePlugin(DefaultPluginManager.java:67)
at org.gradle.api.internal.plugins.DefaultPluginManager.addImperativePlugin(DefaultPluginManager.java:73)
at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:60)
at org.gradle.api.plugins.PluginContainer$apply.call(Unknown Source)
at com.github.jengelman.gradle.plugins.shadow.ShadowPlugin$_apply_closure1.doCall(ShadowPlugin.groovy:14)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.internal.Actions$FilteredAction.execute(Actions.java:205)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115)
at org.gradle.api.internal.DefaultDomainObjectCollection.withType(DefaultDomainObjectCollection.java:126)
at org.gradle.api.DomainObjectCollection$withType.call(Unknown Source)
at com.github.jengelman.gradle.plugins.shadow.ShadowPlugin.apply(ShadowPlugin.groovy:13)
at com.github.jengelman.gradle.plugins.shadow.ShadowPlugin.apply(ShadowPlugin.groovy)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:137)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:113)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:136)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.java:34)
at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
at build_510at2wz88zxsnze9q7i4j9mw.run(/Users/strontium/Desktop/Lite/LiteLoader-1.10.2-afdeb24462f1554e399b1e40ece6de70034d6d6d/build.gradle:29)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 58 more
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'ShadowJar'.
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:123)
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:118)
at org.gradle.util.GUtil.uncheckedCall(GUtil.java:401)
at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:176)
at org.gradle.api.internal.project.taskfactory.TaskFactory.create(TaskFactory.java:118)
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:77)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(AnnotationProcessingTaskFactory.java:101)
at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(DependencyAutoWireTaskFactory.java:39)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:62)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:97)
at org.gradle.api.tasks.TaskContainer$create.call(Unknown Source)
at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.configureShadowTask(ShadowJavaPlugin.groovy:40)
at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.apply(ShadowJavaPlugin.groovy:35)
at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.apply(ShadowJavaPlugin.groovy)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:137)
... 84 more
Caused by: java.lang.NoSuchMethodError: org.gradle.api.java.archives.internal.DefaultManifest.<init>(Lorg/gradle/api/internal/file/FileResolver;)V
at com.github.jengelman.gradle.plugins.shadow.tasks.DefaultInheritManifest.<init>(DefaultInheritManifest.groovy:15)
at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.<init>(ShadowJar.java:44)
at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar_Decorated.<init>(Unknown Source)
at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:56)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121)
... 100 more
BUILD FAILED
Total time: 8.221 secs
I've looked into it, and I've heard that Gradle 2.11 broke compatibility with ShadowJar 1.2.2, but.. I am using the latest version of Gradle (2.14), and I assume that the latest version of ShadowJar is being used (1.2.3). What should I do?
- usernameless
Hey Alvoria,
I really wanted to use this pack in 1.10.2, so I wrote a mod that will let you load shaders by using "/loadshader <name>". Screenshot:
(the shader is named achromatomaly instead of deconverge since I renamed the files in my version of the resource pack).
So... if you are still interested in working on this, or someone looking here in the future wants to use your resource pack... you can download the mod from curseforge here.
- usernameless
If the extension is .zip, you may be downloading the MDK instead of the Installer. If that's the case, make sure you use the download labelled either "Installer" or "Installer-win".
If the extension is .jar, right click the file, and chose run with Java. If you don't have that option, you might not have Java installed, so that would explain why it's opening with WinOpen by default.
-snip-
@usernameless_user
Are you sure? I've had two other people with this same crash on 1.9.4. Neither of them have followed my troubleshooting steps, so I'm curious what the issue actually is.
Uh, not anymore. I assumed "java.util.ConcurrentModificationException" had something to do with ASM (which TAN uses), but after looking into it I now realize that isn't the case... woops.
java.util.ConcurrentModificationException
at com.google.common.collect.HashBiMap$Itr.checkForConcurrentModification(HashBiMap.java:339)
at com.google.common.collect.HashBiMap$Itr.hasNext(HashBiMap.java:345)
at net.minecraft.client.audio.SoundManager.func_148605_d(SoundManager.java:251)
at net.minecraft.client.audio.SoundHandler.func_73660_a(SourceFile:220)
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1799)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1056)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:369)
at net.minecraft.client.main.Main.main(SourceFile:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Client thread
Stacktrace:
at com.google.common.collect.HashBiMap$Itr.checkForConcurrentModification(HashBiMap.java:339)
at com.google.common.collect.HashBiMap$Itr.hasNext(HashBiMap.java:345)
at net.minecraft.client.audio.SoundManager.func_148605_d(SoundManager.java:251)
at net.minecraft.client.audio.SoundHandler.func_73660_a(SourceFile:220)
Are there any servers which run this as their only mod? Thanks. Having an official server for this mod would be really cool... people could make companies for mining, power distribution...
0
Are there any examples of the usage of Accessor Transformers? I've run into a case where they are actually what I need, but I can't find very much documentation about them. All I have been able to figure out on my own by looking at the LiteLoader source is I need to decorate some class and register it in some JSON file, but I am not sure if that is correct (and if it is, it's still not enough information to find out on my own). I've googled tons, I've used those example code searching websites, but there's nothing.
edit: er, I just went back to the last time you answered one of my questions, and you said theres info in the JavaDoc... sorry. I just had IDEA generate a reference for those now.
1
I'm not sure if I can make it compatible with Optifine... all the methods I use for loading shaders are methods in the vanilla game. If Optifine messes with those, there's nothing I can do ;-; Sorry. I'll put a note on the Cursefore page, though.
0
If I used the first method, I would mean I'd have to save everything it found to a config file, like I am doing for saving the current shader between relaunches. And I absolutely hate dealing with File IO. I don't know if I am just incompetent, or if File IO is actually a pain in the butt ;-; Similar with the second method.
Also, I deleted the old Forge version... I figured it would be better to have people use the better, more functional version since the Forge version kinda sucked
0
And... I've finished the LiteLoader version! http://minecraft.curseforge.com/projects/not-so-secret-settings
The config menu is slightly funky: All the vanilla shaders have buttons, but since I couldn't find a way to dynamically find all the currently loaded resources (and therefore be able to find all the extra shaders for them), I couldn't add buttons for anything else. So, instead, to load shaders under different names, you can use the textbox.
The text in the textbox will turn red and not save the input if the shader is not found (this I can do for non-vanilla shaders, because reasons...), but if the name is valid and found, it'll stay white and let you save.
And, your settings will remain between game sessions and you wont have to reload the shaders every time you start the game!
0
I'm also learning how to use use LiteLoader & rewrite the mod for LiteLoader instead of Forge. Hopefully that version won't be nearly as buggy (because, to be honest, my implementation is super janky. ex, you need to run the command every time you load the game), and it'll have a nice little config menu instead of a command.
EDIT: The LiteLoader version is nearly complete
0
How would I go about it using mixins? From what I've read here, they can only be used to overwrite/add methods and fields. (sorry if my questions are stupid, by the way)
0
Okay, another question -
I want to access a private method from another class. I think what I need are access transformers, but I can only find documentation for using them in Forge and Sponge. I did try the Sponge method anyways, but of course, didn't work. I think I could also use mixins, and I got mixins working, but not for changing private methods to public methods. I've also been totally unable to find any example code for access transformers. Are there any resources to help me figure out how to do this?
0
Huh. So thats a thing. Thanks.
0
I am trying to set up a liteloader dev workspace. I have downloaded the lastest source for Liteloader 1.10.2 from gitlab, but when I run "gradle", I get this error:
I've looked into it, and I've heard that Gradle 2.11 broke compatibility with ShadowJar 1.2.2, but.. I am using the latest version of Gradle (2.14), and I assume that the latest version of ShadowJar is being used (1.2.3). What should I do?
- usernameless
3
I really wanted to use this pack in 1.10.2, so I wrote a mod that will let you load shaders by using "/loadshader <name>". Screenshot:
(the shader is named achromatomaly instead of deconverge since I renamed the files in my version of the resource pack).
So... if you are still interested in working on this, or someone looking here in the future wants to use your resource pack... you can download the mod from curseforge here.
- usernameless
0
If the extension is .zip, you may be downloading the MDK instead of the Installer. If that's the case, make sure you use the download labelled either "Installer" or "Installer-win".
If the extension is .jar, right click the file, and chose run with Java. If you don't have that option, you might not have Java installed, so that would explain why it's opening with WinOpen by default.
0
Uh, not anymore. I assumed "java.util.ConcurrentModificationException" had something to do with ASM (which TAN uses), but after looking into it I now realize that isn't the case... woops.
0
That is an error on Tough as Nails' side.
0
Are there any servers which run this as their only mod? Thanks. Having an official server for this mod would be really cool... people could make companies for mining, power distribution...