public int GetBlockLight(int x, int y, int z) { AnvilSection section = GetSection(y, true); int blockY = y % AnvilSection.Height; return(section.GetBlockLight(x, blockY, z)); }
public bool SetBlockLight(int x, int y, int z, int light) { AnvilSection section = GetSection(y, true); int blockY = y % AnvilSection.Height; _isModified = true; return(section.SetBlockLight(x, blockY, z, light)); }
private AnvilSection GetSection(int y, bool create) { int sectionY = y / AnvilSection.Height; AnvilSection section = _sections[sectionY]; if (section == null && create) { section = CreateNewSection(sectionY, true); _sections[sectionY] = section; } return(section); }