Package net.minecraft.block.entity
Class PistonBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.PistonBlockEntity
A piston block entity represents the block being pushed by a piston.
- Mappings:
Namespace Name official cny
intermediary net/minecraft/class_2669
named net/minecraft/block/entity/PistonBlockEntity
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private Direction
private static final ThreadLocal<Direction>
private int
static final double
private static final int
private static final double
private float
private float
private BlockState
private long
private boolean
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
ConstructorDescriptionPistonBlockEntity
(BlockPos pos, BlockState state) PistonBlockEntity
(BlockPos pos, BlockState state, BlockState pushedBlock, Direction facing, boolean extending, boolean source) -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
canMoveEntity
(Box box, Entity entity) void
finish()
private float
getAmountExtended
(float progress) getCollisionShape
(BlockView world, BlockPos pos) private BlockState
private static double
getIntersectionSize
(Box box, Direction direction, Box box2) float
getProgress
(float tickDelta) float
getRenderOffsetX
(float tickDelta) float
getRenderOffsetY
(float tickDelta) float
getRenderOffsetZ
(float tickDelta) long
boolean
private boolean
boolean
isSource()
private static void
moveEntitiesInHoneyBlock
(World world, BlockPos pos, float float2, PistonBlockEntity blockEntity) private static void
moveEntity
(Direction direction, Entity entity, double double2, Direction direction2) private static Box
offsetHeadBox
(BlockPos pos, Box box, PistonBlockEntity blockEntity) private static void
private static void
pushEntities
(World world, BlockPos pos, float float2, PistonBlockEntity blockEntity) void
readNbt
(NbtCompound nbt) static void
tick
(World world, BlockPos pos, BlockState state, PistonBlockEntity blockEntity) Serializes the state of this block entity that is observable by clients.protected void
writeNbt
(NbtCompound nbt) Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toUpdatePacket, writeIdToNbt
-
Field Details
-
field_31382
private static final int field_31382- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lcny;b:I
intermediary field_31382
Lnet/minecraft/class_2669;field_31382:I
named field_31382
Lnet/minecraft/block/entity/PistonBlockEntity;field_31382:I
-
field_31383
private static final double field_31383- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lcny;c:D
intermediary field_31383
Lnet/minecraft/class_2669;field_31383:D
named field_31383
Lnet/minecraft/block/entity/PistonBlockEntity;field_31383:D
-
field_31381
public static final double field_31381- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lcny;a:D
intermediary field_31381
Lnet/minecraft/class_2669;field_31381:D
named field_31381
Lnet/minecraft/block/entity/PistonBlockEntity;field_31381:D
-
field_12205
- Mappings:
Namespace Name Mixin selector official h
Lcny;h:Ljava/lang/ThreadLocal;
intermediary field_12205
Lnet/minecraft/class_2669;field_12205:Ljava/lang/ThreadLocal;
named field_12205
Lnet/minecraft/block/entity/PistonBlockEntity;field_12205:Ljava/lang/ThreadLocal;
-
pushedBlock
- Mappings:
Namespace Name Mixin selector official d
Lcny;d:Lcoc;
intermediary field_12204
Lnet/minecraft/class_2669;field_12204:Lnet/minecraft/class_2680;
named pushedBlock
Lnet/minecraft/block/entity/PistonBlockEntity;pushedBlock:Lnet/minecraft/block/BlockState;
-
facing
- Mappings:
Namespace Name Mixin selector official e
Lcny;e:Lgm;
intermediary field_12201
Lnet/minecraft/class_2669;field_12201:Lnet/minecraft/class_2350;
named facing
Lnet/minecraft/block/entity/PistonBlockEntity;facing:Lnet/minecraft/util/math/Direction;
-
extending
private boolean extending- Mappings:
Namespace Name Mixin selector official f
Lcny;f:Z
intermediary field_12203
Lnet/minecraft/class_2669;field_12203:Z
named extending
Lnet/minecraft/block/entity/PistonBlockEntity;extending:Z
-
source
private boolean source- Mappings:
Namespace Name Mixin selector official g
Lcny;g:Z
intermediary field_12202
Lnet/minecraft/class_2669;field_12202:Z
named source
Lnet/minecraft/block/entity/PistonBlockEntity;source:Z
-
progress
private float progress- Mappings:
Namespace Name Mixin selector official i
Lcny;i:F
intermediary field_12207
Lnet/minecraft/class_2669;field_12207:F
named progress
Lnet/minecraft/block/entity/PistonBlockEntity;progress:F
-
lastProgress
private float lastProgress- Mappings:
Namespace Name Mixin selector official j
Lcny;j:F
intermediary field_12206
Lnet/minecraft/class_2669;field_12206:F
named lastProgress
Lnet/minecraft/block/entity/PistonBlockEntity;lastProgress:F
-
savedWorldTime
private long savedWorldTime- Mappings:
Namespace Name Mixin selector official k
Lcny;k:J
intermediary field_12208
Lnet/minecraft/class_2669;field_12208:J
named savedWorldTime
Lnet/minecraft/block/entity/PistonBlockEntity;savedWorldTime:J
-
field_26705
private int field_26705- Mappings:
Namespace Name Mixin selector official l
Lcny;l:I
intermediary field_26705
Lnet/minecraft/class_2669;field_26705:I
named field_26705
Lnet/minecraft/block/entity/PistonBlockEntity;field_26705:I
-
-
Constructor Details
-
PistonBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lcny;<init>(Lgh;Lcoc;)V
intermediary <init>
Lnet/minecraft/class_2669;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named <init>
Lnet/minecraft/block/entity/PistonBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
PistonBlockEntity
public PistonBlockEntity(BlockPos pos, BlockState state, BlockState pushedBlock, Direction facing, boolean extending, boolean source) - Mappings:
Namespace Name Mixin selector official <init>
Lcny;<init>(Lgh;Lcoc;Lcoc;Lgm;ZZ)V
intermediary <init>
Lnet/minecraft/class_2669;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;ZZ)V
named <init>
Lnet/minecraft/block/entity/PistonBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;ZZ)V
-
-
Method Details
-
toInitialChunkDataNbt
Serializes the state of this block entity that is observable by clients. It is sent alongside the initial chunk data, as well as when the block entity implementsBlockEntity.toUpdatePacket()
and decides to use the defaultBlockEntityUpdateS2CPacket
.- Overrides:
toInitialChunkDataNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector official Z_
Lclz;Z_()Loc;
intermediary method_16887
Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;
named toInitialChunkDataNbt
Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
isExtending
public boolean isExtending()- Mappings:
Namespace Name Mixin selector official c
Lcny;c()Z
intermediary method_11501
Lnet/minecraft/class_2669;method_11501()Z
named isExtending
Lnet/minecraft/block/entity/PistonBlockEntity;isExtending()Z
-
getFacing
- Mappings:
Namespace Name Mixin selector official d
Lcny;d()Lgm;
intermediary method_11498
Lnet/minecraft/class_2669;method_11498()Lnet/minecraft/class_2350;
named getFacing
Lnet/minecraft/block/entity/PistonBlockEntity;getFacing()Lnet/minecraft/util/math/Direction;
-
isSource
public boolean isSource()- Mappings:
Namespace Name Mixin selector official f
Lcny;f()Z
intermediary method_11515
Lnet/minecraft/class_2669;method_11515()Z
named isSource
Lnet/minecraft/block/entity/PistonBlockEntity;isSource()Z
-
getProgress
public float getProgress(float tickDelta) - Mappings:
Namespace Name Mixin selector official a
Lcny;a(F)F
intermediary method_11499
Lnet/minecraft/class_2669;method_11499(F)F
named getProgress
Lnet/minecraft/block/entity/PistonBlockEntity;getProgress(F)F
-
getRenderOffsetX
public float getRenderOffsetX(float tickDelta) - Mappings:
Namespace Name Mixin selector official b
Lcny;b(F)F
intermediary method_11494
Lnet/minecraft/class_2669;method_11494(F)F
named getRenderOffsetX
Lnet/minecraft/block/entity/PistonBlockEntity;getRenderOffsetX(F)F
-
getRenderOffsetY
public float getRenderOffsetY(float tickDelta) - Mappings:
Namespace Name Mixin selector official c
Lcny;c(F)F
intermediary method_11511
Lnet/minecraft/class_2669;method_11511(F)F
named getRenderOffsetY
Lnet/minecraft/block/entity/PistonBlockEntity;getRenderOffsetY(F)F
-
getRenderOffsetZ
public float getRenderOffsetZ(float tickDelta) - Mappings:
Namespace Name Mixin selector official d
Lcny;d(F)F
intermediary method_11507
Lnet/minecraft/class_2669;method_11507(F)F
named getRenderOffsetZ
Lnet/minecraft/block/entity/PistonBlockEntity;getRenderOffsetZ(F)F
-
getAmountExtended
private float getAmountExtended(float progress) - Mappings:
Namespace Name Mixin selector official e
Lcny;e(F)F
intermediary method_11504
Lnet/minecraft/class_2669;method_11504(F)F
named getAmountExtended
Lnet/minecraft/block/entity/PistonBlockEntity;getAmountExtended(F)F
-
getHeadBlockState
- Mappings:
Namespace Name Mixin selector official w
Lcny;w()Lcoc;
intermediary method_11496
Lnet/minecraft/class_2669;method_11496()Lnet/minecraft/class_2680;
named getHeadBlockState
Lnet/minecraft/block/entity/PistonBlockEntity;getHeadBlockState()Lnet/minecraft/block/BlockState;
-
pushEntities
private static void pushEntities(World world, BlockPos pos, float float2, PistonBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lcad;Lgh;FLcny;)V
intermediary method_11503
Lnet/minecraft/class_2669;method_11503(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;FLnet/minecraft/class_2669;)V
named pushEntities
Lnet/minecraft/block/entity/PistonBlockEntity;pushEntities(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;FLnet/minecraft/block/entity/PistonBlockEntity;)V
-
moveEntity
private static void moveEntity(Direction direction, Entity entity, double double2, Direction direction2) - Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lgm;Lawt;DLgm;)V
intermediary method_23672
Lnet/minecraft/class_2669;method_23672(Lnet/minecraft/class_2350;Lnet/minecraft/class_1297;DLnet/minecraft/class_2350;)V
named moveEntity
Lnet/minecraft/block/entity/PistonBlockEntity;moveEntity(Lnet/minecraft/util/math/Direction;Lnet/minecraft/entity/Entity;DLnet/minecraft/util/math/Direction;)V
-
moveEntitiesInHoneyBlock
private static void moveEntitiesInHoneyBlock(World world, BlockPos pos, float float2, PistonBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official b
Lcny;b(Lcad;Lgh;FLcny;)V
intermediary method_23674
Lnet/minecraft/class_2669;method_23674(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;FLnet/minecraft/class_2669;)V
named moveEntitiesInHoneyBlock
Lnet/minecraft/block/entity/PistonBlockEntity;moveEntitiesInHoneyBlock(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;FLnet/minecraft/block/entity/PistonBlockEntity;)V
-
canMoveEntity
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Ldoh;Lawt;)Z
intermediary method_23671
Lnet/minecraft/class_2669;method_23671(Lnet/minecraft/class_238;Lnet/minecraft/class_1297;)Z
named canMoveEntity
Lnet/minecraft/block/entity/PistonBlockEntity;canMoveEntity(Lnet/minecraft/util/math/Box;Lnet/minecraft/entity/Entity;)Z
-
isPushingHoneyBlock
private boolean isPushingHoneyBlock()- Mappings:
Namespace Name Mixin selector official x
Lcny;x()Z
intermediary method_23364
Lnet/minecraft/class_2669;method_23364()Z
named isPushingHoneyBlock
Lnet/minecraft/block/entity/PistonBlockEntity;isPushingHoneyBlock()Z
-
getMovementDirection
- Mappings:
Namespace Name Mixin selector official g
Lcny;g()Lgm;
intermediary method_11506
Lnet/minecraft/class_2669;method_11506()Lnet/minecraft/class_2350;
named getMovementDirection
Lnet/minecraft/block/entity/PistonBlockEntity;getMovementDirection()Lnet/minecraft/util/math/Direction;
-
getIntersectionSize
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Ldoh;Lgm;Ldoh;)D
intermediary method_11497
Lnet/minecraft/class_2669;method_11497(Lnet/minecraft/class_238;Lnet/minecraft/class_2350;Lnet/minecraft/class_238;)D
named getIntersectionSize
Lnet/minecraft/block/entity/PistonBlockEntity;getIntersectionSize(Lnet/minecraft/util/math/Box;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Box;)D
-
offsetHeadBox
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lgh;Ldoh;Lcny;)Ldoh;
intermediary method_11500
Lnet/minecraft/class_2669;method_11500(Lnet/minecraft/class_2338;Lnet/minecraft/class_238;Lnet/minecraft/class_2669;)Lnet/minecraft/class_238;
named offsetHeadBox
Lnet/minecraft/block/entity/PistonBlockEntity;offsetHeadBox(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Box;Lnet/minecraft/block/entity/PistonBlockEntity;)Lnet/minecraft/util/math/Box;
-
push
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lgh;Lawt;Lgm;D)V
intermediary method_11514
Lnet/minecraft/class_2669;method_11514(Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;Lnet/minecraft/class_2350;D)V
named push
Lnet/minecraft/block/entity/PistonBlockEntity;push(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Direction;D)V
-
getPushedBlock
- Mappings:
Namespace Name Mixin selector official i
Lcny;i()Lcoc;
intermediary method_11495
Lnet/minecraft/class_2669;method_11495()Lnet/minecraft/class_2680;
named getPushedBlock
Lnet/minecraft/block/entity/PistonBlockEntity;getPushedBlock()Lnet/minecraft/block/BlockState;
-
finish
public void finish()- Mappings:
Namespace Name Mixin selector official j
Lcny;j()V
intermediary method_11513
Lnet/minecraft/class_2669;method_11513()V
named finish
Lnet/minecraft/block/entity/PistonBlockEntity;finish()V
-
tick
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lcad;Lgh;Lcoc;Lcny;)V
intermediary method_31707
Lnet/minecraft/class_2669;method_31707(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2669;)V
named tick
Lnet/minecraft/block/entity/PistonBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/PistonBlockEntity;)V
-
readNbt
- Overrides:
readNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector official a
Lclz;a(Loc;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
writeNbt
- Overrides:
writeNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector official b
Lclz;b(Loc;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
getCollisionShape
- Mappings:
Namespace Name Mixin selector official a
Lcny;a(Lbzj;Lgh;)Ldpf;
intermediary method_11512
Lnet/minecraft/class_2669;method_11512(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;
named getCollisionShape
Lnet/minecraft/block/entity/PistonBlockEntity;getCollisionShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;
-
getSavedWorldTime
public long getSavedWorldTime()- Mappings:
Namespace Name Mixin selector official v
Lcny;v()J
intermediary method_11508
Lnet/minecraft/class_2669;method_11508()J
named getSavedWorldTime
Lnet/minecraft/block/entity/PistonBlockEntity;getSavedWorldTime()J
-