void disableMod(ModContainer mod) { HashMap<String, EventBus> temporary = Maps.newHashMap(eventChannels); String modId = mod.getModId(); EventBus bus = temporary.remove(modId); bus.post(new FMLModDisabledEvent()); if (errors.get(modId).isEmpty()) { eventChannels = ImmutableMap.copyOf(temporary); modStates.put(modId, ModState.DISABLED); modObjectList.remove(mod); activeModList.remove(mod); } }
@EventHandler public void modDisableEvent(FMLModDisabledEvent evt) { System.out.println("Disabling VR mode"); if(Minecraft.getMinecraft().entityRenderer==newRenderer) swap(); }