Sticky Blocks

Discussion in 'Archived: Plugin Requests' started by gtagasje, Feb 2, 2012.

  1. Offline

    gtagasje

    Hi there,

    My suggested name: Sticky it.

    My idea: I wanna request a plugin which makes it possible to place slimeballs on blocks, so they can be stickied to eachother. Just as a sticky piston, they will take the block it is stickied to with it when it moves, this will make it available to make big doorways ect. ways easier with pistons. You should be able to place it on any block (Included redstone.) I dont know how hard this is, or if it is available to do, but please let me know what you think off this, if it can be done or not.

    The commands: N/A

    Im willing to pay: I wanna pay something, but I can't. :p



    Regards,
    Gtagasje.
     
  2. Offline

    efstajas

    This isn't possible, at least not in a "beautiful" way, which would require the addition of new blocks. Also, they're a lot of client side restrictions when it comes to pistons, so the animation will NOT work... I'm not sure if this is possible at all, if yes, only without animation and only with a selecting tool (Select blocks that should become sticky), not with crafting these blocks.
     
  3. Offline

    gtagasje

    Alright, atleast thanks for telling me.
     
  4. Well, the crafting could be simulated by placing the block, then (right) clicking it with a slimeball in hand, the ball could be substracted from the inventory but there would be no texture change on the clicked block, so it would look like b4...
    Also, as efstajas told: No smooth block moving possible...
     
  5. Offline

    dannycrafts

    Ok wait, ofcourse it is possible, not in a perfectly nice way but it is definitly possible.

    You could add custom blocks and crafting recipes, but the custom blocks would only work if player use SpoutCraft.

    It is probably better to simulate the blocks as if they are different (sticky). It would be useful to let the player know when the block is sticky, like BookWorm does to be able to differentiate books. You could use a bit of data in block data to identify if they are sticky, but you could also keep track if sticky blocks in a database. Whatever seems best.

    EDIT: Also, I think this may have a problem with the client animation, but I'm not sure. (another reason why it is not perfectly nice.)
    The onPistonExtend and onPistonRetract events allow you to get the blocks that are being moved. I think you could put your own blocks in their, and if you can, it should look nice.

    Anyway, it is definitively possible.
     
  6. Offline

    efstajas

    Yeah, Spoutcraft can always do anything. ;) But no, the animation is completely client side. Only the block directly next to the piston would be animated smoothly.
     
  7. Offline

    Rensik

    This sounds like a really cool plugin if it could be developed.

    Would it be possible to apply piston properties to a 'stickied' block so when it was 'pulled by a piston' it would trigger a piston-like effect and pull blocks 'connected' to it? Seems to me the way minecraft uses pistons this would be possible. Of course, I'm no java programmer, so what do I know if this is actually possible or not? If so, I think the piston transition effect would go a long way into 'smoothing' the block movement.

    Anywho, it would be an awesome plugin if developed :)
     
  8. Offline

    dannycrafts

    I just checked the documentation: http://jd.bukkit.org/doxygen/d5/d52...vent_1_1block_1_1BlockPistonRetractEvent.html
    It seems that unlike onPistonExtend, onPistonRetract only involves one block. I don't know why I didn't see this earlier, but yeah.
    Efstajas noted that the it would be impossible to show an animation for the 'extra' blocks in the client without any client modding. Even though I can't confirm that, it can't simply be done with bukkit (at least not with the nice animation). I'm wondering if the server could send additional piston-retract messages for each block, but I don't know if this could work because I don't know how the message works.
     

Share This Page