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) intintgetMinY()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.booleanisChunkLoaded(int blockX, int blockZ) booleanisChunkLoadedAt(float x, float z) booleanisOutOfRadius(int blockX, int blockZ) voidpromoteEntity(long runtimeId) Make a pending entity visible.voidput(int x, int z, BoarChunkSection[] chunks) voidremoveEntity(long uniqueId) 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) void
-
Constructor Details
-
CompensatedWorld
public CompensatedWorld()
-
-
Method Details
-
removeEntity
public void removeEntity(long uniqueId) -
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
-
promoteEntity
public void promoteEntity(long runtimeId) 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
-
clearChunks
public void clearChunks() -
isChunkLoaded
public boolean isChunkLoaded(int blockX, int blockZ) -
isChunkLoadedAt
public boolean isChunkLoadedAt(float x, 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
-
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()
-