[1.8] Mod Development Help Thread/Updating to 1.8 Thread

Discussion in 'Mod Development' started by Chaka, Nov 27, 2014.

  1. Chaka

    Chaka FTB Team Mod Developer Retired Staff

    So I decided to make this thread because there were a lot of changes in 1.8.

    So this thread is for modders to talk about the new things that have changed and to help them out with problems they are having with their code.

    Here are some of the things that have changed.

    They removed setBlockTexturename() setTextureName() as well as registerBlockIcons() And anything that accepts coordinates such as onBlockActivated() and onEntityCollidedWithBlock() Anything with coordinates has been replaced with BlockPos Change the coordinates with BlockPos. And the side argument (int) in most methods has been changed to EnumFacing

    To get Blocks/Items to render in your inventory you need to register the models with this

    Code:
    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(YourItem, metadata, new ModelResourceLocation("modid:items_registered_name", "inventory"));
    
    You can replace ("modid:items_registered_name", "inventory")); with this.
    (Reference.MOD_ID + ":ItemNameHere", "inventory"));

    That is, If you use a Reference class.

    For rendering Items you should replace the old method of TileEntitySpecialRenderers here is an example
    Code:
    Tessellator tess = Tessellator.instance;
    tess.startDrawingQuads();
    tess.addVertexWithUV ...
    ...
    tess.draw();
    
    Replaced With

    Code:
    Tessellator tess = Tessellator.getInstance();
    WorldRenderer worldrenderer = tess.getWorldRenderer();
    worldrenderer.addVertexWithUV ...
    ...
    tess.draw();
    
    World generation is basically the same except for the new BlockPos method.


    If you would like to see some of this code working here is my git for The BackWoods mod 1.8
    https://github.com/BackWoodsMod/TheBackWoods-1.8


    Thanks. Hope this helps everyone.
     
  2. DarkIron987

    DarkIron987 New Member

    Chaka likes this.
  3. Chaka

    Chaka FTB Team Mod Developer Retired Staff

    If you, or anyone else needs any help just hop on #FTB-Wiki irc on Espernet or my TS server and i will be glad to help.
     
    DarkIron987 likes this.
  4. immibis

    immibis New Member

    Why are we updating to 1.8? (Yes, I bring this up every version)
     
    SatanicSanta likes this.
  5. CoolSquid

    CoolSquid New Member

    Well, I'm updating because none of the Forge hooks my main mod used changed. The only thing I had to change was my imports. It was easy, so why not?
     
  6. Strikingwolf

    Strikingwolf New Member

    Many many reasons
     
  7. DarkIron987

    DarkIron987 New Member

    New forge features. Modeling custom items is also A LOT easier.
     
  8. Strikingwolf

    Strikingwolf New Member

    1. Could be implemented now
    2. Along with 1 TB of JSON files
     
  9. Chaka

    Chaka FTB Team Mod Developer Retired Staff

    I mostly am updating because i want to rewrite my mod. And there are cool new features. When i write my mod i am going to do it properly this time.
     
  10. immibis

    immibis New Member

    What is your mod, so I know whether it's important enough to backport?
     
    xbony2 likes this.
  11. Chaka

    Chaka FTB Team Mod Developer Retired Staff

    The BackWoods go to my website in my signature and you can find links there

    Sent from my flux armor using the tappatalk app from the flux store
     
  12. keybounce

    keybounce New Member

    What are the biggest features of 1.8?

    1. World border.

    ... Aaannnd ... aaannnd ... Gany's mods?
     
  13. VikeStep

    VikeStep New Member

    I updated my mod to 1.8 (I'll get it up on a github branch a bit later). I didn't have any items/blocks. The only issues I ran into when updating were:
    - x, y, z changed to BlockPos
    - Entity.getCommandSenderName() changed to Entity.getName()

    After those changes it worked fine
     
  14. DarkIron987

    DarkIron987 New Member

    The BlockPos was a very easy fix though. Also, the 1TB (@Strikingwolf ) of .JSON is new.
     
  15. Strikingwolf

    Strikingwolf New Member

    That is only for things like MFR or RotaryCraft
     
    Chaka and DarkIron987 like this.
  16. jaquadro

    jaquadro New Member

    Or basically every big tech mod out there. Aesthetic mods too. 1.8 will be a lonely place for a long while yet.
     
  17. Strikingwolf

    Strikingwolf New Member

    Until someone reimplements the old render system into forge or something
     
  18. Chaka

    Chaka FTB Team Mod Developer Retired Staff

    I just gave up updating to 1.8 There is toooooo many bugs
     
    Strikingwolf and SatanicSanta like this.
  19. jaquadro

    jaquadro New Member

    Sure. Something is going to happen eventually. I hope we do get a real solution baked into Forge though. Otherwise it could turn into a pissing contest between core mods.
     
  20. DarkIron987

    DarkIron987 New Member

    To be 100% honest the only difference is renders and registering blocks/items. So far working with my mod 90% of functions are the same. I would say Buildcraft may be updated to 1.8 by January 2015.
     
    Chaka likes this.

Share This Page