1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Add new blocks

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

  1. PiloudeDakar

    PiloudeDakar Witch

    Messages:
    62
    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 Slime

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

    PiloudeDakar Witch

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

    EndermannbugZJFC Slime

    Messages:
    84
    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 Witch

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

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
  7. PiloudeDakar

    PiloudeDakar Witch

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

    mmm545 Baby Zombie

    Messages:
    152
    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 Witch

    Messages:
    62
    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 Witch

    Messages:
    62
    GitHub:
    piloudedakar
  11. mmm545

    mmm545 Baby Zombie

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

    PiloudeDakar Witch

    Messages:
    62
    GitHub:
    piloudedakar
    where can I find this pm 4
     
  13. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
  14. PiloudeDakar

    PiloudeDakar Witch

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

    PiloudeDakar Witch

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

    mmm545 Baby Zombie

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

    PiloudeDakar Witch

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

    OguzhanUmutlu Witch

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

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    PM3: Only custom items can be added
    PM4: Custom items and custom blocks can be added
     
  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.