Package net.minecraft.item
Class PowderSnowBucketItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BlockItem
net.minecraft.item.PowderSnowBucketItem
- All Implemented Interfaces:
FluidModificationItem
,ItemConvertible
public class PowderSnowBucketItem extends BlockItem implements FluidModificationItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings
-
Field Summary
Fields Modifier and Type Field Description private SoundEvent
placeSound
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group
-
Constructor Summary
Constructors Constructor Description PowderSnowBucketItem(Block block, SoundEvent placeSound, Item.Settings settings)
-
Method Summary
Modifier and Type Method Description protected SoundEvent
getPlaceSound(BlockState state)
String
getTranslationKey()
Gets the translation key of this item.boolean
placeFluid(PlayerEntity player, World world, BlockPos pos, BlockHitResult hitResult)
ActionResult
useOnBlock(ItemUsageContext context)
Called when an item is used on a block.Methods inherited from class net.minecraft.item.BlockItem
appendBlocks, appendStacks, appendTooltip, canPlace, checkStatePlacement, getBlock, getPlacementContext, getPlacementState, hasStoredInventory, method_33261, place, place, postPlacement, writeTagToBlockEntity
Methods inherited from class net.minecraft.item.Item
asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isNetworkSynced, isSuitableFor, isUsedOnRelease, onClicked, onCraft, onStackClicked, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnEntity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.item.FluidModificationItem
onEmptied
-
Field Details
-
placeSound
-
-
Constructor Details
-
PowderSnowBucketItem
-
-
Method Details
-
useOnBlock
Called when an item is used on a block.This method is called on both the logical client and logical server, so take caution when using this method. The logical side can be checked using
context.getWorld().isClient()
.- Overrides:
useOnBlock
in classBlockItem
- Parameters:
context
- the usage context- Returns:
- an action result that specifies if using the item on a block was successful.
-
getTranslationKey
Gets the translation key of this item.- Overrides:
getTranslationKey
in classBlockItem
-
getPlaceSound
- Overrides:
getPlaceSound
in classBlockItem
-
placeFluid
public boolean placeFluid(@Nullable PlayerEntity player, World world, BlockPos pos, @Nullable BlockHitResult hitResult)- Specified by:
placeFluid
in interfaceFluidModificationItem
-