Class TheEndGatewayBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.TheEndPortalBlockEntity
net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
-
Field Summary
Modifier and TypeFieldDescriptionprivate long
private static int
private static int
private static int
private boolean
private BlockPos
private static int
private static org.apache.logging.log4j.Logger
private static int
private int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
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_)
private static boolean
isChunkEmpty(ServerLevel p_155816_, Vec3 p_155817_)
boolean
boolean
void
load(CompoundTag p_155840_)
save(CompoundTag p_59961_)
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
clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, setBlockState, setChanged, setChanged, setLevel, setRemoved
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
SPAWN_TIME
private static final int SPAWN_TIME- See Also:
- Constant Field Values
-
COOLDOWN_TIME
private static final int COOLDOWN_TIME- See Also:
- Constant Field Values
-
ATTENTION_INTERVAL
private static final int ATTENTION_INTERVAL- See Also:
- Constant Field Values
-
EVENT_COOLDOWN
private static final int EVENT_COOLDOWN- See Also:
- Constant Field Values
-
GATEWAY_HEIGHT_ABOVE_SURFACE
private static final int GATEWAY_HEIGHT_ABOVE_SURFACE- See Also:
- Constant Field Values
-
age
private long age -
teleportCooldown
private int teleportCooldown -
exitPortal
-
exactTeleport
private boolean exactTeleport
-
-
Constructor Details
-
TheEndGatewayBlockEntity
-
-
Method Details
-
save
- Overrides:
save
in classBlockEntity
-
load
- Overrides:
load
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
-