Minecart next to each other

Discussion in 'Spigot Plugin Development' started by Danique, Jun 26, 2015.

  1. Hey there,

    I need help! I need when a minecart rides on a block with below a sign with some text, the minecart get a minecart next to the middle and follow the middle minecart like this:
    [] = minecart
    || = Rails


    Does someone how i get this? I think this will be with entity's

  2. Creeoer


    If I'm not completely thrown off it sounds like you want to spawn a minecart next to the minecart the player is riding in whenever you run over a sign with some text, that is a little performance heavy.

    Anyway, use the VehicleEnterEvent, get the entinty, if said entity was a minecart, create a runnable that runs every let's say 4 ticks that checks the block beneath the minecart entity. Check if the blockstate were a sign, if so then instianate a minecart entity next to the entity the player is in. The minecart will probaly fall if there isn't a rail next to it, can't help you there.
    • Agree Agree x 1
  3. Can you make an example for me?
  4. Creeoer


    What I did will make sense to people who looked over bukkit for more than a week. Sorry, I won't spoonfeed you step-by-step what I did.
  5. But can you send me an pm?
  6. Creeoer


    Sending a pm or posting a reply to this thread doesn't make a difference.
  7. I meam only to me because i can't make this.... On myself
  8. Creeoer


    Read the javadocs? You can expect good explainations from posting plugin threads on the forums but never the code straight out.
  9. Can you not Skype me The code?
  10. Creeoer


    Dude, what don't you understand. I won't post the code not because of my public image, I won't post it because it'll promote people like you to flood the forums with questions demanding full code examples, which no one wants.
    • Like Like x 1
  11. Here's some code,

    Code (Text):
    if (danique.knowsJava()) {
    } else {
    System.out.println("Learn Java");
    • Funny Funny x 4
    • Optimistic Optimistic x 2
    • Winner Winner x 1
  12. Hahaha xd i like that code