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

Rewrite item classes

Comments in 'Plugin Development' started by thebigsmileXD, Oct 24, 2015.

  1. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Its me again. Lets say, i have a spawn egg. As we all know, spawneggs can spawn mobs.
    But isnt a minecart also a spawn egg? A spawn egg for a minecart entity?
    Still dont get the point? Okay..

    The minecart item class is empty (see pocketmine). Can i add a class via plugin so lets say.. I want to rewrite the class and implement it.. I tried it in several ways, but most times when i select the minecart-item i get raklib errors.. (I really hate raklib)
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  3. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    which error? It should work
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Minecart is not a spawn egg. It has slightly different behaviour from a spawn egg. For instance, minecart can only be placed on rails, and minecarts always face the orientation of the rail.

    I think the RakLib error you got came from the client sending a packet that PocketMine doesn't support yet (related to riding). Can you show the error?
  6. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
  7. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    The error is:
    [RakLib] Error: blocked xxxx for 10 seconds
    And yes, the behaviour is a bit different. But i want to place down the minecart everywhere, so like a car.
  8. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    idk i tested it too and i can place minecart etc but i get blocked too but idk why, maybe PacketLogger xD
  9. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    I don't have PacketLogger installed.
    And on me the minecart disappears after some seconds. For the rails the same
  10. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    so idk for me it works well and minecart is spawned after restart too :D but i implement it into pocketmine

    and i meant try PacketLogger
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If RakLib blocks you, that means that the client did something wrong (or just PocketMine/RakLib doesn't know about it), at the RakNet level. PacketLogger won't help with that - you need Wireshark, or simpler, modify PM source.
  12. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    But with modifying the source i don't have the optimization stuff by jenkins..
  13. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    if packet from client is registered in Network so it doesn't block player right?
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I meant to modify source for debugging, not for production use.

Share This Page

Advertisement