Inactive [MECH] MagnetBlock v0.4.7 - Movable Structures controlled by Redstone [1060]

Discussion in 'Inactive/Unsupported Plugins' started by narrowtux, Mar 2, 2011.

  1. Offline

    narrowtux

    MagnetBlock
    Version 0.4.7
    [​IMG]
    Features
    • Use feather to move on x/z axis
    • Use stick to move on y axis
    • Click to push
    • Rightclick to pull
    • Use bone to rotate
    • Redstone support
    • Collision detection
    • Also moves Passengers of structures (not so efficient :D)
    • Basic Permission support. (Optional|See below for instructions)
    • Follow me and come here functions
    Download: MagnetBlock.jar
    Source: on github.com
    Usage
    Show Usage (open)

    Watch this video first:


    To begin, type
    /mbcs structurename
    where structurename is your whished name

    You can build the blocks of the structure now.

    To finish building, type
    /mbfs

    To reedit a structure, type
    /mbes structurename

    Remove a structure by typing
    /mbrs structurename

    Now comes the magic!
    Ironblocks that are connected to redstone are magnets. To add a magnet to a structure, type
    /mbam strucurename
    and place the iron block.

    If you then power the magnet with redstone, the structure will move to it as far as possible, and it's being animated!

    To remove a magnet, type
    /mbrm
    and click on the magnet that you want to be removed.
    Other important commands:

    /mblist
    Lists all structures with a count of their magnets.

    /mbch {name}
    Lets the structure move to your position.

    /mbfm [name]
    The given structure will follow you. This can be used to have magic carpets or to drive cars.
    If you omit the name, the structure will stop following you.

    Permissions
    Show Permissions (open)

    I implemented a basic system that allows you to define who can use this plugin and who not.
    I won't upgrade it to Permissions or GroupManager. I will do a full Permissions implementation when the official Permissions system is implemented in Bukkit.
    This is how it works:

    Create a new file, called "users.lst" in the MagnetBlock directory. Write all the users that are allowed to use MagnetBlock into this file, each user in a single line. Example:

    Code:
    narrowtux
    notch
    player
    If you don't write any users in this file or the file does not exist, everyone can use all of the features of MagnetBlock.

    Configuration

    Show Configuration (open)

    MagnetBlock can be configured by a text file. This is absolutely optional, if you don't provide one, it will use the defaults that you are used to.
    With the configuration file you can adjust the blocktype of the magnets and which items should move in which direction.
    Example Configuration file with default values:
    Code:
    #What blocktype should magnets be?
    magnet=IRON_BLOCK
    #Configure the actions of items.
    #item=ITEM,x,y,z
    #this decides how much the structure is moved when you use the specified item.
    item=FEATHER,1,0,1
    item=STICK,0,1,0
    #How much should the structures accelerate?
    maximumspeed=1
    
    Create a new file in server/plugins/MagnetBlock, called magnetblock.cfg
    The magnet-property should be clear.
    With item=, you can create a new push/pull item and define on which axes the item should push or pull. If you type in 1,1,1 , the specified item will move the structure in any direction. This is still dependent from the view of the player that clicks on the structure. If you type in 2,0,2 , the structure will move only on x and z axis, but will move by 2 blocks.

    Known Bugs
    After creating a structure, it might not be able to move correctly. You can work this around by typing /reload to reload all bukkit plugins. Then the structure should move.
    Changelog
    Version 0.4.7
    • Added Button, Powered Rail (aka booster), detector rail to the list of non solid blocks
    • buttons and pressure plates now snap back when the structure moves
    Show Changelog (open)

    Version 0.4.6
    • Disabled structure restore on startup. If you still want this, set "restoreonstartup=true" in your configuration (This can make your structures to air, beware)
    Version 0.4.5
    • Fixed the cobblestone problem while saving structures.
    Version 0.4.4
    • Added a maximumSpeed configuration value. If it is higher than 1, structures will accelerate until they have reached maximum speed.
    • Revamped configuration-parsing
    Version 0.4.3
    • Fixed the cobblestone bug
    Version 0.4.2
    • Compatible with [602] and Minecraft Beta 1.4
    • Added configuration (optional)
    • Temporary removed rotation
    Version 0.4.1
    • Removed magnet-block not found debug message
    • look down in follow-me mode to go down!
    Version 0.4
    • Now every nonsolid block is supported
      • except doors, beds, because they are 2 blocks
    • supports placing of items (redstone dust, crops, water buckets, ...)
    • supports moving the text of signs
    Version 0.3
    • Air-BlockType bug fixed! Redownload Craftbukkit as well to use this fix.
    • Nonsolid blocks (redstone, torches) are now better supported to be moved. If should have forget a blocktype, say it please!
      • Note: placing some of these nonsolid blocks is still impossible (for example redstone which turns into redstone wire when placed). If you want to use redstone, you'll have to cheat REDSTONE_WIRE into your inventory (data value: 55)
    • new Feature: Follow me and come here.
    Version 0.2.1
    • Players that aren't in users.lst can now destroy blocks.
    Version 0.2
    • Basic Permission support.
    Version 0.1.5
    • Worked around the blocktype returning air issue. If that still happens, the blocktype is set to Cobblestone making it easy for you to identify the missing blocks and replacing them. Can't do anything more about it, because this seems to be a bukkit-bug
    • Muted the logs.
    Version 0.1.4
    • Magnets receive from upper and lower restone currents also.
    • You may also try to update RedRemote to v0.2 if you've got it. This goes hand-in-hand with MagnetBlock now, so you can easily place a receiver diamondblock aside or atop the magnet to power it.
    Version 0.1.3
    • Fixed block-testing method.
    Version 0.1.2
    • Bug fixed: Structures dont move to the right position when a magnet is active
    • Bug fixed: Passengers aren't taken when they stand at the border of the structure or when they stand on half-steps.
    Version 0.1.1
    • Bug fixed: Structures origin would move if the structure collides with something
    • CPU intensive Passenger takewith, will be made far more efficient soon.
    Version 0.1
    • Use feather to move on x/z axis
    • Use stick to move on y axis
    • Click to push
    • Rightclick to pull
    • Use bone to rotate
    • Redstone support
    • Collision detection

    Videos
    Show Videos (open)

    A transport system below earth made by mustadont

    An Elevator made by alcol




    If you want to show your structure here, just post the video, I'll add it to this section.

    Future features
    • Passenger detection. If you stand in a moving structure, let's say a train, you don't want to walk all the time the structure moves. The structure should transport you like a minecart. (No problem to teleport players each time the structure moves, but I need help with detection of passengers) Implemented, but very CPU intensive.
    • Permissions. I'll add this when official Bukkit-Permissions support comes out.
    • Private Structures. You may want to add secret doors into your wall. Other players should not be able to move theese structures by using feather, stick or bone.
    • Pressure plates. The Structure should trigger wooden pressure plates if it's above one. This could be used to determine if a train is in the station or not (example).
    Disclaimer! While this plugin provides features of both Yogodas PushBlocks and komes BlockPush, it's not a port or a fork of them.
     
  2. Offline

    Yogoda

    Looks really cool, especially rotation and redstone :)

    I'm confused, is it a fork of komes's BlockPush, or are you taking over the development ? Does he agree with this ?

    Also PushBlocks is my old plugin for hmod, you may want to change your thread title.

    I don't like so much the use of commands when it can be avoided though, and we need to deconstruct and rebuild things we want to move ?

    The thing really needed is permissions support of course, on a server you can't allow anyone to push everything freely, when it is done I will install it on my server ;)
     
  3. Offline

    narrowtux

    This is not intended to be a port of PushBlocks, and
    this is no fork of komes BlockPush.
    It wont be possible to do without commands, because it's a different approach than PushBlocks. You have to build structures, which are saved to a file. Also, the structures cannot be edited after you finished editing.

    My intention with this plugin was to provide moveable structures that can be controlled via redstone.
    A friend saw this while I developed it, and he asked me to add the thing with the feather and the stick, because my API provides the needed move functions.
    I did that and my idea was to provide rotation as easy as this by clicking it with a bone.

    I'm planning to add Permissions, but at the moment, my Permissions sucks :D It crashes every time I reload.
     
  4. Will this replace movecraft or can it be used in sush a way ?
     
  5. Offline

    narrowtux

    I didn't try movecraft yet.
    I wrote this plugin without any porting/forking or replacing things in mind.

    You can move structures via redstone or by pushing or pulling, so it could be used like Movecraft, I think.
     
  6. Offline

    Anoniempje

    /me stretches his fingers and starts working on howls moving castle.
     
  7. Offline

    narrowtux

    I made a video which demonstrates the features! Watch in the first post.
     
  8. Offline

    PAPABEAR1010

    Amazing , thankyou
     
  9. Offline

    Em0srawk

    Could this be used for an epic sweeping lava fall to wipe out any enemies in it's path? I hope so :p
     
  10. Offline

    narrowtux

    Could be possible :D Nice that you are so creative ;)
     
  11. Offline

    JohnnyR

    This is a fantastic Idea, however It doesn't seem to be working correctly. I made a wall, put a magnet above it, and when I power the magnet with redstone, It only moves up one block, and gives a bunch of collisions. Any ideas?

    Also, should the wall try to move back when the magnet is off? This would be a great feature.

    Also, how do you remove a structure?
     
  12. Offline

    narrowtux

    Removing a structure works via the command /mbrs structurename where structurename is the name of the structure you want to be removed.

    Can you send me a screenshot on which I can see the wall?

    Also what do you mean with the wall should move back? You can simply add a second magnet on the other side, when you power it, the wall will move back, just like in the video (I create two magnets on each side there).
     
  13. Offline

    JohnnyR

    I made a 4x4 glass wall in a slot in the ground. I put a magnet above it. When I hit the switch, the wall came up, but only one block. Let me do some more experimenting, I may have just placed the wall weird.

    Also, what I mean is, for example in your video, you have a castle wall that goes down with the flip of a switch, then back up with the flip of the same switch. That's what I am trying to achieve.

    Again, this mod is fantastic =)
     
  14. Offline

    narrowtux

    I realized it like this:
    place the origin point a bit away from the gate (2 Blocks is good)
    then build a magnet directly below the origin point and one 3 or 4 blocks above it - or how high your gate should be.
    The two magnets are connected via redstone, but the one has an inverter before it. So only one magnet is active at the same time.
     
  15. Offline

    JohnnyR

    Great! I will go ahead and try that. Thank you!
     
  16. Offline

    ssechaud

    When I place blocks it just says AIR added to structure.
     
  17. Offline

    Jendon23

    awesome plugin! i was already thinking it was cool, until i saw the train part of the video, its epic!! you should make a +/- magnet, maybe the magnets are iron block and lapis lazuli block or something, and iron attracts to lapis but repels from iron, and vice-versa!
     
  18. Offline

    RioS

    I got some problem with passengers :/

    Sometimes the structure move without me.
    I'm running 493.
    Any idea ?
     
  19. Offline

    narrowtux

    That could be caused if the server lags, in fact, this plugin only moves structures to the right position if it doesn't lag too much. The passengers have to stand in the structure while it moves. The algorithm checks any player if he stands on a block which is associated with the structure. If the player is in the air, this check wont work, of course.

    In a later release I'll change passenger handling. It will work equal to minecarts:
    A Player has to rightclick on the structure to be taken with and rightclick it again to exit it. If the structure stops at a magnet for more than 20 ticks, all its passengers will be automatically ejected.
     
  20. Nice plugin ! But I've been searching for something else... I want something that teleports a structure from one place to another, does such plugin exist ?
    I tried vexelport but that only teleports people :/
     
  21. Offline

    orophin

    Hello i have a problem i made some strucktures with this plugin but i want to delete on but i forgot the name of it how do i do to find back the name?
     
  22. Offline

    narrowtux

    just type /mblist to see all structures.
     
  23. Offline

    Sol

    Is the block type configurable? I think using Iron blocks may conflict with things like Minecart Mania and/or ControllerBlock? It would be nice to be able to use this and be able to specify the block ID to be used as the Magnet Block. Being able to set it to something like a Diamond Block would be super sweet, so building this kind of stuff on a "100% legit" server would still hold some meaning.

    ~Sol
     
  24. Offline

    narrowtux

    While this takes the logic out of the plugin (Iron with a copper-wire gives you a magnet for real), I'll add this as a configureable option.
     
  25. Offline

    Sol

    Absolutely, but thank you very much indeed :D

    Think of it as a "magic magnet" that uses Diamonds and Women... oh wait :confused:

    ~Sol
     
  26. A W E S O M E :D

    Please continue this work, better than PushBlocks usw.
    I already maked a door with my friend that leads into a underground base...
    Nice!

    A bug:
    When I remove blocks from the structure he still says: "Block colliding with null"...
    Please fix that, It's a little bit annoying to build everything again :/
     
  27. Offline

    narrowtux

    A little workaround is to reload the plugins. Essentials gives you a command /rel that does this very fast.
     
  28. Offline

    J. D.

    Hey man, I really love your plugin but I am having a lot of problems.

    Most of my objects will just disappear after a few moves between magnets. The size of the structure also seems to cause issues in various issues. If I make a large structure and want it to move up and down? It won't move beyond a few spaces, no matter how far apart the magnets are. There is also an issue I am having where magnets belonging to different structures will stop the moving structure dead.
     
  29. Offline

    narrowtux

    Can you post screenshots of your structures?
     
  30. Offline

    xibit1987

    Hey mate, awesome plugin. working as designed... almost :)

    If you create an elevator shaft, and on each floor put a magnet block and the elevator moves from top to bottom the elevator floor stop on the same level as the magnet. but if the elevator coms from bottom and up it stops 1 block beneath the magnet block. Can you fix this?
     

Share This Page