Fixed the crafting issue - it was fairly silly, actually

This commit is contained in:
Aidan C. Brady 2015-03-21 00:50:19 -05:00
parent 3305581373
commit a31449c2d3
4 changed files with 30 additions and 19 deletions

View file

@ -607,11 +607,11 @@ public class ClientProxy extends CommonProxy
}
@Override
public void onConfigSync()
public void onConfigSync(boolean fromPacket)
{
super.onConfigSync();
super.onConfigSync(fromPacket);
if(general.voiceServerEnabled && MekanismClient.voiceClient != null)
if(fromPacket && general.voiceServerEnabled && MekanismClient.voiceClient != null)
{
MekanismClient.voiceClient.start();
}

View file

@ -541,19 +541,9 @@ public class CommonProxy
{
return (File)FMLInjectionData.data()[6];
}
public void onConfigSync()
public void updateConfigRecipes()
{
if(general.cardboardSpawners)
{
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
}
else {
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
MachineType.updateAllUsages();
for(MachineType type : MachineType.getValidMachines())
{
if(machines.isEnabled(type))
@ -565,8 +555,26 @@ public class CommonProxy
CraftingManager.getInstance().getRecipeList().removeAll(type.getRecipes());
}
}
}
Mekanism.logger.info("Received config from server.");
public void onConfigSync(boolean fromPacket)
{
if(general.cardboardSpawners)
{
MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0);
}
else {
MekanismAPI.addBoxBlacklist(Blocks.mob_spawner, 0);
}
MachineType.updateAllUsages();
updateConfigRecipes();
if(fromPacket)
{
Mekanism.logger.info("Received config from server.");
}
}
public EntityPlayer getPlayer(MessageContext context)

View file

@ -1185,7 +1185,7 @@ public class Mekanism
//Load configuration
proxy.loadConfiguration();
proxy.onConfigSync();
proxy.onConfigSync(false);
//Add baby skeleton spawner
if(general.spawnBabySkeletons)
@ -1233,6 +1233,9 @@ public class Mekanism
OreDictManager.init();
//Update the config-dependent recipes after the recipes have actually been added in the first place
Mekanism.proxy.updateConfigRecipes();
logger.info("Hooking complete.");
}
@ -1365,7 +1368,7 @@ public class Mekanism
if(event.modID.equals("Mekanism"))
{
proxy.loadConfiguration();
proxy.onConfigSync();
proxy.onConfigSync(false);
}
}
}

View file

@ -158,7 +158,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
e.printStackTrace();
}
Mekanism.proxy.onConfigSync();
Mekanism.proxy.onConfigSync(true);
}
}
}