Package net.minecraft.block.dispenser
Class ProjectileDispenserBehavior
java.lang.Object
net.minecraft.block.dispenser.ItemDispenserBehavior
net.minecraft.block.dispenser.ProjectileDispenserBehavior
- All Implemented Interfaces:
DispenserBehavior
A dispenser behavior that spawns a projectile with velocity in front of the dispenser.
- Mappings:
Namespace Name official idintermediary net/minecraft/class_2965named net/minecraft/block/dispenser/ProjectileDispenserBehavior
-
Field Summary
Fields inherited from interface net.minecraft.block.dispenser.DispenserBehavior
LOGGER, NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ProjectileEntitycreateProjectile(World world, Position position, ItemStack stack) Creates the entity that will be spawned in front of the dispenser.dispenseSilently(BlockPointer pointer, ItemStack stack) protected floatgetForce()Returns the force of a projectile's velocity when spawned.protected floatReturns the variation of a projectile's velocity when spawned.protected voidplaySound(BlockPointer pointer) Methods inherited from class net.minecraft.block.dispenser.ItemDispenserBehavior
dispense, spawnItem, spawnParticles
-
Constructor Details
-
ProjectileDispenserBehavior
public ProjectileDispenserBehavior()
-
-
Method Details
-
dispenseSilently
- Overrides:
dispenseSilentlyin classItemDispenserBehavior- Mappings:
Namespace Name Mixin selector official aLig;a(Lgv;Lcfx;)Lcfx;intermediary method_10135Lnet/minecraft/class_2347;method_10135(Lnet/minecraft/class_2342;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1799;named dispenseSilentlyLnet/minecraft/block/dispenser/ItemDispenserBehavior;dispenseSilently(Lnet/minecraft/util/math/BlockPointer;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/ItemStack;
-
playSound
- Overrides:
playSoundin classItemDispenserBehavior- Mappings:
Namespace Name Mixin selector official aLig;a(Lgv;)Vintermediary method_10136Lnet/minecraft/class_2347;method_10136(Lnet/minecraft/class_2342;)Vnamed playSoundLnet/minecraft/block/dispenser/ItemDispenserBehavior;playSound(Lnet/minecraft/util/math/BlockPointer;)V
-
createProjectile
protected abstract ProjectileEntity createProjectile(World world, Position position, ItemStack stack) Creates the entity that will be spawned in front of the dispenser.- Parameters:
world- the world the projectile will spawn inposition- the output location of the dispenserstack- the stack that the dispenser will consume- Returns:
- the created projectile
- Mappings:
Namespace Name Mixin selector official aLid;a(Lcmk;Lho;Lcfx;)Lbze;intermediary method_12844Lnet/minecraft/class_2965;method_12844(Lnet/minecraft/class_1937;Lnet/minecraft/class_2374;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1676;named createProjectileLnet/minecraft/block/dispenser/ProjectileDispenserBehavior;createProjectile(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Position;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/projectile/ProjectileEntity;
-
getVariation
protected float getVariation()Returns the variation of a projectile's velocity when spawned.- Returns:
- the variation of a projectile's velocity when spawned
- Mappings:
Namespace Name Mixin selector official aLid;a()Fintermediary method_12845Lnet/minecraft/class_2965;method_12845()Fnamed getVariationLnet/minecraft/block/dispenser/ProjectileDispenserBehavior;getVariation()F
-
getForce
protected float getForce()Returns the force of a projectile's velocity when spawned.- Returns:
- the force of a projectile's velocity when spawned
- Mappings:
Namespace Name Mixin selector official bLid;b()Fintermediary method_12846Lnet/minecraft/class_2965;method_12846()Fnamed getForceLnet/minecraft/block/dispenser/ProjectileDispenserBehavior;getForce()F
-