team-abciv / ic2tweaker Goto Github PK
View Code? Open in Web Editor NEWBecause there are people who insist that all tweaks should go through CraftTweaker... so here we go...
License: The Unlicense
Because there are people who insist that all tweaks should go through CraftTweaker... so here we go...
License: The Unlicense
Quoted from #8 (comment)
Can you do something similar so that you can conveniently change the charge level and energy of items through scripts? At the moment, all this data is recorded in NBT, and if this is the charge level, in addition to NBT, we also need to edit the damage of the item so that it is displayed visually (for example, if it is a drill, or an energy crystal).
I think it should work like this:
<myic2item>.ic2Charge = 1000000; // set item charge (nbt + damage) print("item: " ~ <myic2item>.ic2Charge); // return item charge print("item: " ~ <myic2item>.ic2MaxCharge); // return item max charge
<myic2item>.ic2Enegy = 4000000; // set item energy (ntb) print("item: " ~ <myic2item>.ic2Enegy); // return item energy print("item: " ~ <myic2item>.ic2MaxEnegy); // return item max energy
mods.ic2.SemiFluidGenerator.addFluid doesnt work and gives an error even when example code is used. I talked with crafttweaker creator and he said its something to do with this mod not being updated.
The code example mods.ic2.SemiFluidGenerator.addFluid(liquid:water, 2333.0D);
[INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: IC2/semiFluidGenerator.zs}: ic2.api.recipe.ISemiFluidFuelManager.addFluid(Ljava/lang/String;ID)V
java.lang.NoSuchMethodError: ic2.api.recipe.ISemiFluidFuelManager.addFluid(Ljava/lang/String;ID)V
Minecraft version 1.12
Newest version of IC2
I know this mod is for IC2 Experimental, but it's also useful for IC2C, however I suspect this specific addition is causing a crash when used with IC2C. Not sure if it matters to you or not but I figured I'd report it anyway. Here's the relevant crashy bit from my log in case you have any interest in fixing it. I suspect for me rolling back to a version before this change will work so nbd if you can't or don't care to.
---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!
Time: 2023-05-02 16:41:53 EDT
Description: Initializing game
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from IC2 Tweaker (ic2_tweaker)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: ic2.core.recipe.ScrapboxRecipeManager$Drop
at info.tritusk.modpack.crafttweaker.support.ic2.ScrapBoxSupport$Impl.getOriginalTopChance(ScrapBoxSupport.java:128)
at info.tritusk.modpack.crafttweaker.support.ic2.ScrapBoxSupport$Impl.rebuildScrapBoxPool(ScrapBoxSupport.java:94)
at info.tritusk.modpack.crafttweaker.support.ic2.IC2Tweaker.initStage4(IC2Tweaker.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:754)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
at net.minecraft.client.Minecraft.init(Minecraft.java:535)
at net.minecraft.client.Minecraft.run(Minecraft.java:3931)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: java.lang.ClassNotFoundException: ic2.core.recipe.ScrapboxRecipeManager$Drop
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at info.tritusk.modpack.crafttweaker.support.ic2.ScrapBoxSupport$Impl.getOriginalTopChance(ScrapBoxSupport.java:124)
... 45 more
Caused by: java.lang.NullPointerException
import mods.ic2.BlastFurnace;
import crafttweaker.item.IIngredient;
import crafttweaker.item.IItemStack;
import crafttweaker.oredict.IOreDictEntry;
enableDebug();
var CopperOre = [
ore:oreCopperNormal,
ore:oreCopperPoor,
ore:oreRichCopper,
ore:oreCopperSmall
] as IIngredient[];
function BlastFurnace(inputOre as IIngredient[], output as IItemStack) {
val numbers = [
3,5,2,7
] as int[];
for i, ore in inputOre {
mods.ic2.BlastFurnace.addRecipe([output,ic2:misc_resource:5], ore * numbers[i], 1, 2500);
}
}
BlastFurnace(CopperOre,tfc:metal/ingot/copper);
For some reason JEI doesn't show the amount of ore needed to craft the ingot. Before that when i did not use ore dictionary it worked, then i changed it to ore dictionary to make the code shorter and now it doesn't show it even tough the recipe works correctly.
Minecraft version 1.12.2
Forge 14.23.5.2859
Craft Tweaker2 4.1.20.675
IC2 Tweaker 2.0
I have the following script that allows to enrich water/distilled water into Ink from Mystcraft:
mods.ic2.Canner.addEnrichRecipe(<liquid:myst.ink.black> * 1000, <liquid:water> * 1000, <ore:dyeBlack> * 2);
mods.ic2.Canner.addEnrichRecipe(<liquid:myst.ink.black> * 2000, <liquid:ic2distilled_water> * 2000, <ore:dyeBlack>);
The problem is that in JEI item slot shows only vanilla black dye (ink sack) and doesn't indicate that two are needed with subscript, making it confusing. It still functions properly, however, accepting all black dyes and requiring two of them, only JEI is broken.
When will you push the update with the fixes to the curseforge ?
When I add new items to the scrapbox, some pretty weird logic happens. The first item I added starts to drop very often, although it has a low drop rate.
There is some weird logic in the original (maybe it's for balance) that hoes fall very often anyway. If I add new items with IC2Tweaker, they get into the array before IC2 itself does, and therefore the first item I add drops out very often (instead of a hoe).
private void addBuiltinDrops() {
if (IC2.suddenlyHoes) {
this.addDrop(Items.WOODEN_HOE, 9001.0F);
} else {
this.addDrop(Items.WOODEN_HOE, 5.01F);
}
this.addDrop(Blocks.DIRT, 5.0F);
this.addDrop(Items.STICK, 4.0F);
this.addDrop(Blocks.GRASS, 3.0F);
....
}
The Charge and Energy functions work completely identical to each other. They return/change only the value for Charge. In fact, these are 2 different values, items (drill, saw, nano saber, energy crystal, ...) have a charge level, and blocks (mfe, mfsu, ...) have an energy level.
// Code:
var mfe = <ic2:te:74>.withTag({energy: 370040.3});
print("[Charge]" ~ mfe.displayName ~ ": " ~ mfe.ic2Charge ~ "/" ~ mfe.ic2MaxCharge);
print("[Energy]" ~ mfe.displayName ~ ": " ~ mfe.ic2Energy ~ "/" ~ mfe.ic2MaxEnergy);
// Result:
[Charge]МФЭ: 0.0/0.0
[Energy]МФЭ: 0.0/0.0
// Code:
var goggles = <ic2:nightvision_goggles>.withTag({charge: 19000.5});
print("[Charge]" ~ goggles.displayName ~ ": " ~ goggles.ic2Charge ~ "/" ~ goggles.ic2MaxCharge);
print("[Energy]" ~ goggles.displayName ~ ": " ~ goggles.ic2Energy ~ "/" ~ goggles.ic2MaxEnergy);
// Result:
[Charge]Прибор ночного видения: 19000.5/200000.0
[Energy]Прибор ночного видения: 19000.5/200000.0
I'm trying to use maxDamage to change the max durability of an item but it doesn't work. Can you please add a feature that will make it possible to change the durability of items from the ic2 mod?
var rotor_carbon = <ic2:rotor_carbon>;
print("rotor_carbon: " ~ rotor_carbon.maxDamage);
rotor_carbon.maxDamage = 1000;
print("rotor_carbon: " ~ rotor_carbon.maxDamage);
[INITIALIZATION][CLIENT][INFO] rotor_carbon: 604800
[INITIALIZATION][CLIENT][INFO] Setting max damage of Carbon Rotor to 1000
[INITIALIZATION][CLIENT][INFO] rotor_carbon: 604800
In IC2 liquid fuels can be used not only by Semifluid Generator, but also for Liquid Fuel Firebox. But this addon can't add new fuels for it (only for Semifluid Generator)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.