From 10dea0a6be449b5cfbef6654fc230cedf0e8b85a Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 3 May 2016 17:14:15 +1000 Subject: [PATCH] Fix /fill not working when held block is same as existing block. (since we use brushes now) --- Commands/building/CmdFill.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Commands/building/CmdFill.cs b/Commands/building/CmdFill.cs index 0e542f397..916dff0d3 100644 --- a/Commands/building/CmdFill.cs +++ b/Commands/building/CmdFill.cs @@ -47,16 +47,9 @@ namespace MCGalaxy.Commands { oldExtType = p.level.GetExtTile(x, y, z); p.RevertBlock(x, y, z); GetRealBlock(type, extType, p, ref cpos); - - if (cpos.type == oldType) { - if (cpos.type != Block.custom_block) { - Player.SendMessage(p, "Cannot fill with the same type."); return; - } - if (cpos.extType == oldExtType) { - Player.SendMessage(p, "Cannot fill with the same type."); return; - } + if (!Block.canPlace(p, oldType) && !Block.BuildIn(oldType)) { + Player.SendMessage(p, "Cannot fill with that."); return; } - if (!Block.canPlace(p, oldType) && !Block.BuildIn(oldType)) { Player.SendMessage(p, "Cannot fill with that."); return; } SparseBitSet bits = new SparseBitSet(p.level.Width, p.level.Height, p.level.Length); List buffer = new List(), origins = new List();