Fix chunk damage during terrain gen
This commit is contained in:
parent
6fb8ee7ba5
commit
535437f51e
@ -128,6 +128,7 @@ namespace TrueCraft.Core.World
|
||||
public void SetBlockID(Coordinates3D coordinates, byte value)
|
||||
{
|
||||
IsModified = true;
|
||||
if (ParentRegion != null)
|
||||
ParentRegion.DamageChunk(Coordinates);
|
||||
int index = coordinates.Y + (coordinates.Z * Height) + (coordinates.X * Height * Width);
|
||||
Data[index] = value;
|
||||
@ -166,6 +167,7 @@ namespace TrueCraft.Core.World
|
||||
public void SetMetadata(Coordinates3D coordinates, byte value)
|
||||
{
|
||||
IsModified = true;
|
||||
if (ParentRegion != null)
|
||||
ParentRegion.DamageChunk(Coordinates);
|
||||
int index = coordinates.Y + (coordinates.Z * Height) + (coordinates.X * Height * Width);
|
||||
Metadata[index] = value;
|
||||
@ -178,6 +180,7 @@ namespace TrueCraft.Core.World
|
||||
public void SetSkyLight(Coordinates3D coordinates, byte value)
|
||||
{
|
||||
IsModified = true;
|
||||
if (ParentRegion != null)
|
||||
ParentRegion.DamageChunk(Coordinates);
|
||||
int index = coordinates.Y + (coordinates.Z * Height) + (coordinates.X * Height * Width);
|
||||
SkyLight[index] = value;
|
||||
@ -190,6 +193,7 @@ namespace TrueCraft.Core.World
|
||||
public void SetBlockLight(Coordinates3D coordinates, byte value)
|
||||
{
|
||||
IsModified = true;
|
||||
if (ParentRegion != null)
|
||||
ParentRegion.DamageChunk(Coordinates);
|
||||
int index = coordinates.Y + (coordinates.Z * Height) + (coordinates.X * Height * Width);
|
||||
BlockLight[index] = value;
|
||||
@ -215,6 +219,7 @@ namespace TrueCraft.Core.World
|
||||
else
|
||||
TileEntities[coordinates] = value;
|
||||
IsModified = true;
|
||||
if (ParentRegion != null)
|
||||
ParentRegion.DamageChunk(Coordinates);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user