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
ConstructorDescriptionStomperBoots
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canPush
(Player player, LivingEntity entity) Checks if the stomper boots can move an entity and is not the player who is using the boots.protected Vector
getShockwave
(Location origin, Location target) This gives us the "shockwave"Vector
for a given target.void
stomp
(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, callItemHandler, canUse, 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, postRegister, preRegister, register, sendDeprecationWarning, setHidden, setItemGroup, setRecipe, setRecipeOutput, setRecipeType, setResearch, setUseableInWorkbench, toString, warn
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
-
Constructor Details
-
StomperBoots
@ParametersAreNonnullByDefault public StomperBoots(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
stomp
This will apply the "stomp" effect to the givenEntityDamageEvent
.- Parameters:
fallDamageEvent
- TheEntityDamageEvent
in which thePlayer
has taken fall damage
-
getShockwave
This gives us the "shockwave"Vector
for a given target. -
canPush
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:
entity
- TheLivingEntity
to check.player
- ThePlayer
using theStomperBoots
.- Returns:
- If the entity can move.
-