From 16cf6399f0899c5c99fe3b282d0e4bac510ab124 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Fri, 3 Jun 2011 06:49:23 +0000 Subject: [PATCH] Enums for interpreting data values --- Substrate/SubstrateCS/Source/Data.cs | 318 +++++++++++++++++++++++ Substrate/SubstrateCS/Source/ItemInfo.cs | 26 -- Substrate/SubstrateCS/Substrate.csproj | 1 + 3 files changed, 319 insertions(+), 26 deletions(-) create mode 100644 Substrate/SubstrateCS/Source/Data.cs diff --git a/Substrate/SubstrateCS/Source/Data.cs b/Substrate/SubstrateCS/Source/Data.cs new file mode 100644 index 0000000..ae64f2d --- /dev/null +++ b/Substrate/SubstrateCS/Source/Data.cs @@ -0,0 +1,318 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Substrate +{ + + // Block Data + + public enum WoodType + { + OAK = 0, + SPRUCE = 1, + BIRCH = 2, + } + + public enum LeafType + { + OAK = 0, + SPRUCE = 1, + BIRCH = 2, + } + + public enum SaplingType + { + OAK = 0, + SPRUCE = 1, + BIRCH = 2, + } + + public enum WaterFlow + { + FULL = 0, + FLOW_1 = 1, + FLOW_2 = 2, + FLOW_3 = 3, + FLOW_4 = 4, + FLOW_5 = 5, + FLOW_6 = 6, + FLOW_7 = 7, + } + + public enum LavaFlow + { + FULL = 0, + FLOW_1 = 2, + FLOW_2 = 4, + FLOW_3 = 6, + } + + [FlagsAttribute] + public enum LiquidState + { + FALLING = 0x08, + } + + + public enum DoorHinge + { + NORTHEAST = 0, + SOUTHEAST = 1, + SOUTHWEST = 2, + NORTHWEST = 3, + } + + [FlagsAttribute] + public enum DoorState + { + SWUNG = 0x04, + TOPHALF = 0x08, + } + + public enum WoolColor + { + WHITE = 0, + ORANGE = 1, + MAGENTA = 2, + LIGHT_BLUE = 3, + YELLOW = 4, + LIGHT_GREEN = 5, + PINK = 6, + GRAY = 7, + LIGHT_GRAY = 8, + CYAN = 9, + PURPLE = 10, + BLUE = 11, + BROWN = 12, + DARK_GREEN = 13, + RED = 14, + BLACK = 15 + } + + public enum TorchOrientation + { + SOUTH = 1, + NORTH = 2, + WEST = 3, + EAST = 4, + FLOOR = 5, + } + + public enum RailOrientation + { + EASTWEST = 0, + NORTHSOUTH = 1, + ASCEND_SOUTH = 2, + ASCEND_NORTH = 3, + ASCEND_EAST = 4, + ASCEND_WEST = 5, + NORTHEAST = 6, + SOUTHEAST = 7, + SOUTHWEST = 8, + NORTHWEST = 9 + } + + public enum PoweredRailOrientation + { + EAST_WEST = 0, + NORTH_SOUTH = 1, + ASCEND_SOUTH = 2, + ASCEND_NORTH = 3, + ASCEND_EAST = 4, + ASCEND_WEST = 5, + } + + [FlagsAttribute] + public enum PoweredRailState + { + POWERED = 0x08, + } + + public enum LadderOrientation + { + EAST = 2, + WEST = 3, + NORTH = 4, + SOUTH = 5, + } + + public enum StairOrientation + { + ASCEND_SOUTH = 0, + ASCEND_NORTH = 1, + ASCEND_WEST = 2, + ASCEND_EAST = 3, + } + + public enum LeverOrientation + { + SOUTH = 1, + NORTH = 2, + WEST = 3, + EAST = 4, + GROUND_EASTWEST = 5, + GROUND_NORTHSOUTH = 6, + } + + [FlagsAttribute] + public enum LeverState + { + POWERED = 0x08, + } + + public enum ButtonOrientation + { + WEST = 1, + EAST = 2, + SOUTH = 3, + NORTH = 4, + } + + [FlagsAttribute] + public enum ButtonState + { + PRESSED = 0x08, + } + + public enum SignPostOrientation + { + WEST = 0, + WEST_NORTHWEST = 1, + NORTHWEST = 2, + NORTH_NORTHWEST = 3, + NORTH = 4, + NORTH_NORTHEAST = 5, + NORTHEAST = 6, + EAST_NORTHEAST = 7, + EAST = 8, + EAST_SOUTHEAST = 9, + SOUTHEAST = 10, + SOUTH_SOUTHEAST = 11, + SOUTH = 12, + SOUTH_SOUTHWEST = 13, + SOUTHWEST = 14, + WEST_SOUTHWEST = 15, + } + + public enum WallSignOrientation + { + EAST = 2, + WEST = 3, + NORTH = 4, + SOUTH = 5, + } + + public enum FurnaceOrientation + { + EAST = 2, + WEST = 3, + NORTH = 4, + SOUTH = 5, + } + + public enum PumpkinOrientation + { + EAST = 0, + SOUTH = 1, + WEST = 2, + NORTH = 3, + } + + [FlagsAttribute] + public enum PressurePlateState + { + PRESSED = 0x01, + } + + public enum SlabType + { + STONE = 0, + SANDSTONE = 1, + WOOD = 2, + COBBLESTONE = 3, + } + + public enum BedOrientation + { + WEST = 0, + NORTH = 1, + EAST = 2, + SOUTH = 3, + } + + public enum CakeState + { + PIECES_6 = 0, + PIECES_5 = 1, + PIECES_4 = 2, + PIECES_3 = 3, + PIECES_2 = 4, + PIECES_1 = 5, + } + + [FlagsAttribute] + public enum BedState + { + HEAD = 0x08, + } + + public enum RepeaterOriengation + { + EAST = 0, + SOUTH = 1, + WEST = 2, + NORTH = 3, + } + + public enum RepeaterDelay + { + DELAY_1 = 0, + DELAY_2 = 4, + DELAY_3 = 8, + DELAY_4 = 12, + } + + public enum TallGrassType + { + DEAD_SHRUB = 0, + TALL_GRASS = 1, + FERN = 2, + } + + public enum TrapdoorOrientation + { + WEST = 0, + EAST = 1, + SOUTH = 2, + NORTH = 3, + } + + // Item Data + + public enum CoalType + { + COAL = 0, + CHARCOAL = 1 + } + + public enum DyeType + { + INK_SAC = 0, + ROSE_RED = 1, + CACTUS_GREEN = 2, + COCOA_BEANS = 3, + LAPIS_LAZULI = 4, + PURPLE_DYE = 5, + CYAN_DYE = 6, + LIGHT_GRAY_DYE = 7, + GRAY_DYE = 8, + PINK_DYE = 9, + LIME_DYE = 10, + DANDELION_YELLOW = 11, + LIGHT_BLUE_DYE = 12, + MAGENTA_DYE = 13, + ORANGE_DYE = 14, + BONE_MEAL = 15 + } +} diff --git a/Substrate/SubstrateCS/Source/ItemInfo.cs b/Substrate/SubstrateCS/Source/ItemInfo.cs index cb4d1a0..e930f9e 100644 --- a/Substrate/SubstrateCS/Source/ItemInfo.cs +++ b/Substrate/SubstrateCS/Source/ItemInfo.cs @@ -408,30 +408,4 @@ namespace Substrate GreenMusicDisc = new ItemInfo(2257, "Green Music Disc"); } } - - public enum CoalType - { - COAL = 0, - CHARCOAL = 1 - } - - public enum DyeType - { - INK_SAC = 0, - ROSE_RED = 1, - CACTUS_GREEN = 2, - COCOA_BEANS = 3, - LAPIS_LAZULI = 4, - PURPLE_DYE = 5, - CYAN_DYE = 6, - LIGHT_GRAY_DYE = 7, - GRAY_DYE = 8, - PINK_DYE = 9, - LIME_DYE = 10, - DANDELION_YELLOW = 11, - LIGHT_BLUE_DYE = 12, - MAGENTA_DYE = 13, - ORANGE_DYE = 14, - BONE_MEAL = 15 - } } diff --git a/Substrate/SubstrateCS/Substrate.csproj b/Substrate/SubstrateCS/Substrate.csproj index 0f09b87..f07b4d9 100644 --- a/Substrate/SubstrateCS/Substrate.csproj +++ b/Substrate/SubstrateCS/Substrate.csproj @@ -68,6 +68,7 @@ +