public static MapCell GetCellByCellId(this Worlds.World world, string s2CellId) { MapCell reslt; Worlds.World.Cells.TryGetValue(s2CellId, out reslt); return(reslt); }
/// <inheritdoc /> public SmallFireball(Worlds.World level) : base(EntityType.SmallFireball, level) { Width = 0.3125; Height = 0.3125; Gravity = 0; if (ItemFactory.TryGetItem("minecraft:fire_charge", out var item)) { SetItem(item); } }
public static bool AddNewCell(this Worlds.World world, MapCell newCell, bool force) { bool reslt; if (force) { reslt = Worlds.World.Cells.AddOrUpdate(newCell.S2CellId.ToString(), newCell, (k, v) => newCell) != null; } else { reslt = Worlds.World.Cells.TryAdd(newCell.S2CellId.ToString(), newCell); } return(reslt); }
public static void RefreshSpawns(this Worlds.World world, string s2CellId = null) { var s2CellIds = Worlds.World.Cells.GetEnumerator(); do { if (s2CellIds.Current.Value.IsNull()) { continue; } if (s2CellId != null) { while (s2CellId != s2CellIds.Current.Key) { s2CellIds.MoveNext(); } } KeyValuePair <string, MapCell> currCell = s2CellIds.Current; foreach (var fort in currCell.Value.Forts) { } } while (s2CellIds.MoveNext() && s2CellId == null); }
public TileDamageEvent(Player player, byte damage, Tile tile, Worlds.World world, API.Server server) : base(tile, world, server) { Player = player; Damage = damage; }
public WorldWireOperationEvent(Vector2D <int> start, Vector2D <int> end, WireToolMode mode, Player player, API.Server server, Worlds.World world) : base(server, world) { Start = start; End = end; Mode = mode; Source = player; }
public static bool CellAlreadyRegistered(this Worlds.World world, string s2CellId) { return(Worlds.World.Cells.ContainsKey(s2CellId)); }
public static int GetCellIndexByCellId(this Worlds.World world, string s2CellId) { return(0); }
public TileBreakEvent(Player player, Tile tile, Worlds.World world, API.Server server) : base(tile, world, server) { Player = player; }
protected TileEvent(Tile tile, Worlds.World world, API.Server server) : base(server, world) { Tile = tile; }