The Meaning of Life, the Universe, and Everything.
Location:
Colorado
Join Date:
3/27/2016
Posts:
208
Location:
Colorado
Minecraft:
ProfessorOro
Discord:
gargatheoro
PMC:
GargatheOro
Member Details
I want to figure out how these work:
Make a new drink with the water bottle properties. Check, except that when I do that all it does is place all the potions in the creative tab I assign.
I made class 'Alcohol' which the item initialization is using. That class extends 'ItemPotion'.
I want to make three different "tiers" of class 'Alcohol' such as 'Alcohol2'. Simple enough
I a system that gives a player 10 "sober points." Each tier of alcohol makes you lose a respective amount (eg. tier 3 makes you lose three)
If you reach 0 sober points, it will give you slowness 255, mining fatigue 255, blindness and night vision, nausea, and disable you from jumping for 30 minutes each at the same time (Passing out). It would also be nice if it could block out a player's chat, but that is wishful thinking.
After you serve passing out time, you get nausea and mining fatigue 1 for an additional 30 minutes (Hang Over).
To create my first alcohol, beer. Beer will be tier 2.
If you reach 5 sober points, your words start to slur. I have seen a plugin do this so I know it is possible.
If you reach 4 sober points, you will randomly veer to the left or right a block or two when you are walking.
If you reach 6 sober points, a chat message tells you you are starting to feel intoxicated.
I got a little poll at the bottom for those of you that wanna help but can't with this.
What exactly are you asking? Sounds like you already have a plan on what to do. So start coding and when you get stuck show your code and explain the errors.
So you're just asking for people to write your mod for you?
If you want a place to start then look at the ItemPotion class and try to figure out what its methods (methods for the animation, use and use duration, etc) do and adapt them for your class. The methods are commented so it shouldn't be too hard to understand. Most of your logic and effects can be handled in onItemUse or onItemUseFinish (like in ItemPotion).
I want to figure out how these work:
I got a little poll at the bottom for those of you that wanna help but can't with this.
An SF Towny server! Join our Discord: Click here
What exactly are you asking? Sounds like you already have a plan on what to do. So start coding and when you get stuck show your code and explain the errors.
I dont know how to start coding. IDK how to do any of it.
An SF Towny server! Join our Discord: Click here
So you're just asking for people to write your mod for you?
If you want a place to start then look at the ItemPotion class and try to figure out what its methods (methods for the animation, use and use duration, etc) do and adapt them for your class. The methods are commented so it shouldn't be too hard to understand. Most of your logic and effects can be handled in onItemUse or onItemUseFinish (like in ItemPotion).
Thank you for the reply. It helps. Still cant fix the thing where I extend itempotion and it puts every potion in my creative tab.
An SF Towny server! Join our Discord: Click here
That's because potions are hardcoded versions below 1.7. Don't extend ItemPotion, just adapt some of its methods.