public class ServerWorld extends World implements IForgeWorldServer
修飾子とタイプ | フィールドと説明 |
---|---|
boolean |
disableLevelSaving |
protected java.util.Set<ChunkPos> |
doneChunks
Stores the recently processed (lighting) chunks
|
protected RaidManager |
raids |
addedTileEntityList, captureBlockSnapshots, capturedBlockSnapshots, chunkProvider, dimension, DIST_HASH_MAGIC, isRemote, loadedTileEntityList, prevRainingStrength, prevThunderingStrength, processingLoadedTiles, rainingStrength, rand, restoringBlockSnapshots, thunderingStrength, tickableTileEntities, tileEntitiesToBeRemoved, updateLCG, worldInfo
コンストラクタと説明 |
---|
ServerWorld(MinecraftServer serverIn,
java.util.concurrent.Executor executorIn,
SaveHandler saveHandlerIn,
WorldInfo worldInfoIn,
DimensionType dimType,
IProfiler profilerIn,
IChunkStatusListener listenerIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addBlockEvent(BlockPos pos,
Block blockIn,
int eventID,
int eventParam) |
void |
addDuringCommandTeleport(ServerPlayerEntity playerIn) |
void |
addDuringPortalTeleport(ServerPlayerEntity playerIn) |
boolean |
addEntity(Entity entityIn) |
boolean |
addEntityIfNotDuplicate(Entity entityIn) |
void |
addFromAnotherDimension(Entity entityIn) |
void |
addLightningBolt(LightningBoltEntity entityIn) |
void |
addNewPlayer(ServerPlayerEntity player) |
void |
addRespawnedPlayer(ServerPlayerEntity player) |
protected BlockPos |
adjustPosToNearbyEntity(BlockPos pos) |
boolean |
canMineBlockBody(PlayerEntity player,
BlockPos pos) |
void |
checkSessionLock() |
void |
chunkCheck(Entity entityIn) |
void |
clearBlockEvents(MutableBoundingBox boundingBox) |
it.unimi.dsi.fastutil.objects.Object2IntMap<EntityClassification> |
countEntities() |
protected void |
createBonusChest()
Creates the bonus chest in the world.
|
Explosion |
createExplosion(Entity entityIn,
DamageSource damageSourceIn,
double xIn,
double yIn,
double zIn,
float explosionRadius,
boolean causesFire,
Explosion.Mode modeIn) |
void |
createSpawnPosition(WorldSettings settings)
creates a spawn position at random within 256 blocks of 0,0
|
BlockPos |
findNearestStructure(java.lang.String name,
BlockPos pos,
int radius,
boolean skipExistingChunks) |
Raid |
findRaid(BlockPos pos) |
boolean |
forceChunk(int chunkX,
int chunkZ,
boolean add) |
ServerChunkProvider |
getChunkProvider()
Gets the world's chunk provider
|
Teleporter |
getDefaultTeleporter() |
java.util.List<EnderDragonEntity> |
getDragons() |
java.util.stream.Stream<Entity> |
getEntities() |
java.util.List<Entity> |
getEntities(EntityType<?> entityTypeIn,
java.util.function.Predicate<? super Entity> predicateIn) |
Entity |
getEntityByID(int id)
Returns the Entity with the given ID, or null if it doesn't exist in this World.
|
Entity |
getEntityByUuid(java.util.UUID uniqueId) |
it.unimi.dsi.fastutil.longs.LongSet |
getForcedChunks() |
MapData |
getMapData(java.lang.String mapName) |
int |
getNextMapId() |
Biome |
getNoiseBiomeRaw(int x,
int y,
int z) |
ServerTickList<Block> |
getPendingBlockTicks() |
ServerTickList<Fluid> |
getPendingFluidTicks() |
java.util.List<ServerPlayerEntity> |
getPlayers() |
java.util.List<ServerPlayerEntity> |
getPlayers(java.util.function.Predicate<? super ServerPlayerEntity> predicateIn) |
PointOfInterestManager |
getPointOfInterestManager() |
RaidManager |
getRaids() |
ServerPlayerEntity |
getRandomPlayer() |
RecipeManager |
getRecipeManager() |
DimensionSavedDataManager |
getSavedData() |
SaveHandler |
getSaveHandler() |
ServerScoreboard |
getScoreboard() |
MinecraftServer |
getServer() |
BlockPos |
getSpawnCoordinate()
Returns null for anything other than the End
|
TemplateManager |
getStructureTemplateManager() |
NetworkTagManager |
getTags() |
boolean |
hasRaid(BlockPos pos) |
protected void |
initCapabilities() |
boolean |
isBlockModifiable(PlayerEntity player,
BlockPos pos) |
boolean |
isCloseToVillage(BlockPos pos,
int p_217471_2_) |
boolean |
isInsideTick() |
boolean |
isSaveDisabled() |
boolean |
isVillage(BlockPos pos) |
boolean |
isVillage(SectionPos pos) |
void |
notifyBlockUpdate(BlockPos pos,
BlockState oldState,
BlockState newState,
int flags)
Flags are as in setBlockState
|
void |
onBlockStateChange(BlockPos pos,
BlockState blockStateIn,
BlockState newState) |
void |
onChunkUnloading(Chunk chunkIn) |
void |
onEntityRemoved(Entity entityIn)
非推奨です。
|
void |
playBroadcastSound(int id,
BlockPos pos,
int data) |
void |
playEvent(PlayerEntity player,
int type,
BlockPos pos,
int data) |
void |
playMovingSound(PlayerEntity playerIn,
Entity entityIn,
SoundEvent eventIn,
SoundCategory categoryIn,
float volume,
float pitch) |
void |
playSound(PlayerEntity player,
double x,
double y,
double z,
SoundEvent soundIn,
SoundCategory category,
float volume,
float pitch) |
void |
registerMapData(MapData mapDataIn) |
void |
removeEntity(Entity entityIn) |
void |
removeEntity(Entity entityIn,
boolean keepData) |
void |
removeEntityComplete(Entity entityIn,
boolean keepData) |
void |
removePlayer(ServerPlayerEntity player) |
void |
removePlayer(ServerPlayerEntity player,
boolean keepData) |
void |
resetUpdateEntityTick()
Resets the updateEntityTick field to 0
|
void |
save(IProgressUpdate progress,
boolean flush,
boolean skipSave) |
protected void |
saveLevel()
Saves the chunks to disk.
|
int |
sectionsToVillage(SectionPos pos) |
void |
sendBlockBreakProgress(int breakerId,
BlockPos pos,
int progress) |
void |
setEntityState(Entity entityIn,
byte state)
sends a Packet 38 (Entity Status) to all tracked players of that entity
|
void |
setGameTime(long worldTime) |
void |
setInitialSpawnLocation()
Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk.
|
void |
setSpawnPoint(BlockPos pos) |
<T extends IParticleData> |
spawnParticle(ServerPlayerEntity player,
T type,
boolean longDistance,
double posX,
double posY,
double posZ,
int particleCount,
double xOffset,
double yOffset,
double zOffset,
double speed) |
<T extends IParticleData> |
spawnParticle(T type,
double posX,
double posY,
double posZ,
int particleCount,
double xOffset,
double yOffset,
double zOffset,
double speed) |
boolean |
summonEntity(Entity entityIn)
Used for "unnatural" ways of entities appearing in the world, e.g. summon command, interdimensional teleports
|
void |
tick(java.util.function.BooleanSupplier hasTimeLeft)
Runs a single tick for the world
|
void |
tickEnvironment(Chunk chunkIn,
int randomTickSpeed) |
void |
tickPassenger(Entity ridingEntity,
Entity passengerEntity) |
void |
updateAllPlayersSleepingFlag()
Updates the flag that indicates whether or not all players in the world are sleeping.
|
void |
updateEntity(Entity entityIn) |
void |
updateReputation(IReputationType type,
Entity target,
IReputationTracking host) |
void |
writeDebugInfo(java.nio.file.Path pathIn) |
addOptionalParticle, addOptionalParticle, addParticle, addParticle, addTileEntities, addTileEntity, advanceTime, calculateInitialSkylight, calculateInitialWeather, calculateInitialWeatherBody, checkBlockCollision, close, createExplosion, createExplosion, destroyBlock, extinguishFire, fillCrashReport, findBlockstateInArea, getActualHeight, getBiomeManager, getBlockRandomPos, getBlockReader, getBlockState, getCelestialAngleRadians, getChunk, getChunk, getChunkAt, getDayTime, getDifficultyForLocation, getDimension, getEntitiesInAABBexcluding, getEntitiesWithinAABB, getEntitiesWithinAABB, getFluidState, getGameRules, getGameTime, getGroundAboveSeaLevel, getHeight, getLightManager, getLoadedEntitiesWithinAABB, getMaxEntityRadius, getProfiler, getProviderName, getRainStrength, getRandom, getRedstonePower, getRedstonePowerFromNeighbors, getSeaLevel, getSeed, getSkylightSubtracted, getSpawnPoint, getStrongPower, getThunderStrength, getTileEntity, getWorld, getWorldBorder, getWorldInfo, getWorldType, guardEntityTick, hasBlockState, increaseMaxEntityRadius, isBlockinHighHumidity, isBlockPowered, isBlockPresent, isDaytime, isFlammableWithin, isMaterialInBB, isNightTime, isOutsideBuildHeight, isRaining, isRainingAt, isRemote, isSidePowered, isThundering, isTopSolid, isValid, isYOutOfBounds, makeFireworks, markAndNotifyBlock, markBlockRangeForRenderUpdate, markChunkDirty, neighborChanged, notifyNeighbors, notifyNeighborsOfStateChange, notifyNeighborsOfStateExcept, playSound, playSound, removeBlock, removeTileEntity, sendPacketToServer, sendQuittingDisconnectingPacket, setAllowedSpawnTypes, setBlockState, setBlockState, setDayTime, setRainStrength, setThunderStrength, setTileEntity, setTimeLightningFlash, tickBlockEntities, updateComparatorOutputLevel
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWorldServer
getMaxEntityRadius, increaseMaxEntityRadius
getCapability, getCapability
checkNoEntityCollision, chunkExists, getCelestialAngle, getCurrentMoonPhaseFactor, getDifficulty, getEmptyCollisionShapes, getHeight, getMoonPhase, playEvent
func_225317_b, func_225318_b, getClosestEntity, getClosestEntityWithinAABB, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntitiesWithinAABB, getEntitiesWithinAABBExcludingEntity, getPlayerByUuid, getTargettableEntitiesWithinAABB, getTargettablePlayersWithinAABB, isPlayerWithin
canBlockSeeSky, containsAnyLiquid, getBiome, getBlockColor, getBrightness, getChunk, getChunk, getLight, getNeighborAwareLightSubtracted, getNoiseBiome, getStrongPower, hasWater, isAirBlock, isAreaLoaded, isAreaLoaded, isAreaLoaded, isBlockLoaded
canSeeSky, getLightFor, getLightSubtracted
checkNoEntityCollision, func_226663_a_, getCollisionShapes, getCollisionShapes, hasNoCollisions, hasNoCollisions, hasNoCollisions, hasNoCollisions
func_217300_a, getHeight, getLightValue, getMaxLightLevel, rayTraceBlocks, rayTraceBlocks
getMaxHeight
destroyBlock
public boolean disableLevelSaving
protected final RaidManager raids
protected java.util.Set<ChunkPos> doneChunks
public ServerWorld(MinecraftServer serverIn, java.util.concurrent.Executor executorIn, SaveHandler saveHandlerIn, WorldInfo worldInfoIn, DimensionType dimType, IProfiler profilerIn, IChunkStatusListener listenerIn)
public Biome getNoiseBiomeRaw(int x, int y, int z)
getNoiseBiomeRaw
インタフェース内 IWorldReader
public void tick(java.util.function.BooleanSupplier hasTimeLeft)
public void tickEnvironment(Chunk chunkIn, int randomTickSpeed)
public boolean isInsideTick()
public void updateAllPlayersSleepingFlag()
public ServerScoreboard getScoreboard()
getScoreboard
クラス内 World
public void setInitialSpawnLocation()
setInitialSpawnLocation
クラス内 World
public void resetUpdateEntityTick()
public void updateEntity(Entity entityIn)
public void chunkCheck(Entity entityIn)
public boolean isBlockModifiable(PlayerEntity player, BlockPos pos)
isBlockModifiable
クラス内 World
public boolean canMineBlockBody(PlayerEntity player, BlockPos pos)
canMineBlockBody
クラス内 World
public void createSpawnPosition(WorldSettings settings)
protected void createBonusChest()
@Nullable public BlockPos getSpawnCoordinate()
public void save(@Nullable IProgressUpdate progress, boolean flush, boolean skipSave) throws SessionLockException
protected void saveLevel() throws SessionLockException
public java.util.List<Entity> getEntities(@Nullable EntityType<?> entityTypeIn, java.util.function.Predicate<? super Entity> predicateIn)
public java.util.List<EnderDragonEntity> getDragons()
public java.util.List<ServerPlayerEntity> getPlayers(java.util.function.Predicate<? super ServerPlayerEntity> predicateIn)
@Nullable public ServerPlayerEntity getRandomPlayer()
public it.unimi.dsi.fastutil.objects.Object2IntMap<EntityClassification> countEntities()
public boolean addEntity(Entity entityIn)
addEntity
インタフェース内 IWorldWriter
public boolean summonEntity(Entity entityIn)
public void addFromAnotherDimension(Entity entityIn)
public void addDuringCommandTeleport(ServerPlayerEntity playerIn)
public void addDuringPortalTeleport(ServerPlayerEntity playerIn)
public void addNewPlayer(ServerPlayerEntity player)
public void addRespawnedPlayer(ServerPlayerEntity player)
public boolean addEntityIfNotDuplicate(Entity entityIn)
public void onChunkUnloading(Chunk chunkIn)
@Deprecated public void onEntityRemoved(Entity entityIn)
public void removeEntityComplete(Entity entityIn, boolean keepData)
public void removeEntity(Entity entityIn)
public void removeEntity(Entity entityIn, boolean keepData)
public void removePlayer(ServerPlayerEntity player)
public void removePlayer(ServerPlayerEntity player, boolean keepData)
public void addLightningBolt(LightningBoltEntity entityIn)
public void sendBlockBreakProgress(int breakerId, BlockPos pos, int progress)
sendBlockBreakProgress
クラス内 World
public void playSound(@Nullable PlayerEntity player, double x, double y, double z, SoundEvent soundIn, SoundCategory category, float volume, float pitch)
public void playMovingSound(@Nullable PlayerEntity playerIn, Entity entityIn, SoundEvent eventIn, SoundCategory categoryIn, float volume, float pitch)
playMovingSound
クラス内 World
public void playBroadcastSound(int id, BlockPos pos, int data)
playBroadcastSound
クラス内 World
public void playEvent(@Nullable PlayerEntity player, int type, BlockPos pos, int data)
public void notifyBlockUpdate(BlockPos pos, BlockState oldState, BlockState newState, int flags)
notifyBlockUpdate
クラス内 World
public void setEntityState(Entity entityIn, byte state)
setEntityState
クラス内 World
public ServerChunkProvider getChunkProvider()
getChunkProvider
インタフェース内 IWorld
getChunkProvider
クラス内 World
public Explosion createExplosion(@Nullable Entity entityIn, @Nullable DamageSource damageSourceIn, double xIn, double yIn, double zIn, float explosionRadius, boolean causesFire, Explosion.Mode modeIn)
createExplosion
クラス内 World
public void addBlockEvent(BlockPos pos, Block blockIn, int eventID, int eventParam)
addBlockEvent
クラス内 World
public ServerTickList<Block> getPendingBlockTicks()
getPendingBlockTicks
インタフェース内 IWorld
public ServerTickList<Fluid> getPendingFluidTicks()
getPendingFluidTicks
インタフェース内 IWorld
@Nonnull public MinecraftServer getServer()
public Teleporter getDefaultTeleporter()
public TemplateManager getStructureTemplateManager()
public <T extends IParticleData> int spawnParticle(T type, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed)
public <T extends IParticleData> boolean spawnParticle(ServerPlayerEntity player, T type, boolean longDistance, double posX, double posY, double posZ, int particleCount, double xOffset, double yOffset, double zOffset, double speed)
@Nullable public Entity getEntityByID(int id)
getEntityByID
クラス内 World
@Nullable public Entity getEntityByUuid(java.util.UUID uniqueId)
@Nullable public BlockPos findNearestStructure(java.lang.String name, BlockPos pos, int radius, boolean skipExistingChunks)
public RecipeManager getRecipeManager()
getRecipeManager
クラス内 World
public NetworkTagManager getTags()
public void setGameTime(long worldTime)
setGameTime
クラス内 World
public boolean isSaveDisabled()
isSaveDisabled
クラス内 World
public void checkSessionLock() throws SessionLockException
public SaveHandler getSaveHandler()
public DimensionSavedDataManager getSavedData()
@Nullable public MapData getMapData(java.lang.String mapName)
getMapData
クラス内 World
public void registerMapData(MapData mapDataIn)
registerMapData
クラス内 World
public int getNextMapId()
getNextMapId
クラス内 World
public void setSpawnPoint(BlockPos pos)
setSpawnPoint
クラス内 World
public it.unimi.dsi.fastutil.longs.LongSet getForcedChunks()
public boolean forceChunk(int chunkX, int chunkZ, boolean add)
public java.util.List<ServerPlayerEntity> getPlayers()
getPlayers
インタフェース内 IEntityReader
public void onBlockStateChange(BlockPos pos, BlockState blockStateIn, BlockState newState)
onBlockStateChange
クラス内 World
public PointOfInterestManager getPointOfInterestManager()
public boolean isVillage(BlockPos pos)
public boolean isVillage(SectionPos pos)
public boolean isCloseToVillage(BlockPos pos, int p_217471_2_)
public int sectionsToVillage(SectionPos pos)
public RaidManager getRaids()
public boolean hasRaid(BlockPos pos)
public void updateReputation(IReputationType type, Entity target, IReputationTracking host)
public void writeDebugInfo(java.nio.file.Path pathIn) throws java.io.IOException
java.io.IOException
public void clearBlockEvents(MutableBoundingBox boundingBox)
protected void initCapabilities()
public java.util.stream.Stream<Entity> getEntities()