[FUN/MECH]Parafulmine v1.2 - LigthningBolt Generator with Permissions[1000]

Discussion in 'Inactive/Unsupported Plugins' started by Piddu, May 18, 2011.

  1. Offline

    Piddu

    Parafulmine - My First Plugin:
    Version: v1.2
    This is my first plugin made with Bukkit =)
    When the player powers an obsidian block, the plugin check if there is an
    iron or gold block on top of it, and than spawns a LightningStrike entity at the
    that location.
    Iron block is used for a damaging LightningStrike
    Gold block is used to smelt ore blocks above of it.
    Version: 1.0 in" shorts"

    Using Alta189's SQLite interface package i started to use an on-file DataBase to store info.
    You can find a description of this package here:

    http://forums.bukkit.org/threads/sql-lite-tutorial-library.17034/

    Again thx a lot to Alta189 for his job, i encourage anybody to give it a look
    Stored info are used to manage PF iron/obsidian block configuration.
    These info are than used by the player to define how the PF will work.
    By clicking an obsidian block under an iron block ( the base of a PF ), player get a green chat msg displaying PF info such as PF Id and Owner.
    If the player is the owner of the PF he can use 3 commands:
    /pflink Idnumber Idnumber - will "link" A non-linked PF to an other. Powering up this PF will create a wall of lightnings towards the linked PF.

    /pfturret IDnumber - will set a PF ( if not linked to any other PF ) to turret mode. This PF will shot at its location if Powered up.
    /pfturretuse IDnumber - will select a PF owned by the player ( if set on turret mode). At this point the player by holding a button ( item id 77) in his hand can shot lightnings by aiming with his cursor, but he must stay within 12 blocks distance from the selected PF.
    in other words, your PF work as a remote controlled turret.

    Btw, i have tried the plugin it seems to work, i am not a very experienced programmer, if you have any design tip to give i'll be happy. I know my code seems chaotic =P
    i will make a post where i explain in a better detailed way how this plugin works and how to use it...

    Features:
    • Place an obsidian block
    • Put an iron block on that
    • Power up the obsidian
    • Cheese :D
    OR
    • Place an obsidian block
    • Put an iron block on that
    • Place an other obsidian block
    • Put an iron block on that
    • Link them together by using "/pdlink Id Id"
    • power up the first PF
    • A wall of lightning is created!
    OR
    • Place an obsidian block
    • Put an iron block on that
    • Use "/pfturret Id" command to set the PF in TurretMode
    • Select it by using "/pfturretuse Id" command
    • hold a button in your hand ( item id 77)
    • click and fire lightning at your cursor location.
    OR
    • Place an obsidian block
    • Put a gold block on that
    • Put a smeltable block on the gold one
    • Power up the obsidian
    • Get the smelted stuff
    KNOWN BUGS
    Since the plugin now creates a DB file, your old PFs will cause problems.
    IF you destroy an old PF the plugin will try to execute a DELETE query on the DB, but since the DB is empty it will trow exceptions... this as not caused problems on my machine ( i have a very old PC ) .
    This problem effect also the creation of the first PF controlled turret by a player...

    Download The Plugin
    https://github.com/downloads/Piddu/Parafulmine/ParaFulmine.jar

    Update repository (almost harder than coding the entire plugin lol )
    https://github.com/Piddu/Parafulmine/tree/master/src/parafulmine

    Changelog:
    Version 1.2
    • updated to bukkit 1000
    • some bug fixes...


    Version 1.1
    ADDED PERMISSIONS as requested =)
    • Parafulmine.Iron - let players click iron block to create a IronParafulmine
    • Parafulmine.Gold - let players click gold block to create a GoldenParafulmine
    • Parafulmine.Link - let players use /pflink command
    • Parafulmine.Turret - let player use /pfturret and /pfturretuse commands
    Version 1.0
    Huge update with new MAJOR features.
    • Plugin now supports SQLite DB on file credits to Alta189 for his SQLite interface package
    • You can now create lightning Walls by connecting 2 iron/obsidian PF
    • You can use an iron/obsidian PF as a REMOTE CONTROLLED TURRET
    • Control your turret by holding a remote controller in your hand!
    • New textline command "/pflink id id"
    • New textline command "/pfturret id"
    • New textline command "/pfturretuse id"
    Version 0.2
    • Now you can use iron or gold block over obsidian
    • Iron block will generate a lightning bolt with regular damage effect.
    • Gold block will generate a lightning bolt WITHOUT damage effect but in this case the lightning will smelt (if smeltable)a block placed on the gold one.
    • These are the current smeltable blocks:
    • cobble
    • sand
    • iron ore
    • gold ore
    • raw wood ( makes coal)
    Version 0.1

    • Released
     
    ledhead900 likes this.
  2. Offline

    Plague

    version 0.0 does not exist
    you are missing a changelog
    the tag has to be uppercase FUN, not Fun
     
  3. Offline

    Piddu

    i have not changed anything yet... i think i will evolve this into something more complicated and maybe usefull =)...
    thx for reply
     
  4. Offline

    kahlilnc

    so does it keep generating?
     
  5. Offline

    Zarius

    @Piddu
    Very cool :) Same question as kahlinc: does it generate just one lightning per on/off cycle? (wonder what happens if you set up a loop - lots of lightning? :D)

    Also - could you add an option to "consume" the iron block after so many lightning zaps? (mcMMO does this with the anvil I think)
     
  6. Offline

    Piddu

    it keeps generating lightning at every cycle loop.
    I have build a wall of these blocks connected to a clock generator, the final effect it's like a wall of lightning.
    Since the final goal for me is to build walls of these blocks, force-fields like, i don't think to add the " consume " option because it may be boring to replace lot of iron blocks.

    Actually lightnings fall from the sky, if you test my plugin underground you'll see the lightning falling from the sky through the earth, without damaging any blocks between the generator and the sky.
    Because of that i am looking for a way to make the lightning strike between 2 blocks instead of falling from the sky.
    If this is possible, next step will be to make lightning strikes not only vertically but also horizontally... but i am not sure if it's possible to change lightning attributes...

    ok that is not possible since it would recquire a custom rendering class for the clients...
    thx everybody for the feedback and suggestions

    Since is not possible ( or at least i think is not) to change the lightnings attributes and rendering effects, i have thought a new possible use of the whole plugin, it still works as the 0.1 version but i added a new functionality.
    Now you can use an obsidian/goldblock configuration to smelt oreblocks... check the first post for a more detailed description.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  7. Offline

    Haekon

    You're going to need permissions on this...The lag from long lightning walls is gonna KILL servers.
     
  8. Offline

    creepycreeper

    Epic plugin. Definitely gonna use this tonight
    .
     
  9. Offline

    Piddu

    mm i think this is needed too...i have tested it on a private server with 10+ppl we built a 10 blocks wall and there wasn't lag, ofc 10 blocks is not too large...
    anyway i have re-think how to build a wall of lightnings i am gonna try to implement this...

    for the smelting part i have think to let be possible to place chests near or over the gold block, and smelt the stuff inside of them. But since it doesn't use coal maybe is a bit OP... i could try to make the gold block consume during the process as suggested by zarius, but gold is an hard to find mat...

    anyway for these changes i think i am gonna need a config file to store some infos...
     
  10. Offline

    Nitnelave

    Actually, I'd like Permissions to BUILD that. To restrict the use, you can set it in an area only VIPs can access, or add some check on the redstone with another plugin (a way of powering the obsidian that would require permission)
     
  11. Offline

    Piddu

    After i finish the current update ( trust me it will be HUGE update ) i'll try to add permissions...
     
  12. Offline

    Piddu

    NEW MAJOR UPDATE read first post !
     
  13. Offline

    Piddu

    update : ADDED PERMISSIONS and new mechanism see change log in the first post

    update repository with updated classes

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  14. Offline

    Pencil

    Wow why didn't i see this earlier? :confused: *makesevilplanoflighteningfence* :D
     
  15. Offline

    ryladine

    Does this plugin function with Bukkit Build #1000?
     
  16. Offline

    cvxx7q

    I do not think it does, i get this when i Click a PF for its information

    altho it does look permissions related, i will investigate, but the actual lightning strike powered by redstone works fine :D

    Code:
    14:20:04 [SEVERE] Could not pass event PLAYER_INTERACT to ParaFulmine
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at parafulmine.PFPlayerListener.onPlayerInteract(PFPlayerListener.java:1
    74)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.j
    ava:307)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:332)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:168)
            at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:6
    3)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:458)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  17. Offline

    Piddu

    as soon as i can i release a new version and maybe i'll add some feature...
     
  18. Offline

    Piddu

    updated and fixed for bukkit 1000.
    Give it a try report any bug if they accours thx =)
     

Share This Page