NoChickenEggs Version 0.1 Tested with Minecraft 1.2.3 and CraftBukkit 1.2.3-R0 Features: * Stops chickens from laying eggs Upcoming features: * Only by request. Download link (newest): <Edit by Moderator: Redacted mediafire url> WGET friendly: http://www.wenhaug.no/bukkitplugins/NoChickenEggs.jar If you test it and got feedback for me then please let me know what I can do better/what worked well! Source code is in the .jar. Changelog: Version 0.1 * Initial release
I have looked at your source, and can only see one issue. I notice that you look for whether a Player is nearby, and return; if they are,but what if another plugin wanted to spawn a load of egg items, perhaps you should have this so that it looks for whether a Chicken is nearby, and cancel the event.
True, didn't think of that. The reason I chose that approach was because I was able to determine extactly what offset an egg is spawned at relative to the player when you throw it out, so I didn't have to check a volume larger than necessary. I'm not sure if I'm able to check the same offset with chickens. Let me know if you can solve this problem in a more elegant way, will you? =)
gablank I ended up using very similar values for my getNearbyEntities(0.01, 0.5, 0.01) How did you determine those values for players? I think a good solution would be to use configurable values, that way you won't need to continually release updates for when something changes. MeneXia I got the impression that it wasn't fully released yet, that was the reason it wasn't on BukkitDev. Therefore it is better that someone knows that they are installing it, ie installing it manually.
AStevensTaylor I determined them by simply outputting the coordinates of the event when I dropped something from my character, and comparing them to the coordinates of my character. The x and z values could be a lot smaller without making any difference.
"If you test it and got feedback for me then please let me know what I can do better/what worked well! " Well... theres not much you can do to imrprove this NoChickenEggs plugin, as it already clarifys its purpose... so my only suggestion is that you could make the chicken purple.
Hi, This is more of a request, possibly for a different project.. I was wondering if you could configure the mod to allow chicken eggs to hatch on their own? aka Selfhatch=20% .. hence after a chicken lays an egg, it has a 20% chance of actually hatching while it sits there.. would be great for food production machines.