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

Check if beacon is active?

Discussion in 'Facepalm' started by Eduardo, Jul 9, 2017.

  1. Eduardo

    Eduardo Baby Zombie

    Messages:
    100
    GitHub:
    xBeastMode
    Is there any way to check if a beacon is active and gets its level or do we have to check if it's the correct shape and activate it manually?
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    You'll need to code a whole new tile for that and hack InventoryType class using ReflectionClass to access private properties. You can refer to the Minecraft Wiki for beacon's NBT tags.

    We can't help you without knowing how you've added beacons to PMMP.
     
    jasonwynn10 likes this.
  3. Eduardo

    Eduardo Baby Zombie

    Messages:
    100
    GitHub:
    xBeastMode
    Nevermind, the beam works by itself. Just need to figure out a way to make it's inventory.
     
  4. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    The client handles the beam. The game will check for the blocks above and below the beacon and cast the beam. But you will manually need to code a way for the server to check the number of blocks (not as hard as you think it is).
    For the inventory, you'll need to use reflection hacks.
     
  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.