Class ItemLaunching

java.lang.Object
me.desht.pneumaticcraft.common.util.ItemLaunching

public class ItemLaunching extends Object
Common code for the Air Cannon and Pneumatic Chestplate item launcher
  • 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 world
      stack - the item stack to be fired
      dispenserLike - true if dispenser-like behaviour should be used
      fallingBlocks - true if block items should be spawned as falling block entities rather than item entities
      Returns:
      the entity to launch
    • registerBehaviour

      public static void registerBehaviour(ILaunchBehaviour behaviour)
    • registerDefaultBehaviours

      public static void registerDefaultBehaviours()