Fix /paste with /transform scale. (Thanks 6 or so hours of trying to find that)

This commit is contained in:
UnknownShadow200 2016-08-27 10:10:38 +10:00
parent f107cf2a34
commit 545bd4025b
2 changed files with 2 additions and 6 deletions

View File

@ -40,12 +40,7 @@ namespace MCGalaxy.Drawing.Ops {
state.GetCoords(i, out locX, out locY, out locZ); state.GetCoords(i, out locX, out locY, out locZ);
ushort x = (ushort)(locX + x1), y = (ushort)(locY + y1), z = (ushort)(locZ + z1); ushort x = (ushort)(locX + x1), y = (ushort)(locY + y1), z = (ushort)(locZ + z1);
byte block = lvl.GetTile(x, y, z), extBlock = 0; if ((b != Block.air || pasteAir) && lvl.InBound(x, y, z))
if (block == Block.custom_block) extBlock = lvl.GetExtTile(x, y, z);
bool diff = b != block || (b == Block.custom_block && extB != extBlock);
bool place = lvl.InBound(x, y, z) && diff;
if ((b != Block.air || pasteAir) && place)
yield return Place(x, y, z, b, extB); yield return Place(x, y, z, b, extB);
} }
} }

View File

@ -83,6 +83,7 @@ namespace MCGalaxy.Drawing.Transforms {
success = int.TryParse(top, out mul) && int.TryParse(bottom, out div); success = int.TryParse(top, out mul) && int.TryParse(bottom, out div);
} }
if (mul > 32 || mul < -32) { Player.Message(p, "Scale must be between -32 and 32."); return false; }
if (!success) { Player.MessageLines(p, HelpString); } if (!success) { Player.MessageLines(p, HelpString); }
return success; return success;
} }