public abstract class World extends java.lang.Object implements IBlockAccess, ICapabilityProvider
Modifier | Constructor and Description |
---|---|
protected |
World(ISaveHandler saveHandlerIn,
WorldInfo info,
WorldProvider providerIn,
Profiler profilerIn,
boolean client) |
Modifier and Type | Method and Description |
---|---|
void |
addBlockEvent(BlockPos pos,
Block blockIn,
int eventID,
int eventParam) |
void |
addEventListener(IWorldEventListener listener) |
void |
addTileEntities(java.util.Collection<TileEntity> tileEntityCollection) |
boolean |
addTileEntity(TileEntity tile) |
boolean |
addWeatherEffect(Entity entityIn) |
CrashReportCategory |
addWorldInfoToCrashReport(CrashReport report) |
void |
calculateInitialSkylight() |
protected void |
calculateInitialWeather() |
void |
calculateInitialWeatherBody() |
int |
calculateSkylightSubtracted(float partialTicks) |
boolean |
canBlockFreeze(BlockPos pos,
boolean noWaterAdj) |
boolean |
canBlockFreezeBody(BlockPos pos,
boolean noWaterAdj) |
boolean |
canBlockFreezeNoWater(BlockPos pos) |
boolean |
canBlockFreezeWater(BlockPos pos) |
boolean |
canBlockSeeSky(BlockPos pos) |
boolean |
canMineBlockBody(EntityPlayer player,
BlockPos pos) |
boolean |
canSeeSky(BlockPos pos) |
boolean |
canSnowAt(BlockPos pos,
boolean checkLight) |
boolean |
canSnowAtBody(BlockPos pos,
boolean checkLight) |
boolean |
checkBlockCollision(AxisAlignedBB bb) |
boolean |
checkLight(BlockPos pos) |
boolean |
checkLightFor(EnumSkyBlock lightType,
BlockPos pos) |
boolean |
checkNoEntityCollision(AxisAlignedBB bb) |
boolean |
checkNoEntityCollision(AxisAlignedBB bb,
Entity entityIn) |
void |
checkSessionLock() |
boolean |
collidesWithAnyBlock(AxisAlignedBB bbox) |
boolean |
containsAnyLiquid(AxisAlignedBB bb) |
int |
countEntities(java.lang.Class<?> entityType) |
int |
countEntities(EnumCreatureType type,
boolean forSpawnCount)
Returns a count of entities that classify themselves as the specified creature type.
|
protected abstract IChunkProvider |
createChunkProvider() |
Explosion |
createExplosion(Entity entityIn,
double x,
double y,
double z,
float strength,
boolean isSmoking) |
boolean |
destroyBlock(BlockPos pos,
boolean dropBlock) |
boolean |
extinguishFire(EntityPlayer player,
BlockPos pos,
EnumFacing side) |
<T extends Entity> |
findNearestEntityWithinAABB(java.lang.Class<? extends T> entityType,
AxisAlignedBB aabb,
T closestTo) |
BlockPos |
findNearestStructure(java.lang.String p_190528_1_,
BlockPos p_190528_2_,
boolean p_190528_3_) |
int |
getActualHeight() |
Biome |
getBiome(BlockPos pos) |
Biome |
getBiomeForCoordsBody(BlockPos pos) |
BiomeProvider |
getBiomeProvider() |
float |
getBlockDensity(Vec3d vec,
AxisAlignedBB bb) |
int |
getBlockLightOpacity(BlockPos pos)
Readded as it was removed, very useful helper function
|
IBlockState |
getBlockState(BlockPos pos) |
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
float |
getCelestialAngle(float partialTicks) |
float |
getCelestialAngleRadians(float partialTicks) |
Chunk |
getChunkFromBlockCoords(BlockPos pos) |
Chunk |
getChunkFromChunkCoords(int chunkX,
int chunkZ) |
IChunkProvider |
getChunkProvider() |
int |
getChunksLowestHorizon(int x,
int z)
Deprecated.
|
EntityPlayer |
getClosestPlayer(double posX,
double posY,
double posZ,
double distance,
boolean spectator) |
EntityPlayer |
getClosestPlayer(double x,
double y,
double z,
double p_190525_7_,
com.google.common.base.Predicate<Entity> p_190525_9_) |
EntityPlayer |
getClosestPlayerToEntity(Entity entityIn,
double distance) |
Vec3d |
getCloudColorBody(float partialTicks) |
Vec3d |
getCloudColour(float partialTicks) |
java.util.List<AxisAlignedBB> |
getCollisionBoxes(Entity entityIn,
AxisAlignedBB aabb) |
private boolean |
getCollisionBoxes(Entity entityIn,
AxisAlignedBB aabb,
boolean p_191504_3_,
java.util.List<AxisAlignedBB> outList) |
int |
getCombinedLight(BlockPos pos,
int lightValue) |
java.util.Calendar |
getCurrentDate() |
float |
getCurrentMoonPhaseFactor() |
float |
getCurrentMoonPhaseFactorBody() |
java.lang.String |
getDebugLoadedEntities() |
EnumDifficulty |
getDifficulty() |
DifficultyInstance |
getDifficultyForLocation(BlockPos pos) |
<T extends Entity> |
getEntities(java.lang.Class<? extends T> entityType,
com.google.common.base.Predicate<? super T> filter) |
java.util.List<Entity> |
getEntitiesInAABBexcluding(Entity entityIn,
AxisAlignedBB boundingBox,
com.google.common.base.Predicate<? super Entity> predicate) |
<T extends Entity> |
getEntitiesWithinAABB(java.lang.Class<? extends T> classEntity,
AxisAlignedBB bb) |
<T extends Entity> |
getEntitiesWithinAABB(java.lang.Class<? extends T> clazz,
AxisAlignedBB aabb,
com.google.common.base.Predicate<? super T> filter) |
java.util.List<Entity> |
getEntitiesWithinAABBExcludingEntity(Entity entityIn,
AxisAlignedBB bb) |
Entity |
getEntityByID(int id) |
Vec3d |
getFogColor(float partialTicks) |
GameRules |
getGameRules() |
IBlockState |
getGroundAboveSeaLevel(BlockPos pos) |
int |
getHeight() |
BlockPos |
getHeight(BlockPos pos) |
int |
getHeight(int x,
int z) |
double |
getHorizon() |
int |
getLastLightningBolt() |
int |
getLight(BlockPos pos) |
int |
getLight(BlockPos pos,
boolean checkNeighbors) |
float |
getLightBrightness(BlockPos pos) |
int |
getLightFor(EnumSkyBlock type,
BlockPos pos) |
int |
getLightFromNeighbors(BlockPos pos) |
int |
getLightFromNeighborsFor(EnumSkyBlock type,
BlockPos pos) |
java.util.List<Entity> |
getLoadedEntityList() |
LootTableManager |
getLootTableManager() |
MapStorage |
getMapStorage() |
MinecraftServer |
getMinecraftServer() |
int |
getMoonPhase() |
EntityPlayer |
getNearestAttackablePlayer(BlockPos pos,
double maxXZDistance,
double maxYDistance) |
EntityPlayer |
getNearestAttackablePlayer(double posX,
double posY,
double posZ,
double maxXZDistance,
double maxYDistance,
com.google.common.base.Function<EntityPlayer,java.lang.Double> playerToDouble,
com.google.common.base.Predicate<EntityPlayer> p_184150_12_) |
EntityPlayer |
getNearestAttackablePlayer(Entity entityIn,
double maxXZDistance,
double maxYDistance) |
EntityPlayer |
getNearestPlayerNotCreative(Entity entityIn,
double distance) |
java.util.List<NextTickListEntry> |
getPendingBlockUpdates(Chunk chunkIn,
boolean remove) |
java.util.List<NextTickListEntry> |
getPendingBlockUpdates(StructureBoundingBox structureBB,
boolean remove) |
private TileEntity |
getPendingTileEntityAt(BlockPos pos) |
java.util.Iterator<Chunk> |
getPersistentChunkIterable(java.util.Iterator<Chunk> chunkIterator) |
com.google.common.collect.ImmutableSetMultimap<ChunkPos,ForgeChunkManager.Ticket> |
getPersistentChunks()
Get the persistent chunks for this world
|
MapStorage |
getPerWorldStorage() |
EntityPlayer |
getPlayerEntityByName(java.lang.String name) |
EntityPlayer |
getPlayerEntityByUUID(java.util.UUID uuid) |
<T extends Entity> |
getPlayers(java.lang.Class<? extends T> playerType,
com.google.common.base.Predicate<? super T> filter) |
BlockPos |
getPrecipitationHeight(BlockPos pos) |
java.lang.String |
getProviderName() |
float |
getRainStrength(float delta) |
private int |
getRawLight(BlockPos pos,
EnumSkyBlock lightType) |
int |
getRedstonePower(BlockPos pos,
EnumFacing facing) |
ISaveHandler |
getSaveHandler() |
Scoreboard |
getScoreboard() |
int |
getSeaLevel() |
long |
getSeed() |
Vec3d |
getSkyColor(Entity entityIn,
float partialTicks) |
Vec3d |
getSkyColorBody(Entity entityIn,
float partialTicks) |
int |
getSkylightSubtracted() |
BlockPos |
getSpawnPoint() |
float |
getStarBrightness(float partialTicks) |
float |
getStarBrightnessBody(float partialTicks) |
int |
getStrongPower(BlockPos pos) |
int |
getStrongPower(BlockPos pos,
EnumFacing direction) |
float |
getSunBrightness(float partialTicks) |
float |
getSunBrightnessBody(float partialTicks) |
float |
getSunBrightnessFactor(float partialTicks)
The current sun brightness factor for this dimension.
|
float |
getThunderStrength(float delta) |
TileEntity |
getTileEntity(BlockPos pos) |
BlockPos |
getTopSolidOrLiquidBlock(BlockPos pos) |
long |
getTotalWorldTime() |
int |
getUniqueDataId(java.lang.String key) |
VillageCollection |
getVillageCollection() |
WorldBorder |
getWorldBorder() |
WorldInfo |
getWorldInfo() |
long |
getWorldTime() |
WorldType |
getWorldType() |
boolean |
handleMaterialAcceleration(AxisAlignedBB bb,
Material materialIn,
Entity entityIn) |
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
void |
immediateBlockTick(BlockPos pos,
IBlockState state,
java.util.Random random) |
World |
init() |
protected void |
initCapabilities() |
void |
initialize(WorldSettings settings) |
boolean |
isAirBlock(BlockPos pos) |
boolean |
isAnyPlayerWithinRangeAt(double x,
double y,
double z,
double range) |
boolean |
isAreaLoaded(BlockPos from,
BlockPos to) |
boolean |
isAreaLoaded(BlockPos from,
BlockPos to,
boolean allowEmpty) |
boolean |
isAreaLoaded(BlockPos center,
int radius) |
boolean |
isAreaLoaded(BlockPos center,
int radius,
boolean allowEmpty) |
private boolean |
isAreaLoaded(int xStart,
int yStart,
int zStart,
int xEnd,
int yEnd,
int zEnd,
boolean allowEmpty) |
boolean |
isAreaLoaded(StructureBoundingBox box) |
boolean |
isAreaLoaded(StructureBoundingBox box,
boolean allowEmpty) |
boolean |
isBlockFullCube(BlockPos pos) |
int |
isBlockIndirectlyGettingPowered(BlockPos pos) |
boolean |
isBlockinHighHumidity(BlockPos pos) |
boolean |
isBlockLoaded(BlockPos pos) |
boolean |
isBlockLoaded(BlockPos pos,
boolean allowEmpty) |
boolean |
isBlockModifiable(EntityPlayer player,
BlockPos pos) |
boolean |
isBlockNormalCube(BlockPos pos,
boolean _default) |
boolean |
isBlockPowered(BlockPos pos) |
boolean |
isBlockTickPending(BlockPos pos,
Block blockType) |
boolean |
isChunkGeneratedAt(int x,
int z) |
protected abstract boolean |
isChunkLoaded(int x,
int z,
boolean allowEmpty) |
boolean |
isDaytime() |
boolean |
isFlammableWithin(AxisAlignedBB bb) |
boolean |
isInsideWorldBorder(Entity p_191503_1_) |
boolean |
isMaterialInBB(AxisAlignedBB bb,
Material materialIn) |
boolean |
isOutsideBuildHeight(BlockPos pos) |
boolean |
isRaining() |
boolean |
isRainingAt(BlockPos position) |
boolean |
isSidePowered(BlockPos pos,
EnumFacing side) |
boolean |
isSideSolid(BlockPos pos,
EnumFacing side)
Determine if the given block is considered solid on the
specified side.
|
boolean |
isSideSolid(BlockPos pos,
EnumFacing side,
boolean _default)
Determine if the given block is considered solid on the
specified side.
|
boolean |
isSpawnChunk(int x,
int z) |
boolean |
isThundering() |
boolean |
isUpdateScheduled(BlockPos pos,
Block blk) |
boolean |
isValid(BlockPos pos) |
private boolean |
isWater(BlockPos pos) |
void |
joinEntityInSurroundings(Entity entityIn) |
WorldSavedData |
loadData(java.lang.Class<? extends WorldSavedData> clazz,
java.lang.String dataID) |
void |
loadEntities(java.util.Collection<Entity> entityCollection) |
void |
makeFireworks(double x,
double y,
double z,
double motionX,
double motionY,
double motionZ,
NBTTagCompound compound) |
void |
markAndNotifyBlock(BlockPos pos,
Chunk chunk,
IBlockState iblockstate,
IBlockState newState,
int flags) |
void |
markBlockRangeForRenderUpdate(BlockPos rangeMin,
BlockPos rangeMax) |
void |
markBlockRangeForRenderUpdate(int x1,
int y1,
int z1,
int x2,
int y2,
int z2) |
void |
markBlocksDirtyVertical(int x,
int z,
int y1,
int y2) |
void |
markChunkDirty(BlockPos pos,
TileEntity unusedTileEntity) |
void |
markTileEntitiesInChunkForRemoval(Chunk chunk)
Deprecated.
|
void |
markTileEntityForRemoval(TileEntity tileEntityIn) |
boolean |
mayPlace(Block blockIn,
BlockPos pos,
boolean skipCollisionCheck,
EnumFacing sidePlacedOn,
Entity placer) |
void |
neighborChanged(BlockPos pos,
Block blockIn,
BlockPos fromPos) |
Explosion |
newExplosion(Entity entityIn,
double x,
double y,
double z,
float strength,
boolean isFlaming,
boolean isSmoking) |
void |
notifyBlockUpdate(BlockPos pos,
IBlockState oldState,
IBlockState newState,
int flags) |
void |
notifyLightSet(BlockPos pos) |
void |
notifyNeighborsOfStateChange(BlockPos pos,
Block blockType,
boolean updateObservers) |
void |
notifyNeighborsOfStateExcept(BlockPos pos,
Block blockType,
EnumFacing skipSide) |
void |
notifyNeighborsRespectDebug(BlockPos pos,
Block blockType,
boolean p_175722_3_) |
void |
observedNeighborChanged(BlockPos pos,
Block p_190529_2_,
BlockPos p_190529_3_) |
void |
onEntityAdded(Entity entityIn) |
void |
onEntityRemoved(Entity entityIn) |
void |
playBroadcastSound(int id,
BlockPos pos,
int data) |
void |
playEvent(EntityPlayer player,
int type,
BlockPos pos,
int data) |
void |
playEvent(int type,
BlockPos pos,
int data) |
protected void |
playMoodSoundAndCheckLight(int p_147467_1_,
int p_147467_2_,
Chunk chunkIn) |
void |
playRecord(BlockPos blockPositionIn,
SoundEvent soundEventIn) |
void |
playSound(double x,
double y,
double z,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch,
boolean distanceDelay) |
void |
playSound(EntityPlayer player,
BlockPos pos,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch) |
void |
playSound(EntityPlayer player,
double x,
double y,
double z,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch) |
RayTraceResult |
rayTraceBlocks(Vec3d start,
Vec3d end) |
RayTraceResult |
rayTraceBlocks(Vec3d start,
Vec3d end,
boolean stopOnLiquid) |
RayTraceResult |
rayTraceBlocks(Vec3d vec31,
Vec3d vec32,
boolean stopOnLiquid,
boolean ignoreBlockWithoutBoundingBox,
boolean returnLastUncollidableBlock) |
void |
removeEntity(Entity entityIn) |
void |
removeEntityDangerously(Entity entityIn) |
void |
removeEventListener(IWorldEventListener listener) |
void |
removeTileEntity(BlockPos pos) |
void |
scheduleBlockUpdate(BlockPos pos,
Block blockIn,
int delay,
int priority) |
void |
scheduleUpdate(BlockPos pos,
Block blockIn,
int delay) |
void |
sendBlockBreakProgress(int breakerId,
BlockPos pos,
int progress) |
void |
sendPacketToServer(Packet<?> packetIn) |
void |
sendQuittingDisconnectingPacket() |
void |
setAllowedSpawnTypes(boolean hostile,
boolean peaceful) |
boolean |
setBlockState(BlockPos pos,
IBlockState state) |
boolean |
setBlockState(BlockPos pos,
IBlockState newState,
int flags) |
boolean |
setBlockToAir(BlockPos pos) |
void |
setData(java.lang.String dataID,
WorldSavedData worldSavedDataIn) |
void |
setEntityState(Entity entityIn,
byte state) |
void |
setInitialSpawnLocation() |
void |
setLastLightningBolt(int lastLightningBoltIn) |
void |
setLightFor(EnumSkyBlock type,
BlockPos pos,
int lightValue) |
void |
setRainStrength(float strength) |
java.util.Random |
setRandomSeed(int p_72843_1_,
int p_72843_2_,
int p_72843_3_) |
void |
setSeaLevel(int seaLevelIn) |
void |
setSkylightSubtracted(int newSkylightSubtracted) |
void |
setSpawnPoint(BlockPos pos) |
void |
setThunderStrength(float strength) |
void |
setTileEntity(BlockPos pos,
TileEntity tileEntityIn) |
void |
setTotalWorldTime(long worldTime) |
void |
setWorldTime(long time) |
void |
spawnAlwaysVisibleParticle(int p_190523_1_,
double p_190523_2_,
double p_190523_4_,
double p_190523_6_,
double p_190523_8_,
double p_190523_10_,
double p_190523_12_,
int... p_190523_14_) |
boolean |
spawnEntity(Entity entityIn) |
void |
spawnParticle(EnumParticleTypes particleType,
boolean ignoreRange,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
void |
spawnParticle(EnumParticleTypes particleType,
double xCoord,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
private void |
spawnParticle(int particleID,
boolean ignoreRange,
double xCood,
double yCoord,
double zCoord,
double xSpeed,
double ySpeed,
double zSpeed,
int... parameters) |
void |
tick() |
protected void |
tickPlayers() |
boolean |
tickUpdates(boolean runAllPending) |
void |
unloadEntities(java.util.Collection<Entity> entityCollection) |
void |
updateAllPlayersSleepingFlag() |
protected void |
updateBlocks() |
void |
updateBlockTick(BlockPos pos,
Block blockIn,
int delay,
int priority) |
void |
updateComparatorOutputLevel(BlockPos pos,
Block blockIn) |
void |
updateEntities() |
void |
updateEntity(Entity ent) |
void |
updateEntityWithOptionalForce(Entity entityIn,
boolean forceUpdate) |
void |
updateObservingBlocksAt(BlockPos pos,
Block blockType) |
protected void |
updateWeather() |
void |
updateWeatherBody() |
public static double MAX_ENTITY_RADIUS
private int seaLevel
protected boolean scheduledUpdatesAreImmediate
public final java.util.List<Entity> loadedEntityList
protected final java.util.List<Entity> unloadedEntityList
public final java.util.List<TileEntity> loadedTileEntityList
public final java.util.List<TileEntity> tickableTileEntities
private final java.util.List<TileEntity> addedTileEntityList
private final java.util.List<TileEntity> tileEntitiesToBeRemoved
public final java.util.List<EntityPlayer> playerEntities
public final java.util.List<Entity> weatherEffects
protected final IntHashMap<Entity> entitiesById
private final long cloudColour
private int skylightSubtracted
protected int updateLCG
protected final int DIST_HASH_MAGIC
public float prevRainingStrength
public float rainingStrength
public float prevThunderingStrength
public float thunderingStrength
private int lastLightningBolt
public final java.util.Random rand
public final WorldProvider provider
protected PathWorldListener pathListener
protected java.util.List<IWorldEventListener> eventListeners
protected IChunkProvider chunkProvider
protected final ISaveHandler saveHandler
protected WorldInfo worldInfo
protected boolean findingSpawnPoint
protected MapStorage mapStorage
public VillageCollection villageCollection
protected LootTableManager lootTable
protected AdvancementManager advancementManager
protected FunctionManager functionManager
public final Profiler profiler
private final java.util.Calendar calendar
protected Scoreboard worldScoreboard
public final boolean isRemote
protected boolean spawnHostileMobs
protected boolean spawnPeacefulMobs
private boolean processingLoadedTiles
private final WorldBorder worldBorder
int[] lightUpdateBlockList
public boolean restoringBlockSnapshots
public boolean captureBlockSnapshots
public java.util.ArrayList<BlockSnapshot> capturedBlockSnapshots
private CapabilityDispatcher capabilities
private WorldCapabilityData capabilityData
protected MapStorage perWorldStorage
protected World(ISaveHandler saveHandlerIn, WorldInfo info, WorldProvider providerIn, Profiler profilerIn, boolean client)
public World init()
public Biome getBiome(BlockPos pos)
getBiome
in interface IBlockAccess
public BiomeProvider getBiomeProvider()
protected abstract IChunkProvider createChunkProvider()
public void initialize(WorldSettings settings)
@Nullable public MinecraftServer getMinecraftServer()
public void setInitialSpawnLocation()
public IBlockState getGroundAboveSeaLevel(BlockPos pos)
public boolean isValid(BlockPos pos)
public boolean isOutsideBuildHeight(BlockPos pos)
public boolean isAirBlock(BlockPos pos)
isAirBlock
in interface IBlockAccess
public boolean isBlockLoaded(BlockPos pos)
public boolean isBlockLoaded(BlockPos pos, boolean allowEmpty)
public boolean isAreaLoaded(BlockPos center, int radius)
public boolean isAreaLoaded(BlockPos center, int radius, boolean allowEmpty)
public boolean isAreaLoaded(StructureBoundingBox box)
public boolean isAreaLoaded(StructureBoundingBox box, boolean allowEmpty)
private boolean isAreaLoaded(int xStart, int yStart, int zStart, int xEnd, int yEnd, int zEnd, boolean allowEmpty)
protected abstract boolean isChunkLoaded(int x, int z, boolean allowEmpty)
public Chunk getChunkFromChunkCoords(int chunkX, int chunkZ)
public boolean isChunkGeneratedAt(int x, int z)
public boolean setBlockState(BlockPos pos, IBlockState newState, int flags)
public void markAndNotifyBlock(BlockPos pos, @Nullable Chunk chunk, IBlockState iblockstate, IBlockState newState, int flags)
public boolean setBlockToAir(BlockPos pos)
public boolean destroyBlock(BlockPos pos, boolean dropBlock)
public boolean setBlockState(BlockPos pos, IBlockState state)
public void notifyBlockUpdate(BlockPos pos, IBlockState oldState, IBlockState newState, int flags)
public void notifyNeighborsRespectDebug(BlockPos pos, Block blockType, boolean p_175722_3_)
public void markBlocksDirtyVertical(int x, int z, int y1, int y2)
public void markBlockRangeForRenderUpdate(BlockPos rangeMin, BlockPos rangeMax)
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2)
public void notifyNeighborsOfStateChange(BlockPos pos, Block blockType, boolean updateObservers)
public void notifyNeighborsOfStateExcept(BlockPos pos, Block blockType, EnumFacing skipSide)
public void observedNeighborChanged(BlockPos pos, Block p_190529_2_, BlockPos p_190529_3_)
public boolean canSeeSky(BlockPos pos)
public boolean canBlockSeeSky(BlockPos pos)
public int getLight(BlockPos pos)
public int getLightFromNeighbors(BlockPos pos)
public int getLight(BlockPos pos, boolean checkNeighbors)
public int getHeight(int x, int z)
@Deprecated public int getChunksLowestHorizon(int x, int z)
public int getLightFromNeighborsFor(EnumSkyBlock type, BlockPos pos)
public int getLightFor(EnumSkyBlock type, BlockPos pos)
public void setLightFor(EnumSkyBlock type, BlockPos pos, int lightValue)
public void notifyLightSet(BlockPos pos)
public int getCombinedLight(BlockPos pos, int lightValue)
getCombinedLight
in interface IBlockAccess
public float getLightBrightness(BlockPos pos)
public IBlockState getBlockState(BlockPos pos)
getBlockState
in interface IBlockAccess
public boolean isDaytime()
@Nullable public RayTraceResult rayTraceBlocks(Vec3d start, Vec3d end)
@Nullable public RayTraceResult rayTraceBlocks(Vec3d start, Vec3d end, boolean stopOnLiquid)
@Nullable public RayTraceResult rayTraceBlocks(Vec3d vec31, Vec3d vec32, boolean stopOnLiquid, boolean ignoreBlockWithoutBoundingBox, boolean returnLastUncollidableBlock)
public void playSound(@Nullable EntityPlayer player, BlockPos pos, SoundEvent soundIn, SoundCategory category, float volume, float pitch)
public void playSound(@Nullable EntityPlayer player, double x, double y, double z, SoundEvent soundIn, SoundCategory category, float volume, float pitch)
public void playSound(double x, double y, double z, SoundEvent soundIn, SoundCategory category, float volume, float pitch, boolean distanceDelay)
public void playRecord(BlockPos blockPositionIn, @Nullable SoundEvent soundEventIn)
public void spawnParticle(EnumParticleTypes particleType, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
public void spawnAlwaysVisibleParticle(int p_190523_1_, double p_190523_2_, double p_190523_4_, double p_190523_6_, double p_190523_8_, double p_190523_10_, double p_190523_12_, int... p_190523_14_)
public void spawnParticle(EnumParticleTypes particleType, boolean ignoreRange, double xCoord, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
private void spawnParticle(int particleID, boolean ignoreRange, double xCood, double yCoord, double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
public boolean addWeatherEffect(Entity entityIn)
public boolean spawnEntity(Entity entityIn)
public void onEntityAdded(Entity entityIn)
public void onEntityRemoved(Entity entityIn)
public void removeEntity(Entity entityIn)
public void removeEntityDangerously(Entity entityIn)
public void addEventListener(IWorldEventListener listener)
private boolean getCollisionBoxes(@Nullable Entity entityIn, AxisAlignedBB aabb, boolean p_191504_3_, @Nullable java.util.List<AxisAlignedBB> outList)
public java.util.List<AxisAlignedBB> getCollisionBoxes(@Nullable Entity entityIn, AxisAlignedBB aabb)
public void removeEventListener(IWorldEventListener listener)
public boolean isInsideWorldBorder(Entity p_191503_1_)
public boolean collidesWithAnyBlock(AxisAlignedBB bbox)
public int calculateSkylightSubtracted(float partialTicks)
public float getSunBrightnessFactor(float partialTicks)
public float getSunBrightness(float partialTicks)
public float getSunBrightnessBody(float partialTicks)
public float getCelestialAngle(float partialTicks)
public int getMoonPhase()
public float getCurrentMoonPhaseFactor()
public float getCurrentMoonPhaseFactorBody()
public float getCelestialAngleRadians(float partialTicks)
public Vec3d getCloudColour(float partialTicks)
public Vec3d getCloudColorBody(float partialTicks)
public Vec3d getFogColor(float partialTicks)
public float getStarBrightness(float partialTicks)
public float getStarBrightnessBody(float partialTicks)
public void scheduleBlockUpdate(BlockPos pos, Block blockIn, int delay, int priority)
public void updateEntities()
protected void tickPlayers()
public boolean addTileEntity(TileEntity tile)
public void addTileEntities(java.util.Collection<TileEntity> tileEntityCollection)
public void updateEntity(Entity ent)
public void updateEntityWithOptionalForce(Entity entityIn, boolean forceUpdate)
public boolean checkNoEntityCollision(AxisAlignedBB bb)
public boolean checkNoEntityCollision(AxisAlignedBB bb, @Nullable Entity entityIn)
public boolean checkBlockCollision(AxisAlignedBB bb)
public boolean containsAnyLiquid(AxisAlignedBB bb)
public boolean isFlammableWithin(AxisAlignedBB bb)
public boolean handleMaterialAcceleration(AxisAlignedBB bb, Material materialIn, Entity entityIn)
public boolean isMaterialInBB(AxisAlignedBB bb, Material materialIn)
public Explosion createExplosion(@Nullable Entity entityIn, double x, double y, double z, float strength, boolean isSmoking)
public Explosion newExplosion(@Nullable Entity entityIn, double x, double y, double z, float strength, boolean isFlaming, boolean isSmoking)
public float getBlockDensity(Vec3d vec, AxisAlignedBB bb)
public boolean extinguishFire(@Nullable EntityPlayer player, BlockPos pos, EnumFacing side)
public java.lang.String getDebugLoadedEntities()
public java.lang.String getProviderName()
@Nullable public TileEntity getTileEntity(BlockPos pos)
getTileEntity
in interface IBlockAccess
@Nullable private TileEntity getPendingTileEntityAt(BlockPos pos)
public void setTileEntity(BlockPos pos, @Nullable TileEntity tileEntityIn)
public void removeTileEntity(BlockPos pos)
public void markTileEntityForRemoval(TileEntity tileEntityIn)
public boolean isBlockFullCube(BlockPos pos)
public boolean isBlockNormalCube(BlockPos pos, boolean _default)
public void calculateInitialSkylight()
public void setAllowedSpawnTypes(boolean hostile, boolean peaceful)
public void tick()
protected void calculateInitialWeather()
public void calculateInitialWeatherBody()
protected void updateWeather()
public void updateWeatherBody()
protected void playMoodSoundAndCheckLight(int p_147467_1_, int p_147467_2_, Chunk chunkIn)
protected void updateBlocks()
public void immediateBlockTick(BlockPos pos, IBlockState state, java.util.Random random)
public boolean canBlockFreezeWater(BlockPos pos)
public boolean canBlockFreezeNoWater(BlockPos pos)
public boolean canBlockFreeze(BlockPos pos, boolean noWaterAdj)
public boolean canBlockFreezeBody(BlockPos pos, boolean noWaterAdj)
private boolean isWater(BlockPos pos)
public boolean canSnowAt(BlockPos pos, boolean checkLight)
public boolean canSnowAtBody(BlockPos pos, boolean checkLight)
public boolean checkLight(BlockPos pos)
private int getRawLight(BlockPos pos, EnumSkyBlock lightType)
public boolean checkLightFor(EnumSkyBlock lightType, BlockPos pos)
public boolean tickUpdates(boolean runAllPending)
@Nullable public java.util.List<NextTickListEntry> getPendingBlockUpdates(Chunk chunkIn, boolean remove)
@Nullable public java.util.List<NextTickListEntry> getPendingBlockUpdates(StructureBoundingBox structureBB, boolean remove)
public java.util.List<Entity> getEntitiesWithinAABBExcludingEntity(@Nullable Entity entityIn, AxisAlignedBB bb)
public java.util.List<Entity> getEntitiesInAABBexcluding(@Nullable Entity entityIn, AxisAlignedBB boundingBox, @Nullable com.google.common.base.Predicate<? super Entity> predicate)
public <T extends Entity> java.util.List<T> getEntities(java.lang.Class<? extends T> entityType, com.google.common.base.Predicate<? super T> filter)
public <T extends Entity> java.util.List<T> getPlayers(java.lang.Class<? extends T> playerType, com.google.common.base.Predicate<? super T> filter)
public <T extends Entity> java.util.List<T> getEntitiesWithinAABB(java.lang.Class<? extends T> classEntity, AxisAlignedBB bb)
public <T extends Entity> java.util.List<T> getEntitiesWithinAABB(java.lang.Class<? extends T> clazz, AxisAlignedBB aabb, @Nullable com.google.common.base.Predicate<? super T> filter)
@Nullable public <T extends Entity> T findNearestEntityWithinAABB(java.lang.Class<? extends T> entityType, AxisAlignedBB aabb, T closestTo)
@Nullable public Entity getEntityByID(int id)
public java.util.List<Entity> getLoadedEntityList()
public void markChunkDirty(BlockPos pos, TileEntity unusedTileEntity)
public int countEntities(java.lang.Class<?> entityType)
public void loadEntities(java.util.Collection<Entity> entityCollection)
public void unloadEntities(java.util.Collection<Entity> entityCollection)
public boolean mayPlace(Block blockIn, BlockPos pos, boolean skipCollisionCheck, EnumFacing sidePlacedOn, @Nullable Entity placer)
public int getSeaLevel()
public void setSeaLevel(int seaLevelIn)
public int getStrongPower(BlockPos pos, EnumFacing direction)
getStrongPower
in interface IBlockAccess
public WorldType getWorldType()
getWorldType
in interface IBlockAccess
public int getStrongPower(BlockPos pos)
public boolean isSidePowered(BlockPos pos, EnumFacing side)
public int getRedstonePower(BlockPos pos, EnumFacing facing)
public boolean isBlockPowered(BlockPos pos)
public int isBlockIndirectlyGettingPowered(BlockPos pos)
@Nullable public EntityPlayer getClosestPlayerToEntity(Entity entityIn, double distance)
@Nullable public EntityPlayer getNearestPlayerNotCreative(Entity entityIn, double distance)
@Nullable public EntityPlayer getClosestPlayer(double posX, double posY, double posZ, double distance, boolean spectator)
@Nullable public EntityPlayer getClosestPlayer(double x, double y, double z, double p_190525_7_, com.google.common.base.Predicate<Entity> p_190525_9_)
public boolean isAnyPlayerWithinRangeAt(double x, double y, double z, double range)
@Nullable public EntityPlayer getNearestAttackablePlayer(Entity entityIn, double maxXZDistance, double maxYDistance)
@Nullable public EntityPlayer getNearestAttackablePlayer(BlockPos pos, double maxXZDistance, double maxYDistance)
@Nullable public EntityPlayer getNearestAttackablePlayer(double posX, double posY, double posZ, double maxXZDistance, double maxYDistance, @Nullable com.google.common.base.Function<EntityPlayer,java.lang.Double> playerToDouble, @Nullable com.google.common.base.Predicate<EntityPlayer> p_184150_12_)
@Nullable public EntityPlayer getPlayerEntityByName(java.lang.String name)
@Nullable public EntityPlayer getPlayerEntityByUUID(java.util.UUID uuid)
public void sendQuittingDisconnectingPacket()
public void checkSessionLock() throws MinecraftException
MinecraftException
public void setTotalWorldTime(long worldTime)
public long getSeed()
public long getTotalWorldTime()
public long getWorldTime()
public void setWorldTime(long time)
public BlockPos getSpawnPoint()
public void setSpawnPoint(BlockPos pos)
public void joinEntityInSurroundings(Entity entityIn)
public boolean isBlockModifiable(EntityPlayer player, BlockPos pos)
public boolean canMineBlockBody(EntityPlayer player, BlockPos pos)
public void setEntityState(Entity entityIn, byte state)
public IChunkProvider getChunkProvider()
public ISaveHandler getSaveHandler()
public WorldInfo getWorldInfo()
public GameRules getGameRules()
public void updateAllPlayersSleepingFlag()
public float getThunderStrength(float delta)
public void setThunderStrength(float strength)
public float getRainStrength(float delta)
public void setRainStrength(float strength)
public boolean isThundering()
public boolean isRaining()
public boolean isRainingAt(BlockPos position)
public boolean isBlockinHighHumidity(BlockPos pos)
@Nullable public MapStorage getMapStorage()
public void setData(java.lang.String dataID, WorldSavedData worldSavedDataIn)
@Nullable public WorldSavedData loadData(java.lang.Class<? extends WorldSavedData> clazz, java.lang.String dataID)
public int getUniqueDataId(java.lang.String key)
public void playBroadcastSound(int id, BlockPos pos, int data)
public void playEvent(int type, BlockPos pos, int data)
public void playEvent(@Nullable EntityPlayer player, int type, BlockPos pos, int data)
public int getHeight()
public int getActualHeight()
public java.util.Random setRandomSeed(int p_72843_1_, int p_72843_2_, int p_72843_3_)
public CrashReportCategory addWorldInfoToCrashReport(CrashReport report)
public double getHorizon()
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
public java.util.Calendar getCurrentDate()
public void makeFireworks(double x, double y, double z, double motionX, double motionY, double motionZ, @Nullable NBTTagCompound compound)
public Scoreboard getScoreboard()
public DifficultyInstance getDifficultyForLocation(BlockPos pos)
public EnumDifficulty getDifficulty()
public int getSkylightSubtracted()
public void setSkylightSubtracted(int newSkylightSubtracted)
public int getLastLightningBolt()
public void setLastLightningBolt(int lastLightningBoltIn)
public VillageCollection getVillageCollection()
public WorldBorder getWorldBorder()
public boolean isSpawnChunk(int x, int z)
public boolean isSideSolid(BlockPos pos, EnumFacing side)
pos
- Block Positionside
- The Side in questionpublic boolean isSideSolid(BlockPos pos, EnumFacing side, boolean _default)
isSideSolid
in interface IBlockAccess
pos
- Block Positionside
- The Side in question_default
- The default to return if the block doesn't exist.public com.google.common.collect.ImmutableSetMultimap<ChunkPos,ForgeChunkManager.Ticket> getPersistentChunks()
public java.util.Iterator<Chunk> getPersistentChunkIterable(java.util.Iterator<Chunk> chunkIterator)
public int getBlockLightOpacity(BlockPos pos)
pos
- Block positionpublic int countEntities(EnumCreatureType type, boolean forSpawnCount)
@Deprecated public void markTileEntitiesInChunkForRemoval(Chunk chunk)
protected void initCapabilities()
public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
ICapabilityProvider
ICapabilityProvider.getCapability(Capability, EnumFacing)
.
Basically, this method functions analogously to Map.containsKey(Object)
.
Example: A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
This is a light weight version of getCapability, intended for metadata uses.
hasCapability
in interface ICapabilityProvider
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.getCapability(Capability, EnumFacing)
must not return null.@Nullable public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object)
.
getCapability
in interface ICapabilityProvider
capability
- The capability to checkfacing
- The Side to check from,
CAN BE NULL. Null is defined to represent 'internal' or 'self'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return true.public MapStorage getPerWorldStorage()
public void sendPacketToServer(Packet<?> packetIn)
public LootTableManager getLootTableManager()