Posts by GregoriusT

    It's really complicated, look at this:

    It would be much less complicated if you wouldnt call your Variables "var1" - "varX".

    I don't know. It should be, if API didn't change.
    I'm staying on older version, because new IC2 REQUIRES new forge, and I don't feel like redoing the whole dev-environment once again.

    Then do your Tests on a normal Minecraft instance instad of the Dev Environment. The API should not require latest Forge (the dev deobf however does). You can still choose.


    I didn't have the choice so I had to update Forge, because I have the newest experimental IC² in my Dev Environment and I seriously HATE updating Forge, especially if it is not even needed.

    Well, that is exactly how my OreDictionary Handler works. You should look at the newer Versions of my API. I have every OrePrefix (dust, ingot, ore etc.) as seperate Enum constant (with its own properties, such as amount of Material contained in that Prefix, Dust = 1 Material Unit, Nugget = 1/9 Material Unit etc) so that I can remove the Prefix from the Ore-String, then after removing the Prefix, I use getField (aka Reflection, what is MUCH faster than iterating through all the Constants) to access the Material Enum Constant for the mentioned Ore. If that fails I print a Message saying, that the Material is not known to me into the Log. Note that even though it is not recommended (from java dev side) to have lowercase Letters in an Enum, you can and should still use them, when having the OreDictionary, as sometimes, there are Materials with an Uppercased Letter in the middle of the Name.


    Oh and "upperFirstLetter" is also called "capitalization".

    I was actually thinking about doing it that way, but thought the way I did it would be a little more simple and compact. Was not aware he was going to make it metadata based, good to know.

    It is just an assumption that he will do it, as he already did it to the other Resource Items.

    As soon as Thunderdark makes Curcuits Metadata based, your Code wouldnt work AGKz.


    This is how you have to do it properly:


    ItemStack tStack = Items.getItem("electronicCircuit").copy(); // <-- The copy() is important!
    tStack.stackSize = 2;


    And then use the Stack.

    To get back at the Costs, it should be at least 10 Million EU (Massfab and Replicator together) when amplifying with Scrap. This sounds much, but it is only one old MFSU, or one new Lapotron Crystal. And I said "at least", meaning it should cost MUCH more.

    There is a usage.txt in ic2.api.energy.


    -- EnergyTileUnloadEvent --


    Another event every energy tile has to post is the EnergyTileUnloadEvent.


    The event has to be posted as soon as the implementing tile entity is being unloaded, either by
    unloading the containing chunk or by destroying the block containing it.


    It's possible to detect the unloading by triggering on both the beginning of
    TileEntity.invalidate() and the beginning of TileEntity.onChunkUnload().


    It is important that the tile entity is still properly linked to the world while posting the unload
    event, otherwise the energy net can't find all affected connections.


    -----


    You need to implement unloading the TileEntity on both, invalidate and onChunkUnload.