Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advance functions and multiple outputs #430

Open
Tcll opened this issue May 9, 2017 · 7 comments
Open

advance functions and multiple outputs #430

Tcll opened this issue May 9, 2017 · 7 comments

Comments

@Tcll
Copy link

Tcll commented May 9, 2017

How would one add say a 10% chance of an extra item to an unsupportive mod??

To elaborate a bit, I'm basically trying to mod the Mekanizm Enrichment Chamber into the Engineer's Toolbox Centrifuge...

Mekanizm doesn't support a second output, so I'm basically trying to tie a 2nd item to the output...
Problem is, I'm not sure how to determine the 10% chance the item is actually bound to the output.

Is there any sort of "random" function or something that could give me what I'm looking for??

@Blue64
Copy link

Blue64 commented May 10, 2017

which MineCraft Version? Mod Versions? Java Version? Operating System?

@Tcll
Copy link
Author

Tcll commented May 10, 2017

3.0.9 for 1.7.10
not sure why this matters, but java 8 on Linux (Xubuntu 14.04)

@Blue64
Copy link

Blue64 commented May 10, 2017

NotePad++ provides the simplest example of why it matters, especially when combined with AutoHotKey (for Windows, not sure if it can work on Linux/Unix), as on Windows, if you want to preform an Extended Search Find function on a Line Return;

on Windows: \r\n
on Unix: \n
on: Mac: \r
Ubuntu is Coded in Unix
Linux is Coded in Unix
Android Phones are Coded in a Unix Subset (fun fact)
Each OS type has a different Folder Tree, and a different Writing Method to reach different folders.

That does transfer over to the saved data, and as a result, affects Compiled Programs accordingly, including Java. The Version of Java becomes important because for some reason not everybody uses the correct Version with their Forge, some use Java 7, some use Java 8, most Forge Dependent Mods use a Forge Version that upgraded to Java 8, which has some commands that Java 7 doesn't, and Java 7 also has a bunch that they got rid of with the jump to Java 8.

It's all one big cascading tech tree of issues and problems.

I made a little reference sheet for Information Collection Checklists; >> Here <<

@Tcll
Copy link
Author

Tcll commented May 10, 2017

Alright I see where you're coming from, but my issue regards ZenScript​, not Java,
or to be more precise, the lack of documentation about a possibly proprietary feature that should be available in ZenScript...

You don't really need info about my OS and Java version for that :)
In fact, tbh the only thing of any relevance in your above post would be Notepad++, as it's what I'm using for my scripts. lol

EDIT: unless there something else I might be missing >.>
in any case, you have it :)

@Blue64
Copy link

Blue64 commented May 10, 2017

it's relevant to the directory for the OS, and accuracy of MT Core Functions for Java, older versions might rely on no longer existent commands/functions in Java. each Mod that sets up a Config File for example needs to know your OS so they can know how to access the \config\ Folder Sub-directory of the \.minecraft\ Directory, which if I recall, on Unix Based OS it's (...\\.minecraft\\config\\...) whilst on Windows it's (...\.minecraft\config\...).

one person once had a Bug Report where the problem was their Java was 2 versions behind lol ever since then, I've asked.

Side Note: yeah, NP++ is pretty awesome lol I use it for my Text Editor and put the End of Line Conversions in Unix Mode whenever I can xD that \r is like 1/4 of the characters sometimes lol and the AutoHotKey is nice because I can tell my Mouse to do a Press & Hold without any fancy tricks or reconfiguration, just use a hotkey, which I usually set to ~ lol currently I have my Sorting Script loaded, trying to figure out this Crash During Launch Bug with MineChem. I'm not entirely sure of the cause though lol

[20:46:24] [Client thread/ERROR] [FML/]: Caught exception from minechem
java.lang.NullPointerException
	at minechem.potion.PharmacologyEffect$Potion.<init>(PharmacologyEffect.java:212) ~[PharmacologyEffect$Potion.class:?]
	at minechem.potion.PharmacologyEffect$Potion.<init>(PharmacologyEffect.java:217) ~[PharmacologyEffect$Potion.class:?]
	at minechem.potion.PharmacologyEffectRegistry.init(PharmacologyEffectRegistry.java:100) ~[PharmacologyEffectRegistry.class:?]
	at minechem.Minechem.postInit(Minechem.java:182) ~[Minechem.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[forge-1.7.10-10.13.4.1614-1.7.10.jar:?]
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forge-1.7.10-10.13.4.1614-1.7.10.jar:?]
	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forge-1.7.10-10.13.4.1614-1.7.10.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:552) [bao.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878) [bao.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:148) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

@Tcll
Copy link
Author

Tcll commented May 10, 2017

huh, alright, I stand corrected... lol
then again, python is pretty similar, if not exact to that... >.>

I personally have had about enough of Notepad++
I mean, it's still cool and all, but some of I've recently gotten used to with jetbrains IDEs like PyCharm and IntelliJ are making me look back in disgust at it... :P
box selection for example...

I'm thinking about trying out ATOM to replace good ol NP++ with, but idk...

good luck on that error btw :)

@Blue64
Copy link

Blue64 commented May 10, 2017

iopleke/Minechem#843 is where I've posted the Bug Tracker if anyone here wants to take a look at the full crash log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants