Package net.minecraft.tileentity
Class EndGatewayTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.EndPortalTileEntity
-
- net.minecraft.tileentity.EndGatewayTileEntity
-
- All Implemented Interfaces:
ITickableTileEntity
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class EndGatewayTileEntity extends EndPortalTileEntity implements ITickableTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private long
age
private boolean
exactTeleport
private BlockPos
exitPortal
private static org.apache.logging.log4j.Logger
LOGGER
private int
teleportCooldown
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description EndGatewayTileEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
canEntityTeleport(Entity p_242690_0_)
private void
createExitPortal(ServerWorld p_227016_1_, BlockPos p_227016_2_)
private void
findExitPortal(ServerWorld p_227015_1_)
private BlockPos
findExitPosition()
private static BlockPos
findTallestBlock(IBlockReader p_195494_0_, BlockPos p_195494_1_, int p_195494_2_, boolean p_195494_3_)
private static BlockPos
findValidSpawnInChunk(Chunk p_195498_0_)
private static Chunk
getChunk(World p_195495_0_, Vector3d p_195495_1_)
float
getCooldownPercent(float p_195491_1_)
int
getParticleAmount()
float
getSpawnPercent(float p_195497_1_)
SUpdateTileEntityPacket
getUpdatePacket()
CompoundNBT
getUpdateTag()
double
getViewDistance()
boolean
isCoolingDown()
boolean
isSpawning()
void
load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
CompoundNBT
save(CompoundNBT p_189515_1_)
void
setExitPosition(BlockPos p_195489_1_, boolean p_195489_2_)
boolean
shouldRenderFace(Direction p_184313_1_)
void
teleportEntity(Entity p_195496_1_)
void
tick()
void
triggerCooldown()
boolean
triggerEvent(int p_145842_1_, int p_145842_2_)
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, 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.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
age
private long age
-
teleportCooldown
private int teleportCooldown
-
exitPortal
@Nullable private BlockPos exitPortal
-
exactTeleport
private boolean exactTeleport
-
-
Method Detail
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classTileEntity
-
getViewDistance
public double getViewDistance()
- Overrides:
getViewDistance
in classTileEntity
-
tick
public void tick()
- Specified by:
tick
in interfaceITickableTileEntity
-
canEntityTeleport
public static boolean canEntityTeleport(Entity p_242690_0_)
-
isSpawning
public boolean isSpawning()
-
isCoolingDown
public boolean isCoolingDown()
-
getSpawnPercent
public float getSpawnPercent(float p_195497_1_)
-
getCooldownPercent
public float getCooldownPercent(float p_195491_1_)
-
getUpdatePacket
@Nullable public SUpdateTileEntityPacket getUpdatePacket()
- Overrides:
getUpdatePacket
in classTileEntity
-
getUpdateTag
public CompoundNBT getUpdateTag()
- Overrides:
getUpdateTag
in classTileEntity
-
triggerCooldown
public void triggerCooldown()
-
triggerEvent
public boolean triggerEvent(int p_145842_1_, int p_145842_2_)
- Overrides:
triggerEvent
in classTileEntity
-
teleportEntity
public void teleportEntity(Entity p_195496_1_)
-
findExitPosition
private BlockPos findExitPosition()
-
findExitPortal
private void findExitPortal(ServerWorld p_227015_1_)
-
findTallestBlock
private static BlockPos findTallestBlock(IBlockReader p_195494_0_, BlockPos p_195494_1_, int p_195494_2_, boolean p_195494_3_)
-
createExitPortal
private void createExitPortal(ServerWorld p_227016_1_, BlockPos p_227016_2_)
-
shouldRenderFace
public boolean shouldRenderFace(Direction p_184313_1_)
- Overrides:
shouldRenderFace
in classEndPortalTileEntity
-
getParticleAmount
public int getParticleAmount()
-
setExitPosition
public void setExitPosition(BlockPos p_195489_1_, boolean p_195489_2_)
-
-