Skip to content

Commit

Permalink
Finished updating to 1.9.4. Hopefully it'll work for 1.10 also
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Jul 3, 2016
1 parent 6bf7bef commit 8d87e23
Show file tree
Hide file tree
Showing 29 changed files with 505 additions and 2,363 deletions.
267 changes: 65 additions & 202 deletions src/main/java/net/doubledoordev/d3core/D3Core.java

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014,
* Copyright (c) 2014-2016, Dries007 & DoubleDoorDevelopment
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +12,7 @@
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of the {organization} nor the names of its
* Neither the name of DoubleDoorDevelopment nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
Expand All @@ -27,18 +27,17 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/

package net.doubledoordev.d3core.client;

import net.doubledoordev.d3core.D3Core;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.IModGuiFactory;
import net.minecraftforge.fml.client.config.GuiConfig;
import net.minecraftforge.fml.client.config.IConfigElement;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
import net.doubledoordev.d3core.util.CoreConstants;
import net.doubledoordev.d3core.util.ID3Mod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.I18n;
Expand All @@ -52,6 +51,7 @@
*/
public class ModConfigGuiFactory implements IModGuiFactory
{
@SuppressWarnings("WeakerAccess")
public static class D3ConfigGuiScreen extends GuiConfig
{
public D3ConfigGuiScreen(GuiScreen parentScreen)
Expand All @@ -61,14 +61,22 @@ public D3ConfigGuiScreen(GuiScreen parentScreen)

private static List<IConfigElement> getConfigElements()
{
List<IConfigElement> list = new ArrayList<>();
for (ModContainer modContainer : Loader.instance().getActiveModList())
Configuration c = D3Core.getConfig();
if (c.getCategoryNames().size() == 1)
{
if (modContainer.getMod() instanceof ID3Mod)
//noinspection LoopStatementThatDoesntLoop
for (String k : c.getCategoryNames())
{
((ID3Mod) modContainer.getMod()).addConfigElements(list);
// Let forge do the work, for loop abused to avoid other strange constructs
return new ConfigElement(c.getCategory(k)).getChildElements();
}
}

List<IConfigElement> list = new ArrayList<>();
for (String k : c.getCategoryNames())
{
list.add(new ConfigElement(c.getCategory(k)));
}
return list;
}
}
Expand Down
122 changes: 0 additions & 122 deletions src/main/java/net/doubledoordev/d3core/permissions/Group.java

This file was deleted.

120 changes: 0 additions & 120 deletions src/main/java/net/doubledoordev/d3core/permissions/Node.java

This file was deleted.

This file was deleted.

0 comments on commit 8d87e23

Please sign in to comment.