Package net.minecraft.block.entity
Class EndGatewayBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.EndPortalBlockEntity
net.minecraft.block.entity.EndGatewayBlockEntity
public class EndGatewayBlockEntity extends EndPortalBlockEntity
-
Field Summary
Fields Modifier and Type Field Description private longageprivate booleanexactTeleportprivate BlockPosexitPortalPosprivate static LoggerLOGGERprivate intteleportCooldownFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors Constructor Description EndGatewayBlockEntity(BlockPos blockPos, BlockState blockState) -
Method Summary
Modifier and Type Method Description static voidclientTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)private static voidcreatePortal(ServerWorld serverWorld, BlockPos blockPos, EndGatewayFeatureConfig endGatewayFeatureConfig)private static BlockPosfindBestPortalExitPos(World world, BlockPos blockPos)private static BlockPosfindExitPortalPos(BlockView world, BlockPos pos, int searchRadius, boolean bool)private static BlockPosfindPortalPosition(WorldChunk chunk)voidfromTag(CompoundTag tag)private static WorldChunkgetChunk(World world, Vec3d pos)floatgetCooldownBeamHeight(float tickDelta)intgetDrawnSidesCount()floatgetRecentlyGeneratedBeamHeight(float tickDelta)doublegetSquaredRenderDistance()booleanisRecentlyGenerated()static booleanmethod_30276(Entity entity)private static booleanmethod_31698(ServerWorld serverWorld, Vec3d vec3d)private static BlockPosmethod_31699(ServerWorld serverWorld, BlockPos blockPos)private static Vec3dmethod_31701(ServerWorld serverWorld, BlockPos blockPos)booleanneedsCooldownBeforeTeleporting()booleanonSyncedBlockEvent(int type, int data)static voidserverTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)voidsetExitPortalPos(BlockPos pos, boolean exactTeleport)booleanshouldDrawSide(Direction direction)private static voidstartTeleportCooldown(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)CompoundTagtoInitialChunkDataTag()CompoundTagtoTag(CompoundTag tag)BlockEntityUpdateS2CPackettoUpdatePacket()static voidtryTeleportingEntity(World world, BlockPos blockPos, BlockState blockState, Entity entity, EndGatewayBlockEntity endGatewayBlockEntity)Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, populateCrashReport, setCachedState, setWorld
-
Field Details
-
LOGGER
-
age
private long age -
teleportCooldown
private int teleportCooldown -
exitPortalPos
-
exactTeleport
private boolean exactTeleport
-
-
Constructor Details
-
EndGatewayBlockEntity
-
-
Method Details
-
toTag
- Overrides:
toTagin classBlockEntity
-
fromTag
- Overrides:
fromTagin classBlockEntity
-
getSquaredRenderDistance
@Environment(CLIENT) public double getSquaredRenderDistance()- Overrides:
getSquaredRenderDistancein classBlockEntity
-
clientTick
public static void clientTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity) -
serverTick
public static void serverTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity) -
method_30276
-
isRecentlyGenerated
public boolean isRecentlyGenerated() -
needsCooldownBeforeTeleporting
public boolean needsCooldownBeforeTeleporting() -
getRecentlyGeneratedBeamHeight
@Environment(CLIENT) public float getRecentlyGeneratedBeamHeight(float tickDelta) -
getCooldownBeamHeight
@Environment(CLIENT) public float getCooldownBeamHeight(float tickDelta) -
toUpdatePacket
- Overrides:
toUpdatePacketin classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTagin classBlockEntity
-
startTeleportCooldown
private static void startTeleportCooldown(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity) -
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data)- Overrides:
onSyncedBlockEventin classBlockEntity
-
tryTeleportingEntity
public static void tryTeleportingEntity(World world, BlockPos blockPos, BlockState blockState, Entity entity, EndGatewayBlockEntity endGatewayBlockEntity) -
findBestPortalExitPos
-
method_31699
-
method_31701
-
method_31698
-
findExitPortalPos
-
getChunk
-
findPortalPosition
-
createPortal
private static void createPortal(ServerWorld serverWorld, BlockPos blockPos, EndGatewayFeatureConfig endGatewayFeatureConfig) -
shouldDrawSide
- Overrides:
shouldDrawSidein classEndPortalBlockEntity
-
getDrawnSidesCount
@Environment(CLIENT) public int getDrawnSidesCount() -
setExitPortalPos
-