Added config option to disable Cardboard Boxes picking up spawners
This commit is contained in:
parent
4d9c2ad2b2
commit
398dffb7ce
3 changed files with 26 additions and 3 deletions
|
@ -2,6 +2,8 @@ package mekanism.common;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mekanism.api.MekanismAPI;
|
||||
import mekanism.api.MekanismAPI.BlockInfo;
|
||||
import mekanism.common.entity.EntityRobit;
|
||||
import mekanism.common.inventory.container.ContainerAdvancedElectricMachine;
|
||||
import mekanism.common.inventory.container.ContainerChanceMachine;
|
||||
|
@ -61,6 +63,7 @@ import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
|||
import mekanism.common.tile.TileEntitySalinationController;
|
||||
import mekanism.common.tile.TileEntitySalinationValve;
|
||||
import mekanism.common.tile.TileEntityTeleporter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
@ -174,14 +177,15 @@ public class CommonProxy
|
|||
Mekanism.osmiumGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumGenerationEnabled", true).getBoolean(true);
|
||||
Mekanism.copperGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperGenerationEnabled", true).getBoolean(true);
|
||||
Mekanism.tinGenerationEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TinGenerationEnabled", true).getBoolean(true);
|
||||
Mekanism.disableBCSteelCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCSteelCrafting", false).getBoolean(true);
|
||||
Mekanism.disableBCBronzeCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCBronzeCrafting", false).getBoolean(true);
|
||||
Mekanism.disableBCSteelCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCSteelCrafting", false).getBoolean(false);
|
||||
Mekanism.disableBCBronzeCrafting = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DisableBCBronzeCrafting", false).getBoolean(false);
|
||||
Mekanism.updateNotifications = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpdateNotifications", true).getBoolean(true);
|
||||
Mekanism.controlCircuitOreDict = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ControlCircuitOreDict", true).getBoolean(true);
|
||||
Mekanism.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false).getBoolean(true);
|
||||
Mekanism.logPackets = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "LogPackets", false).getBoolean(false);
|
||||
Mekanism.dynamicTankEasterEgg = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "DynamicTankEasterEgg", false).getBoolean(true);
|
||||
Mekanism.voiceServerEnabled = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoiceServerEnabled", true).getBoolean(true);
|
||||
Mekanism.forceBuildcraft = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ForceBuildcraftPower", false).getBoolean(false);
|
||||
Mekanism.cardboardSpawners = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AllowSpawnerBoxPickup", true).getBoolean(true);
|
||||
Mekanism.obsidianTNTDelay = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100).getInt();
|
||||
Mekanism.obsidianTNTBlastRadius = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt();
|
||||
Mekanism.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10).getInt();
|
||||
|
@ -200,6 +204,14 @@ public class CommonProxy
|
|||
Mekanism.TO_TE = Mekanism.TO_BC*10;
|
||||
Mekanism.FROM_TE = Mekanism.FROM_BC/10;
|
||||
|
||||
if(Mekanism.cardboardSpawners)
|
||||
{
|
||||
MekanismAPI.cardboardBoxIgnore.add(new BlockInfo(Block.mobSpawner.blockID, 0));
|
||||
}
|
||||
else {
|
||||
MekanismAPI.cardboardBoxIgnore.remove(new BlockInfo(Block.mobSpawner.blockID, 0));
|
||||
}
|
||||
|
||||
Mekanism.enrichmentChamberUsage = Mekanism.configuration.get("usage", "EnrichmentChamberUsage", 50D).getDouble(50D);
|
||||
Mekanism.osmiumCompressorUsage = Mekanism.configuration.get("usage", "OsmiumCompressorUsage", 100D).getDouble(100D);
|
||||
Mekanism.combinerUsage = Mekanism.configuration.get("usage", "CombinerUsage", 50D).getDouble(50D);
|
||||
|
@ -391,6 +403,14 @@ public class CommonProxy
|
|||
|
||||
public void onConfigSync()
|
||||
{
|
||||
if(Mekanism.cardboardSpawners)
|
||||
{
|
||||
MekanismAPI.cardboardBoxIgnore.add(new BlockInfo(Block.mobSpawner.blockID, 0));
|
||||
}
|
||||
else {
|
||||
MekanismAPI.cardboardBoxIgnore.remove(new BlockInfo(Block.mobSpawner.blockID, 0));
|
||||
}
|
||||
|
||||
System.out.println("[Mekanism] Received config from server.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -277,6 +277,7 @@ public class Mekanism
|
|||
public static boolean dynamicTankEasterEgg = false;
|
||||
public static boolean voiceServerEnabled = true;
|
||||
public static boolean forceBuildcraft = false;
|
||||
public static boolean cardboardSpawners = true;
|
||||
public static int obsidianTNTBlastRadius = 12;
|
||||
public static int osmiumGenerationAmount = 12;
|
||||
public static int copperGenerationAmount = 16;
|
||||
|
|
|
@ -37,6 +37,7 @@ public class PacketConfigSync implements IMekanismPacket
|
|||
Mekanism.dynamicTankEasterEgg = dataStream.readBoolean();
|
||||
Mekanism.voiceServerEnabled = dataStream.readBoolean();
|
||||
Mekanism.forceBuildcraft = dataStream.readBoolean();
|
||||
Mekanism.cardboardSpawners = dataStream.readBoolean();
|
||||
Mekanism.obsidianTNTDelay = dataStream.readInt();
|
||||
Mekanism.obsidianTNTBlastRadius = dataStream.readInt();
|
||||
Mekanism.UPDATE_DELAY = dataStream.readInt();
|
||||
|
@ -92,6 +93,7 @@ public class PacketConfigSync implements IMekanismPacket
|
|||
dataStream.writeBoolean(Mekanism.dynamicTankEasterEgg);
|
||||
dataStream.writeBoolean(Mekanism.voiceServerEnabled);
|
||||
dataStream.writeBoolean(Mekanism.forceBuildcraft);
|
||||
dataStream.writeBoolean(Mekanism.cardboardSpawners);
|
||||
dataStream.writeInt(Mekanism.obsidianTNTDelay);
|
||||
dataStream.writeInt(Mekanism.obsidianTNTBlastRadius);
|
||||
dataStream.writeInt(Mekanism.UPDATE_DELAY);
|
||||
|
|
Loading…
Reference in a new issue