public class PokeBallImpactEvent
extends net.minecraftforge.eventbus.api.Event
Constructor and Description |
---|
PokeBallImpactEvent(PokeBallEntity pokeBall,
net.minecraft.util.math.RayTraceResult targetPosition)
The basic constructor for the impact event taking the Poke Ball that is taking the collision and the ray traced block/entity
that it has collided with
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<net.minecraft.block.BlockState> |
getBlockHit()
If the target is a block it will obtain the state of said block
Otherwise it will return an empty optional
|
java.util.Optional<net.minecraft.util.math.BlockPos> |
getBlockPosHit()
If the target is a block it will obtain the position of said block
Otherwise it will return an empty optional
|
java.util.Optional<net.minecraft.entity.Entity> |
getEntityHit()
If the target is an entity it will obtain the hit entity
Otherwise it will return an empty optional
|
PokeBallEntity |
getPokeBall()
Gets the Poke Ball entity being thrown
|
boolean |
isEmptyPokeBall()
Gets if the ball thrown was empty or not
|
public PokeBallImpactEvent(PokeBallEntity pokeBall, net.minecraft.util.math.RayTraceResult targetPosition)
pokeBall
- The pokeballtargetPosition
- The target positionpublic PokeBallEntity getPokeBall()
public java.util.Optional<net.minecraft.entity.Entity> getEntityHit()
public java.util.Optional<net.minecraft.util.math.BlockPos> getBlockPosHit()
public java.util.Optional<net.minecraft.block.BlockState> getBlockHit()
public boolean isEmptyPokeBall()