Class HERBICIDE_POTION
This is a splash potion designed to be thrown rather than consumed directly. When thrown, it deals full damage to plant-based entities (Creepers and Creakings) and creates a plant-killing effect in a 4-block radius splash area. The potion will also harm other living creatures (including players), but at reduced intensity (10% of normal damage).
Effects when splashed:
- Full Instant Damage II effect for Creepers and Creakings
- Reduced intensity (10%) for all other entities including players
- HERBICIDE stationary spell effect that kills plants in the 4-block radius
- Since:
- 2.2.7
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.potion.O2Potion
duration, flavorText, ingredients, potionColor, potionSuccessMessage, potionType, text, usesModifier -
Constructor Summary
ConstructorsConstructorDescriptionHERBICIDE_POTION(@NotNull Ollivanders2 plugin) Constructor for Herbicide Potion. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoOnPotionSplashEvent(@NotNull org.bukkit.event.entity.PotionSplashEvent event) Handle the splash potion event and apply herbicide effects.voiddrink(@NotNull org.bukkit.entity.Player player) Drink the Herbicide Potion - no effect when consumed directly.Methods inherited from class net.pottercraft.ollivanders2.potion.O2Potion
brew, brewBadPotion, checkRecipe, createPotionItemStack, getFlavorText, getIngredients, getIngredientsText, getLevel, getMagicBranch, getName, getPotionSuccessMessage, getPotionType, getText, setUsesModifier
-
Constructor Details
-
HERBICIDE_POTION
Constructor for Herbicide Potion.Initializes the splash potion with its ingredients (Lionfish Spines, Flobberworm Mucus, Horklump Juice, and Standard Potion Ingredients), description text, potion color, and the Instant Damage effect. Sets up the 30-second duration for the plant-killing effect.
- Parameters:
plugin- a callback to the plugin instance
-
-
Method Details
-
drink
public void drink(@NotNull @NotNull org.bukkit.entity.Player player) Drink the Herbicide Potion - no effect when consumed directly.This is a splash potion intended to be thrown, not consumed. Drinking it has no special effect. The potion's primary functionality is triggered through the splash event when thrown, which damages plant-based entities and kills plants in the affected area.
-
doOnPotionSplashEvent
public void doOnPotionSplashEvent(@NotNull @NotNull org.bukkit.event.entity.PotionSplashEvent event) Handle the splash potion event and apply herbicide effects.When the potion splashes:
- Creepers and Creakings receive full damage intensity from the potion effect
- All other entities (players, mobs, etc.) receive reduced damage (10% intensity)
- A HERBICIDE stationary spell is created at the splash location to kill plant blocks in the affected radius (4 blocks) for the duration of the potion effect (30 seconds)
- Specified by:
doOnPotionSplashEventin classO2SplashPotion- Parameters:
event- the splash potion thrown event containing affected entities and location
-