@Override public int decode(
			byte[] data, int offset, DecodeState ds, CerealDecoder context
		) throws InvalidEncoding, ResourceNotFound {
			long propDecodeResult = NumberEncoding.readUnsignedBase128(data, offset); 
			long props = NumberEncoding.base128Value(propDecodeResult); 
			offset += NumberEncoding.base128Skip(propDecodeResult);
			
			if( (props | KNOWN_PROP_MASK) != KNOWN_PROP_MASK ) {
				throw new InvalidEncoding(String.format("Unknown world properties encoded: %x", props));
			}
			
			long sizePower = -1234;
			long referenceTime = 0;
			RSTNode rst = null;
			EntitySpatialTreeIndex<NonTile> nonTiles = new EntitySpatialTreeIndex<NonTile>();
			LayerLink backgroundLink = null;
			
			if( (props & PROP_RST_SIZE_POWER) != 0 ) {
				sizePower = context.removeStackItem(ds, -1, Number.class).longValue();
			}
			if( (props & PROP_RST) != 0 ) {
				rst = context.removeStackItem(ds, -1, RSTNode.class);
			}
			if( (props & PROP_REFERENCE_TIME) != 0 ) {
				referenceTime = context.removeStackItem(ds, -1, Number.class).longValue();
			}
			
			if( sizePower == -1234 ) throw new InvalidEncoding("World encoded without an RST size power");
			if( sizePower < 0 ) throw new InvalidEncoding("World encoded with negative RST size power: "+sizePower);
			if( sizePower > 30 ) throw new InvalidEncoding("World encoded with overly large RST size power: "+sizePower);
			if( rst == null ) throw new InvalidEncoding("World encoded with no RST");
			
			ds.pushStackItem(new World(referenceTime, rst, (int)sizePower, nonTiles, backgroundLink));
			
			return offset;
		}