Class StomperBoots
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.armor.StomperBoots
- All Implemented Interfaces:
Placeable
The Boots of the Stomper are boots which damage nearby enemies whenever the
Player
takes fall damage.- Author:
- TheBusyBiscuit
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench -
Constructor Summary
ConstructorsConstructorDescriptionStomperBoots(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanPush(org.bukkit.entity.Player player, org.bukkit.entity.LivingEntity entity) Checks if the stomper boots can move an entity and is not the player who is using the boots.protected org.bukkit.util.VectorgetShockwave(org.bukkit.Location origin, org.bukkit.Location target) This gives us the "shockwave"Vectorfor a given target.voidstomp(org.bukkit.event.entity.EntityDamageEvent fallDamageEvent) This will apply the "stomp" effect to the givenEntityDamageEvent.Methods inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addItemHandler, addItemSetting, addOfficialWikipage, addWikiPage, callItemHandler, canUse, disable, enable, equals, error, getAddon, getBlockTicker, getById, getByItem, getDrops, getDrops, getHandlers, getId, getItem, getItemGroup, getItemName, getItemSetting, getItemSettings, getOptionalById, getOptionalByItem, getRecipe, getRecipeOutput, getRecipeType, getResearch, getState, getWikipage, hashCode, hasResearch, info, isDisabled, isDisabledIn, isDisenchantable, isEnchantable, isHidden, isItem, isItemStackImmutable, isTicking, isUseableInWorkbench, load, loadDataByDefault, postRegister, preRegister, register, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warnMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
StomperBoots
@ParametersAreNonnullByDefault public StomperBoots(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, org.bukkit.inventory.ItemStack[] recipe)
-
-
Method Details
-
stomp
public void stomp(@Nonnull org.bukkit.event.entity.EntityDamageEvent fallDamageEvent) This will apply the "stomp" effect to the givenEntityDamageEvent.- Parameters:
fallDamageEvent- TheEntityDamageEventin which thePlayerhas taken fall damage
-
getShockwave
@Nonnull protected org.bukkit.util.Vector getShockwave(@Nonnull org.bukkit.Location origin, @Nonnull org.bukkit.Location target) This gives us the "shockwave"Vectorfor a given target.- Parameters:
origin- TheLocationof ourPlayertarget- TheLocationof theEntitywe are pushing away- Returns:
- A
Vectorto determine the velocity for ourEntity
-
canPush
protected boolean canPush(@Nonnull org.bukkit.entity.Player player, @Nonnull org.bukkit.entity.LivingEntity entity) Checks if the stomper boots can move an entity and is not the player who is using the boots.For developers: If you're spawning an immovable NPC, you should be denying collision with
LivingEntity.setCollidable(boolean)or gravity withEntity.setGravity(boolean).- Parameters:
player- ThePlayerusing theStomperBoots.entity- TheLivingEntityto check.- Returns:
- If the entity can move.
-