Class ClimbingPick
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem<ItemUseHandler>
io.github.thebusybiscuit.slimefun4.implementation.items.tools.ClimbingPick
- All Implemented Interfaces:
DamageableItem
,ItemAttribute
,Placeable
,RecipeDisplayItem
public class ClimbingPick
extends SimpleSlimefunItem<ItemUseHandler>
implements DamageableItem, RecipeDisplayItem
The
ClimbingPick
launches you 1 block upwards when you right click
on a ice Block
.
Every level of efficiency Enchantment
increases the launch by 0.2 blocks.- Author:
- Linox, TheBusyBiscuit
-
Field Summary
Fields inherited from class io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem
addon, disenchantable, enchantable, hidden, recipeOutput, useableInWorkbench
-
Constructor Summary
ConstructorDescriptionClimbingPick
(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method adds every surface that is climbable by default.protected void
addSurface
(Material type, double defaultValue) void
damageItem
(Player p, ItemStack item) This method will damage the givenItemStack
once.double
getClimbingSpeed
(ItemStack item, Material type) double
getClimbingSpeed
(Material type) This returns the climbing speed for a givenMaterial
.This is the list of items to display alongside thisSlimefunItem
.This returns theItemHandler
that will be added to thisSlimefunItem
.boolean
Implement this method to make the behaviour of this interface dependent on the state of your object.boolean
This returns whether theClimbingPick
needs to be held in both arms to work.Methods inherited from class io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem
preRegister
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, 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.DamageableItem
evaluateUnbreakingEnchantment
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.Placeable
useVanillaBlockBreaking
Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.RecipeDisplayItem
getRecipeSectionLabel
-
Constructor Details
-
ClimbingPick
@ParametersAreNonnullByDefault public ClimbingPick(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe)
-
-
Method Details
-
addDefaultSurfaces
protected void addDefaultSurfaces()This method adds every surface that is climbable by default. -
addSurface
-
isDualWieldingEnabled
public boolean isDualWieldingEnabled()This returns whether theClimbingPick
needs to be held in both arms to work.- Returns:
- Whether dual wielding is enabled
-
getClimbableSurfaces
- Returns:
- A
Collection
of everyClimbableSurface
-
getClimbingSpeed
This returns the climbing speed for a givenMaterial
. -
getClimbingSpeed
- Parameters:
item
- theClimbingPick
'sItemStack
type
- TheMaterial
- Returns:
- The climbing speed or 0.
-
getItemHandler
Description copied from class:SimpleSlimefunItem
This returns theItemHandler
that will be added to thisSlimefunItem
.- Specified by:
getItemHandler
in classSimpleSlimefunItem<ItemUseHandler>
- Returns:
- The
ItemHandler
that should be added to thisSlimefunItem
-
damageItem
Description copied from interface:DamageableItem
This method will damage the givenItemStack
once. It also takes into account theEnchantment
Unbreaking
. It will only apply the damage ifDamageableItem.isDamageable()
returned true.- Specified by:
damageItem
in interfaceDamageableItem
- Parameters:
p
- ThePlayer
to which the item belongsitem
- TheItemStack
to damage
-
isDamageable
public boolean isDamageable()Description copied from interface:DamageableItem
Implement this method to make the behaviour of this interface dependent on the state of your object. You could add aConfig
option to toggle the behaviour for example.- Specified by:
isDamageable
in interfaceDamageableItem
- Returns:
- Whether this
SlimefunItem
is damageable
-
getDisplayRecipes
Description copied from interface:RecipeDisplayItem
This is the list of items to display alongside thisSlimefunItem
. Note that these items will be filled in from top to bottom first. So if you want it to express a recipe, add your inputItemStack
and then your outputItemStack
.- Specified by:
getDisplayRecipes
in interfaceRecipeDisplayItem
- Returns:
- The recipes to display in the
SlimefunGuide
-
getLabelLocalPath
- Specified by:
getLabelLocalPath
in interfaceRecipeDisplayItem
-