Package net.minecraft.util.math.shapes
Class EntitySelectionContext
- java.lang.Object
-
- net.minecraft.util.math.shapes.EntitySelectionContext
-
- All Implemented Interfaces:
ISelectionContext
,IForgeSelectionContext
public class EntitySelectionContext extends java.lang.Object implements ISelectionContext
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<Fluid>
canStandOnFluid
private boolean
descending
protected static ISelectionContext
EMPTY
private Entity
entity
private double
entityBottom
private Item
heldItem
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntitySelectionContext(boolean p_i232177_1_, double p_i232177_2_, Item p_i232177_4_, java.util.function.Predicate<Fluid> p_i232177_5_)
protected
EntitySelectionContext(Entity p_i51182_1_)
Deprecated.protected
EntitySelectionContext(Entity entity, boolean p_i232177_1_, double p_i232177_2_, Item p_i232177_4_, java.util.function.Predicate<Fluid> p_i232177_5_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canStandOnFluid(FluidState p_230426_1_, FlowingFluid p_230426_2_)
Entity
getEntity()
boolean
isAbove(VoxelShape p_216378_1_, BlockPos p_216378_2_, boolean p_216378_3_)
boolean
isDescending()
boolean
isHoldingItem(Item p_216375_1_)
-
-
-
Field Detail
-
EMPTY
protected static final ISelectionContext EMPTY
-
descending
private final boolean descending
-
entityBottom
private final double entityBottom
-
heldItem
private final Item heldItem
-
canStandOnFluid
private final java.util.function.Predicate<Fluid> canStandOnFluid
-
entity
@Nullable private final Entity entity
-
-
Constructor Detail
-
EntitySelectionContext
protected EntitySelectionContext(boolean p_i232177_1_, double p_i232177_2_, Item p_i232177_4_, java.util.function.Predicate<Fluid> p_i232177_5_)
-
EntitySelectionContext
protected EntitySelectionContext(@Nullable Entity entity, boolean p_i232177_1_, double p_i232177_2_, Item p_i232177_4_, java.util.function.Predicate<Fluid> p_i232177_5_)
-
EntitySelectionContext
@Deprecated protected EntitySelectionContext(Entity p_i51182_1_)
Deprecated.
-
-
Method Detail
-
isHoldingItem
public boolean isHoldingItem(Item p_216375_1_)
- Specified by:
isHoldingItem
in interfaceISelectionContext
-
canStandOnFluid
public boolean canStandOnFluid(FluidState p_230426_1_, FlowingFluid p_230426_2_)
- Specified by:
canStandOnFluid
in interfaceISelectionContext
-
isDescending
public boolean isDescending()
- Specified by:
isDescending
in interfaceISelectionContext
-
isAbove
public boolean isAbove(VoxelShape p_216378_1_, BlockPos p_216378_2_, boolean p_216378_3_)
- Specified by:
isAbove
in interfaceISelectionContext
-
getEntity
@Nullable public Entity getEntity()
- Specified by:
getEntity
in interfaceIForgeSelectionContext
-
-