*
* @param key - The key to modify
* @param value - The value to change
*/
private void changeWorldInfo(String key, Object value) {
NBTTagCompound nbt = world.getWorldInfo().getNBTTagCompound();
if (value instanceof String) {
nbt.setString(key, (String) value);
} else if (value instanceof Boolean) {
nbt.setBoolean(key, (Boolean) value);
} else if (value instanceof Integer) {
nbt.setInteger(key, (Integer) value);
} else if (value instanceof Long) {
nbt.setLong(key, (Long) value);
}
WorldInfo info = new WorldInfo(nbt);
try {
Field fields[] = net.minecraft.src.World.class.getDeclaredFields();
for (Field field : fields) {