Package org.cyclops.evilcraft.item
Class ItemMace
java.lang.Object
net.minecraft.world.item.Item
net.minecraftforge.fluids.capability.ItemFluidContainer
org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
org.cyclops.evilcraft.core.item.ItemBloodContainer
org.cyclops.evilcraft.item.ItemMace
- All Implemented Interfaces:
net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeItem,org.cyclops.cyclopscore.item.IInformationProvider
- Direct Known Subclasses:
ItemMaceOfDestruction,ItemMaceOfDistortion
An abstract powerable mace.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
Fields inherited from class org.cyclops.evilcraft.core.item.ItemBloodContainer
canPickUpFields inherited from class org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
component, fluidFields inherited from class net.minecraftforge.fluids.capability.ItemFluidContainer
capacityFields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface org.cyclops.cyclopscore.item.IInformationProvider
BLOCK_PREFIX, INFO_PREFIX, INFO_PREFIX_STYLES, ITEM_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionItemMace(net.minecraft.world.item.Item.Properties builder, int containerSize, int hitUsage, int maximumCharge, int powerLevels, float meleeDamage) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanimateOutOfEnergy(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity) voidappendHoverText(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag) protected doublegetArea(int itemUsedCount) The area of effect for the given in use count (counting up per tick).com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(net.minecraft.world.entity.EquipmentSlot slot, net.minecraft.world.item.ItemStack itemStack) intintgetPower(net.minecraft.world.item.ItemStack itemStack) Get the power level of the given ItemStack.net.minecraft.world.item.UseAnimgetUseAnimation(net.minecraft.world.item.ItemStack stack) intgetUseDuration(net.minecraft.world.item.ItemStack itemStack) booleanhurtEnemy(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity attacked, net.minecraft.world.entity.LivingEntity attacker) protected booleanisUsable(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.player.Player player) booleanonLeftClickEntity(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity entity) voidonUsingTick(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity player, int duration) voidreleaseUsing(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int itemInUseCount) protected voidshowUsedItemTick(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity player, int power) protected voidshowUsingItemTick(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity entity, int duration) protected abstract voiduse(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int itemUsedCount, int power) The usage action after charging the mace.net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) Methods inherited from class org.cyclops.evilcraft.core.item.ItemBloodContainer
canConsume, consume, doesSneakBypassUse, drainFromOthers, isPickupFluids, isPlaceFluids, onItemUseFirst, setPlaceFluidsMethods inherited from class org.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
canDrain, fillItemCategory, getBarColor, getBarWidth, getFluid, getInfo, initCapabilities, isBarVisible, provideInformationMethods inherited from class net.minecraft.world.item.Item
allowedIn, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEquipSound, getFoodProperties, getId, getItemCategory, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, hasCraftingRemainingItem, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getShareTag, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Constructor Details
-
ItemMace
public ItemMace(net.minecraft.world.item.Item.Properties builder, int containerSize, int hitUsage, int maximumCharge, int powerLevels, float meleeDamage)
-
-
Method Details
-
isUsable
protected boolean isUsable(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.player.Player player) -
hurtEnemy
public boolean hurtEnemy(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity attacked, net.minecraft.world.entity.LivingEntity attacker) - Overrides:
hurtEnemyin classnet.minecraft.world.item.Item
-
onLeftClickEntity
public boolean onLeftClickEntity(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity entity) -
getUseAnimation
public net.minecraft.world.item.UseAnim getUseAnimation(net.minecraft.world.item.ItemStack stack) - Overrides:
getUseAnimationin classnet.minecraft.world.item.Item
-
getUseDuration
public int getUseDuration(net.minecraft.world.item.ItemStack itemStack) - Overrides:
getUseDurationin classnet.minecraft.world.item.Item
-
use
public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) - Overrides:
usein classItemBloodContainer
-
onUsingTick
public void onUsingTick(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity player, int duration) -
showUsingItemTick
protected void showUsingItemTick(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.entity.LivingEntity entity, int duration) -
showUsedItemTick
protected void showUsedItemTick(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity player, int power) -
getArea
protected double getArea(int itemUsedCount) The area of effect for the given in use count (counting up per tick).- Parameters:
itemUsedCount- The amount of ticks the item was active.- Returns:
- The area of effect.
-
releaseUsing
public void releaseUsing(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int itemInUseCount) - Overrides:
releaseUsingin classnet.minecraft.world.item.Item
-
use
protected abstract void use(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int itemUsedCount, int power) The usage action after charging the mace.- Parameters:
world- The worldentity- The using entityitemUsedCount- The charge countpower- The configured power level
-
animateOutOfEnergy
protected void animateOutOfEnergy(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity) -
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValuein classnet.minecraft.world.item.Item
-
getAttributeModifiers
public com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(net.minecraft.world.entity.EquipmentSlot slot, net.minecraft.world.item.ItemStack itemStack) -
appendHoverText
public void appendHoverText(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flag) - Overrides:
appendHoverTextin classorg.cyclops.cyclopscore.item.DamageIndicatedItemFluidContainer
-
getPower
public int getPower(net.minecraft.world.item.ItemStack itemStack) Get the power level of the given ItemStack.- Parameters:
itemStack- The item to check.- Returns:
- The power this Mace currently has.
-