Coffee Revamped
Coffee
Coffee is designed to bring two completely awesome things, coffee and minecraft, together.
Great, right? Why else would you download and install random plugins like this that add practically nothing to the gameplay? It's fun! :D
Coffee is crafted with a water bottle, a sugar and a cocoa bean. Brew it in a furnace to add some spice! Be warned, though, these strong flavors may give you some negative side effects.
All effects and spices that coffee can have are completely configurable, you just need to configure it.
Coffee isn't tested for earlier versions of the game before 1.7.9, however it should work. If anyone wants to test it and let me know if it work, that would be appreciated.
Note:
Between 1.2 (the original Coffee) and 2.0 (the revamped version) was quite a large change; Coffee was practically one of the first things I ever wrote in Java, and I've long been at work with it since then. 2.0 aims to provide a slightly larger and more functional version of the original, and is likely not close to compatible with the original- I started over when rewriting it.
Some documentation on configuring it and crafting it can be found on the Github page
Here are a few (perhaps outdated) videos of this (videos are of the old version, not 2.0!)
Showcase coming soon. If you want to make a video of this and get some views, be my guest! Just post the video in the comments, and I'll add it to a showcase one way or another.
Coffee is under the GPL v3 license. The source code for the plugin can be found on Github. If you want to help out with the development, shoot me a PM, or just make a new pull request on Github with your changes, I'll see it and get in touch.
Enjoy! Idea is by Smeller10.
When will this be updated to 1.13?
Well Hidy-ho there neighborino, I was wondering where I was going wrong with editing the config. I did it one at a time and restarted the server for each time to try to locate what part I had edited to create the issue, but couldn't find it. The issue I'm having is that when I edit the spices, it somehow breaks the ability to brew it in the furnace (It doesn't error out or crash, it simply sits there smiling back at me, doing nothing.) I have been successful in brewing the spices before editing the config, so I'm sure it isn't just me being a derp.. I wanted to have the 2 spices be Espresso and a Macchiato. I am able to change the names, descriptions, negative effects, durations/amp., but I am not able to add more than one effect without it failing to brew in the furnace. It would just be: " potionEffectType: SPEED, FAST_DIGGING" correct? Am I listing it wrong or is it just not possible at this time to add more than one effect per potion?
I don't have a full grasp on ticks for the duration (They're 1 tick = 1.25 seconds, with a minimum of 5 ticks?) But it seems that no matter what number I add for the duration, it stays the same amount for the buff duration. So when I do 7,000 vs 68,000, it's the same duration no matter what. Is that normal?
And on a side note, for the coffee, it seems to have a base stat of adding haste (fast digging) even when it isn't listed in the config. So for example, if I wanted it to be speed and listed only speed, it'd be speed and haste. Adding to the list as changeable would be very nice :D
Awesome, super fast fix :)
@lsal
Alright, I have submitted a version to bukkitdev with the fixed config. The code was fine, but as you saw the config had two of potionDuration and potionAmplification...the second ones should have been negativePotionDuration and negativePotionAmplification. You can either regen the config or change the names to those and it should work. Thanks for letting me know! :)
@lsal
Looking it to this now
How do you add a time for the negative effects, the config does not allow it, if you add it the file resets..?
Rewritten :) I did the flavor thing as suggested, it's referred to as "spices" but can be anything you want.
@Tanman20
I like this! I will most definitely do it when I get around to rewriting it, as I commented on Throwables I've long neglected BukkitDev. Plugin should still work, but it was the first plugin I ever made while learning java o.e I knew next to no java then, and that was out of the question.
You should make it to where you can add milk to the coffee after it's been made. You should also be able to brew lattes and cappuccinos etc, and add flavors. You should also make all of the coffees give you different speed boosts! Great start to the plugin though!!!
@Livid_C0ffee
Sure, under certain conditions. Can you PM me? I don't want it going on in the comments, its starting to spam them and is not very on topic :/ sorry
@Axe2760
Sorry, didn't think of that. Can I please use your plugin to run into mine? I can give you credit also if you'd like. I am using JDGUI to de-compile.
Livid_C0ffee: Nope that shouldn't work, seems like a problem with your decompiler... I'll post the source on github sometime.
What worries me right now is that you are copy/pasting my code... and decompiling it without permission to do so?
@Axe2760
Also axe, would you like to become like a ticket manager or a part of dev staff for CBX? I would greatly appreciate it!
This is what I'm worried about - These errors -
But are you sure val$p works??
@Livid_C0ffee
The val$p is from decompiling it, it's not a part of the class. The hashmap is a warning though, not an error. It won't make a difference at runtime.
I am getting some errors when I open your class.
Apparently - val$p "cannot be resolved or is not a field" ==
Also, on the ItemStack cocoa = new ItemStack(Material.getMaterial(351));
"The method getMaterial(int) from the Material is deprecated" ===
one more thing....
HashMap<String, Boolean> hash = new HashMap();
"Multiple markers at this line - Type safety: The expression of type HashMap needs unchecked conversion to conform to HashMap<String,Boolean> - HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized"
@Axe2760
Actually, I need help again.
Here is my plugin URL - http://dev.bukkit.org/bukkit-plugins/coffeebashx/
I figured out the crafting, but how can I change the name of the item and the effects it has on it?
@Axe2760
Actually, I just found out how to do it. Thanks though
@Livid_C0ffee
It hardly seems worth explaining, if you're new to bukkit, refer to the javadocs. If you don't understand what the javadocs mean, try to learn java; objects, instances, inheritance, etc are all concepts that you should understand before tackling bigger projects with bukkit.
Either way, I'm not a fan of video tutorials - I couldn't refer you to any. But a quick google search should pretty much suffice for answering any of your questions on "how to do this" and "what does that mean"; chances are your question is either answered in the documentation, or in the forums because it was previously asked.
If you want to know, the method is <Server>.addRecipe(ItemStack item);. <Server> is an instance of your server, you can do Bukkit.getServer() or if you have an instance of your main class, <Plugin>.getServer();.