From aa17aebbe247e296d2c6803ebbe6008120d3d772 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 24 Oct 2016 15:00:10 +1100 Subject: [PATCH] Core: Get custom doors working, mostly. --- MCGalaxy/Blocks/Behaviour/BlockBehaviour.cs | 2 +- MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs | 16 ++++++++++--- MCGalaxy/Blocks/Behaviour/PlaceBehaviour.cs | 2 +- .../Blocks/Behaviour/WalkthroughBehaviour.cs | 13 ++++++++-- MCGalaxy/Blocks/Physics/AIPhysics.cs | 2 +- .../Blocks/Physics/ActivateablePhysics.cs | 24 ++++++++++++------- MCGalaxy/Blocks/Physics/AirPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/BirdPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/C4Physics.cs | 2 +- MCGalaxy/Blocks/Physics/DoorPhysics.cs | 23 ++++++++++++------ MCGalaxy/Blocks/Physics/ExtLiquidPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/ExtraInfoPhysics.cs | 8 +++++-- MCGalaxy/Blocks/Physics/FinitePhysics.cs | 2 +- MCGalaxy/Blocks/Physics/FirePhysics.cs | 2 +- MCGalaxy/Blocks/Physics/FireworkPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/HunterPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/LeafPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/LiquidPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/OtherPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/PhysicsArgs.cs | 2 +- MCGalaxy/Blocks/Physics/RocketPhysics.cs | 2 +- .../Blocks/Physics/SimpleLiquidPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/SnakePhysics.cs | 2 +- MCGalaxy/Blocks/Physics/TntPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/TrainPhysics.cs | 2 +- MCGalaxy/Blocks/Physics/ZombiePhysics.cs | 2 +- MCGalaxy/Commands/CPE/CustomBlockCommand.cs | 3 ++- .../Commands/building/CmdRestartPhysics.cs | 2 +- MCGalaxy/Commands/other/CmdC4.cs | 8 +++---- MCGalaxy/Drawing/DrawOps/DrawOp.Performer.cs | 2 +- MCGalaxy/Drawing/DrawOps/RedoDrawOp.cs | 2 +- MCGalaxy/Drawing/DrawOps/UndoDrawOp.cs | 2 +- MCGalaxy/Events/Level.Events.cs | 2 +- MCGalaxy/Levels/Level.Blocks.cs | 2 +- MCGalaxy/Levels/Level.Fields.cs | 2 +- MCGalaxy/Levels/Level.Physics.cs | 2 +- MCGalaxy/Player/Player.Handlers.cs | 2 +- MCGalaxy/Plugins/Events/LevelEvents.cs | 2 +- 38 files changed, 98 insertions(+), 59 deletions(-) diff --git a/MCGalaxy/Blocks/Behaviour/BlockBehaviour.cs b/MCGalaxy/Blocks/Behaviour/BlockBehaviour.cs index 229bd8df4..5cb7d1d9e 100644 --- a/MCGalaxy/Blocks/Behaviour/BlockBehaviour.cs +++ b/MCGalaxy/Blocks/Behaviour/BlockBehaviour.cs @@ -16,7 +16,7 @@ permissions and limitations under the Licenses. */ using System; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; namespace MCGalaxy.Blocks { diff --git a/MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs b/MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs index a1cb00895..f7109decc 100644 --- a/MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs +++ b/MCGalaxy/Blocks/Behaviour/DeleteBehaviour.cs @@ -16,7 +16,7 @@ permissions and limitations under the Licenses. */ using System; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; namespace MCGalaxy.Blocks { @@ -75,9 +75,15 @@ namespace MCGalaxy.Blocks { } internal static bool Door(Player p, byte block, ushort x, ushort y, ushort z) { - if (p.level.physics != 0) { + if (p.level.physics != 0) { + bool isExt = false; + if (block == Block.custom_block) { + isExt = true; + block = p.level.GetExtTile(x, y, z); + } + byte physForm; - PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, out physForm); + PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, isExt, out physForm); p.level.Blockchange(x, y, z, physForm, false, args); } else { p.RevertBlock(x, y, z); @@ -100,6 +106,10 @@ namespace MCGalaxy.Blocks { return WalkthroughBehaviour.Portal(p, block, x, y, z, false); } else if (p.level.CustomBlockProps[extBlock].IsMessageBlock) { return WalkthroughBehaviour.MessageBlock(p, block, x, y, z, false); + } else if (p.level.CustomBlockProps[extBlock].IsTDoor) { + return RevertDoor(p, block, x, y, z); + } else if (p.level.CustomBlockProps[extBlock].IsDoor) { + return Door(p, block, x, y, z); } p.ChangeBlock(x, y, z, Block.air, 0); diff --git a/MCGalaxy/Blocks/Behaviour/PlaceBehaviour.cs b/MCGalaxy/Blocks/Behaviour/PlaceBehaviour.cs index 398106692..94a9ad9b7 100644 --- a/MCGalaxy/Blocks/Behaviour/PlaceBehaviour.cs +++ b/MCGalaxy/Blocks/Behaviour/PlaceBehaviour.cs @@ -15,7 +15,7 @@ or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses. */ -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using System; namespace MCGalaxy.Blocks { diff --git a/MCGalaxy/Blocks/Behaviour/WalkthroughBehaviour.cs b/MCGalaxy/Blocks/Behaviour/WalkthroughBehaviour.cs index a31719128..a95a16968 100644 --- a/MCGalaxy/Blocks/Behaviour/WalkthroughBehaviour.cs +++ b/MCGalaxy/Blocks/Behaviour/WalkthroughBehaviour.cs @@ -18,7 +18,7 @@ using System; using System.Collections.Generic; using System.Data; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.SQL; namespace MCGalaxy.Blocks { @@ -26,8 +26,14 @@ namespace MCGalaxy.Blocks { internal static bool Door(Player p, byte block, ushort x, ushort y, ushort z) { if (p.level.physics == 0) return true; + bool isExt = false; + if (block == Block.custom_block) { + isExt = true; + block = p.level.GetExtTile(x, y, z); + } + byte physForm; - PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, out physForm); + PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, isExt, out physForm); p.level.Blockchange(x, y, z, physForm, false, args); return true; } @@ -43,6 +49,9 @@ namespace MCGalaxy.Blocks { return Portal(p, block, x, y, z, true); } else if (p.level.CustomBlockProps[extBlock].IsMessageBlock) { return MessageBlock(p, block, x, y, z, true); + } else if (p.level.CustomBlockProps[extBlock].IsDoor + && p.level.CustomBlockDefs[extBlock].CollideType != 0) { + return Door(p, block, x, y, z); } return false; } diff --git a/MCGalaxy/Blocks/Physics/AIPhysics.cs b/MCGalaxy/Blocks/Physics/AIPhysics.cs index efcd1546c..26326c92c 100644 --- a/MCGalaxy/Blocks/Physics/AIPhysics.cs +++ b/MCGalaxy/Blocks/Physics/AIPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class AIPhysics { diff --git a/MCGalaxy/Blocks/Physics/ActivateablePhysics.cs b/MCGalaxy/Blocks/Physics/ActivateablePhysics.cs index 0988a5ed3..8b313c9de 100644 --- a/MCGalaxy/Blocks/Physics/ActivateablePhysics.cs +++ b/MCGalaxy/Blocks/Physics/ActivateablePhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class ActivateablePhysics { /// Activates fireworks, rockets, and TNT in 1 block radius around (x, y, z) @@ -61,18 +61,25 @@ namespace MCGalaxy.BlockPhysics { public static void DoDoors(Level lvl, ushort x, ushort y, ushort z, bool instant) { int index = lvl.PosToInt(x, y, z); if (index < 0) return; - byte b = lvl.blocks[index]; - if (Block.Props[b].IsDoor) { + byte block = lvl.blocks[index]; + bool ext = block == Block.custom_block; + BlockProps[] props = Block.Props; + if (ext) { + block = lvl.GetExtTile(x, y, z); + props = lvl.CustomBlockProps; + } + + if (props[block].IsDoor) { byte physForm; - PhysicsArgs args = GetDoorArgs(b, out physForm); + PhysicsArgs args = GetDoorArgs(block, ext, out physForm); if (!instant) lvl.AddUpdate(index, physForm, false, args); else lvl.Blockchange(index, physForm, false, args); - } else if (Block.Props[b].IsTDoor) { - PhysicsArgs args = GetTDoorArgs(b); + } else if (props[block].IsTDoor) { + PhysicsArgs args = GetTDoorArgs(block, ext); lvl.AddUpdate(index, Block.air, false, args); } else { - byte oDoor = Block.Props[b].ODoorId; + byte oDoor = props[block].ODoorId; if (oDoor != Block.Invalid) lvl.AddUpdate(index, oDoor, true); } @@ -86,7 +93,8 @@ namespace MCGalaxy.BlockPhysics { args.ExtBlock = isExt; physForm = Block.door_tree_air; // air - if (raw == Block.air_door || raw == Block.air_switch) { + if (isExt) { + } else if (raw == Block.air_door || raw == Block.air_switch) { args.Value1 = 4 - 1; } else if (raw == Block.door_green) { physForm = Block.door_green_air; // red wool diff --git a/MCGalaxy/Blocks/Physics/AirPhysics.cs b/MCGalaxy/Blocks/Physics/AirPhysics.cs index 9ce4c6d64..62eb8f1c3 100644 --- a/MCGalaxy/Blocks/Physics/AirPhysics.cs +++ b/MCGalaxy/Blocks/Physics/AirPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public enum AirFlood { Full, Layer, Down, Up, } public static class AirPhysics { diff --git a/MCGalaxy/Blocks/Physics/BirdPhysics.cs b/MCGalaxy/Blocks/Physics/BirdPhysics.cs index ab0ec6daa..2a5f9b6bf 100644 --- a/MCGalaxy/Blocks/Physics/BirdPhysics.cs +++ b/MCGalaxy/Blocks/Physics/BirdPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class BirdPhysics { public static void Do(Level lvl, ref Check C) { diff --git a/MCGalaxy/Blocks/Physics/C4Physics.cs b/MCGalaxy/Blocks/Physics/C4Physics.cs index 196cfc670..3ec9e2d33 100644 --- a/MCGalaxy/Blocks/Physics/C4Physics.cs +++ b/MCGalaxy/Blocks/Physics/C4Physics.cs @@ -18,7 +18,7 @@ using System; using System.Collections.Generic; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class C4Physics { diff --git a/MCGalaxy/Blocks/Physics/DoorPhysics.cs b/MCGalaxy/Blocks/Physics/DoorPhysics.cs index fcb93730b..1e9bed7da 100644 --- a/MCGalaxy/Blocks/Physics/DoorPhysics.cs +++ b/MCGalaxy/Blocks/Physics/DoorPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class DoorPhysics { // Change anys door blocks nearby into air forms @@ -25,7 +25,8 @@ namespace MCGalaxy.BlockPhysics { ushort x, y, z; lvl.IntToPos(C.b, out x, out y, out z); byte block = C.data.Value2; - bool instant = block == Block.air_door || block == Block.air_switch; + bool instant = !C.data.ExtBlock && + (block == Block.air_door || block == Block.air_switch); ActivateablePhysics.DoDoors(lvl, (ushort)(x + 1), y, z, instant); ActivateablePhysics.DoDoors(lvl, (ushort)(x - 1), y, z, instant); @@ -54,7 +55,7 @@ namespace MCGalaxy.BlockPhysics { } static void ActivateODoor(Level lvl, ref Check C, int index) { - byte block = Block.Props[lvl.blocks[index]].ODoorId; + byte block = Block.Props[lvl.blocks[index]].ODoorId; if (block == lvl.blocks[C.b]) { lvl.AddUpdate(index, block, true); } @@ -76,10 +77,18 @@ namespace MCGalaxy.BlockPhysics { static void ActivateTDoor(Level lvl, int index) { byte block = lvl.blocks[index]; - if (!Block.Props[block].IsTDoor) return; - - PhysicsArgs args = ActivateablePhysics.GetTDoorArgs(block); - lvl.AddUpdate(index, Block.air, false, args); + if (block != Block.custom_block) { + if (!Block.Props[block].IsTDoor) return; + + PhysicsArgs args = ActivateablePhysics.GetTDoorArgs(block, false); + lvl.AddUpdate(index, Block.air, false, args); + } else { + block = lvl.GetExtTile(index); + if (!lvl.CustomBlockProps[block].IsTDoor) return; + + PhysicsArgs args = ActivateablePhysics.GetTDoorArgs(block, true); + lvl.AddUpdate(index, Block.air, false, args); + } } } } \ No newline at end of file diff --git a/MCGalaxy/Blocks/Physics/ExtLiquidPhysics.cs b/MCGalaxy/Blocks/Physics/ExtLiquidPhysics.cs index 7d7c9bd09..45524af20 100644 --- a/MCGalaxy/Blocks/Physics/ExtLiquidPhysics.cs +++ b/MCGalaxy/Blocks/Physics/ExtLiquidPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class ExtLiquidPhysics { diff --git a/MCGalaxy/Blocks/Physics/ExtraInfoPhysics.cs b/MCGalaxy/Blocks/Physics/ExtraInfoPhysics.cs index 72784ff18..3ca646a1d 100644 --- a/MCGalaxy/Blocks/Physics/ExtraInfoPhysics.cs +++ b/MCGalaxy/Blocks/Physics/ExtraInfoPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public delegate bool ExtraInfoHandler(Level lvl, ref Check C); @@ -47,7 +47,11 @@ namespace MCGalaxy.BlockPhysics { if (C.data.Type2 == PhysicsArgs.Wait) C.data.Type2 = 0; if (C.data.Door) { - lvl.AddUpdate(C.b, C.data.Value2); C.data.ResetTypes(); + PhysicsArgs dArgs = default(PhysicsArgs); + dArgs.ExtBlock = C.data.ExtBlock; + lvl.AddUpdate(C.b, C.data.Value2, false, dArgs); + + C.data.ResetTypes(); C.data.Data = PhysicsArgs.RemoveFromChecks; } return false; diff --git a/MCGalaxy/Blocks/Physics/FinitePhysics.cs b/MCGalaxy/Blocks/Physics/FinitePhysics.cs index 6eb7b153b..4cd675bfb 100644 --- a/MCGalaxy/Blocks/Physics/FinitePhysics.cs +++ b/MCGalaxy/Blocks/Physics/FinitePhysics.cs @@ -18,7 +18,7 @@ using System; using System.Collections.Generic; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class FinitePhysics { diff --git a/MCGalaxy/Blocks/Physics/FirePhysics.cs b/MCGalaxy/Blocks/Physics/FirePhysics.cs index 8e758bb8e..15bf43593 100644 --- a/MCGalaxy/Blocks/Physics/FirePhysics.cs +++ b/MCGalaxy/Blocks/Physics/FirePhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class FirePhysics { diff --git a/MCGalaxy/Blocks/Physics/FireworkPhysics.cs b/MCGalaxy/Blocks/Physics/FireworkPhysics.cs index 791660ea3..970b32f6d 100644 --- a/MCGalaxy/Blocks/Physics/FireworkPhysics.cs +++ b/MCGalaxy/Blocks/Physics/FireworkPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class FireworkPhysics { diff --git a/MCGalaxy/Blocks/Physics/HunterPhysics.cs b/MCGalaxy/Blocks/Physics/HunterPhysics.cs index b1a58c5e1..b6b55f2f5 100644 --- a/MCGalaxy/Blocks/Physics/HunterPhysics.cs +++ b/MCGalaxy/Blocks/Physics/HunterPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class HunterPhysics { diff --git a/MCGalaxy/Blocks/Physics/LeafPhysics.cs b/MCGalaxy/Blocks/Physics/LeafPhysics.cs index 8caa2cdc9..85d3ede44 100644 --- a/MCGalaxy/Blocks/Physics/LeafPhysics.cs +++ b/MCGalaxy/Blocks/Physics/LeafPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class LeafPhysics { diff --git a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs index fadee4e47..7da4fe2c9 100644 --- a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs +++ b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class LiquidPhysics { diff --git a/MCGalaxy/Blocks/Physics/OtherPhysics.cs b/MCGalaxy/Blocks/Physics/OtherPhysics.cs index cfdd15277..1d57924fa 100644 --- a/MCGalaxy/Blocks/Physics/OtherPhysics.cs +++ b/MCGalaxy/Blocks/Physics/OtherPhysics.cs @@ -18,7 +18,7 @@ using System; using MCGalaxy.Generator.Foilage; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class OtherPhysics { diff --git a/MCGalaxy/Blocks/Physics/PhysicsArgs.cs b/MCGalaxy/Blocks/Physics/PhysicsArgs.cs index 1e6f2087a..14e59329c 100644 --- a/MCGalaxy/Blocks/Physics/PhysicsArgs.cs +++ b/MCGalaxy/Blocks/Physics/PhysicsArgs.cs @@ -18,7 +18,7 @@ using System; using System.Runtime.InteropServices; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct PhysicsArgs { diff --git a/MCGalaxy/Blocks/Physics/RocketPhysics.cs b/MCGalaxy/Blocks/Physics/RocketPhysics.cs index 47bc64978..47e537529 100644 --- a/MCGalaxy/Blocks/Physics/RocketPhysics.cs +++ b/MCGalaxy/Blocks/Physics/RocketPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class RocketPhysics { diff --git a/MCGalaxy/Blocks/Physics/SimpleLiquidPhysics.cs b/MCGalaxy/Blocks/Physics/SimpleLiquidPhysics.cs index ad158b1d0..839e08fad 100644 --- a/MCGalaxy/Blocks/Physics/SimpleLiquidPhysics.cs +++ b/MCGalaxy/Blocks/Physics/SimpleLiquidPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class SimpleLiquidPhysics { diff --git a/MCGalaxy/Blocks/Physics/SnakePhysics.cs b/MCGalaxy/Blocks/Physics/SnakePhysics.cs index c36c8b3ca..d2c6f188f 100644 --- a/MCGalaxy/Blocks/Physics/SnakePhysics.cs +++ b/MCGalaxy/Blocks/Physics/SnakePhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class SnakePhysics { diff --git a/MCGalaxy/Blocks/Physics/TntPhysics.cs b/MCGalaxy/Blocks/Physics/TntPhysics.cs index 433747995..158e35dc1 100644 --- a/MCGalaxy/Blocks/Physics/TntPhysics.cs +++ b/MCGalaxy/Blocks/Physics/TntPhysics.cs @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; using MCGalaxy.Games; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class TntPhysics { diff --git a/MCGalaxy/Blocks/Physics/TrainPhysics.cs b/MCGalaxy/Blocks/Physics/TrainPhysics.cs index 3c468cbc2..5dc307a7f 100644 --- a/MCGalaxy/Blocks/Physics/TrainPhysics.cs +++ b/MCGalaxy/Blocks/Physics/TrainPhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class TrainPhysics { diff --git a/MCGalaxy/Blocks/Physics/ZombiePhysics.cs b/MCGalaxy/Blocks/Physics/ZombiePhysics.cs index 0a64a208a..4f9797cc7 100644 --- a/MCGalaxy/Blocks/Physics/ZombiePhysics.cs +++ b/MCGalaxy/Blocks/Physics/ZombiePhysics.cs @@ -17,7 +17,7 @@ */ using System; -namespace MCGalaxy.BlockPhysics { +namespace MCGalaxy.Blocks.Physics { public static class ZombiePhysics { diff --git a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs index 67ba3a766..63c5e4019 100644 --- a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs +++ b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs @@ -165,7 +165,8 @@ namespace MCGalaxy.Commands.CPE { if (!ExistsInScope(def, i, global)) continue; defsInScope.Add(def); } - MultiPageOutput.Output(p, defsInScope, FormatBlock, cmd.Substring(1), "custom blocks", modifier, true); + MultiPageOutput.Output(p, defsInScope, FormatBlock, cmd.Substring(1) + " list", + "custom blocks", modifier, true); } static string FormatBlock(BlockDefinition def, int i) { diff --git a/MCGalaxy/Commands/building/CmdRestartPhysics.cs b/MCGalaxy/Commands/building/CmdRestartPhysics.cs index 72e3717fd..d21bfa7d5 100644 --- a/MCGalaxy/Commands/building/CmdRestartPhysics.cs +++ b/MCGalaxy/Commands/building/CmdRestartPhysics.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; namespace MCGalaxy.Commands.Building { public sealed class CmdRestartPhysics : Command { diff --git a/MCGalaxy/Commands/other/CmdC4.cs b/MCGalaxy/Commands/other/CmdC4.cs index c99f9e737..b22bc3650 100644 --- a/MCGalaxy/Commands/other/CmdC4.cs +++ b/MCGalaxy/Commands/other/CmdC4.cs @@ -15,12 +15,10 @@ or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses. */ -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; -namespace MCGalaxy.Commands -{ - public sealed class CmdC4 : Command - { +namespace MCGalaxy.Commands { + public sealed class CmdC4 : Command { public override string name { get { return "c4"; } } public override string shortcut { get { return ""; } } public override string type { get { return CommandTypes.Other; } } diff --git a/MCGalaxy/Drawing/DrawOps/DrawOp.Performer.cs b/MCGalaxy/Drawing/DrawOps/DrawOp.Performer.cs index 22b70a8f2..34ba2d5a6 100644 --- a/MCGalaxy/Drawing/DrawOps/DrawOp.Performer.cs +++ b/MCGalaxy/Drawing/DrawOps/DrawOp.Performer.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Commands; using MCGalaxy.Drawing.Brushes; using MCGalaxy.Drawing.Ops; diff --git a/MCGalaxy/Drawing/DrawOps/RedoDrawOp.cs b/MCGalaxy/Drawing/DrawOps/RedoDrawOp.cs index 068d4488c..976cbdd8e 100644 --- a/MCGalaxy/Drawing/DrawOps/RedoDrawOp.cs +++ b/MCGalaxy/Drawing/DrawOps/RedoDrawOp.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Drawing.Brushes; using MCGalaxy.Undo; diff --git a/MCGalaxy/Drawing/DrawOps/UndoDrawOp.cs b/MCGalaxy/Drawing/DrawOps/UndoDrawOp.cs index 92dc29a9b..c939b1438 100644 --- a/MCGalaxy/Drawing/DrawOps/UndoDrawOp.cs +++ b/MCGalaxy/Drawing/DrawOps/UndoDrawOp.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Drawing.Brushes; using MCGalaxy.Undo; diff --git a/MCGalaxy/Events/Level.Events.cs b/MCGalaxy/Events/Level.Events.cs index bb8a80d9f..76a079253 100644 --- a/MCGalaxy/Events/Level.Events.cs +++ b/MCGalaxy/Events/Level.Events.cs @@ -16,7 +16,7 @@ permissions and limitations under the Licenses. */ using System; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; namespace MCGalaxy { diff --git a/MCGalaxy/Levels/Level.Blocks.cs b/MCGalaxy/Levels/Level.Blocks.cs index 1b0abf247..92fa34439 100644 --- a/MCGalaxy/Levels/Level.Blocks.cs +++ b/MCGalaxy/Levels/Level.Blocks.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Games; using MCGalaxy.SQL; diff --git a/MCGalaxy/Levels/Level.Fields.cs b/MCGalaxy/Levels/Level.Fields.cs index 2d554012a..09efd4b8f 100644 --- a/MCGalaxy/Levels/Level.Fields.cs +++ b/MCGalaxy/Levels/Level.Fields.cs @@ -19,7 +19,7 @@ using System; using System.Collections.Generic; using System.Threading; using MCGalaxy.Blocks; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Config; using MCGalaxy.Games; using Timer = System.Timers.Timer; diff --git a/MCGalaxy/Levels/Level.Physics.cs b/MCGalaxy/Levels/Level.Physics.cs index 6797b04d5..f304917b2 100644 --- a/MCGalaxy/Levels/Level.Physics.cs +++ b/MCGalaxy/Levels/Level.Physics.cs @@ -18,7 +18,7 @@ using System; using System.Threading; using MCGalaxy.Blocks; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Games; namespace MCGalaxy { diff --git a/MCGalaxy/Player/Player.Handlers.cs b/MCGalaxy/Player/Player.Handlers.cs index 03b5d1c27..2a020c09c 100644 --- a/MCGalaxy/Player/Player.Handlers.cs +++ b/MCGalaxy/Player/Player.Handlers.cs @@ -19,7 +19,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading; using MCGalaxy.Blocks; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; using MCGalaxy.Commands; using MCGalaxy.Games; using MCGalaxy.SQL; diff --git a/MCGalaxy/Plugins/Events/LevelEvents.cs b/MCGalaxy/Plugins/Events/LevelEvents.cs index ffb3e2185..03be77b09 100644 --- a/MCGalaxy/Plugins/Events/LevelEvents.cs +++ b/MCGalaxy/Plugins/Events/LevelEvents.cs @@ -17,7 +17,7 @@ */ using System; using System.Collections.Generic; -using MCGalaxy.BlockPhysics; +using MCGalaxy.Blocks.Physics; namespace MCGalaxy {