Add new blocks

Discussion in 'Development' started by PiloudeDakar, Dec 19, 2020.

  1. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    Can i add new blocks with
    PHP:
    public function registerModdedBlocks(){
    BlockFactory::registerBlock(new ModdedBlockClass(ModdedBlocksIds::MODDED_BLOCK_ID_CONST$Modded_Block_Meta"Modded block name"));
     
  2. EndermannbugZJFC

    EndermannbugZJFC Witch

    Messages:
    59
    GitHub:
    endermanbugzjfc
    You can't make custom blocks at PocketMine-MP 3
     
  3. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    Can I add meta on blocks id to do New blocks ?
     
  4. EndermannbugZJFC

    EndermannbugZJFC Witch

    Messages:
    59
    GitHub:
    endermanbugzjfc
    No, due to the limit of the world format which pocketmine 3 is using. You can’t register blocks that with ID higher than 255, Also meta of blocks are also limited to 15.
     
  5. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    Can I create items because their ids go higher than 255 ?
     
  6. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    170
    GitHub:
    ethaniccc
  7. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    I need to do this ?
    PHP:
    public function registerModdedItem(){
        
    ItemFactory::registerItem(new ModdedItemClassidmetaname))
    }
     
  8. mmm545

    mmm545 Baby Zombie

    Messages:
    125
    GitHub:
    mmm545
    there is more to it than that, you also need a texture pack (just look at the repository ethaniccc sent above)
     
  9. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    Hey, I have suggested at pocketmine's creator to change world format to be able to add modded blocks and they Sayed me this possible at the moment.
     
  10. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
  11. mmm545

    mmm545 Baby Zombie

    Messages:
    125
    GitHub:
    mmm545
    yes you can make custom blocks only in pm4
     
  12. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    where can I find this pm 4
     
  13. mmm545

    mmm545 Baby Zombie

    Messages:
    125
    GitHub:
    mmm545
  14. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    This version is working with actual Minecraft ?
     
  15. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    This plugin doesn't work, it create item but no change the name or the texture.
     
  16. mmm545

    mmm545 Baby Zombie

    Messages:
    125
    GitHub:
    mmm545
    did you download the resource pack
     
  17. PiloudeDakar

    PiloudeDakar Silverfish

    Messages:
    20
    GitHub:
    PiloudeDakar
    No, it's not directly in the plugin ?
     
  18. OguzhanUmutlu

    OguzhanUmutlu Witch

    Messages:
    53
    GitHub:
    OguzhanUmutlu
    Its 4.0.0 API feature.
     
  19. mmm545

    mmm545 Baby Zombie

    Messages:
    125
    GitHub:
    mmm545
    PM3: Only custom items can be added
    PM4: Custom items and custom blocks can be added
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.