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:
TypedInstance<BlockEntityType<?>>, DebugValueSource, IAttachmentHolder, IBlockEntityExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class AttachmentHolder
AttachmentHolder.AsFieldNested classes/interfaces inherited from interface DebugValueSource
DebugValueSource.Registration, DebugValueSource.ValueGetter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate static final intprivate static final intprivate static final longprivate static final booleanprivate static final intprivate booleanprivate @Nullable BlockPosprivate static final intprivate static final org.slf4j.Loggerprivate static final intprivate intFields inherited from class BlockEntity
level, remove, worldPositionFields inherited from class AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbeamAnimationTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity entity) private static Vec3findExitPortalXZPosTentative(ServerLevel level, BlockPos endGatewayPos) private static BlockPosfindExitPosition(Level level, BlockPos exitPortal) private static BlockPosfindOrCreateValidTeleportPos(ServerLevel level, BlockPos endGatewayPos) private static BlockPosfindTallestBlock(BlockGetter level, BlockPos around, int dist, boolean allowBedrock) private static @Nullable BlockPosfindValidSpawnInChunk(LevelChunk chunk) private static LevelChunkfloatgetCooldownPercent(float a) int@Nullable Vec3getPortalPosition(ServerLevel currentLevel, BlockPos portalEntryPos) floatgetSpawnPercent(float a) getUpdateTag(HolderLookup.Provider registries) private static booleanisChunkEmpty(ServerLevel level, Vec3 xzPos) booleanbooleanprotected voidloadAdditional(ValueInput input) static voidportalTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity entity) protected voidsaveAdditional(ValueOutput output) voidsetExitPosition(BlockPos exactPosition, boolean exact) booleanshouldRenderFace(Direction direction) private static voidspawnGatewayPortal(ServerLevel level, BlockPos portalPos, EndGatewayConfiguration config) static voidtriggerCooldown(Level level, BlockPos pos, BlockState blockState, TheEndGatewayBlockEntity entity) booleantriggerEvent(int b0, int b1) Methods inherited from class BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getAndClearAttachmentTypesToSync, getBlockPos, getBlockState, getLevel, getNameForReporting, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, preRemoveSideEffects, problemPath, registerDebugValues, removeComponentsFromTag, removeData, saveCustomOnly, saveCustomOnly, saveWithFullMetadata, saveWithFullMetadata, saveWithId, saveWithoutMetadata, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, syncData, typeHolderMethods inherited from class AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface 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:
-
DEFAULT_AGE
private static final long DEFAULT_AGE- See Also:
-
DEFAULT_EXACT_TELEPORT
private static final boolean DEFAULT_EXACT_TELEPORT- 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 entity) -
portalTick
public static void portalTick(Level level, BlockPos pos, BlockState state, TheEndGatewayBlockEntity entity) -
isSpawning
public boolean isSpawning() -
isCoolingDown
public boolean isCoolingDown() -
getSpawnPercent
public float getSpawnPercent(float a) -
getCooldownPercent
public float getCooldownPercent(float a) -
getUpdatePacket
- Overrides:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
triggerCooldown
public static void triggerCooldown(Level level, BlockPos pos, BlockState blockState, TheEndGatewayBlockEntity entity) -
triggerEvent
public boolean triggerEvent(int b0, int b1) - Overrides:
triggerEventin classBlockEntity
-
getPortalPosition
-
findExitPosition
-
findOrCreateValidTeleportPos
-
findExitPortalXZPosTentative
-
isChunkEmpty
-
findTallestBlock
private static BlockPos findTallestBlock(BlockGetter level, BlockPos around, int dist, boolean allowBedrock) -
getChunk
-
findValidSpawnInChunk
-
spawnGatewayPortal
private static void spawnGatewayPortal(ServerLevel level, BlockPos portalPos, EndGatewayConfiguration config) -
shouldRenderFace
- Overrides:
shouldRenderFacein classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-