mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Fix manual deletion of a block above dirt not changing it to grass. (Thanks Basicaneer)
This commit is contained in:
parent
f33a444d6d
commit
04f14f0c0c
@ -142,17 +142,18 @@ namespace MCGalaxy {
|
||||
|
||||
bool DeleteBlock(byte b, ushort x, ushort y, ushort z, byte type, byte extType) {
|
||||
if (deleteMode) { return ChangeBlock(x, y, z, Block.air, 0); }
|
||||
bool changed = true;
|
||||
|
||||
Block.HandleDelete handler = Block.deleteHandlers[b];
|
||||
if (handler != null) {
|
||||
if (handler(this, b, x, y, z)) return false;
|
||||
} else {
|
||||
return ChangeBlock(x, y, z, Block.air, 0);
|
||||
changed = ChangeBlock(x, y, z, Block.air, 0);
|
||||
}
|
||||
|
||||
if ((level.physics == 0 || level.physics == 5) && level.GetTile(x, (ushort)(y - 1), z) == Block.dirt)
|
||||
ChangeBlock(x, (ushort)(y - 1), z, Block.grass, 0);
|
||||
return true;
|
||||
return changed;
|
||||
}
|
||||
|
||||
bool PlaceBlock(byte b, ushort x, ushort y, ushort z, byte type, byte extType) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user