Class TheEndGatewayBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.TheEndPortalBlockEntity
net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity
- All Implemented Interfaces:
IAttachmentHolder
,IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private static final int
private static final int
private static final int
private boolean
private BlockPos
private static final int
private static final org.slf4j.Logger
private static final int
private int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
beamAnimationTick
(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) private static Vec3
findExitPortalXZPosTentative
(ServerLevel level, BlockPos pos) private static BlockPos
findExitPosition
(Level level, BlockPos pos) private static BlockPos
findOrCreateValidTeleportPos
(ServerLevel level, BlockPos pos) private static BlockPos
findTallestBlock
(BlockGetter level, BlockPos pos, int radius, boolean allowBedrock) private static BlockPos
findValidSpawnInChunk
(LevelChunk chunk) private static LevelChunk
float
getCooldownPercent
(float partialTicks) int
getPortalPosition
(ServerLevel level, BlockPos pos) float
getSpawnPercent
(float partialTicks) getUpdateTag
(HolderLookup.Provider registries) private static boolean
isChunkEmpty
(ServerLevel level, Vec3 pos) boolean
boolean
protected void
loadAdditional
(CompoundTag tag, HolderLookup.Provider registries) static void
portalTick
(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) protected void
saveAdditional
(CompoundTag tag, HolderLookup.Provider registries) void
setExitPosition
(BlockPos exitPortal, boolean exactTeleport) boolean
shouldRenderFace
(Direction face) private static void
spawnGatewayPortal
(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) static void
triggerCooldown
(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) boolean
triggerEvent
(int id, int type) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SPAWN_TIME
private static final int SPAWN_TIME- See Also:
-
COOLDOWN_TIME
private static final int COOLDOWN_TIME- See Also:
-
ATTENTION_INTERVAL
private static final int ATTENTION_INTERVAL- See Also:
-
EVENT_COOLDOWN
private static final int EVENT_COOLDOWN- See Also:
-
GATEWAY_HEIGHT_ABOVE_SURFACE
private static final int GATEWAY_HEIGHT_ABOVE_SURFACE- See Also:
-
age
private long age -
teleportCooldown
private int teleportCooldown -
exitPortal
-
exactTeleport
private boolean exactTeleport
-
-
Constructor Details
-
TheEndGatewayBlockEntity
-
-
Method Details
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
beamAnimationTick
public static void beamAnimationTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) -
portalTick
public static void portalTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) -
isSpawning
public boolean isSpawning() -
isCoolingDown
public boolean isCoolingDown() -
getSpawnPercent
public float getSpawnPercent(float partialTicks) -
getCooldownPercent
public float getCooldownPercent(float partialTicks) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
triggerCooldown
public static void triggerCooldown(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) -
triggerEvent
public boolean triggerEvent(int id, int type) - Overrides:
triggerEvent
in classBlockEntity
-
getPortalPosition
-
findExitPosition
-
findOrCreateValidTeleportPos
-
findExitPortalXZPosTentative
-
isChunkEmpty
-
findTallestBlock
private static BlockPos findTallestBlock(BlockGetter level, BlockPos pos, int radius, boolean allowBedrock) -
getChunk
-
findValidSpawnInChunk
-
spawnGatewayPortal
private static void spawnGatewayPortal(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) -
shouldRenderFace
- Overrides:
shouldRenderFace
in classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-