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

Tutorial Creating basic shapes

Discussion in 'Resources' started by Sandertv, Jan 19, 2017.

  1. archie426

    archie426 Baby Zombie

    Messages:
    130
    GitHub:
    archie426
    Sphere is a 3D circle
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    wtf?
    you just have to provide a position object for $center.
    That means you have to change the type hint of $center to Position and pass an position. OP should fix the type hint..
     
    Hipster likes this.
  3. Hipster

    Hipster Zombie

    Messages:
    214
    Ok thanks, will try, so the type hint in the "tutorial" is wrong, since Vector3 doesn't support getLevel()
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    It is wrong. In type-strict object-oriented languages (which we are pretending to be), if your variable type is of a superclass, you can't assume it to be of a subclass. This assumption makes type hinting meaningless as you aren't using the type hint at all.

    You guys should really take a look at PEMapModder's WorldEditArt plugin (under https://github.com/LegendOfMCPE/WorldEditArt) for the algorithms! PEMapModder's core value of non-pragmatism made most of his work unusable for servers (not directly), but for programmers they indeed have great value!
     
    Sandertv likes this.
  5. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Excuse me then, I've changed it anyways.
     
  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.