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 pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) private static Vec3
findExitPortalXZPosTentative
(ServerLevel pLevel, BlockPos pPos) private static BlockPos
findExitPosition
(Level pLevel, BlockPos pPos) private static BlockPos
findOrCreateValidTeleportPos
(ServerLevel pLevel, BlockPos pPos) private static BlockPos
findTallestBlock
(BlockGetter pLevel, BlockPos pPos, int pRadius, boolean pAllowBedrock) private static BlockPos
findValidSpawnInChunk
(LevelChunk pChunk) private static LevelChunk
float
getCooldownPercent
(float pPartialTicks) int
getPortalPosition
(ServerLevel pLevel, BlockPos pPos) float
getSpawnPercent
(float pPartialTicks) getUpdateTag
(HolderLookup.Provider pRegistries) private static boolean
isChunkEmpty
(ServerLevel pLevel, Vec3 pPos) boolean
boolean
protected void
loadAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) static void
portalTick
(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) protected void
saveAdditional
(CompoundTag pTag, HolderLookup.Provider pRegistries) void
setExitPosition
(BlockPos pExitPortal, boolean pExactTeleport) boolean
shouldRenderFace
(Direction pFace) private static void
spawnGatewayPortal
(ServerLevel pLevel, BlockPos pPos, EndGatewayConfiguration pConfig) static void
triggerCooldown
(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) boolean
triggerEvent
(int pId, int pType) 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 pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) -
portalTick
public static void portalTick(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) -
isSpawning
public boolean isSpawning() -
isCoolingDown
public boolean isCoolingDown() -
getSpawnPercent
public float getSpawnPercent(float pPartialTicks) -
getCooldownPercent
public float getCooldownPercent(float pPartialTicks) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
triggerCooldown
public static void triggerCooldown(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) -
triggerEvent
public boolean triggerEvent(int pId, int pType) - Overrides:
triggerEvent
in classBlockEntity
-
getPortalPosition
-
findExitPosition
-
findOrCreateValidTeleportPos
-
findExitPortalXZPosTentative
-
isChunkEmpty
-
findTallestBlock
private static BlockPos findTallestBlock(BlockGetter pLevel, BlockPos pPos, int pRadius, boolean pAllowBedrock) -
getChunk
-
findValidSpawnInChunk
-
spawnGatewayPortal
private static void spawnGatewayPortal(ServerLevel pLevel, BlockPos pPos, EndGatewayConfiguration pConfig) -
shouldRenderFace
- Overrides:
shouldRenderFace
in classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-