putting levers on chests?

Discussion in 'Plugin Development' started by CaiusTSM, Jun 8, 2011.

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

    CaiusTSM

    Hello, I am trying to put a lever on a chest by canceling the player interact event, which works except that when the lever is placed, its glitched, and then a second later, the lever is on the floor not the chest. How would I put a lever on a chest without it glitching, and how would i make it stay on the chest?
     
  2. Offline

    DreadKyller

    well, if the chest is not on the floor will it work? if not I do not really think there is, but let me check. A lot of the time that's just glitched like you said, in corners I will place a torch and it goes to other side of the corner, so I just disconnect and join back in and it's usually fised, maybe try that, cause that might be all.
     
  3. Offline

    CaiusTSM

    when i put the chest in the air the same thing happens, the lever glitches, and then attaches to the ground (floating above ground) as if there were ground under them.

    To put the levers on the chest I canceled the player interact event and changed the material of the block next to the chest to that of a lever.
     
  4. Offline

    nisovin

  5. You also need to override the canbuild event to prevent it being popped off if anything around it updates.
     
  6. Offline

    CaiusTSM

    thanks, could you give me a link to the canBuild event?

    Could you give me an example code of making it not pop off?
    Thanks.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  7. Offline

    CaiusTSM

    Hm, I don't understand what canBuild has to do with the lever popping off, is it the BLOCK_PHYSICS event that I have to cancel?
     
Thread Status:
Not open for further replies.

Share This Page