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 pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) private static Vec3findExitPortalXZPosTentative(ServerLevel pLevel, BlockPos pPos) private static BlockPosfindExitPosition(Level pLevel, BlockPos pPos) private static BlockPosfindOrCreateValidTeleportPos(ServerLevel pLevel, BlockPos pPos) private static BlockPosfindTallestBlock(BlockGetter pLevel, BlockPos pPos, int pRadius, boolean pAllowBedrock) private static BlockPosfindValidSpawnInChunk(LevelChunk pChunk) private static LevelChunkfloatgetCooldownPercent(float pPartialTicks) intgetPortalPosition(ServerLevel pLevel, BlockPos pPos) floatgetSpawnPercent(float pPartialTicks) getUpdateTag(HolderLookup.Provider pRegistries) private static booleanisChunkEmpty(ServerLevel pLevel, Vec3 pPos) booleanbooleanprotected voidloadAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) static voidportalTick(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) protected voidsaveAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) voidsetExitPosition(BlockPos pExitPortal, boolean pExactTeleport) booleanshouldRenderFace(Direction pFace) private static voidspawnGatewayPortal(ServerLevel pLevel, BlockPos pPos, EndGatewayConfiguration pConfig) static voidtriggerCooldown(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) booleantriggerEvent(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, syncDataMethods 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, setData, syncDataMethods 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 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:
getUpdatePacketin classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTagin classBlockEntity
-
triggerCooldown
public static void triggerCooldown(Level pLevel, BlockPos pPos, BlockState pState, TheEndGatewayBlockEntity pBlockEntity) -
triggerEvent
public boolean triggerEvent(int pId, int pType) - Overrides:
triggerEventin 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:
shouldRenderFacein classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-