public static void SendRemove(Player p, BlockDefinition def) { p.Send(Packet.MakeRemoveBlockDefinition(def.BlockID)); if (!p.Supports(CpeExt.BlockPermissions)) { return; } p.Send(Packet.MakeSetBlockPermission( (Block)def.BlockID, false, false)); }
internal static void SendNowRemoveOldBlocks(Player p, World oldWorld) { BlockDefinition[] defs = oldWorld.BlockDefs; for (int i = (int)Block.Air + 1; i < defs.Length; i++) { BlockDefinition def = defs[i]; if (def == null || def == GlobalDefs[i]) { continue; } p.SendNow(Packet.MakeRemoveBlockDefinition((byte)i)); } }