Skip to content

Instantly share code, notes, and snippets.

module Minecraft
( ClientToServerPacket
, ServerToClientPacket
, MCInventoryItem
, MCInventoryUpdate
, MCBlockChange
, MCMultiBlockChange
) where
import Data.Int
anonymous
anonymous / error.h
Created November 22, 2010 23:32
/*
** error.h
**
** Copyright (c) 2008 Max Rupp (feelgood@cs.pdx.edu) All rights reserved.
*/
#ifndef __ERROR_H__
#define __ERROR_H__
#ifdef DEBUG
anonymous
anonymous / gist:710044
Created November 22, 2010 14:33
if ([typeEncoding isEqualToString:@"@\"MCInventory\""]) {
MCShort itemcount;
if(![dataBuffer readBytes:&itemcount length:sizeof(MCShort)]) goto Failure;
MCInventory *inventory = [[[MCInventory alloc] init] autorelease];
// Read in every inventory item
for(int slot = 0; slot < itemcount; slot++){
// Read item id
MCShort itemid;
if(![dataBuffer readBytes:&itemid length:sizeof(MCShort)]) goto Failure;