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, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanPush(Player player, LivingEntity entity) Checks if the stomper boots can move an entity and is not the player who is using the boots.protected VectorgetShockwave(Location origin, Location target) This gives us the "shockwave"Vectorfor a given target.voidstomp(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, 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, ItemStack[] recipe)
-
-
Method Details
-
stomp
This will apply the "stomp" effect to the givenEntityDamageEvent.- Parameters:
fallDamageEvent- TheEntityDamageEventin which thePlayerhas taken fall damage
-
getShockwave
This gives us the "shockwave"Vectorfor 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- TheLivingEntityto check.player- ThePlayerusing theStomperBoots.- Returns:
- If the entity can move.
-