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>
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private Direction
private boolean
private boolean
private long
private BlockState
private static final ThreadLocal<Direction>
private float
private float
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
ConstructorDescriptionPistonTileEntity
(BlockState p_i45665_1_, Direction p_i45665_2_, boolean p_i45665_3_, boolean p_i45665_4_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
fixEntityWithinPistonBase
(Entity p_190605_1_, Direction p_190605_2_, double p_190605_3_) private BlockState
getCollisionShape
(IBlockReader p_195508_1_, BlockPos p_195508_2_) private float
getExtendedProgress
(float p_184320_1_) long
private static double
getMovement
(AxisAlignedBB p_190612_0_, Direction p_190612_1_, AxisAlignedBB p_190612_2_) float
getProgress
(float p_145860_1_) double
float
getXOff
(float p_174929_1_) float
getYOff
(float p_174928_1_) float
getZOff
(float p_174926_1_) boolean
boolean
private boolean
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_) 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 Details
-
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
-
PistonTileEntity
public PistonTileEntity() -
PistonTileEntity
public PistonTileEntity(BlockState p_i45665_1_, Direction p_i45665_2_, boolean p_i45665_3_, boolean p_i45665_4_)
-
-
Method Details
-
getUpdateTag
- Overrides:
getUpdateTag
in classTileEntity
-
isExtending
public boolean isExtending() -
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
-
moveCollidedEntities
private void moveCollidedEntities(float p_184322_1_) -
moveEntityByPiston
-
moveStuckEntities
private void moveStuckEntities(float p_227024_1_) -
matchesStickyCritera
-
isStickyForEntities
private boolean isStickyForEntities() -
getMovementDirection
-
getMovement
private static double getMovement(AxisAlignedBB p_190612_0_, Direction p_190612_1_, AxisAlignedBB p_190612_2_) -
moveByPositionAndProgress
-
fixEntityWithinPistonBase
-
getMovedState
-
finalTick
public void finalTick() -
tick
public void tick()- Specified by:
tick
in interfaceITickableTileEntity
-
load
- Overrides:
load
in classTileEntity
-
save
- Overrides:
save
in classTileEntity
-
getCollisionShape
-
getLastTicked
public long getLastTicked() -
getViewDistance
public double getViewDistance()- Overrides:
getViewDistance
in classTileEntity
-