Package net.minecraft.tileentity
Class PistonTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.PistonTileEntity
-
- All Implemented Interfaces:
ITickableTileEntity
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class PistonTileEntity extends TileEntity implements ITickableTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private int
deathTicks
private Direction
direction
private boolean
extending
private boolean
isSourcePiston
private long
lastTicked
private BlockState
movedState
private static java.lang.ThreadLocal<Direction>
NOCLIP
private float
progress
private float
progressO
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description PistonTileEntity()
PistonTileEntity(BlockState p_i45665_1_, Direction p_i45665_2_, boolean p_i45665_3_, boolean p_i45665_4_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalTick()
private void
fixEntityWithinPistonBase(Entity p_190605_1_, Direction p_190605_2_, double p_190605_3_)
private BlockState
getCollisionRelatedBlockState()
VoxelShape
getCollisionShape(IBlockReader p_195508_1_, BlockPos p_195508_2_)
Direction
getDirection()
private float
getExtendedProgress(float p_184320_1_)
long
getLastTicked()
BlockState
getMovedState()
private static double
getMovement(AxisAlignedBB p_190612_0_, Direction p_190612_1_, AxisAlignedBB p_190612_2_)
Direction
getMovementDirection()
float
getProgress(float p_145860_1_)
CompoundNBT
getUpdateTag()
double
getViewDistance()
float
getXOff(float p_174929_1_)
float
getYOff(float p_174928_1_)
float
getZOff(float p_174926_1_)
boolean
isExtending()
boolean
isSourcePiston()
private boolean
isStickyForEntities()
void
load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
private static boolean
matchesStickyCritera(AxisAlignedBB p_227021_0_, Entity p_227021_1_)
private AxisAlignedBB
moveByPositionAndProgress(AxisAlignedBB p_190607_1_)
private void
moveCollidedEntities(float p_184322_1_)
private static void
moveEntityByPiston(Direction p_227022_0_, Entity p_227022_1_, double p_227022_2_, Direction p_227022_4_)
private void
moveStuckEntities(float p_227024_1_)
CompoundNBT
save(CompoundNBT p_189515_1_)
void
tick()
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, 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.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
-
-
-
Field Detail
-
movedState
private BlockState movedState
-
direction
private Direction direction
-
extending
private boolean extending
-
isSourcePiston
private boolean isSourcePiston
-
NOCLIP
private static final java.lang.ThreadLocal<Direction> NOCLIP
-
progress
private float progress
-
progressO
private float progressO
-
lastTicked
private long lastTicked
-
deathTicks
private int deathTicks
-
-
Constructor Detail
-
PistonTileEntity
public PistonTileEntity()
-
PistonTileEntity
public PistonTileEntity(BlockState p_i45665_1_, Direction p_i45665_2_, boolean p_i45665_3_, boolean p_i45665_4_)
-
-
Method Detail
-
getUpdateTag
public CompoundNBT getUpdateTag()
- Overrides:
getUpdateTag
in classTileEntity
-
isExtending
public boolean isExtending()
-
getDirection
public Direction getDirection()
-
isSourcePiston
public boolean isSourcePiston()
-
getProgress
public float getProgress(float p_145860_1_)
-
getXOff
public float getXOff(float p_174929_1_)
-
getYOff
public float getYOff(float p_174928_1_)
-
getZOff
public float getZOff(float p_174926_1_)
-
getExtendedProgress
private float getExtendedProgress(float p_184320_1_)
-
getCollisionRelatedBlockState
private BlockState getCollisionRelatedBlockState()
-
moveCollidedEntities
private void moveCollidedEntities(float p_184322_1_)
-
moveEntityByPiston
private static void moveEntityByPiston(Direction p_227022_0_, Entity p_227022_1_, double p_227022_2_, Direction p_227022_4_)
-
moveStuckEntities
private void moveStuckEntities(float p_227024_1_)
-
matchesStickyCritera
private static boolean matchesStickyCritera(AxisAlignedBB p_227021_0_, Entity p_227021_1_)
-
isStickyForEntities
private boolean isStickyForEntities()
-
getMovementDirection
public Direction getMovementDirection()
-
getMovement
private static double getMovement(AxisAlignedBB p_190612_0_, Direction p_190612_1_, AxisAlignedBB p_190612_2_)
-
moveByPositionAndProgress
private AxisAlignedBB moveByPositionAndProgress(AxisAlignedBB p_190607_1_)
-
fixEntityWithinPistonBase
private void fixEntityWithinPistonBase(Entity p_190605_1_, Direction p_190605_2_, double p_190605_3_)
-
getMovedState
public BlockState getMovedState()
-
finalTick
public void finalTick()
-
tick
public void tick()
- Specified by:
tick
in interfaceITickableTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classTileEntity
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classTileEntity
-
getCollisionShape
public VoxelShape getCollisionShape(IBlockReader p_195508_1_, BlockPos p_195508_2_)
-
getLastTicked
public long getLastTicked()
-
getViewDistance
public double getViewDistance()
- Overrides:
getViewDistance
in classTileEntity
-
-