termninal stage, no help possible.
Posts by RawCode
-
-
post error log, ever if game not crashed error log is generated.
-
unloaded chunks now solid, no vanilla stuff will load them without player's interaction.
still korea, it must cost much, much resources, but not much time.
-
food must consume multiple food items in order to make single can that heal much, i will implement mod for this later.
-
wiki lol, wiki in most cases filled by noobs with lots of spare time, all semifluid values defined by IC2e itself, configuration externalized to config.
public static int energyGeneratorSemiOil = 8;
public static int energyGeneratorSemiFuel = 32;
public static int energyGeneratorSemiBiomass = 8;
public static int energyGeneratorSemiBioethanol = 16;Code
Display Morepublic static void init() { Recipes.semiFluidGenerator = new SemiFluidFuelManager(); if(IC2.energyGeneratorSemiOil > 0) addFuel("oil", 10, IC2.energyGeneratorSemiOil); if(IC2.energyGeneratorSemiFuel > 0) addFuel("fuel", 5, IC2.energyGeneratorSemiFuel); if(IC2.energyGeneratorSemiBiomass > 0) addFuel("biomass", 20, IC2.energyGeneratorSemiBiomass); if(IC2.energyGeneratorSemiBioethanol > 0) addFuel("bioethanol", 10, IC2.energyGeneratorSemiBioethanol); }
calculation rules ARE 10 units of OIL will give 8 energy, that means 1000 units of oil gives 800 energy, energy given per tick
-
in case of damaged JAR game will crash on class declaration long before TE tick will have chance to happen.
also mods\game outdated, nice plan to update.
-
Quote
very valuable when Natural Regen is turned off
NEVER...
-
IC2 food system not updated when Notch allowed stacking food, it just underpowered.
-
fake difficulty by random rates for essentional gameplay items is BS.
i have mod that allow you to "replicate" all registered recipes without scanning first.
sources embedded
-
frame != time.
frames per second will be power, but individual frames have nothing with time.If your energy net have multiple energy sources all machines will request power from every device and burn up in process, placing transformer limit number of request to 1, your suggestion to remove transformers remove energy tiers completely.
Quoteso people think it is Voltage
Some people can's think at all, this is not reason to make everything casual.
-
there is no voltage, Alabaka never stated that V part inside LV HV EV is voltage.
current implementation is "frame in tick" there is no power.stepup is frame limiter, removing it will make energy net unmanageble
system can't be revorked, it comple crap, new implementation needed.
iridium MUST be embedded into replicator\storage and removed from chests, i made mod about this, you can get it if you want.
8 16 64 512 not too hard to remember
for scrap, just change UUM cost from 10kk to something lower in config.
-
this all about mods and modders who dont like any type of modifications and ever dont support config options (there is no config option for replicator-scanner-storage combo to open all recipes initially), currently IC2e block and TE registration does not allow to replace or change buildin stuff without magic, methods like createTileEntity hardcoded, block constructors are hardcoded.
some versions ago recycler banlist and miner's valueble ore featured hardcoded components (or still have hardcoded part not checked fresh versions) that cannot be removed without hacks.
as for mods, i try to download and decompile\check source of everything, few days ago i found method for one sided windows (ARS magica) that can be used in multiple places, also it will fit IC2e obscurator, there is no way to learn something without checking work of other people.
-
-
-
First of all, if you dont like reflections or reverse engineering this article not for you.
Code included still WIP and some parts "not very good" due to lack of time to benchmark everything.
Expected that you use Forge with SRG names for development.Story:
In far far away SMP server players were unable to find iridium sample, some users joined dark side, others kept looting with no success.
After 2 hours run i decided that this is fucking korea and must be fixed;
This thread about how to replace TE objects on existing world without loss of devices.Modding go in two stages:
First you mush ensure that your code executed in proper time, in current case after all mods you wanted to edit already constructed and ready to go, this can be cone by loadafter annotation (for each mod you want to alter) or by forcing your mod to construct last:Code
Display Moreprivate void EnsureLastWord() throws Throwable { //this method allow mod to run LAST no matter what //if other mod used similar technique result is undefined or infinite loop based on exact implementation Loader load = Loader.instance(); LoadController lc = (LoadController) UnsafeImp.Read_Object(load, "modController"); List<ModContainer> mcsA = lc.getActiveModList(); List<ModContainer> lcn = new ArrayList(); ModContainer last = null; for (ModContainer x : mcsA) { if (x.getName().equals("YOURMODNAMEID")) { last = x; continue; } lcn.add(x); } lcn.add(last); UnsafeImp.Write_Object(lc,"activeModList",lcn); }
This method resort modlist and place mod with modid "YOURMODNAMEID" to last position of list, this shoud be done only single time (i missed init field soo it called two times but no harm done), calling this method shoud be done at preinit stage.
Main part of code shoud be placed to postinit stage, in other case result in undefined.Note: "Fetch_FieldEx" is wrapper over reflections that search fields of class and all it's superclasses.
Second stage is actual changes, this done by reflections, when scaning for fields workspace and srg name shoud be checked, in other case your workspace or constructed mod will fail to work:
Codediscover = (HashMap) UnsafeImp.Fetch_FieldEx(TileEntity.class, "nameToClassMap","field_70326_a");
Fetch_FieldEx will discover and read field with given name: nameToClassMap for workspace and field_70326_a for SRG obfuscated enviroment.To minimize version dependency reflections used only when absolutely necessary, in our case registerTileEntity throw exception if TE with given name already present soo we remove it from Map before registering modded TE:
Codediscover.remove("Replicator"); GameRegistry.registerTileEntity(TileEntityReplicatorImp.class, "Replicator");
TileEntityReplicatorImp.class is custom version of TileEntityReplicator :
Code
Display Morepublic class TileEntityReplicatorImp extends TileEntityReplicator implements IPatternStorage { public void scanforPatternStorage() { Storage = (IPatternStorage)this; } @Override public short getPatternCount() { return (short) Recipes.Scanner.getRecipes().size(); } @Override public ItemStack getPatternItemstack(int id) { if (id >= getPatternCount()) return null; RecipeInputItemStack is = (RecipeInputItemStack) KEYSET[id]; return is.input; } static Map<ItemStack,int[]> IREC = new HashMap(); static Object[] KEYSET; static Object[] VALUES; { Map TMP = Recipes.Scanner.getRecipes(); KEYSET = TMP.keySet().toArray(); VALUES = TMP.values().toArray(); for (int i=0; i < KEYSET.length; i++){ RecipeInputItemStack I = (RecipeInputItemStack) KEYSET[i]; RecipeOutput O = (RecipeOutput) VALUES[i]; int[] itm = new int[] { O.metadata.getInteger("recordedAmountUU"), O.metadata.getInteger("recordedAmountEU") }; IREC.put(I.input, itm); } } @Override public int[] getPatternvalus(ItemStack id) { return IREC.get(id); } @Override public boolean transferPattern(ItemStack arg0, int arg1, int arg2) { return false; } }
Now replicator is pattern storage itself with all registered scanner recipes build in, also it's completely API compatable, soo other mods that want pattern storage also will have access to all recipes.
This change effect only replicators loaded from world save, new placed replicators will keep initial class, this i result of IC2e multiblock implementation, additional TE declaration hardcoded into blockMachine2.class, soo we have no choice expect replace it to:
Code
Display Morepublic class BlockMachine2Imp extends BlockMachine2 { public BlockMachine2Imp(Configuration config, InternalName internalName) { super(config, internalName); } public TileEntityBlock createTileEntity(World world, int meta) { switch (meta) { case 0: return new TileEntityTeleporter(); case 1: return new TileEntityTesla(); case 2: return new TileEntityCropmatron(); case 3: return new TileEntityCentrifuge(); case 4: return new TileEntityMetalFormer(); case 5: return new TileEntityOreWashing(); case 6: return new TileEntityPatternStorage(); case 7: return new TileEntityScanner(); case 8: return new TileEntityReplicatorImp(); default: return null; } } }
Replacement done in two stages, first we cleanup blocklist:
QuoteBlock.blocksList[Ic2Items.replicator.itemID] = null;
NOTE: Ic2Items.replicator.itemID hold block ID, this can be seen from original constructor's source code.
Without this game will fail to start.Due to IC2e blockIDassigner bug, leaving item reference will cause game crash without stating that problem with dublicate ID soo we also cleanup item reference:
Now we can register block again, since there is no constructor with ID specification, we must "cheat" IC2 with fake configuration that return value we want:
Code
Display Morepublic class ConfigurationImp extends Configuration { private Property prop; public ConfigurationImp(Property prop){ this.prop = prop; } public Property get(String category, String key, int defaultValue) { return prop; } }
Now we can allocate block again with same ID but different class:
Codenew BlockMachine2Imp(new ConfigurationImp(new Property("block",Ic2Items.replicator.itemID+"",Type.INTEGER)), InternalName.blockMachine2);
Now we can run game, place Replicator and enjoy all recipes embedded initially.
Same actions can be used to replace all types of TE objects including vanilla ones (disabling furnace or changing vanilla chest size anyone?);
ps. same work in bukkit, this allow to a replace nearly everything serverside, if done properly all changes will work smooth in unmodded client. -
GUI obviously WIP, buttons mouseovers added single version before...
-
disable ic2e sounds in config and report back, this NPE can be caused by something else, stacktraces not always lead to proper method.
-
do you have sound card device in your system, some time ago ever vanilla MC crashed if no sound card present.
-
quarry and large area sprayed?
ore wall and miner and sprayed area?
if you can play only casual games this is not reason to make all games casual. -
servers shoud run just fine via priority list configuration file with syntax like
modname#priority