Armorstands help

Discussion in 'Plugin Development' started by jakemaster2003, Aug 1, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    jakemaster2003

    Dear Bukkiters,

    You all know armor stands are pretty cool. So do i i am currently working wel going to work on a plugin where i use armor stands for purposes like one for holding a custom coaster cart model for example and the other one to hold the player i am going to make it way more than that but i want to begin with some things my idea for my plugin is to make a whole vehicles track rides planes etc plugin using custom resource packs but for now i need help with the following stuff:

    - Making armorstands work together like i said one holds the player the other one the model how do i merge those together so they can move together.(With a velocity)

    - make a armor stand follow a path marked with armor stands(PS i only need to know the basics of doing this stuf cuz i dont wanna get spoonfeeded)

    -Give armor stands ID so i can later do other things with them in like other classes

    Thats it for now note from those 2 things i don't need it to be advanced i want to learn from it in fact so i am gonna make it my own if i begin coding the real plugin when i am done with the testing.

    Greetings Jake
     
  2. Offline

    MrGriefer_

  3. Offline

    jakemaster2003

    Last edited: Aug 1, 2017
  4. Offline

    Zombie_Striker

    @jakemaster2003
    For this, do the following:
    1. Create a new class called Structure. This will represent the object all the armorstands are trying to create.
    2. Inside that class, create a HashMap<Armorstand,Vector> and a Location object. The Location represents where the whole entity is, while the hashmap controls where each individual armorstand should be relative to the whole entity.
    3. In the class's constructor, spawn all the armorstands you need, and put them into the hashmap with the vector of where they should be (For example, if you wanted an armorstand to be in from of the structure, which is facing east, you would put them into a hashmap with a Vector of (1,0,0). If you wanted one to be on top, put it in with a Vector of (0,1,0))
    4. Whenever you want to move the whole structure, change the whole object's location. After that, for loop through all the entries of the hashmap. For each one, teleport each armorstand to the whole object's location plus the vector.
     
Thread Status:
Not open for further replies.

Share This Page