[MECH] BigCatch v0.7 - making Fishing more interesting. [818]

Discussion in 'Inactive/Unsupported Plugins' started by spoonikle, Feb 20, 2011.

  1. Offline


    BigCatch - Fishing, Made fun:

    I dont have much time for MC, or coding for fun. So i am going to have to throw in the towel. Anyone is welcome to Pick up the plug-in if they would like. I am just to busy for this kind of work. Here is the source <3

    by: Spoonikle
    with special thanks to...
    Yurij - great code
    FullWall - Good advice, and spotting big problems before they hurt my head
    darknesschaos - Words of encouragement
    Edward Hand - great code
    and to Samkio - For his Tutorials and helping me when my head hurt
    the most.

    Version: v0.7

    BigCatch, adds to the Fishing mechanic in Minecraft. With random catch events, and making it easier to get a fish, even when the server is laggy. Using the plug-in is simple, just throw it in your plug-in folder. when ever a player starts fishing, its working!

    All events are simple, there is no gold - or unobtainable items - in fact most of the fishing events created in BigCatch are well balanced for any traditional survival server.

    BigCatch Makes a great and FUN addition to any server!

    • Added random events, such as catching a leather hat, with a fish inside.
    • Added the BIG CATCH, where a player gets 4 fish for the price of 1!
    • Events range from Saving a drowning Pig, to catching a Squid!!
    When a player has been fishing for 10 seconds, and fails to catch a fish he is then given a 45% chance to catch a fish, and then a range of other random events.

    but, if a player has been fishing for 5 seconds or more, and catches a fish, they will receive a BIGCATCH - 3 additional fish.

    The Drop Table (open)
    "item" - "chance"
    dirt and failure - 2 in 30
    Leather boots - 1 in 10
    leather boots and a fish - 2 in 30
    a fish - 5 in 40
    a leather hat - 1 in 10
    a leather hat with a fish - 1 in 30
    a fish and a bone - 1 in 30
    a fish and 2 bones - 1 in 30
    BigCatch (3 fish) - 1 in 90
    nothing - 1 in 10
    a squid - 2 in 60
    a squid with a fish - 1 in 90
    String - 2 in 30
    A skeleton - 0.333%
    a near miss with a skeleton and broken bones - 2.997 %
    a pig - 0.666%
    The pig drowns and you get a piece of pork - 2.667%

    Planned additions:
    • More random events.
    • Configurable parameters
    • Configurable events, and event messages
    • Even more, cooler Fishing events! Keep sending them to me!
    known bugs:
    • Event catches involving mobs do not work properly (minor)
    Download BigCatch! v0.7 for Craftbukkit!

    Source Code


    Version 0.7
    • Made the migration to latest CB-RB
    • Ate your Cake, it was delicious.
    • fixed DropFish bug - again
    • increased the distance away water can be from a players cross-hair and still be considered fishing. (now = 20 blocks)
    • reduced time required for BigCatch and Catch Event calculations
    • Fixed bug that stacked 3 fish in the inventory instead of 3 separate fish during a BigCatch
    • Tested method of catching radioactive woolly Mammoths with new quantum entanglement tangle angler and uranium 238 tackle box, to make space holes - failed
    • redesigned the Miscast, improper fishing line use, check.
    • Conformed to new ItemPickup standards
    • Ignored government regulations that apply to human testing
    Version 0.5
    • Fixed a bug where players fishing at the same time, would interferer with each-others event calculations.
    • Fixed a glitch that would occur when you cast a line at dirt, then reeled in facing water.
    • Fixed a glitch that would allow the generation of an insane number of timer threads by anyone with a large amount of fish.
    • Added miss cast checks to the fishing rod.
    • increased the overall efficiency of the program
    Version 0.4
    • Major Bug fix, warranting new version number. Fixed Major exploit.
    • Added wooden Bowls and gold to the table. (A tribute to my new plug-in project)
    Version 0.3_1
    • Fixed minor bug - Skeleton spawning instead of a pig :p surprise!
    Version 0.3
    • Removed TSLPC
    • conformed to new Drop item event standards
    • BigCatch! event confirmed to be 100% operational!!
    Undrtakr, Litt, Montag and 2 others like this.
  2. Offline


    I have been playing with the idea. I know how to do it, I am just playing with different excuses for it. maybe a shark, or the "one that got away".

    question: has anyone caught a squid yet?
    (I can't try myself, I am in the middle of planning an RP server.)
  3. Offline


    Shark would be cool. Especially since I'm looking around to see if anyone can add sharks to SMP because it would fit my server PERFECTLY!
  4. Offline


    not possible until notch releases a modding API for the server.

    because a shark would require a custom model, and data like that cannot be sent over to the client ATM. The closest thing you could get to a shark is if someone made custom mob AI using an already existing in game model or a player named shark who put on a lame shark skin.

    there are lot and lots of custom mobs for SP, custom mobs are not going to be in multilayer until there is a way to add mods without altering the MC jar directly.Like when you play counter-strike, the moment you log into a server you have to sit there for 2 min to download the custom map they are running, and all of the stupid sounds they added, but once you do they are not always there when you go to a different sever, or play against bots on your own map.

    i will see about the shark idea. and maybe replace your fishing rod with a stick and a string, as to not ruin you evening.
  5. Offline


    I recently got this plugin to add a little "spice" and fun to the "art of fishing" on my server. I must say, this was quite hilarious and encouraging to see the positive reactions of my friends (and I!). We love the things you've added and I look forward to seeing even more. Having this plugin makes the "boring" act of fishing, with its minimal rewards, suddenly become quite entertaining and humorous, if not simply more rewarding with multiple fish catches, pig rescues, and skeleton drop-ins. Hehe. Thanks for the plugin and hope to see it for some time to come!
  6. Offline


    I am glad to hear that you and your friends are enjoying my plug-in. :D
  7. Offline


    Love the plugin!

    Iconomy Money is ID 0 right? or is that "Air" ?

    Anyway making a Iconomy support would be great!

    Keep up the good work :)
  8. Offline


    zero tis air, IConomey money has no ID. For it is not of Minecraft, nor bukkit.

    I still fail to see what benefit the effort of making IConomy support will have. [bookshelf]

    my plug-in supports any economy, by making Fish a viable and trade-able food source, like bread is.
  9. Offline


    Sounds good man :)
  10. Offline


    Craftbukkit #450, Permissions 2.1:

    When I toss the fishing pole down onto the ground, I am getting events. I caught a bone and boots from doing this.

    Spelling issue:

    "You caugh a fish. It then caughs up a bone...EWW"

    Should be:

    "You caught a fish! It then coughs up a bone... EWW"
  11. Offline


    yes... that is an issue. completely overlooked that. i will look into a fix, thank-you.
    i never expected a person to fish on the ground, now i need to make a check for that.
    --- merged: Mar 1, 2011 1:08 PM ---
    ** major release v0.4

    Fixed the Bug mentioned in post above.
  12. Offline


    Thanks spoonikle! I updated the plugin on our server. Haven't tested it yet, but I'm sure it's working fine.

    These are the types of plugins that Minecraft needs. Alteration of existing systems to make them more fun and interesting. Thanks for your work!
  13. Offline


    This plugin is hilarious, one of my favourites.
  14. Offline


    Thank you, I really appreciate your praise.

    *going to my head* [​IMG]
  15. Offline


    no need for iconnomy money in my mind, I use this on my server in conjunction with bettershop to generate currency. Catch fish-sell to server-get iconnomy money-be happy
  16. Offline


    Hi, first, it´s a funny plugin :), great !!!
    I want to ask you, if you could rename the Jar back to BigCatch, or would the name "BigCatch [424+].jar" be "forever" ? Im asking because, i have the "CraftBukkitUpToDate" plugin, it´s automatically downloading the newest plugins i´ve installed. So i have to adress the .jar and the adress to download in the plugin.properties.
  17. Offline


    i sure could, and i think i will, as i will not support the older version anymore.

    **done, address is http://dl.dropbox.com/u/19143385/BigCatch.jar
  18. Offline


    A squid was caught on my server, and it proceeded to then fly into the air before someone sworded it down.
  19. Offline


    AWESOME!!! was it fun!?? would you like to see a change made to the spawning mech? I am very surprised it could move at all... :D
  20. Offline


    Craftbukkit #450, BigCatch v.4 , just received this:
    15:14:50 [SEVERE] Exception in thread "Timer-435"
    15:14:50 [SEVERE] java.lang.NullPointerException
    15:14:50 [SEVERE]       at com.hotmail.spoonikle.bigcatch.BigCatch$CatchDelay$RemindTask.run(BigCatch.java:84)
    15:14:50 [SEVERE]       at java.util.TimerThread.mainLoop(Timer.java:534)
    15:14:50 [SEVERE]       at java.util.TimerThread.run(Timer.java:484)
  21. Offline


    it seems one of the timer CatchDelay pointed at a null variable... not to worry, although i have no idea why it did this... Did this error affect the function of the plug-in in anyway? the timers thread should have been scrubbed once it was done, even with the null pointer exception.

    side note: has anyone noticed any performance issues in a server that has been running this program for a long time? or with many users fishing at once??
  22. Offline


    I have noticed some issues with users fishing near each other, even with 10 cubes clearance some users see two messages and receive two catches while another user receives none.
  23. Offline


    very very mysterious... Is this all the time, or just on occasion? can you tell me your craftbukkit build?

    just to make sure, can you tell me the message they received? Some events give 2 messages, and a player needs to fish for at least 15 seconds to get a random event. So i can see how that can be mixed up.

    I get the player data using Bukkit's system, and i don't do anything weird, if this is actually an error and not misunderstanding, then we will have to report it to bukkit.

    please give me any information you can, maybe i can stop by your server some time? I currently am not running a server (in the middle of making a RP server) so i cannot test BigCatch as much as i would like.
  24. Offline


    I just caught one, managed to shove it into a pond and now we have a town squid. [​IMG]
  25. Offline


    Im a bit confused. It seems like I can never catch any fish normally, and the events only occur every once in a while, even the "Nothing special is on the hook".
    Does it tell you the event immediately, or once you reel it in?
  26. Offline


    A player is only elegable for for a random event after fishing for 15 seconds. If yo catch a fish normally and it took around 7+ seconds you will get a BigCatch (3 additional fish).

    The event is calculated 1 second after you reel in, to see if you caught a fish.
    --- merged: Mar 5, 2011 12:41 AM ---
    great to hear!~
  27. Offline


    When somebody fished I got this error in my serverlog:
    2011-03-06 13:52:44 [SEVERE] Exception in thread "Timer-2097"
    2011-03-06 13:52:44 [SEVERE] java.lang.NullPointerException
    2011-03-06 13:52:44 [SEVERE] at com.hotmail.spoonikle.bigcatch.BigCatch$CatchDelay$RemindTask.run(BigCatch.java:84)
    2011-03-06 13:52:44 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:534)
    2011-03-06 13:52:44 [SEVERE] at java.util.TimerThread.run(Timer.java:484)
    Bukkit #438, WorldGuard, WorldEdit, LWC, Permissions, Essentials
  28. Offline


    This is the second time this error has, been reported.
    How did this affect your game?
    I know exactly where the error is happening, but i don't know why its happening, ever.
    This error should not happen, but there is a safety in place with all of the timers, I run the garbage collector through them upon execution.

    Is this happening a lot? Please give me more info.

    This error is now at the top of my "list".

    (i see that you have been running my plug-in for a while, even though there are only ever 3 timer threads running at a time per person with my plug-in, java keeps giving them high number names. These threads are deleted once they are no longer needed, yet Java will not use the old name space unless it has to.)
  29. Offline


  30. Offline


    My plug-in messures Time, by asking java how long has it been in milliseconds from a day some time in 1970. it logs that time. then when a second event occurs (reel in) it checks the time again and logs that time. then it figures out the difference between the 2 times in milliseconds.

    ProperTime should not interferer with the system time, and if it dose, then its doing a big no no so big in fact i don't think there is a way to do it in Java without knowing you are doing it. I do not think that is the issue.

    I will take a good long sweep through my methods, i know there are optimizations to be made, i may be able to find the issue.

    It possibly has something to do with the new code that checks to see if you are looking at water 10 blocks away when fishing. (to prevent fishing on land i added a check, you have to look at water 10 blocks or closer to log the rodActivation() event) i may have made an error when clearing the hash table, in this code. Possibly logging the second activation as the first, throwing off the whole system.

    In order to test this. I ask you to cast a line at the dirt, then look at water and reel the line in. then go fishing.

    If i am correct, and i did screw-up, this will cause the plug-in to glitch. I will work on a fix for this, it will not be an ez fix. If i am correct, which i probably am, this will require a lot of thinking and a lot of code...
    I am going to have to consult some of the other dev's on the forums.

    I have completed my rewrite of the method. I feel this is far superior to the original, if anyone has an eye for java you can see it here -
            if (fishingRod == Material.FISHING_ROD) {
                if (missUse.containsKey(player)) { // checks if the player miss casted before.
                } else {
                    if (firstUse.containsKey(player)) { // checks if this is the "reel in" phase
                        Long first = firstUse.get(player); // Retrieve the first
                                                            // time
                        Long second = System.currentTimeMillis(); // Retrieve the
                                                                    // second
                                                                    // time
                        firstUse.remove(player); // Remove the players firstUse date
                        Long diff = second - first; // Gets the difference in milliseconds
                        fishingTime.put(player, diff);// logs the difference into a variable
                        plugin.new CatchDelay(2); // starts the method that calculates BigCatch
                    } else {
                        if (player.getTargetBlock(null, 10).getTypeId() == 8
                                || player.getTargetBlock(null, 10).getTypeId() == 9) { //checks if the player is looking at water
                            firstUse.put(player, System.currentTimeMillis());
                        } else {
                            missUse.put(player, System.currentTimeMillis()); // logs a miss cast.
    This is a major update, i will start a group conversation with all users who have posted here about this update.

    But i have yet to know if this fixes your issue. I will increase the distance the plug-in checks to see if you look at water.
  31. Offline


    I'd love to use this but it conflicts with MCMMO. I can't use the /whois NAME feature from it.

Share This Page