public OtherPhysics(Game game, PhysicsBase physics) { this.game = game; map = game.World; physics.OnPlace[Block.Slab] = HandleSlab; physics.OnPlace[Block.CobblestoneSlab] = HandleCobblestoneSlab; }
public TNTPhysics(Game game, PhysicsBase physics) { this.game = game; map = game.World; this.physics = physics; physics.OnDelete[Block.TNT] = HandleTnt; }
public SinglePlayerServer(Game window) { game = window; physics = new PhysicsBase(game); SupportsFullCP437 = !game.ClassicMode; SupportsPartialMessages = true; }
public SinglePlayerServer(Game game) { this.game = game; physics = new PhysicsBase(game); SupportsFullCP437 = !game.ClassicMode; SupportsPartialMessages = true; IsSinglePlayer = true; }
public FallingPhysics(Game game, PhysicsBase physics) { this.game = game; map = game.World; this.physics = physics; physics.OnPlace[Block.Sand] = DoFalling; physics.OnPlace[Block.Gravel] = DoFalling; physics.OnActivate[Block.Sand] = DoFalling; physics.OnActivate[Block.Gravel] = DoFalling; physics.OnRandomTick[Block.Sand] = DoFalling; physics.OnRandomTick[Block.Gravel] = DoFalling; }
public FoliagePhysics(Game game, PhysicsBase physics) { this.game = game; this.physics = physics; map = game.World; physics.OnPlace[Block.Sapling] = HandleSapling; physics.OnRandomTick[Block.Sapling] = HandleSapling; physics.OnRandomTick[Block.Dirt] = HandleDirt; physics.OnRandomTick[Block.Grass] = HandleGrass; physics.OnRandomTick[Block.Dandelion] = HandleFlower; physics.OnRandomTick[Block.Rose] = HandleFlower; physics.OnRandomTick[Block.RedMushroom] = HandleMushroom; physics.OnRandomTick[Block.BrownMushroom] = HandleMushroom; }
public void TickLava() { int count = Lava.Count; for (int i = 0; i < count; i++) { int index; if (PhysicsBase.CheckItem(Lava, out index)) { BlockID block = map.blocks[index]; if (!(block == Block.Lava || block == Block.StillLava)) { continue; } ActivateLava(index, block); } } }
public void TickWater() { int count = Water.Count; for (int i = 0; i < count; i++) { int index; if (PhysicsBase.CheckItem(Water, out index)) { BlockID block = map.blocks[index]; if (!(block == Block.Water || block == Block.StillWater)) { continue; } ActivateWater(index, block); } } }
public LiquidPhysics(Game game, PhysicsBase physics) { this.game = game; map = game.World; physics.OnPlace[Block.Lava] = OnPlaceLava; physics.OnPlace[Block.Water] = OnPlaceWater; physics.OnPlace[Block.Sponge] = PlaceSponge; physics.OnDelete[Block.Sponge] = DeleteSponge; physics.OnActivate[Block.Water] = physics.OnPlace[Block.Water]; physics.OnActivate[Block.StillWater] = physics.OnPlace[Block.Water]; physics.OnActivate[Block.Lava] = physics.OnPlace[Block.Lava]; physics.OnActivate[Block.StillLava] = physics.OnPlace[Block.Lava]; physics.OnRandomTick[Block.Water] = ActivateWater; physics.OnRandomTick[Block.StillWater] = ActivateWater; physics.OnRandomTick[Block.Lava] = ActivateLava; physics.OnRandomTick[Block.StillLava] = ActivateLava; }
public LiquidPhysics(Game game, PhysicsBase physics) { this.game = game; map = game.World; info = game.BlockInfo; physics.OnPlace[Block.Lava] = (index, b) => Lava.Enqueue(defLavaTick | (uint)index); physics.OnPlace[Block.Water] = (index, b) => Water.Enqueue(defWaterTick | (uint)index); physics.OnPlace[Block.Sponge] = PlaceSponge; physics.OnDelete[Block.Sponge] = DeleteSponge; physics.OnActivate[Block.Water] = physics.OnPlace[Block.Water]; physics.OnActivate[Block.StillWater] = physics.OnPlace[Block.Water]; physics.OnActivate[Block.Lava] = physics.OnPlace[Block.Lava]; physics.OnActivate[Block.StillLava] = physics.OnPlace[Block.Lava]; physics.OnRandomTick[Block.Water] = ActivateWater; physics.OnRandomTick[Block.StillWater] = ActivateWater; physics.OnRandomTick[Block.Lava] = ActivateLava; physics.OnRandomTick[Block.StillLava] = ActivateLava; }