Giter VIP home page Giter VIP logo

ic2tweaker's People

Contributors

3tusk avatar eternalphane avatar trinsdar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ic2tweaker's Issues

Short-cut for changing charges for EU-compatible items

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

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

latest scrapbox thing causing crash with ic2c

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

crash-2023-05-02_16.41.53-client.txt

IC2 blast furnace doesnt display amount when oreDictionary is used

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

JEI is broken for enrichment

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.

[bug] scrapbox

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);
  ....
}

Original hoe dropout from 64 * 9 scrapbox:
photo_2022-10-16_06-39-43

[bug] ic2Energy and ic2MaxEnergy not working

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

[support] maxDamage

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.