diff --git a/Minecraft/Command.hs b/Minecraft/Command.hs index eb243a8..91bd471 100644 --- a/Minecraft/Command.hs +++ b/Minecraft/Command.hs @@ -30,10 +30,12 @@ data OldBlockHandling data DataValue = Facing CardinalDirection + | BlockType BlockType deriving (Eq, Ord, Read, Show) instance Render DataValue where render (Facing dir) = "facing=" <> render dir + render (BlockType bt) = "type=" <> render bt instance Render [DataValue] where render [] = mempty diff --git a/Minecraft/Core.hs b/Minecraft/Core.hs index 92baf6a..f38625d 100644 --- a/Minecraft/Core.hs +++ b/Minecraft/Core.hs @@ -449,12 +449,25 @@ data CardinalDirection deriving (Eq, Ord, Read, Show) makeLenses ''CardinalDirection +data BlockType + = Bottom + | Double + | Top + deriving (Eq, Ord, Read, Show) +makeLenses ''BlockType + instance Render CardinalDirection where render North = "north" render East = "east" render South = "south" render West = "west" +instance Render BlockType where + render Bottom = "bottom" + render Double = "double" + render Top = "top" + + ab :: Int32 -> Pos ab = Pos Abs diff --git a/minecraft-data.cabal b/minecraft-data.cabal index 0a2b303..e766575 100644 --- a/minecraft-data.cabal +++ b/minecraft-data.cabal @@ -27,7 +27,7 @@ library Minecraft.Player other-extensions: DeriveDataTypeable, DeriveGeneric, OverloadedStrings build-depends: array, - base >=4.8 && <4.15, + base >=4.8 && <4.16, bimap, bytestring, containers,