Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dark Item :O

Comments in 'Plugin Development' started by RoboDaim, Aug 18, 2016.

  1. RoboDaim
    Offline

    RoboDaim New Member

    Joined:
    Aug 17, 2016
    Posts:
    5
    Minecraft User:
    RoboDaim
    Hello everybody. if I create the item in the crafting table : if I do not have ingredient , it appears dark in the crafting window . How to make dark item?

    Attached Files:

  2. Survingo
    Offline

    Survingo Active Member

    Joined:
    Dec 6, 2015
    Posts:
    221
    I believe it's an bug of MCPE 0.15,
    so there are no dark items
  3. RoboDaim
    Offline

    RoboDaim New Member

    Joined:
    Aug 17, 2016
    Posts:
    5
    Minecraft User:
    RoboDaim
    but I saw dark items on a single server :eek:.How to make this bag in my plugin?
  4. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Isnt that normal in MCPE? Items appear dark if you dont have them, thats client side.
    Last edited: Aug 18, 2016
    PocketKiller, Survingo and Primus like this.
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
  6. RoboDaim
    Offline

    RoboDaim New Member

    Joined:
    Aug 17, 2016
    Posts:
    5
    Minecraft User:
    RoboDaim
    Here is the proof that this is not the client side is the proof that this is not the client side

    Attached Files:

  7. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Is that one server or mod?
  8. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    And maybe you should show some attempt how this can be achieved? Maybe you should tell us where we can reproduce this? Or maybe you can try using Wireshark to capture the packets?
  9. RoboDaim
    Offline

    RoboDaim New Member

    Joined:
    Aug 17, 2016
    Posts:
    5
    Minecraft User:
    RoboDaim
    I contacted the server creator , he said , that uses bug of item count
  10. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    I predict that he sets Item amount to negative number. I'll test it soon.
  11. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    I am also adding to this,


    Here is a rough outline of my idea
    If $player has the item ID of 1> the. Quantity =-1
  12. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Have you confirmed this? I thought item count was sent in unsigned bytes.
  13. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Well, mines just theory. Theorys can change :)
  14. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Giving an Player item with negative amount doesn't reproduce this, although I might be wrong and doing it this way
    PHP:
    PlayerInventory::addItem()
    won't work. I'm trying to figure out other ways right now.

    Edit: Okay, addItem() function won't allow to add item with negative Item number, that's why it didn't work. Anyone knows any other way?
    Last edited: Aug 21, 2016
  15. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Simple way: Join that server, enable wireshark, see what is sent to the client.
    Now please tell us how to access that server to prove that it exists, or show a wireshark dump if you want us to help you without wild guessing.
  16. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PocketMine treats items with negative number same as empty slot. Nothing got send to client.
  17. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Send a direct packet with 0 as item count to confirm?
  18. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    I have many ideas although I don't have time to test them. (they are theorys, and not to be taken to be correct.) I will leave them on this post in case anyone wants to try.
    • Negative negative 1 (--1)
    • A constant (but laggy) process of constantly adding and removing item. (Loop). Possibly it looks black on the clients side.
    • Internal Problems in the src\pocketmine\item causing it to glitch? (could be in Player.php too, because it is a player's problem. Possibly even client side problems)
    • Possibly its simply banned the item with any ban-item plugin
  19. SOFe
    Offline

    SOFe Banned

    Joined:
    May 28, 2016
    Posts:
    386
    Minecraft User:
    Herobrine
    Remember that eventually the packet data are sent to the client in a byte NBT tag, i.e. it must be an integer 0≤x<256 (or -128 to 128). Negative negative one means 1.
    Repeatedly blinking the item will result in visible blink, because I doubt if packets sent per tick can really arrive ar the client per 50 ms. Instead, they are sent in groups, looking to the client as irregular but still visible change. Furthermore, you can't screenshot like that.
    About your third or fourth points, you didn't explain anything relevant to the client.
  20. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    I did say they are theorys :)

Share This Page

Advertisement