Class ItemLaunching
java.lang.Object
me.desht.pneumaticcraft.common.util.ItemLaunching
Common code for the Air Cannon and Pneumatic Chestplate item launcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.entity.EntitygetEntityToLaunch(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, boolean dispenserLike, boolean fallingBlocks) Get the entity to launch for a given item.static voidlaunchEntity(net.minecraft.world.entity.Entity launchedEntity, net.minecraft.world.phys.Vec3 initialPos, net.minecraft.world.phys.Vec3 velocity, boolean doSpawn) static voidregisterBehaviour(ILaunchBehaviour behaviour) static void
-
Constructor Details
-
ItemLaunching
public ItemLaunching()
-
-
Method Details
-
launchEntity
public static void launchEntity(net.minecraft.world.entity.Entity launchedEntity, net.minecraft.world.phys.Vec3 initialPos, net.minecraft.world.phys.Vec3 velocity, boolean doSpawn) -
getEntityToLaunch
public static net.minecraft.world.entity.Entity getEntityToLaunch(net.minecraft.world.level.Level world, net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, boolean dispenserLike, boolean fallingBlocks) Get the entity to launch for a given item.- Parameters:
world- the worldstack- the item stack to be fireddispenserLike- true if dispenser-like behaviour should be usedfallingBlocks- true if block items should be spawned as falling block entities rather than item entities- Returns:
- the entity to launch
-
registerBehaviour
-
registerDefaultBehaviours
public static void registerDefaultBehaviours()
-