use of net.minecraft.world.chunk.ChunkSection in project lithium-fabric by CaffeineMC.
the class WorldChunkMixin method getFluidState.
/**
* @reason Reduce method size to help the JVM inline
* @author JellySquid, Maity
*/
@Overwrite
public FluidState getFluidState(int x, int y, int z) {
int chunkY = this.getSectionIndex(y);
ChunkSection[] sectionArray = this.getSectionArray();
if (chunkY >= 0 && chunkY < sectionArray.length) {
ChunkSection section = sectionArray[chunkY];
return section.getFluidState(x & 15, y & 15, z & 15);
}
return DEFAULT_FLUID_STATE;
}
Aggregations