problem with "auto collecting chest"

Discussion in 'Plugin Development' started by KonanXPein, Jan 26, 2011.

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

    KonanXPein

    Hey guys,

    I'd like to write a plugin which puts items in a chest when they touch it.

    For example: I've got a water channel system. Mobs, which fell in the water, are collected in one place and killed by a lava-trap. The items are carried away and are collected at the end of the channel-system. At this point I want to collect the items with a chest without standing there, wait for the items and put it in the chest by myself.

    Now I've got a little problem. I know that there is an event called "VehicleBlockCollisionEvent". But items are items and not vehicles. Is there a possibility to get a "ItemBlockCollisionEvent" or something or do I have to write my own event, if that is even possible.

    I've already tried the search, but I couldn't find anything.

    So long

    KonanXPein

    PS: Sorry for bad English or something. I'm from Germany^^
     
  2. Offline

    Fifteen

    I don't think that's possible without editing the Minecraft Server source code.
     
  3. Offline

    Afforess

    Probably won't be that easy. But nothing worth doing is easy.

    Bukkit just got a method that lists all the entities on the server. Items on the ground are technically "entities". Loop through all the entities, searching for entities, and checking to see if they are next to a chest, in flowing water. Then kill them and add them to the chest.

    But wait, there's more!

    The chest interface isn't working 100% right now. Chest.update seems to have issues. Also, how will the game know when to check for items next to chests?

    Those two issues above are going to be your real challenges.
     
  4. Offline

    TheBeefiest

    This is a very strange request, if you want the result of "doing zero work to get things" then why not just give items to yourself or chest with one of the many plugins with a /give command?

    Or are you trying to make some kind of "automated boat" that floats around collecting things for you?
     
Thread Status:
Not open for further replies.

Share This Page