mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
add mekce client config menu and catogory
This commit is contained in:
5 files changed
+30
-5
No files matched your search
@@ -100,6 +100,10 @@ public class MekanismConfig
|
||||
public static boolean enableAmbientLighting;
|
||||
public static int ambientLightingLevel;
|
||||
public static boolean opaqueTransmitters = false;
|
||||
}
|
||||
|
||||
public static class mekce_client
|
||||
{
|
||||
public static boolean doMultiblockSparkle = true;
|
||||
public static int multiblockSparkleIntensity = 6;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.api.MekanismConfig.mekce_client;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.client.SparkleAnimation.INodeChecker;
|
||||
import mekanism.client.entity.EntityLaser;
|
||||
@@ -85,8 +86,8 @@ public class ClientProxy extends CommonProxy
|
||||
client.enableAmbientLighting = Mekanism.configuration.get("client", "EnableAmbientLighting", true).getBoolean();
|
||||
client.ambientLightingLevel = Mekanism.configuration.get("client", "AmbientLightingLevel", 15).getInt();
|
||||
client.opaqueTransmitters = Mekanism.configuration.get("client", "OpaqueTransmitterRender", false).getBoolean();
|
||||
client.doMultiblockSparkle = Mekanism.configuration.get("client", "DoMultiblockSparkle", true).getBoolean();
|
||||
client.multiblockSparkleIntensity = Mekanism.configuration.get("client", "MultiblockSparkleIntesity", 6).getInt();
|
||||
mekce_client.doMultiblockSparkle = Mekanism.configurationce.get("mekce_client", "DoMultiblockSparkle", true).getBoolean();
|
||||
mekce_client.multiblockSparkleIntensity = Mekanism.configurationce.get("mekce_client", "MultiblockSparkleIntesity", 6).getInt();
|
||||
|
||||
if(Mekanism.configuration.hasChanged())
|
||||
{
|
||||
@@ -422,7 +423,7 @@ public class ClientProxy extends CommonProxy
|
||||
@Override
|
||||
public void doMultiblockSparkle(final TileEntityMultiblock<?> tileEntity)
|
||||
{
|
||||
if(client.doMultiblockSparkle == true){
|
||||
if(mekce_client.doMultiblockSparkle == true){
|
||||
new SparkleAnimation(tileEntity, new INodeChecker() {
|
||||
@Override
|
||||
public boolean isNode(TileEntity tile)
|
||||
|
||||
@@ -3,7 +3,7 @@ package mekanism.client;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.api.MekanismConfig.mekce_client;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -47,7 +47,7 @@ public class SparkleAnimation
|
||||
public void run()
|
||||
{
|
||||
World world = pointer.getWorldObj();
|
||||
int count = client.multiblockSparkleIntensity;
|
||||
int count = mekce_client.multiblockSparkleIntensity;
|
||||
|
||||
for(Coord4D coord : iteratedNodes)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ public class GuiMekanismConfig extends GuiConfig
|
||||
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.client"), "mekanism.configgui.ctgy.client", ClientEntry.class));
|
||||
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.mekce"), "mekanism.configgui.ctgy.mekce", MEKCEEntry.class));
|
||||
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.recipe"), "mekanism.configgui.ctgy.recipe", RecipeEntry.class));
|
||||
list.add(new DummyCategoryElement(LangUtils.localize("mekanism.configgui.ctgy.mekce_client"), "mekanism.configgui.ctgy.mekce_client", RecipeEntry.class));
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -135,6 +136,23 @@ public class GuiMekanismConfig extends GuiConfig
|
||||
GuiConfig.getAbridgedConfigPath(Mekanism.configuration.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class MEKCEClientEntry extends CategoryEntry
|
||||
{
|
||||
public MEKCEClientEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
|
||||
{
|
||||
super(owningScreen, owningEntryList, prop);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(owningScreen,
|
||||
new ConfigElement(Mekanism.configurationce.getCategory("mekce_client")).getChildElements(),
|
||||
owningScreen.modID, "mekce_client", false, false,
|
||||
GuiConfig.getAbridgedConfigPath(Mekanism.configurationce.toString()));
|
||||
}
|
||||
}
|
||||
public static class RecipeEntry extends CategoryEntry
|
||||
{
|
||||
public RecipeEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
|
||||
|
||||
Reference in new issue
Block a user