Fix /paint not adding 'painted' flag to /b when replacing existing solid block.

This commit is contained in:
UnknownShadow200 2017-09-19 14:14:23 +10:00
parent 34a5f6aa87
commit 901ad70064

View File

@ -163,7 +163,9 @@ namespace MCGalaxy {
if (type == 2) Player.GlobalBlockchange(level, x, y, z, block); // different visually
ushort flags = BlockDBFlags.ManualPlace;
if (painting && Replacable(old.BlockID)) flags = BlockDBFlags.Painted;
if (painting && CollideType.IsSolid(level.CollideType(old))) {
flags = BlockDBFlags.Painted;
}
level.BlockDB.Cache.Add(this, x, y, z, flags, old, block);
bool autoGrass = level.Config.GrassGrow && (level.physics == 0 || level.physics == 5);
@ -179,12 +181,6 @@ namespace MCGalaxy {
return type;
}
static bool Replacable(byte block) {
block = Block.Convert(block);
return block == Block.Air || (block >= Block.Water && block <= Block.StillLava);
}
internal int ProcessReceived(byte[] buffer, int bufferLen) {
int processedLen = 0;
try {