Class EndGatewayBlockEntity
- Mappings:
Namespace Name official dbb
intermediary net/minecraft/class_2643
named net/minecraft/block/entity/EndGatewayBlockEntity
-
Field Summary
Modifier and TypeFieldDescriptionprivate long
private boolean
private static final int
private static final int
private static final int
private static final int
private static final int
private static final Logger
private int
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canTeleport
(Entity entity) static void
clientTick
(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) private static void
createPortal
(ServerWorld world, BlockPos pos, EndGatewayFeatureConfig config) private static BlockPos
findBestPortalExitPos
(World world, BlockPos pos) private static BlockPos
findExitPortalPos
(BlockView world, BlockPos pos, int searchRadius, boolean force) findPortalPosition
(WorldChunk chunk) private static Vec3d
findTeleportLocation
(ServerWorld world, BlockPos pos) private static WorldChunk
float
getCooldownBeamHeight
(float tickDelta) int
float
getRecentlyGeneratedBeamHeight
(float tickDelta) private static boolean
isChunkEmpty
(ServerWorld world, Vec3d pos) boolean
boolean
boolean
onSyncedBlockEvent
(int type, int data) If this block entity's block extendsBlockWithEntity
, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int)
.void
readNbt
(NbtCompound nbt) Reads data fromnbt
.static void
serverTick
(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) void
setExitPortalPos
(BlockPos pos, boolean exactTeleport) private static BlockPos
setupExitPortalLocation
(ServerWorld world, BlockPos pos) Finds teleport location and creates an island to teleport to (if there is none).boolean
shouldDrawSide
(Direction direction) private static void
startTeleportCooldown
(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornull
to not send the packet.static void
tryTeleportingEntity
(World world, BlockPos pos, BlockState state, Entity entity, EndGatewayBlockEntity blockEntity) protected void
writeNbt
(NbtCompound nbt) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a:Lorg/slf4j/Logger;
intermediary field_12133
Lnet/minecraft/class_2643;field_12133:Lorg/slf4j/Logger;
named LOGGER
Lnet/minecraft/block/entity/EndGatewayBlockEntity;LOGGER:Lorg/slf4j/Logger;
-
field_31368
private static final int field_31368- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ldbb;b:I
intermediary field_31368
Lnet/minecraft/class_2643;field_31368:I
named field_31368
Lnet/minecraft/block/entity/EndGatewayBlockEntity;field_31368:I
-
field_31369
private static final int field_31369- See Also:
- Mappings:
Namespace Name Mixin selector official c
Ldbb;c:I
intermediary field_31369
Lnet/minecraft/class_2643;field_31369:I
named field_31369
Lnet/minecraft/block/entity/EndGatewayBlockEntity;field_31369:I
-
field_31370
private static final int field_31370- See Also:
- Mappings:
Namespace Name Mixin selector official d
Ldbb;d:I
intermediary field_31370
Lnet/minecraft/class_2643;field_31370:I
named field_31370
Lnet/minecraft/block/entity/EndGatewayBlockEntity;field_31370:I
-
field_31371
private static final int field_31371- See Also:
- Mappings:
Namespace Name Mixin selector official e
Ldbb;e:I
intermediary field_31371
Lnet/minecraft/class_2643;field_31371:I
named field_31371
Lnet/minecraft/block/entity/EndGatewayBlockEntity;field_31371:I
-
field_31372
private static final int field_31372- See Also:
- Mappings:
Namespace Name Mixin selector official f
Ldbb;f:I
intermediary field_31372
Lnet/minecraft/class_2643;field_31372:I
named field_31372
Lnet/minecraft/block/entity/EndGatewayBlockEntity;field_31372:I
-
age
private long age- Mappings:
Namespace Name Mixin selector official g
Ldbb;g:J
intermediary field_12131
Lnet/minecraft/class_2643;field_12131:J
named age
Lnet/minecraft/block/entity/EndGatewayBlockEntity;age:J
-
teleportCooldown
private int teleportCooldown- Mappings:
Namespace Name Mixin selector official h
Ldbb;h:I
intermediary field_12130
Lnet/minecraft/class_2643;field_12130:I
named teleportCooldown
Lnet/minecraft/block/entity/EndGatewayBlockEntity;teleportCooldown:I
-
exitPortalPos
- Mappings:
Namespace Name Mixin selector official i
Ldbb;i:Lgu;
intermediary field_12132
Lnet/minecraft/class_2643;field_12132:Lnet/minecraft/class_2338;
named exitPortalPos
Lnet/minecraft/block/entity/EndGatewayBlockEntity;exitPortalPos:Lnet/minecraft/util/math/BlockPos;
-
exactTeleport
private boolean exactTeleport- Mappings:
Namespace Name Mixin selector official j
Ldbb;j:Z
intermediary field_12129
Lnet/minecraft/class_2643;field_12129:Z
named exactTeleport
Lnet/minecraft/block/entity/EndGatewayBlockEntity;exactTeleport:Z
-
-
Constructor Details
-
EndGatewayBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Ldbc;<init>(Lgu;Ldcb;)V
intermediary <init>
Lnet/minecraft/class_2640;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named <init>
Lnet/minecraft/block/entity/EndPortalBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
writeNbt
Writes data tonbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lczn;b(Lqr;)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
-
readNbt
Reads data fromnbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbt
might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lczn;a(Lqr;)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
-
clientTick
public static void clientTick(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lcmm;Lgu;Ldcb;Ldbb;)V
intermediary method_31700
Lnet/minecraft/class_2643;method_31700(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2643;)V
named clientTick
Lnet/minecraft/block/entity/EndGatewayBlockEntity;clientTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/EndGatewayBlockEntity;)V
-
serverTick
public static void serverTick(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official b
Ldbb;b(Lcmm;Lgu;Ldcb;Ldbb;)V
intermediary method_31702
Lnet/minecraft/class_2643;method_31702(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2643;)V
named serverTick
Lnet/minecraft/block/entity/EndGatewayBlockEntity;serverTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/EndGatewayBlockEntity;)V
-
canTeleport
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lbfj;)Z
intermediary method_30276
Lnet/minecraft/class_2643;method_30276(Lnet/minecraft/class_1297;)Z
named canTeleport
Lnet/minecraft/block/entity/EndGatewayBlockEntity;canTeleport(Lnet/minecraft/entity/Entity;)Z
-
isRecentlyGenerated
public boolean isRecentlyGenerated()- Mappings:
Namespace Name Mixin selector official c
Ldbb;c()Z
intermediary method_11420
Lnet/minecraft/class_2643;method_11420()Z
named isRecentlyGenerated
Lnet/minecraft/block/entity/EndGatewayBlockEntity;isRecentlyGenerated()Z
-
needsCooldownBeforeTeleporting
public boolean needsCooldownBeforeTeleporting()- Mappings:
Namespace Name Mixin selector official d
Ldbb;d()Z
intermediary method_11421
Lnet/minecraft/class_2643;method_11421()Z
named needsCooldownBeforeTeleporting
Lnet/minecraft/block/entity/EndGatewayBlockEntity;needsCooldownBeforeTeleporting()Z
-
getRecentlyGeneratedBeamHeight
public float getRecentlyGeneratedBeamHeight(float tickDelta) - Mappings:
Namespace Name Mixin selector official a
Ldbb;a(F)F
intermediary method_11417
Lnet/minecraft/class_2643;method_11417(F)F
named getRecentlyGeneratedBeamHeight
Lnet/minecraft/block/entity/EndGatewayBlockEntity;getRecentlyGeneratedBeamHeight(F)F
-
getCooldownBeamHeight
public float getCooldownBeamHeight(float tickDelta) - Mappings:
Namespace Name Mixin selector official b
Ldbb;b(F)F
intermediary method_11412
Lnet/minecraft/class_2643;method_11412(F)F
named getCooldownBeamHeight
Lnet/minecraft/block/entity/EndGatewayBlockEntity;getCooldownBeamHeight(F)F
-
toUpdatePacket
Description copied from class:BlockEntity
Returns the packet to send to nearby players when the block entity's observable state changes, ornull
to not send the packet.If the data returned by
initial chunk data
is suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this)
. The NBT will be passed toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound)
on the client."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity
's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To sync block entity data using this method, use
serverWorld.getChunkManager().markForUpdate(this.getPos());
.- Overrides:
toUpdatePacket
in classBlockEntity
- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
null
to not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector official f
Ldbb;f()Luz;
intermediary method_38253
Lnet/minecraft/class_2643;method_38253()Lnet/minecraft/class_2622;
named toUpdatePacket
Lnet/minecraft/block/entity/EndGatewayBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
-
toInitialChunkDataNbt
Returns the serialized state of this block entity that is observable by clients.This is sent alongside the initial chunk data, as well as when the block entity implements
BlockEntity.toUpdatePacket()
and decides to use the defaultBlockEntityUpdateS2CPacket
."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity
's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To send all NBT data of this block entity saved to disk, return
BlockEntity.createNbt()
.- Overrides:
toInitialChunkDataNbt
in classBlockEntity
- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector official ao_
Lczn;ao_()Lqr;
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;
-
startTeleportCooldown
private static void startTeleportCooldown(World world, BlockPos pos, BlockState state, EndGatewayBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official c
Ldbb;c(Lcmm;Lgu;Ldcb;Ldbb;)V
intermediary method_11411
Lnet/minecraft/class_2643;method_11411(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2643;)V
named startTeleportCooldown
Lnet/minecraft/block/entity/EndGatewayBlockEntity;startTeleportCooldown(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/EndGatewayBlockEntity;)V
-
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data) If this block entity's block extendsBlockWithEntity
, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int)
.- Overrides:
onSyncedBlockEvent
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a_
Lczn;a_(II)Z
intermediary method_11004
Lnet/minecraft/class_2586;method_11004(II)Z
named onSyncedBlockEvent
Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
-
tryTeleportingEntity
public static void tryTeleportingEntity(World world, BlockPos pos, BlockState state, Entity entity, EndGatewayBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lcmm;Lgu;Ldcb;Lbfj;Ldbb;)V
intermediary method_11409
Lnet/minecraft/class_2643;method_11409(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1297;Lnet/minecraft/class_2643;)V
named tryTeleportingEntity
Lnet/minecraft/block/entity/EndGatewayBlockEntity;tryTeleportingEntity(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;Lnet/minecraft/block/entity/EndGatewayBlockEntity;)V
-
findBestPortalExitPos
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lcmm;Lgu;)Lgu;
intermediary method_11419
Lnet/minecraft/class_2643;method_11419(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
named findBestPortalExitPos
Lnet/minecraft/block/entity/EndGatewayBlockEntity;findBestPortalExitPos(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;
-
setupExitPortalLocation
Finds teleport location and creates an island to teleport to (if there is none).This does not create an exit portal.
- Returns:
- the position of the exit portal
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Laif;Lgu;)Lgu;
intermediary method_31699
Lnet/minecraft/class_2643;method_31699(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
named setupExitPortalLocation
Lnet/minecraft/block/entity/EndGatewayBlockEntity;setupExitPortalLocation(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;
-
findTeleportLocation
- Mappings:
Namespace Name Mixin selector official b
Ldbb;b(Laif;Lgu;)Leei;
intermediary method_31701
Lnet/minecraft/class_2643;method_31701(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Lnet/minecraft/class_243;
named findTeleportLocation
Lnet/minecraft/block/entity/EndGatewayBlockEntity;findTeleportLocation(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Vec3d;
-
isChunkEmpty
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Laif;Leei;)Z
intermediary method_31698
Lnet/minecraft/class_2643;method_31698(Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
named isChunkEmpty
Lnet/minecraft/block/entity/EndGatewayBlockEntity;isChunkEmpty(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
-
findExitPortalPos
private static BlockPos findExitPortalPos(BlockView world, BlockPos pos, int searchRadius, boolean force) - Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lcls;Lgu;IZ)Lgu;
intermediary method_11410
Lnet/minecraft/class_2643;method_11410(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;IZ)Lnet/minecraft/class_2338;
named findExitPortalPos
Lnet/minecraft/block/entity/EndGatewayBlockEntity;findExitPortalPos(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;IZ)Lnet/minecraft/util/math/BlockPos;
-
getChunk
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lcmm;Leei;)Ldei;
intermediary method_11414
Lnet/minecraft/class_2643;method_11414(Lnet/minecraft/class_1937;Lnet/minecraft/class_243;)Lnet/minecraft/class_2818;
named getChunk
Lnet/minecraft/block/entity/EndGatewayBlockEntity;getChunk(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/world/chunk/WorldChunk;
-
findPortalPosition
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Ldei;)Lgu;
intermediary method_11413
Lnet/minecraft/class_2643;method_11413(Lnet/minecraft/class_2818;)Lnet/minecraft/class_2338;
named findPortalPosition
Lnet/minecraft/block/entity/EndGatewayBlockEntity;findPortalPosition(Lnet/minecraft/world/chunk/WorldChunk;)Lnet/minecraft/util/math/BlockPos;
-
createPortal
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Laif;Lgu;Ldmr;)V
intermediary method_11416
Lnet/minecraft/class_2643;method_11416(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_3018;)V
named createPortal
Lnet/minecraft/block/entity/EndGatewayBlockEntity;createPortal(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/EndGatewayFeatureConfig;)V
-
shouldDrawSide
- Overrides:
shouldDrawSide
in classEndPortalBlockEntity
- Mappings:
Namespace Name Mixin selector official a
Ldbc;a(Lha;)Z
intermediary method_11400
Lnet/minecraft/class_2640;method_11400(Lnet/minecraft/class_2350;)Z
named shouldDrawSide
Lnet/minecraft/block/entity/EndPortalBlockEntity;shouldDrawSide(Lnet/minecraft/util/math/Direction;)Z
-
getDrawnSidesCount
public int getDrawnSidesCount()- Mappings:
Namespace Name Mixin selector official g
Ldbb;g()I
intermediary method_11415
Lnet/minecraft/class_2643;method_11415()I
named getDrawnSidesCount
Lnet/minecraft/block/entity/EndGatewayBlockEntity;getDrawnSidesCount()I
-
setExitPortalPos
- Mappings:
Namespace Name Mixin selector official a
Ldbb;a(Lgu;Z)V
intermediary method_11418
Lnet/minecraft/class_2643;method_11418(Lnet/minecraft/class_2338;Z)V
named setExitPortalPos
Lnet/minecraft/block/entity/EndGatewayBlockEntity;setExitPortalPos(Lnet/minecraft/util/math/BlockPos;Z)V
-