[AddOn v1.15] Advanced Solar Panel 1.2

  • Here is a little update for you guys.


    So as far as I can tell the IC2 team have basically made BlockMultiID.java (The bases for every IC2 block) useless to extend for modders because they now have changed the return value of getGui to an integer. This means I would have to modify the IC2 base files and every other modder would have to too to add their own unique blocks to the ic2.java file. This would the basically make all addons incompatible with each other. Not the ideal solution for any of you or for me which forces me to take more drastic measures.


    This means that now I have to implement everything that BlockMultiID used to do for me which is going to be a PITA. :cursing: So it is going to be slow going. ;(

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence

    • Official Post

    Here is a little update for you guys.


    So as far as I can tell the IC2 team have basically made BlockMultiID.java (The bases for every IC2 block) useless to extend for modders because they now have changed the return value of getGui to an integer. This means I would have to modify the IC2 base files and every other modder would have to too to add their own unique blocks to the ic2.java file. This would the basically make all addons incompatible with each other. Not the ideal solution for any of you or for me which forces me to take more drastic measures.


    This means that now I have to implement everything that BlockMultiID used to do for me which is going to be a PITA. :cursing: So it is going to be slow going. ;(


    Good to hear it's not just my noobishness causing these problems. There's hope for addons yet!

    • Official Post

    I don't see an issue there.


    Just override blockActivated and replace the Platform.launchGUI call with your own implementation.


    However I don't particularly like if you use ic2.common.BlockMultiID, better use your own Block implementation which extends BlockContainer. Just copy the BlockMultiID file for now and adjust it to fit your specific needs. It's subjected to change quite a bit and contains code which isn't exactly necessary for typical addons.


    I'll most likely strip it down a bit, adjust the documentation and release it as a part of an examples zip file.


    Also have a look at the WallForceFieldGenerator Addon, I helped Thunderdark a bit to make proper use of the IC2 API and not relying on internal IC2 files which might change a lot in the future.


  • Thanks for the help Player. Overriding blockActivated does get it working but it is no longer ideal since I still have to make a getGui class even if it is no longer be used by anything. Which goes back to the PITA part of me eventually having to implement my own block class and no longer extending BlockMultiID. Which is a shame because now I m going to have to directly deal with forge and any changes that they make each update. It was much nicer just have to worry about the changes in IC2 and not IC2 and forge.


    Your help Player has also given me a good idea: The Modder's Lounge

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence

  • This addon is best, but it's not work in SMP mode :( Can you add SMP support to yours addon ?


    Thanks. I don't play SMP and I have no clue how to implement SMP in the addon. So without help from someone more knowledgeable in minecraft code or at least an example addon that I can use to see what I need to implement, SMP isn't in the cards for a while.

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence

  • Thanks so much for updating! Now I just have to wait for advanced macerator. Question: Is the 1.7 download an update or version 1.1?
    I definitly encourage you to look into SMP.

    I5 2500K | 4GB Cosair Vengence | Radeon 6850 | Rosewill 600w PSU | GigaByte Z68MA | CM Elite 311 | Dell 19" 720p (upgrading soon!)| Hitachi 500 GB 7200 HDD | LG 24X |Windows 7 (Genuine!)
    Alblaka in a Lightning Rod suggestion thread...[/size]

  • Thanks so much for updating! Now I just have to wait for advanced macerator. Question: Is the 1.7 download an update or version 1.1?
    I definitly encourage you to look into SMP.


    It is still version 1.1. The first two sets of numbers are for IC2 version and the second two sets are for the add on version.


    mod_AdvancedSolarPanel_v1.0.1.1 – Is for IC2 Version 1.0
    mod_AdvancedSolarPanel_v1.15.1.2 – Is for IC2 version v1.15

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence

  • I understand now. Thanks!

    I5 2500K | 4GB Cosair Vengence | Radeon 6850 | Rosewill 600w PSU | GigaByte Z68MA | CM Elite 311 | Dell 19" 720p (upgrading soon!)| Hitachi 500 GB 7200 HDD | LG 24X |Windows 7 (Genuine!)
    Alblaka in a Lightning Rod suggestion thread...[/size]

    • Official Post

    Thanks. I don't play SMP and I have no clue how to implement SMP in the addon. So without help from someone more knowledgeable in minecraft code or at least an example addon that I can use to see what I need to implement, SMP isn't in the cards for a while.


    It's actually quite easy once you know how it's working, at least for your kind of block.


    At first you have to separate the calculations in updateEntity, invalidate etc. in 2 parts:

    • the simulating part (ENet, processing) -> surround it with a Platform.isSimulating() check
    • the rendering part (effects, sounds) -> surround it with a Platform.isRendering() check


    Don't try to do any EnergyNet calls in a non-simulating environment.


    Then you'll have to synchronize everything the user can see/hear:

    • Anything visible from outside like the activity state (changing texture) or sounds:
      If you extend TileEntityBlock (or a subclass of it) the active field will get transmitted automatically. Anything additional has to be handled with NetworkManager.updateTileEntityField+onNetworkUpdate and getNetworkedFields. I don't think your addon changes its texture or anything else which falls into this category, so you won't need this.
    • Anything visible in the GUI:
      The gui values get synchronized with the corresponding Container object, just set the values in updateCraftingResults on the server by assigning them to a specific id in updateCraftingInventoryInfo. func_20112_a will read those values on the client. The containers will also update slot information, you'll only have to call addSlot for it to work.
      You can only use short values with updateCraftingInventoryInfo, but assigning a single int value to 2 ids by splitting it into 2 short values with a few binary operations works well.
      IC2 contains quite many different containers, just look at them.
  • Thanks Player! If I have time maybe tonight or tomorrow I ll take a stab at it.

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence

  • I love this addon! A balanced recipe, cable requirements and a config file, what more could you ask for?


    Will use this on my server for sure! Keep it up! :thumbup:

  • Great addon and a great idea too, ty vm, taking solar panels to the next level, im gonna dl it now and test it. Now with a big enough flower, the mass fab can choke on energy, that hungry bastard :D I really dont get it, what the bitchting was all about, if you dont like it, dont use it, problem solved, move on. I personally find the upgrade very usefull, I use solar panels all the time, no need for maintenance, no need refilling, no worries about getting nuked, no worries youll glow in the dark :D ... just leave it and it will charge up your batboxes/MFEs/MFSs, wich will always be charged. Perfect for outposts and if you dont like geothermal gens, you can even cable it down to your underground outposts. Easy peasy. The idea with the config hits the nail on the head, so everyone can change it, according to its needs.

  • F5F5F5F5


    Almost like waiting for IC2 SMP. Can't wait to be able to power my teleporter, mass fab, and machines with 2 large solar flowers.

    Quote

    It has become a little stubbly. Implement facial hair growth in IC²? Vision continuously grows more furry until you shave. (approx once every 2 minecraft days ;P)


    Steve shaves with his chainsaw.
    Check out Factorio- A game where you build a factory from scratch.

  • Not sure why you don't play SMP? Stupid to play single player. More crashes more rolebacks more problems that end up happening. With SMP and Client it runs better takes advantage of more then 1 core on a computer. It's pretty much a must thing for true IC fans and Minecraft vets.

    Check out Our Brand New GT New Horizons Server .:Here:.
    Check out Our Brand New GT New Horizons Let's Play Series .:Here:.

  • F5F5F5F5


    Almost like waiting for IC2 SMP. Can't wait to be able to power my teleporter, mass fab, and machines with 2 large solar flowers.


    You can stop wearing out your F5 key. SMP has been put on hold until I finish relocating and can get my desktop and server backup. Right now I'm in a hotel room with just my old Pentium M 1.86GHz laptop. I can't run the server and the client at the same time to do testing on it. I did try though to run both at one time and it was a spectacular failure.

    All people dream, but not equally. Those who dream by night in
    the dusty recesses of their mind, wake in the morning to find
    that it was vanity. But the dreamers of the day are dangerous people,
    for they dream their dreams with open eyes, and make them come true.
    --T.E. Lawrence