How should i use a variable "voltage" in
in new IC2 API? Should i make so, that my machines would explode themselves, if voltage is exceeded maximum level for current tier? Or this variable is nessesary only for transformators or so?
How should i use a variable "voltage" in
in new IC2 API? Should i make so, that my machines would explode themselves, if voltage is exceeded maximum level for current tier? Or this variable is nessesary only for transformators or so?
Machines shouldn't explode, yet.
Machines shouldn't explode, yet.
Well, what you could always do, is just 'enable' explosions yourself. (Make the explosion happen anyway.)
You typically ignore it, amount already accounts for it with the energy (amount) being voltage*current (*1 tick). It's for special purposes, not the average machine.
I'm aiming to handle overload mostly outside the block to keep it consistent. The voltage parameter is suitable to e.g. let a lamp glow brighter or auto-transformers.
You typically ignore it, amount already accounts for it with the energy (amount) being voltage*current (*1 tick). It's for special purposes, not the average machine.
I'm aiming to handle overload mostly outside the block to keep it consistent. The voltage parameter is suitable to e.g. let a lamp glow brighter or auto-transformers.
Thank you for answer. You aiming for concept - more voltage - more faster work machine? So instead of "upgrade" item and "transformer" item we use a machine specified item in special slot - as "lv motor" "mv motor" or "lv heating coil" for furnance and so on?
No not generally, compared to the old enet voltage = packet size, current = packet rate
There may however be a few things which take the voltage into account.
sorry to revive old thread - but i found some useful info here - anyway how new e-net will be solved ? - i like idea of more "real" solution like cable being capable of current (packets/tick) and voltage being isolation limit only. - is this the case of new e-net ? any disclosure how it will be done ?
What name of ic2 creative tab? ( IndustrialCraft 2 )
Hello,
after trying to create the workspace I get a error...
D:\Java\forge\forge 1.10.2>gradlew setupDevWorkspace eclipse
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Java\forge\forge 1.10.2\build.gradle' line: 9
* What went wrong:
A problem occurred evaluating root project 'forge 1.10.2'.
> Could not find method compile() for arguments [net.industrial-craft:industrialcraft-2-2.6.195-ex110:api] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.098 secs
Display More
build.gradle:
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "http://maven.ic2.player.to/"}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
compile 'net.industrial-craft:industrialcraft-2-2.6.195-ex110:api'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup.
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.6"
}
minecraft {
version = "1.10.2-12.18.3.2281"
runDir = "run"
// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20161111"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Display More
Hello,
I use OreDictionary.WILDCARD_VALUE as Damage to energy crystal, but it doesn't work! It still need energy crystal with full energy. How do I do?
MC:1.10.2
IC2:2.6.249
forge:1.10.2-12.18.3.2185
ItemStack heat_storage = IC2Items.getItem("heat_storage").copy();
heat_storage.setItemDamage(OreDictionary.WILDCARD_VALUE);
ItemStack energy_crystal = IC2Items.getItem("energy_crystal").copy();
energy_crystal.setItemDamage(OreDictionary.WILDCARD_VALUE);
ItemStack rotor_steel = IC2Items.getItem("rotor_steel").copy();
rotor_steel.setItemDamage(OreDictionary.WILDCARD_VALUE);
GameRegistry.addRecipe(new ItemStack(rangeUpgrade), new Object[]
{"CKC",
"LEG",
"MAM",
'C', heat_storage,
'K', rotor_steel,
'L', IC2Items.getItem("te","lv_transformer"),
'E', energy_crystal,
'G', IC2Items.getItem("cable","type:copper,insulation:1"),
'M', IC2Items.getItem("crafting","electric_motor"),
'A', IC2Items.getItem("crafting","advanced_circuit")
});
Display More
Otherwise, the IC2 dev.jar version for coding test would crash when building the world.
Description: Exception in server tick loop
java.lang.NoSuchMethodError: net.minecraft.world.biome.BiomeProvider.getBiomeGenerator(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/biome/Biome;)Lnet/minecraft/world/biome/Biome;
at ic2.core.util.BiomeUtil.getOriginalBiome(BiomeUtil.java:13)
at ic2.core.Ic2WorldDecorator.genRubberTree(Ic2WorldDecorator.java:330)
at ic2.core.Ic2WorldDecorator.generate(Ic2WorldDecorator.java:297)
at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:120)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1079)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1061)
at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:161)
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:337)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
at java.lang.Thread.run(Thread.java:748)
Display More
For the Energy crystal try using:
ItemStack energyCrystal = new ItemStack(IC2Items.getItemAPI().getItem("energy_crystal"), 1, OreDictionary.WILDCARD_VALUE);
Because of the way electric items deal with damage setting the damage in the first place might not actually set the damage properly when using the setter.
Especially when crafting with electric items, but not only there, you might want to use IC2's recipes (Recipes.advRecipes.addRecipe()), which will copy over the energy level of the input items into the output items.
Regarding the crash you sent there. That's caused by you using a different mcp mapping than we do. In minecraft 1.8 and above, forge allows you to use the normal version of the mod in the dev environment. Try using the normal version.
Thanks a lot! It worked!
About IC2's recipes (Recipes.advRecipes.addRecipe()) , how to use it correctly?
I just replace GameRegistry.addRecipe to Recipes.advRecipes.addRecipe, it crashed .Caused by: java.lang.NullPointerException
I try to do some changes still crash....It's hard to debug for Object[] ...
crash logs or it didn't happen
---- Minecraft Crash Report ----
WARNING: coremods are present:
IC2core (industrialcraft-2-2.6.252-ex110-dev.jar)
Contact their authors BEFORE contacting forge
// My bad.
Time: 17-8-3 下午6:26
Description: There was a severe problem during mod loading that has caused the game to fail
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from raiwhiz's Mod (raiwhizsmod)
Caused by: java.lang.NullPointerException
at net.raiwhiz.RaiwhizsMod.load(RaiwhizsMod.java:107)
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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:602)
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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)
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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:795)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:324)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561)
at net.minecraft.client.Minecraft.run(Minecraft.java:386)
at net.minecraft.client.main.Main.main(Main.java:118)
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)
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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)
Display More
My environment is using the normal version.
I just build my mod and take the jar to a normal game. It's no problem!
Since the log isn't complete I'm not sure, but I assume you register the recipes in preInit. You should never register recipes in there. Use init or potinit instead.
Oh...Sorry for uncomplete log...Here is complete one:
---- Minecraft Crash Report ----
WARNING: coremods are present:
IC2core (industrialcraft-2-2.6.252-ex110.jar)
Contact their authors BEFORE contacting forge
// Oops.
Time: 17-8-3 下午7:46
Description: There was a severe problem during mod loading that has caused the game to fail
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from raiwhiz's Mod (raiwhizsmod)
Caused by: java.lang.NullPointerException
at net.raiwhiz.RaiwhizsMod.Init(RaiwhizsMod.java:107)
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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:602)
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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)
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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:795)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:324)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:561)
at net.minecraft.client.Minecraft.run(Minecraft.java:386)
at net.minecraft.client.main.Main.main(Main.java:118)
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)
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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.10.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_144, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 919058104 bytes (876 MB) / 1581776896 bytes (1508 MB) up to 3810525184 bytes (3634 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.32 Powered by Forge 12.18.3.2185 6 mods loaded, 6 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHI mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)
UCHI FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.3.2185.jar)
UCHI Forge{12.18.3.2185} [Minecraft Forge] (forgeSrc-1.10.2-12.18.3.2185.jar)
UCHE raiwhizsmod{1.0.0} [raiwhiz's Mod] (forge-1.10.2-12.18.3.2185-mdk-idea)
UCHI IC2{2.6.252-ex110} [IndustrialCraft 2] (industrialcraft-2-2.6.252-ex110.jar)
UCHI JEI{3.14.7.419} [Just Enough Items] (jei_1.10.2-3.14.7.419.jar)
Loaded coremods (and transformers):
IC2core (industrialcraft-2-2.6.252-ex110.jar)
GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.33' Renderer: 'GeForce GTX 1070/PCIe/SSE2'
Display More
The load function is the Init function... I had renamed it.
Have you remembered to load after IC2 in the @Mod? Recipes.advRecipes is only set when IC2 does it's FMLInitializationEvent, so if you're using it at the same load event and before IC2 that would give you an NPE.
Thank you! I moved it to proInit and that's no problem.
Well, I never consider about loading sequence...
Hey guys,
I make a simple electric item.
When I take it on the chargepad, it looks like the player lift it up continuously until charge stop.
I think the point is item tooltip update.
How to fix it?
Thanks!