Solved Ambiguous instanceof

Discussion in 'Plugin Development' started by mncat77, Apr 27, 2013.

Thread Status:
Not open for further replies.
  1. I am trying to override an internal NMS check by changing the type of a field (entityplayer.activeContainer) from the usual minecraft type (Container~ that extends Container) to my own type (that extends Container aswell).

    Every time I get the NMS instance of the player and check the type of it and perform the same check as done in the NMS code I want to override it returns false (thus code should not be executed). I still see that the code is executed, does anyone know why this could be and how it could be fixed?

    NMS check (yes, someone forgot a second " and the code is messed up that is fixed in the craftbukkit.jar though): https://github.com/Bukkit/mc-dev/blob/master/net/minecraft/server/PlayerConnection.java#L843
    Code:java
    1. this.player.activeContainer instanceof ContainerAnvil

    Should return false (checked by my plugin) seems to return true though....
     
  2. Bump

    Nvm this seems to be absolutely client-sided sadly.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
Thread Status:
Not open for further replies.

Share This Page