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.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate static final intprivate static final intprivate static final intprivate booleanprivate BlockPosprivate static final intprivate static final org.slf4j.Loggerprivate static final intprivate intFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbeamAnimationTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) private static Vec3findExitPortalXZPosTentative(ServerLevel level, BlockPos pos) private static BlockPosfindExitPosition(Level level, BlockPos pos) private static BlockPosfindOrCreateValidTeleportPos(ServerLevel level, BlockPos pos) private static BlockPosfindTallestBlock(BlockGetter level, BlockPos pos, int radius, boolean allowBedrock) private static BlockPosfindValidSpawnInChunk(LevelChunk chunk) private static LevelChunkfloatgetCooldownPercent(float partialTicks) intgetPortalPosition(ServerLevel level, BlockPos pos) floatgetSpawnPercent(float partialTicks) getUpdateTag(HolderLookup.Provider registries) private static booleanisChunkEmpty(ServerLevel level, Vec3 pos) booleanbooleanprotected voidloadAdditional(CompoundTag tag, HolderLookup.Provider registries) static voidportalTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) protected voidsaveAdditional(CompoundTag tag, HolderLookup.Provider registries) voidsetExitPosition(BlockPos exitPortal, boolean exactTeleport) booleanshouldRenderFace(Direction face) private static voidspawnGatewayPortal(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) static voidtriggerCooldown(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) booleantriggerEvent(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, setRemovedMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods 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:
saveAdditionalin classBlockEntity
-
loadAdditional
- Overrides:
loadAdditionalin 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:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
triggerCooldown
public static void triggerCooldown(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity blockEntity) -
triggerEvent
public boolean triggerEvent(int id, int type) - Overrides:
triggerEventin 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:
shouldRenderFacein classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-