Library [CLASS] Mob Disguise! [1.8 support!]

Discussion in 'Resources' started by mine-care, Mar 15, 2015.

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

    bronzzze

    @mine-care
    I got error in code EntityDisguise.Blaze...
    [​IMG]
     
  2. Offline

    mine-care

    @bronzzze the error is? (Hover over to see the text, i assume it is because EntityDisguise enum is in the same class as MyDisguise, to solve that either move the class to the same package with the class from where you call it, or take the EntityDisguise from the class MyDisguise out to a new enum class marked as public.
     
  3. Offline

    bronzzze

  4. Offline

    mine-care

  5. Offline

    bronzzze

    @mine-care
    One more question. Do only other player see me like a mob or I can see myself too as a mob?
     
  6. Offline

    mine-care

    @bronzzze it is kinda impossible to make yourself look like a mob :3 only others see you as a mob, you see yourself absolutely normal. The thing is that the packet should not be sent to the disguised player because he will either crash or freeze.
     
  7. Offline

    bronzzze

    Ok thank you for everything.
     
    mine-care likes this.
  8. Offline

    xXBeLkAXx

    I tried to make a disguise class myself, but it haven't worked nice. Are disguise works after respawn?
     
  9. Offline

    mine-care

    @xXBeLkAXx Well, no disguises take place right after the packet is sent, i can point out what is wrong if i see the calss :)
     
  10. Offline

    xXBeLkAXx

  11. Offline

    mine-care

  12. Offline

    xXBeLkAXx

    @mine-care
    Disguises doesn't keeps after respawn
     
  13. Offline

    mine-care

    @xXBeLkAXx you need to send the packet again onRespawn :p
     
    ChipDev likes this.
  14. Offline

    xXBeLkAXx

    @mine-care I
    I know it, but when I made a minigame with disguises, they didn't worked well after respawn (My disguises, yours in my game will be tested)
     
  15. Offline

    mine-care

    @xXBeLkAXx they will do the same, this happends because upon respawn mc client gets the entities nearby (with the help of the server ofcaurse) and therefor the disguised player will still look as a player... therefore you need to send the packet again to the respawning player...
     
  16. Offline

    ChipDev

    Maybe add that into the code itself to make it simpler for all of us :) (Just simple bukkit events!)
     
    mine-care likes this.
  17. Offline

    teej107

    @ChipDev Hey, you're back!

    Wouldn't be that hard to implement it yourself.
     
    mine-care and nverdier like this.
  18. Offline

    mine-care

    @ChipDev ill add it to the thread as a seperate piece of code because if it is added in the class itself, the class will need to be registered as listener that will cause a lot of issues. I am adding it :- ) ty!
    EDIT: i am also creating the class all over again making it more efficient and easyer to use/handle.
     
    Last edited: Apr 4, 2015
  19. Offline

    ChipDev

    Hey, Im saying for everyone.
     
  20. Offline

    Phishy

    Why am I getting errors on all "PacketType"'s?
     
  21. Offline

    Funnygatt

    Sorry for bumping an old thread, finally got around to using this Class!

    Few issues I've found;
    • Ender Dragons are reversed
    • Disguises seem to disappear every 3-4 minutes or so? (Or when they move too far away from another player, that player doesn't see the disguise anymore)
    • Any way of specifying which Villager appears?
    • Slime and Magma Cube Sizes can't be changed
    That's it. Thanks for an awesome, light-weight class!
     
  22. Offline

    mine-care

    @Funnygatt
    thNks for that :D
    Umm about 1 what you mean?
    2 that's normal and I can't fix it it is all servers task from that point and beyond
    About villager types I would add a feature but I try to keep it as generic as I can, I'll send the code to do that :)
    What you mean by the last one?
    Thank you :- )
     
  23. Offline

    Funnygatt

    When a player is disguised as a dragon, the model is backwards, so if a player is actually looking at me while disguised as a dragon, the dragon itself is facing the opposite way.

    Ah, ok. :)

    Thank you very much!

    If I disguise a player as a Slime or Magma Cube, I can't specify whether they're a Small, Medium or large slime etc.

    Also, would it be possible for you to add Charged Creepers, and the ability to specify the color of wool a sheep has?

    Sorry if I'm asking for a lot! I understand if you can't get around to it all or can't be bothered. :)
     
  24. Offline

    mine-care

    @Funnygatt
    1. Thats strange because for me it seems perfectly fine, what version is your server? (This class has not been tested for 1.8.X servers)

    4. Same with vilager aplies here, i try to keep this general and avoid having methods that specialise on a specific mob type, i may make a sidekick class util doing exacly that.

    No you are not asking too much :p it is my 'job' sort of to keep this thread updated :D I love hearing new ideas. ill do it :- )
     
  25. Offline

    Funnygatt

    We're still running the 1.7.10 Protocol Patch. Once we update to proper 1.8, I'll see if the problem persists. (Blame the owner of the server for that choice -.-)

    Thanks very much!
     
  26. @mine-care please update the reflection class!
     
  27. Offline

    mine-care

    @MrGriefer_HGTech i will have to redo the whole class some time :- ) i will! but idk when D: it is a bit of a pain :p
     
  28. Offline

    Jiheyr NV.

    I get a caution about this line:

    Code:
    Object world = ReflectionUtils.invokeMethod(disguised.getWorld(), "getHandle", null);
    The caution is as follows:

    I don't understand ^,^'
     
  29. Offline

    mine-care

    @Jiheyr NV. Check Arbitrary Number of Arguments in java :p
    It is discouraged to use null in these cases but is still possible. if you remove the ',' and the 'null' the error will go away xD
     
    Jiheyr NV. likes this.
  30. Offline

    DarkBladee12

    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page