Class CompensatedWorld
java.lang.Object
ac.boar.anticheat.compensated.world.base.CompensatedWorld
- Direct Known Subclasses:
CompensatedWorldImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToCache(BoarPlayer player, long runtimeId, long uniqueId) voidvoidfetchEntity(long id) fetchTrackedEntity(long id) intgetBlockAt(int x, int y, int z, int layer) getBlockEntity(int x, int y, int z) getBlockState(int x, int y, int z, int layer) getBlockState(Mutable vector3i, int layer) getBlockState(org.cloudburstmc.math.vector.Vector3i vector3i, int layer) getChunk(int chunkX, int chunkZ) getEntity(long id) intgetKnownMappedRawBlockAt(int x, int y, int z, int layer) getKnownRawBlockAt(int x, int y, int z, int layer) Strict read.intgetMinY()intgetRawBlockAt(int x, int y, int z, int layer) getTrackedEntity(long id) Get an entity the server has spawned, even when the client has not acknowledged the spawn yet.getTrackedEntityByUniqueId(long uniqueId) booleanisChunkLoaded(int blockX, int blockZ) booleanisChunkLoadedAt(float x, float z) booleanisLoadedForPlayerAt(float x, float y, float z) booleanisOutOfRadius(int blockX, int blockZ) voidpromoteEntity(EntityCache entity) Make a pending entity visible.voidput(int x, int z, BoarChunkSection[] chunks, boolean[] knownSections) voidremoveEntity(long uniqueId, EntityCache entity) voidsetViewDistance(int viewDistance) voidupdateBlock(int x, int y, int z, int layer, int block) voidupdateBlock(org.cloudburstmc.math.vector.Vector3i position, int layer, int block) voidupdateSection(int chunkX, int chunkZ, int sectionY, BoarChunkSection section, boolean known) void
-
Constructor Details
-
CompensatedWorld
public CompensatedWorld()
-
-
Method Details
-
removeEntity
-
getEntity
-
fetchEntity
-
getTrackedEntity
Get an entity the server has spawned, even when the client has not acknowledged the spawn yet. Only outbound packet handlers must use this — they mirror what the server has sent so far. Checks and prediction must usegetEntity(long)so they only see entities that exist on the client. -
fetchTrackedEntity
-
getTrackedEntityByUniqueId
-
promoteEntity
Make a pending entity visible. Called when the client acknowledges the spawn packet. -
addToCache
-
setViewDistance
public void setViewDistance(int viewDistance) -
cleanChunksAtPlayerPosition
public void cleanChunksAtPlayerPosition() -
yeetOutOfRangeChunks
public void yeetOutOfRangeChunks() -
isOutOfRadius
public boolean isOutOfRadius(int blockX, int blockZ) -
put
-
updateSection
public void updateSection(int chunkX, int chunkZ, int sectionY, BoarChunkSection section, boolean known) -
clearChunks
public void clearChunks() -
isChunkLoaded
public boolean isChunkLoaded(int blockX, int blockZ) -
isChunkLoadedAt
public boolean isChunkLoadedAt(float x, float z) -
isLoadedForPlayerAt
public boolean isLoadedForPlayerAt(float x, float y, float z) -
updateBlock
public void updateBlock(org.cloudburstmc.math.vector.Vector3i position, int layer, int block) -
updateBlock
public void updateBlock(int x, int y, int z, int layer, int block) -
getBlockState
-
getBlockState
-
getBlockState
-
getKnownRawBlockAt
Strict read. Returns empty unless we know where each block slot came from. A decoded section that sent only layer 0 has air in layer 1. -
getKnownMappedRawBlockAt
-
getRawBlockAt
public int getRawBlockAt(int x, int y, int z, int layer) -
getBlockAt
public int getBlockAt(int x, int y, int z, int layer) -
getBlockEntity
-
getChunk
-
getMinY
public int getMinY() -
getHeightY
public int getHeightY()
-