Inactive [MECH] TeslaCoil v2.6.2 - Keep mobs at bay - the futuristic way! [CB 1.4.5-R0.2]

Discussion in 'Inactive/Unsupported Plugins' started by darklust, May 5, 2011.

  1. Offline


    TeslaCoil - Tesla Coil mob control:
    Version: v2.6.2

    Usage: the player must construct a tower of no less than 3 iron(configurable) blocks, and connect this directly to a redstone current. While the current is active, all mobs within a radius proportionate to the height of the coil (3 blocks high = 3 block radius), above or below ground, will be fried. The towers ping every second, so mobs chasing you will quickly regret it

    Moved to BukkitDev:
  2. Offline


    Well not sure what would be causing the issue then, I have no weather or lightning plugins installed other than this one, and on each world I saw it randomly zapping a single spot, when nothing was there. But the world the tesla coil was in worked normally =/. Others seem to have reported this issue, perhaps when I get the chance I can decompile your plugin and see if I can figure out what bazaar thing would cause this issue/conflict.

    Edit: Looking through the code now, not sure if I've spotted the issue yet, but may have found a simple typo; line 39 of pingrunner:
    if ((new TeslaObject(this.e, this.mine).isCoil() & this.e.isBlockPowered())) {
    is doing the bitwise operation & instead of doing the actual && check which I believe you intended. Actually, noticed you use & instead of && a lot, not sure if that's intentional, but it does not properly check if both are true, instead checks if performing a binary AND on the bits of both operands results in a number != 0 (Rather high probability that the result has a bit set as 1, which would result in true)... perhaps my decompiler is bugging, dunno.

    Also a couple curiosity questions, I may have a performance boost suggestion but wanted to ask something first. When you activate your tesla, it iterates over each chunk of each block in the radius, and does not check if that chunk is loaded, so it loads them, no? And since no player is near, would it unload that chunk soon as you release your reference to it? So it may load/unload each ping, but not sure, hopefully bukkit imposes a unload delay between the loading of a chunk and unload expiration. Haven't made a plugin yet, but still want to learn a bit about the inner workings of bukkit.
  3. Offline


    I use bitwise operators because logical operators often cause the plugin to error; I'm not sure why this happens, but at the bit-level the logic is the same, a boolean value is returned. If a tower is pinging its surroundings and the chunks aren't loaded, no entities will be returned, yielding no lag.
  4. Offline


    So if this was made underground, would the lightning strike on the surface?
  5. Offline


    Thanks for the reply, yeah I wasn't thinking straight, & and && are pretty much the same true/false-wise (But make a difference order of operations wise, and inherently a very slight performance penalty from unnecessary condition continuations if using |, but cause issues in the case of doing null checks and then using the object you checked in the same condition thereafter), and I think I may know why you were getting errors; Java needs the operands of a && to be evaluated to boolean already, unlike C/C++ which automatically considers != 0 true and 0 false when compiled, Java provides no such convenience and requires you to do that value check yourself. E.x. C/C++: if (20 && 3 && 0), works, in Java needs to be: if ((20 != 0) && (3 != 0) && (0 != 0)), where of course those numbers would be a variables and not inline constants :p. Though I haven't checked your code to see if you had any and/or checks on integrals. The chunk loading/unloading thing I figured wouldn't actually be an issue, was just curious how it handled that. But in terms of your pinging, I meant for performance concerns this scenario: Say you have 20 teslas, with a horizontal radius of 32, and a vertical radius of 20... 20(Teslas)*64(XDiameter)*64(YDiameter)*40(ZDiameter) every ping would result in looping 3,276,800 times (If I'm doing my math correctly, lag spike waiting to happen) =/, not including the entity loop if it finds any. Just food for thought, I know the plugin's for fun and not exactly a commercial product, nor have I really thought of a simpler loop to access each chunk in the radius (Other than simplifying the x,y,z loops to multiples of 16 or w/e the chunk block width/height/depth is). I still can't find the issue causing the multiverse bugging, so my hypothesis is it's actually a bukkit bug in my build; it was an experimental build right after 1.5 after all. I don't want you to feel like I'm personally attacking you or anything, I just love the plugin and want to figure out why it's not working very well on my server...

    Not if you set your depth properly, it shouldn't check from bedrock to sky unless you set it to do so, I recommend only doing a 20 vertical radius or so, gets the job done.
  6. Offline


    @darklust uhmm my tesla's are kinda freaking out cus they try hitting shit that isnt there its like they strike random air
  7. Offline


    Have you checked your height config? It is possible that you have underground mobs that are being targeted.
  8. Offline


  9. Offline


    Well if you are building a 3 block high tower and your vertical radius is 8 then it most likely is targeting underground mobs.

    Try setting the vertical radius to the exact number of blocks you plan to stack.
  10. Offline


    Come on, by now I thought you would have known the behavior of the coils :p It's not striking random air, but the mobs beneath it. A vertical radius was incorporated for the sake of hitting mobs at the level of the coil, possibly above the coil level, and beneath it for a solid barrier that will penetrate mineshafts, or coils on hillsides/cliffs.
  11. Offline


    i used f3 mode of minecraft and there where no mobs where it was striking
  12. Offline


    Perhaps they are being struck down as they spawn?
  13. Offline


    They're dying too quickly. The plugin isn't programmed to 'strike anywhere', so that's not the case.
  14. Offline


    Had to quarantine this, at least temporarily. Even though I've got: targetmonsters= creeper, spider, skeleton, zombie, It's making a ton of zombie pigmen, which would be GREAT, except they are invincible. The just end up either sitting there on fire lobotomized, or rushing me in huge groups doing no damage and taking none...pushing me all over the place. I can't say if it's this or some other setting in another plugin causing this...but yeah.

    It's a shame though. The teslacoils embedded into my city walls constantly striking make for great theater.

    Prolly throw it back on once I/you figure a way to turn lightning on pigs-> pigmen off. I know there's a way to, just can't recall how ATM.
  15. Offline


    if u relog all the fake pigmen are gone
  16. Offline


    Lol. I found out the hard way if you set the area they ping to too large, you get a lot of "can't keep up" messages, and your server lags BAD. XD (Tested with 20 vertical and 30 radius)
  17. Offline


    How can i make it target all animals but pigs, because the "clientside pig zombies" arent clientside anymore.
    Please make and option for each animal rather than having one for all.
    To reply to this message PLEASE use the reply button.
  18. Offline


    Does this work on other players?
  19. Offline


    with the targetmonsters="all", I think yes!
  20. Offline


    yes it does but it also hits u
  21. Offline


  22. Offline


    I think you should lower the number of bolts in your config file... either that or don't build so many friggn towers.

    Or did you /spawnmob 200 on your cursor?
  23. Offline


    WTF the tesla is going after ME!?!the second I powered it it killed me! does setting the config to all include players?
  24. Offline


    is there any option to prevent it from targeting zombie pigmen specifically? because i dont care if it hits pigs, but even if the targets are set to "creeper, zombie, skeleton, spider" it targets the resulting zombie pigmen, which it shouldn't. Also why doesnt it work with a redstone torch directly beneath the iron block ? it should be powered alright.
  25. Offline


    In the config, read the line that tells you what it is to strike. By default, it strikes any living thing. Including players.
    Replace "all" with what you want it to strike, and if you don't want it to strike something, don't list it.

    I'm on my road trip and I got a message from one of my mobs of something I didn't expect.
    Could you set in a feature for a Max radius? I set mine to false so the players can have what height they wanted for search range. Apparently someone decided to make a ridiculous height.
    Lagged the server and the server log is showing "can't keep up" every few seconds, much more often than it usually did. lol
  26. Offline


    OK. I acknowledge that I've broken some stuff with the newest update. I am almost done with the sign-based permissions targets, and with this I have completely eliminated the lag, pig zapping and re-implemented pig zombie killing. I HAVE NOT FORSAKEN YOU.
    Liger_XT5 likes this.
  27. Offline


    I have encountered problems with your plugin. The plugin keeps zapping the same spot for hours without a reason. :/ It happens once in a while and often the same spot.
  28. Offline


    feature request: configurable max range.

    i want players to be able to make towers with ranges based on the height but i don't want mega towers :)

    and max towers per player

    i am really interested in this plugin but i do not think it will be wise to put on my server without those two functions
  29. Offline


    I found a good way to control lag. Let the monsters turn on their own death tower.
    To put is simply, make a tower of block with the bottom two below the ground, put pressure plates around the the tower, but make sure that there is reddust below and the dust pointing to the bottom block of the tower.

    I found this design to work with default settings, but the targeting set to just monsters. I had a spider walk along and there were multiple strikes in just a second. No spider legs to munch on after words sadly.
    I'd suggest making the ring bigger is the server lags and doesn't catch fast enough for those annoying creepers. I just had one make it through, but burned to death at least.
    Here is the redstone circuit underneath with the extra ring of pressure plates. Note: the corner blocks next to the coil does not have redstone in order to make the redstone dust point to the tower for it to function.
  30. Offline


    Nice catch, Liger. I still swear there's a mod/setting to turn off lightning pigs>invincipigmen SOMEWHERE...essentials, maybe? IDK...I've got this love/hate relationship with it [essentials, which atm I refuse to capitalize lol]. Darkie's gonna fix it all soon, anyhow (EYE HAZ FAIF IN JOO)
  31. Offline


    I don't seem to understand the issue with the pigs. Are you guys wanting the pigs struck by lightning on purpose?

Share This Page