Fixed the crafting issue - it was fairly silly, actually
This commit is contained in:
parent
3305581373
commit
a31449c2d3
4 changed files with 30 additions and 19 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Mekanism.proxy.onConfigSync();
|
||||
Mekanism.proxy.onConfigSync(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue