Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
        }