Class PistonMovingBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.piston.PistonMovingBlockEntity
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private Direction
private boolean
private boolean
private long
private BlockState
private static ThreadLocal<Direction>
private float
private float
private static double
static double
private static int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
ConstructorDescriptionPistonMovingBlockEntity(BlockPos p_155901_, BlockState p_155902_)
PistonMovingBlockEntity(BlockPos p_155904_, BlockState p_155905_, BlockState p_155906_, Direction p_155907_, boolean p_155908_, boolean p_155909_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private static void
fixEntityWithinPistonBase(BlockPos p_155921_, Entity p_155922_, Direction p_155923_, double p_155924_)
private BlockState
getCollisionShape(BlockGetter p_60357_, BlockPos p_60358_)
private float
getExtendedProgress(float p_60391_)
long
private static double
getMovement(AABB p_60368_, Direction p_60369_, AABB p_60370_)
float
getProgress(float p_60351_)
float
getXOff(float p_60381_)
float
getYOff(float p_60386_)
float
getZOff(float p_60389_)
boolean
boolean
private boolean
void
load(CompoundTag p_155930_)
private static boolean
matchesStickyCritera(AABB p_60365_, Entity p_60366_)
private static AABB
moveByPositionAndProgress(BlockPos p_155926_, AABB p_155927_, PistonMovingBlockEntity p_155928_)
private static void
moveCollidedEntities(Level p_155911_, BlockPos p_155912_, float p_155913_, PistonMovingBlockEntity p_155914_)
private static void
moveEntityByPiston(Direction p_60372_, Entity p_60373_, double p_60374_, Direction p_60375_)
private static void
moveStuckEntities(Level p_155932_, BlockPos p_155933_, float p_155934_, PistonMovingBlockEntity p_155935_)
save(CompoundTag p_60377_)
static void
tick(Level p_155916_, BlockPos p_155917_, BlockState p_155918_, PistonMovingBlockEntity p_155919_)
Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
TICKS_TO_EXTEND
private static final int TICKS_TO_EXTEND- See Also:
- Constant Field Values
-
PUSH_OFFSET
private static final double PUSH_OFFSET- See Also:
- Constant Field Values
-
TICK_MOVEMENT
public static final double TICK_MOVEMENT- See Also:
- Constant Field Values
-
movedState
-
direction
-
extending
private boolean extending -
isSourcePiston
private boolean isSourcePiston -
NOCLIP
-
progress
private float progress -
progressO
private float progressO -
lastTicked
private long lastTicked -
deathTicks
private int deathTicks
-
-
Constructor Details
-
PistonMovingBlockEntity
-
PistonMovingBlockEntity
public PistonMovingBlockEntity(BlockPos p_155904_, BlockState p_155905_, BlockState p_155906_, Direction p_155907_, boolean p_155908_, boolean p_155909_)
-
-
Method Details
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
isExtending
public boolean isExtending() -
getDirection
-
isSourcePiston
public boolean isSourcePiston() -
getProgress
public float getProgress(float p_60351_) -
getXOff
public float getXOff(float p_60381_) -
getYOff
public float getYOff(float p_60386_) -
getZOff
public float getZOff(float p_60389_) -
getExtendedProgress
private float getExtendedProgress(float p_60391_) -
getCollisionRelatedBlockState
-
moveCollidedEntities
private static void moveCollidedEntities(Level p_155911_, BlockPos p_155912_, float p_155913_, PistonMovingBlockEntity p_155914_) -
moveEntityByPiston
-
moveStuckEntities
private static void moveStuckEntities(Level p_155932_, BlockPos p_155933_, float p_155934_, PistonMovingBlockEntity p_155935_) -
matchesStickyCritera
-
isStickyForEntities
private boolean isStickyForEntities() -
getMovementDirection
-
getMovement
-
moveByPositionAndProgress
private static AABB moveByPositionAndProgress(BlockPos p_155926_, AABB p_155927_, PistonMovingBlockEntity p_155928_) -
fixEntityWithinPistonBase
-
getMovedState
-
finalTick
public void finalTick() -
tick
public static void tick(Level p_155916_, BlockPos p_155917_, BlockState p_155918_, PistonMovingBlockEntity p_155919_) -
load
- Overrides:
load
in classBlockEntity
-
save
- Overrides:
save
in classBlockEntity
-
getCollisionShape
-
getLastTicked
public long getLastTicked()
-