Extracted some of minecraft.py into bridge.py, for generality.