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
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
beamAnimationTick
(Level p_155835_, BlockPos p_155836_, BlockState p_155837_, TheEndGatewayBlockEntity p_155838_) static boolean
canEntityTeleport
(Entity p_59941_) private static Vec3
findExitPortalXZPosTentative
(ServerLevel p_155842_, BlockPos p_155843_) private static BlockPos
findExitPosition
(Level p_155826_, BlockPos p_155827_) private static BlockPos
findOrCreateValidTeleportPos
(ServerLevel p_155819_, BlockPos p_155820_) private static BlockPos
findTallestBlock
(BlockGetter p_59943_, BlockPos p_59944_, int p_59945_, boolean p_59946_) private static BlockPos
findValidSpawnInChunk
(LevelChunk p_59954_) private static LevelChunk
float
getCooldownPercent
(float p_59968_) int
float
getSpawnPercent
(float p_59934_) getUpdateTag
(HolderLookup.Provider p_324313_) private static boolean
isChunkEmpty
(ServerLevel p_155816_, Vec3 p_155817_) boolean
boolean
protected void
loadAdditional
(CompoundTag p_155840_, HolderLookup.Provider p_323480_) protected void
saveAdditional
(CompoundTag p_187527_, HolderLookup.Provider p_324553_) void
setExitPosition
(BlockPos p_59956_, boolean p_59957_) boolean
shouldRenderFace
(Direction p_59959_) private static void
spawnGatewayPortal
(ServerLevel p_155822_, BlockPos p_155823_, EndGatewayConfiguration p_155824_) static void
teleportEntity
(Level p_155829_, BlockPos p_155830_, BlockState p_155831_, Entity p_155832_, TheEndGatewayBlockEntity p_155833_) static void
teleportTick
(Level p_155845_, BlockPos p_155846_, BlockState p_155847_, TheEndGatewayBlockEntity p_155848_) private static void
triggerCooldown
(Level p_155850_, BlockPos p_155851_, BlockState p_155852_, TheEndGatewayBlockEntity p_155853_) boolean
triggerEvent
(int p_59963_, int p_59964_) 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, 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, getExistingData, 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, 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 p_155835_, BlockPos p_155836_, BlockState p_155837_, TheEndGatewayBlockEntity p_155838_) -
teleportTick
public static void teleportTick(Level p_155845_, BlockPos p_155846_, BlockState p_155847_, TheEndGatewayBlockEntity p_155848_) -
canEntityTeleport
-
isSpawning
public boolean isSpawning() -
isCoolingDown
public boolean isCoolingDown() -
getSpawnPercent
public float getSpawnPercent(float p_59934_) -
getCooldownPercent
public float getCooldownPercent(float p_59968_) -
getUpdatePacket
- Overrides:
getUpdatePacket
in classBlockEntity
-
getUpdateTag
- Overrides:
getUpdateTag
in classBlockEntity
-
triggerCooldown
private static void triggerCooldown(Level p_155850_, BlockPos p_155851_, BlockState p_155852_, TheEndGatewayBlockEntity p_155853_) -
triggerEvent
public boolean triggerEvent(int p_59963_, int p_59964_) - Overrides:
triggerEvent
in classBlockEntity
-
teleportEntity
public static void teleportEntity(Level p_155829_, BlockPos p_155830_, BlockState p_155831_, Entity p_155832_, TheEndGatewayBlockEntity p_155833_) -
findExitPosition
-
findOrCreateValidTeleportPos
-
findExitPortalXZPosTentative
-
isChunkEmpty
-
findTallestBlock
private static BlockPos findTallestBlock(BlockGetter p_59943_, BlockPos p_59944_, int p_59945_, boolean p_59946_) -
getChunk
-
findValidSpawnInChunk
-
spawnGatewayPortal
private static void spawnGatewayPortal(ServerLevel p_155822_, BlockPos p_155823_, EndGatewayConfiguration p_155824_) -
shouldRenderFace
- Overrides:
shouldRenderFace
in classTheEndPortalBlockEntity
-
getParticleAmount
public int getParticleAmount() -
setExitPosition
-