Am i doing something wrong? At time of posting the video is still uploading... [quote uid=16593 name="wristdirect" post=1371227]Here you go! <Edit by Moderator: Redacted mediafire url> <Edit by Moderator: Redacted mediafire url> edit: lol sorry for the constant small changes. I had to make sure I handled the drinking potion listener better. I made sure it only triggered if you were doing a right click event with the potion. It used an event cancelling method, so if you were breaking a block or opening a door (not for long with the door thing!) with a potion in your hand, it might cancel it. Fixed that! <Edit by Moderator: Redacted mediafire url> Just wanted to quote you so you would get it... And as the video is uploading, it's the same problem as last time. It wont stack the potions. Debugging is VERY good for learning the Bukkit API, as you have to figure out exactly what you are doing in each step and figure out where you went wrong. Only thing i can think of is that you need to add the main data value in front of all the sub data values? (IDK if that is what they are called) EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=16593 name="wristdirect" post=1371264]What about <Edit by Moderator: Redacted mediafire url> Nope, Same thing :/ EDIT: Video is uploaded
Oh, it has to do with it being in creative mode. I changed my game mode to creative and tried and it didn't work. Works in survival though. Any clue as to why it might not work in creative? I'm headed to Cedar Point today so I'll be around for a couple more hours. Hopefully something obvious pops up or you don't need it in creative.
I dont need it for creative, let me test in survival. No idea why though... EDIT: Just tried it in survival, still doesnt work.
I thought this would be a simple enough plugin that i didnt need to write out the entire format. I explained everything i wanted though...
I based the potions I checked for off of the minecraftwiki list of potions. For some reason a lot of potions are not on that list... Do you know of a better list of the sub item values (damage values) of all potions currently in MC? That would solve the problem. In the meanwhile, I'll (if I have time, I have to leave for Cedar Point any minute) write a somewhat slow but all encompassing check for different potions.
Here you go: Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler 373:16 Awkward Potion 373:32 Thick Potion 373:64 Mundane Potion 373:8193 Regeneration Potion (0:45) 373:8194 Swiftness Potion (3:00) 373:8195 Fire Resistance Potion (3:00) 373:8196 Poison Potion (0:45) 373:8197 Healing Potion 373:8200 Weakness Potion (1:30) 373:8201 Strength Potion (3:00) 373:8202 Slowness Potion (1:30) 373:8204 Harming Potion 373:8225 Regeneration Potion II (0:22) 373:8226 Swiftness Potion II (1:30) 373:8228 Poison Potion II (0:22) 373:8229 Healing Potion II 373:8233 Strength Potion II (1:30) 373:8236 Harming Potion II 373:8257 Regeneration Potion (2:00) 373:8258 Swiftness Potion (8:00) 373:8259 Fire Resistance Potion (8:00) 373:8260 Poison Potion (2:00) 373:8264 Weakness Potion (4:00) 373:8265 Strength Potion (8:00) 373:8266 Slowness Potion (4:00) 373:16378 Fire Resistance Splash (2:15) 373:16385 Regeneration Splash (0:33) 373:16386 Swiftness Splash (2:15) 373:16388 Poison Splash (0:33) 373:16389 Healing Splash 373:16392 Weakness Splash (1:07) 373:16393 Strength Splash (2:15) 373:16394 Slowness Splash (1:07) 373:16396 Harming Splash 373:16418 Swiftness Splash II (1:07) 373:16420 Poison Splash II (0:16) 373:16421 Healing Splash II 373:16425 Strength Splash II (1:07) 373:16428 Harming Splash II 373:16449 Regeneration Splash (1:30) 373:16450 Swiftness Splash (6:00) 373:16451 Fire Resistance Splash (6:00) 373:16452 Poison Splash (1:30) 373:16456 Weakness Splash (3:00) 373:16457 Strength Splash (6:00) 373:16458 Slowness Splash (3:00) 373:16471 Regeneration Splash II (0:16) I think thats a complete list anyways.... EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Okay, I'll try using that. Hopefully I can get this up and running soon. Gotta undo some crap code I was writing to make it work regardless (it was not going well lol) Ya what sucks is there are a bunch of 32000+ dmg value potions too :/ Not sure where those are listed though. [quote uid=90588064 name="Techtony96" post=1372555]I think thats a complete list anyways....[/quote] Got it! This should work for all of them. A little inefficient, but it should cover all the weird stuff too! <Edit by Moderator: Redacted mediafire url> EDIT by Moderator: merged posts, please use the edit button instead of double posting.
[quote uid=16593 name="wristdirect" post=1373383]Got it! This should work for all of them. A little inefficient, but it should cover all the weird stuff too! <Edit by Moderator: Redacted mediafire url> Thanks! it works!! Can i have the source so i can update it in the future?
Sure, and if you want to you can make it more precise by singling out the exact damage values that are used and make a smaller table of values to be checked. I took the lazy route Here's the <Edit by Moderator: Redacted mediafire url>
[quote uid=16593 name="wristdirect" post=1374138]Sure, and if you want to you can make it more precise by singling out the exact damage values that are used and make a smaller table of values to be checked. I took the lazy route Here's the <Edit by Moderator: Redacted mediafire url> Found a bug, could you also deny putting stacked potions into brewing stands? Thanks btw, i also posted this on the bukkit dev page.
Alrighty, here ya go! I also fixed another silly problem with right-clicking things like doors and chests while holding a stack of potions. Oh, and also got rid of some debug info sent to the player I forgot to remove <Edit by Moderator: Redacted mediafire url>
[quote uid=16593 name="wristdirect" post=1376405]Alrighty, here ya go! I also fixed another silly problem with right-clicking things like doors and chests while holding a stack of potions. Oh, and also got rid of some debug info sent to the player I forgot to remove <Edit by Moderator: Redacted mediafire url> Think you could start bundling the source with this? Would be awesome and testing it now.
Sorry about that, didn't even think to check the option while compiling into the jar Here's that same version with the source included in the jar. <Edit by Moderator: Redacted mediafire url>
[quote uid=16593 name="wristdirect" post=1376436]Sorry about that, didn't even think to check the option while compiling into the jar Here's that same version with the source included in the jar. <Edit by Moderator: Redacted mediafire url> loving you right now Shut down my server to add the plugin, and my hosts ControlPanel went down. Cant start my server :/