Skip to content
Permalink
Browse files

Painting same block over and over shouldn't add multiple blockdb entr…

…ies.
  • Loading branch information...
UnknownShadow200 committed Sep 9, 2017
1 parent 6f57fce commit d37067403e33d6dbf23103c0c8a8b183862262ca
Showing with 7 additions and 5 deletions.
  1. +7 −5 fCraft/Player/Player.cs
@@ -1252,14 +1252,16 @@ public void Message([NotNull] byte messageType, [NotNull] string message, [NotNu
RaisePlayerPlacedBlockEvent(this, World.Map, coordBelow, Block.Grass, Block.Dirt, context);
SendNow(Packet.MakeSetBlock(coordBelow, Block.Dirt));
}

// handle normal blocks
blockUpdate = new BlockUpdate(this, coord, type);
Info.ProcessBlockPlaced((byte)type);
Block old = map.GetBlock(coord);
map.QueueUpdate(blockUpdate);
RaisePlayerPlacedBlockEvent(this, World.Map, coord, old, type, context);
if (old != type) {
blockUpdate = new BlockUpdate(this, coord, type);
Info.ProcessBlockPlaced((byte)type);
map.QueueUpdate(blockUpdate);
RaisePlayerPlacedBlockEvent(this, World.Map, coord, old, type, context);
}
SendNow(Packet.MakeSetBlock(coord, type));

break;

case CanPlaceResult.BlocktypeDenied:

0 comments on commit d370674

Please sign in to comment.
You can’t perform that action at this time.