Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- instance Binary MCInventory where
- put inv = return ()
- get = do
- t <- get
- c <- get
- items <- replicateM (fromIntegral c) $ do
- iid <- get :: Get Int16
- case (iid) of
- -1 -> return (-1, 0, 0)
- otherwise -> (iid, get, get)
- return (MCInventory t c items)
Add Comment
Please, Sign In to add comment