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 long
age
private boolean
exactTeleport
private BlockPos
exitPortalPos
private static Logger
LOGGER
private int
teleportCooldown
Fields 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 void
clientTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)
private static void
createPortal(ServerWorld serverWorld, BlockPos blockPos, EndGatewayFeatureConfig endGatewayFeatureConfig)
private static BlockPos
findBestPortalExitPos(World world, BlockPos blockPos)
private static BlockPos
findExitPortalPos(BlockView world, BlockPos pos, int searchRadius, boolean bool)
private static BlockPos
findPortalPosition(WorldChunk chunk)
void
fromTag(CompoundTag tag)
private static WorldChunk
getChunk(World world, Vec3d pos)
float
getCooldownBeamHeight(float tickDelta)
int
getDrawnSidesCount()
float
getRecentlyGeneratedBeamHeight(float tickDelta)
double
getSquaredRenderDistance()
boolean
isRecentlyGenerated()
static boolean
method_30276(Entity entity)
private static boolean
method_31698(ServerWorld serverWorld, Vec3d vec3d)
private static BlockPos
method_31699(ServerWorld serverWorld, BlockPos blockPos)
private static Vec3d
method_31701(ServerWorld serverWorld, BlockPos blockPos)
boolean
needsCooldownBeforeTeleporting()
boolean
onSyncedBlockEvent(int type, int data)
static void
serverTick(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)
void
setExitPortalPos(BlockPos pos, boolean exactTeleport)
boolean
shouldDrawSide(Direction direction)
private static void
startTeleportCooldown(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity)
CompoundTag
toInitialChunkDataTag()
CompoundTag
toTag(CompoundTag tag)
BlockEntityUpdateS2CPacket
toUpdatePacket()
static void
tryTeleportingEntity(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:
toTag
in classBlockEntity
-
fromTag
- Overrides:
fromTag
in classBlockEntity
-
getSquaredRenderDistance
@Environment(CLIENT) public double getSquaredRenderDistance()- Overrides:
getSquaredRenderDistance
in 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:
toUpdatePacket
in classBlockEntity
-
toInitialChunkDataTag
- Overrides:
toInitialChunkDataTag
in classBlockEntity
-
startTeleportCooldown
private static void startTeleportCooldown(World world, BlockPos blockPos, BlockState blockState, EndGatewayBlockEntity endGatewayBlockEntity) -
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data)- Overrides:
onSyncedBlockEvent
in 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:
shouldDrawSide
in classEndPortalBlockEntity
-
getDrawnSidesCount
@Environment(CLIENT) public int getDrawnSidesCount() -
setExitPortalPos
-