Prevent ItemFrame from breaking due to physics

Discussion in 'Plugin Development' started by Weasel_Squeezer, Mar 13, 2014.

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

    Weasel_Squeezer

    I am trying to find the best way to make an item float 2 blocks above the ground, and I am experimenting with a lot of different methods. Currently, I am trying to set the item as a passenger to another item, and the only way I can think of that wouldn't be too weird, would be to use an ItemFrame entity as the "vehicle" since that is a static entity. I am trying to hide the ItemFrame in ground so you can't see it.
    (Note: I am only hoping the item will float 2 blocks above the other entity since it does when you make an item the passenger to a player)
    So My question is: Is there anyway to prevent an ItemFrame from breaking due to the games physics? Like if I have an item frame in place, and I put a block in the same location, it would be cool if I can prevent that ItemFrame from breaking so that I can then use it as a "Vehicle" for other entities.
    I am just experimenting here, so this might be stupid. Also, if you have any other ideas, please let me know! thanks!
     
  2. Offline

    RawCode

    open entityframe code and track method that check physics, you can access that class from mc-dev repo.

    then copypaste that method here if problem persists.
     
  3. Offline

    Shayana

    I am not sure at all, didn't check if that works but there is a cancellable BlockPhysicsEvent in the API
     
Thread Status:
Not open for further replies.

Share This Page