mcenderdragon / Futurepack-API

A small Api for the Futurepack
21 stars 4 forks source link

[1.10.2]CraftTweaker support issue #148

Closed SOL3675 closed 7 years ago

SOL3675 commented 7 years ago

When I tried to add recipes with looking the wiki, but the error occurred. It's No such member issue. The wiki has no examples of these scripts, so I actually do not know how it works.

Testing script below. mods.futurepack.neonindustrial.add(<ic2:quantum_helmet>,[<ic2:te:75>,<p455w0rdsthings:emerald_carbon_helmet>,<advanced_solar_panels:crafting:5>],50);

Error log below. Edit: Paste here. https://pastebin.com/EMdAK7jM

mcenderdragon commented 7 years ago

I think you need to remove the "mods" before the futurepack

SOL3675 commented 7 years ago

I already tried that XD Same scripts above without "mods" I forgot to write version number. I'm using futurepack 24.2.133 CraftTweaker 3.0.24

https://pastebin.com/G2gYTriA

mcenderdragon commented 7 years ago

Have the whole log?, so fml-client-latest.log and FP-Latest.log ?

SOL3675 commented 7 years ago

FP-Latest.log https://pastebin.com/QbTdCiLg Client latest log can't paste... It' too long. I'll paste it ASAP when I have time.

mcenderdragon commented 7 years ago

Tgis is not the complete FP-Log... this is far not enough, there should be more...
Just use an uploader for the latest.log.

SOL3675 commented 7 years ago

Here's the whole logs. https://www.dropbox.com/sh/zklhjd23h5w78gg/AACNd3hRMxdEZ4OaityubDgIa?dl=0

I think here is the problem. It included in latest.log. [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: java.lang.ClassNotFoundException: stanhebben.zenscript.symbols.IZenSymbol [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.ClassLoader.loadClass(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.ClassLoader.loadClass(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.Class.forName0(Native Method) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.Class.forName(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at futurepack.minetweaker.MinetweakerBridge.init(MinetweakerBridge.java:16) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at futurepack.common.FPMain.preInit(FPMain.java:159) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.reflect.Method.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:616) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.reflect.Method.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.reflect.Method.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at com.google.common.eventbus.EventBus.post(EventBus.java:275) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:624) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:259) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:439) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.client.main.Main.main(SourceFile:124) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at java.lang.reflect.Method.invoke(Unknown Source) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [07:02:04] [Client thread/INFO]: [futurepack.minetweaker.MinetweakerBridge:init:30]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [07:02:04] [Client thread/INFO]: [java.lang.Throwable:printStackTrace:-1]: Caused by: java.lang.NullPointerException

Maybe I should test it with minimal mods enviroments.

SOL3675 commented 7 years ago

Using only: CraftTweaker 3.0.24 Futurepack 24.2.133 JEI 3.14.7.417

latest.log https://pastebin.com/xK2NEf8d FP-Latest.log https://pastebin.com/XcmWye7h

Error: could not find futurepack

mcenderdragon commented 7 years ago

yeah I think I fixed it, its currently building but i should be working.

mcenderdragon commented 7 years ago

You should try this version, if the link doesnt work try again in ~20min, it is still building

SOL3675 commented 7 years ago

Using link above, but still not work. Your link version is same file size as curse's one. Wrong link?

mcenderdragon commented 7 years ago

Yeah wrong link, I fixed it now ^^

SOL3675 commented 7 years ago

Thanks a lot! It works! I should try all other machines, but I'm little busy now, so another time. Could you add JEI support for custom recipes? It doesn't show up in JEI.

mcenderdragon commented 7 years ago

This should be all the same pipeline. But it seams like minetweaker is adding the recipes after the jei setup...

mcenderdragon commented 7 years ago

If you presst F3 + T, does JEI show the new recipes ?

mcenderdragon commented 7 years ago

It should be this version were everything works.

SOL3675 commented 7 years ago

Hmm, F3 + T works in that version, but custom recipes should be loaded when player in the world. I don't want to say "Press F3 + T" to all the modpack players. As other mods support CraftTweaker, could you add or remove custom recipes on JEI when use /minetweaker reload? Thank you anyway for your good works.

mcenderdragon commented 7 years ago

In the second version I posted the JEI fix was alread included ^^

SOL3675 commented 7 years ago

Strange... I used second link version, "137" and JEI doesn't show custom recipes without "F3 + T". BTW, I tried custom Assembly's recipes, and it works. It has the same JEI issue.

mcenderdragon commented 7 years ago

yeah its my fault i derped and never inited the patch,a fix is on its way ^^

mcenderdragon commented 7 years ago

So I hope this time it finaly works ^^ link

SOL3675 commented 7 years ago

I just launched the game and checked the recipe. Whoosh! It's Great! It completely works! Thanks! 2017-04-21_22 15 39

mcenderdragon commented 7 years ago

If you need research support for Crafttweaker we can discuss that :)

SOL3675 commented 7 years ago

Thank you so much. I'll appreciate if you added research support, because it will be able to balance the game more easier. So, where should we discuss?

mcenderdragon commented 7 years ago

Well I think github is fine since other can find information and also comment if they want. Reimplementing the research system complete would be a bit overkill since I already read json files, so I think I will add a function to remove researches by id and add path to a json file with the same format as the current research.json

SOL3675 commented 7 years ago

I tried to find the research.json, but I couldn't find it. Where it is generated? Is it not in config files?

mcenderdragon commented 7 years ago

its inside the jar futurepack/common/research/

SOL3675 commented 7 years ago

I found it, thanks. So you will move the json file generate out of the jar file? Modpack makers do not edit inside mod's jar files, because the actual modpack profile that upload to Curse are not included the jar files. Your mod licence "All Right Reserved" also prevents modpack makers to edit the jar files. Generally speaking, modpack makers are prohibited to edit that.

mcenderdragon commented 7 years ago

no I think I will add an option for you to register your own file, so the research.json will be the same but you add a modpack_research.json (or any other name) and there are more research entrys. The only thing is the texts, the are located in assets/futurepack/lang/ I dont know if ypu can add something like a default resourcepack to add them.

SOL3675 commented 7 years ago

Files that upload to Curse are contain manifest.json that has an information about included mods, and the folder "Override" contain any other files and folders that in game directory. It can also upload mods but only the mods not in Curse network. So, I resourcepack is okay to add, but I think using resourcepack may cause server compat issue. Resourcepacks are easy to apply and detach in game. Modpack users can mistake easily to detach resourcepack. So I think other places in directory is better than resourcepack. How do you think about this?

mcenderdragon commented 7 years ago

well how does other mods handel localisation and images editable by minetweaker?

SOL3675 commented 7 years ago

Hmm, the research icon images should be editable? I think just using the item icon is even good idea. If you think it is difficult to support CraftTweaker way, using json files is even good, but not in resourcepack. I think adding another json file in config is pretty good.

I don't know the mods that change the localization using CraftTweaker, and I'm not good at proggraming with java. But I think these websites below would be helpful. -Astral Sorcery mod that support CraftTweaker and rendering item icon not in output slot. https://github.com/HellFirePvP/AstralSorcery 2017-04-28_07 14 53

-Custom Achievements mods that can add them via json. These Achievements are using Item Icons with specified Item ids. https://github.com/davqvist/CustomAchievements/tree/master/src/main/java/com/davqvist/customachievements

-CraftTweaker itself can change some localization, but it only strings. http://minetweaker3.powerofbytes.com/wiki/Tutorial:Localization

mcenderdragon commented 7 years ago

If minetweaker can add localisations hten this isvery helpfull. And I think fo the research text I just add a way to add custom folders so the researches are not searched in the assets folder, but rather there.

mcenderdragon commented 7 years ago

Now it also search for lang files in ./mods/futurepack/lang/<lang>/<research>.json for example ./mods/futurepack/lang/en_US/basics.json Or should I move it to the configs directory?

mcenderdragon commented 7 years ago

The wiki is updated with the new research stuff. ALso this version contains research support.

SOL3675 commented 7 years ago

I think configs directory is better. But now, I'll try the version above.

SOL3675 commented 7 years ago

Sorry for late my feedback. I was busy these days. I made a testing json file in the resourcepacks/assets/fp/lang/en_US and add the following scripts like this.

P.S. I couldn't find your modpack policy in your mod page. Is it okay to add this mod in modpacks if the credits are correctly provided?

mcenderdragon commented 7 years ago

futurepack.research.addResearchFile("./NSGen.json");

SOL3675 commented 7 years ago

Oh, I misunderstood about the research file path... I successfully add the custom research! 2017-05-14_10 25 23

Unfortunately, Extrautils2 machines have same id and meta, so I can't select the icon that I wanna add XD. But the custom research are so good to balance the game. Thank you so much.

mcenderdragon commented 7 years ago

Ahh cool :)

SOL3675 commented 7 years ago

I got a good idea to apply language to custom research. Using Resource Loader mod, making "resource" directory. It works like resourcepack, but It can force to apply. This is so great.

SOL3675 commented 7 years ago

Could you update this mod on the Curse network? I want to use the custom research system in my modpack, but version 24.2.145 is not release in the Curse.

mcenderdragon commented 7 years ago

Done

SOL3675 commented 7 years ago

Thanks