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

how to set scale on itemdrop?

Discussion in 'Development' started by padrone, Aug 1, 2018.

  1. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    how to set scale on itemdrop?
     
  2. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    PHP:
            $scale 2;
            foreach(
    $this->getServer()->getLevels() as $level){
                foreach(
    $level->getEntities() as $entity){
                    if(!(
    $entity instanceof Creature)){
                        
    $entity->setScale($scale);
                    }
                }
            }
    Run the code on a repeating task.
     
  3. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    only works on shadows, not on items
     
  4. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Oh, then it worked, actually. Blame Mojang, this is impossible. You cannot change the scale and make the change visible to the player. The fact that the code is changing the shadow shows us that the code has no errors. Tagging in case I am false: @dktapps @SOFe
     
  5. DaPigGuy

    DaPigGuy Slime

    Messages:
    86
    GitHub:
    DaPigGuy
    You are correct. Setting the scale of item entities will do nothing to the appearance of the entity aside from the shadow.
     
  6. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Yes, but it could be possible since Hypixel does that on Minecraft Java. On BedWars, in the places you get the diamonds and the emeralds, it has entities that kinda look like dropped items. One solution could be to cancel the item drop event and set the item in the player's hand to id 0 so we can spawn a block entity with the id of the item, and on a repeating task to setRotation(getRotation, 90); but the bad thing is that this only works on blocks and not items and you have to deal with that.
     
  7. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    yeah, I mean blocks itemdrop like picture below
     

    Attached Files:

  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    You are false because I don't even have an idea what "scale" means. I know nothing about gameplay since 0.16.
     
  9. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Oh, sorry then. I tagged you because you are a member of "PMMP Team" as your label says.
     
  10. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Itemcase
     
  11. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    but how to set size/scale?
     
  12. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Custom item file maybe not sure
     
  13. Angel

    Angel Spider Jockey

    Messages:
    44
    GitHub:
    aimjel
    You could try and use a resource pack.:oops:
     
  14. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    No it’s not a resource pack
    It’s a armor stand
     

    Attached Files:

  15. padrone

    padrone Witch

    Messages:
    69
    GitHub:
    padreon
    how?
     
  16. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Spawn armor stand with item on it
     
  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.