Are you able to create custom entities on server?

Discussion in 'Development' started by MinekCz, Aug 15, 2022.

  1. MinekCz

    MinekCz Spider Jockey

    Messages:
    29
    I just discovered plugin https://poggit.pmmp.io/ci/refteams/refAddonsManager/refAddonsManager...
    It's function is to load behavior packs. So I tried it I got my texture pack and behavior pack. When I tried it in normal world It's working fine, but on server nothing's showing up.

    I am really into coding and pocketmine for few years now, but still after that time wasn't able find solution to this topic - no forum pages about this theme at all.

    Our dream is to create animated models on the server.. Yep we found the skin way where you upload custom skin geometry, It's working ye, but very limited to texture size and also I think no way to create custom animations.

    When I tried the addon way, I defined custom entity id (custom:floating_crystal)
    In normal world I just typed /summon custom:floating_crystal and It's working fine..

    In my code:

    PHP:
    class Floating_Crystal extends Living
    {


        public function 
    __construct(Location $loc)
        {
            
    parent::__construct($locnull);

            
    $this->setCanSaveWithChunk(false);
        }

        public function 
    getName(): string
        
    {
            return 
    "Floating Crystal";
        }





        public static function 
    getNetworkTypeId(): string
        
    {
            return 
    "custom:floating_crystal";
        }

        protected function 
    getInitialSizeInfo() : EntitySizeInfo{ return new EntitySizeInfo(1.80.61.62); }
    }
    Maybe I miss someting in my code, I just need a little guide. I'm really into this so you can be specific.


    Why I ask this question? Because all of the Minecraft servers are able to have custom animated entities (for example Hive)


    So the question is, Are you able to create custom entities on server and how?
     
  2. iRainDropp

    iRainDropp Creeper

    Messages:
    5
    GitHub:
    iRainDropp
    Yes you can and they can include custom geometries and animations for attacks, idle, etc. You can do it using something like blockbench and for the server sided code sadly I don't really know, I am not a developer myself. I have a friend that has implemented the server side code for my server and you can try to get in contact with him on Discord if you'd like. His tag is Ali#0005 (he's currently away from home so you will have to wait a few days - a week for a response from him)
     
  3. MinekCz

    MinekCz Spider Jockey

    Messages:
    29
    Hey guys, It's me again. Just wanted to tell you that I understand that it's maybe a harder topic to answer, so maybe just give some contacts or something, because this question was bothering me for years now and still no one talking about, no answers, nothing. Not even simple word "no you can't do that". Ye even that would help.

    Also I know you can do thing in Blockbench, but how to port these thing to a server is the question.

    So please, this topic should be solved. And we're in this year, you know and just nothing, Minecraft is moving on, but all of this don't.
     

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.