aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pers
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/pers
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
The Great Renaming (#3014)
* move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names
Diffstat (limited to 'src/main/java/pers')
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/Config.java28
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java84
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java64
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java35
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java52
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/block/BlockDimensionDisplay.java47
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java27
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java65
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java208
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java168
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java209
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java57
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/renderer/ItemDimensionDisplayRenderer.java78
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java121
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java351
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java125
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java200
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5UndergroundFluidHelper.java149
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/OreVeinLayer.java18
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/Oremix.java121
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/SmallOre.java82
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/StringPaddingHack.java131
22 files changed, 0 insertions, 2420 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/Config.java b/src/main/java/pers/gwyog/gtneioreplugin/Config.java
deleted file mode 100644
index ceced6a78e..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/Config.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package pers.gwyog.gtneioreplugin;
-
-@com.gtnewhorizon.gtnhlib.config.Config(
- modid = GTNEIOrePlugin.MODID,
- category = "general",
- filename = GTNEIOrePlugin.MODID)
-public class Config {
-
- @com.gtnewhorizon.gtnhlib.config.Config.Comment("if true, generate both csv files.")
- @com.gtnewhorizon.gtnhlib.config.Config.DefaultBoolean(false)
- @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart
- public static boolean printCsv;
-
- @com.gtnewhorizon.gtnhlib.config.Config.Comment("the name of the file you want for the ore sheet, it'll appear at the root of your instance.")
- @com.gtnewhorizon.gtnhlib.config.Config.DefaultString("GTNH-Oresheet.csv")
- @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart
- public static String CSVName;
-
- @com.gtnewhorizon.gtnhlib.config.Config.Comment("the name of the file you want for the small ore sheet, it'll appear at the root of your instance.")
- @com.gtnewhorizon.gtnhlib.config.Config.DefaultString("GTNH-Small-Ores-Sheet.csv")
- @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart
- public static String CSVnameSmall;
-
- @com.gtnewhorizon.gtnhlib.config.Config.Comment("Maximum number of lines the dimension names tooltip can have before it wraps around.")
- @com.gtnewhorizon.gtnhlib.config.Config.DefaultInt(11)
- @com.gtnewhorizon.gtnhlib.config.Config.RequiresMcRestart
- public static int maxTooltipLines;
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
deleted file mode 100644
index 7ae7b0bc1c..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package pers.gwyog.gtneioreplugin;
-
-import java.io.File;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import com.gtnewhorizon.gtnhlib.config.ConfigException;
-import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
-
-import cpw.mods.fml.common.Mod;
-import cpw.mods.fml.common.Mod.EventHandler;
-import cpw.mods.fml.common.event.FMLInitializationEvent;
-import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import gregtech.GT_Version;
-import pers.gwyog.gtneioreplugin.plugin.IMCForNEI;
-import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
-import pers.gwyog.gtneioreplugin.util.CSVMaker;
-import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
-import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
-import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
-
-@Mod(
- modid = GTNEIOrePlugin.MODID,
- name = GTNEIOrePlugin.NAME,
- version = GTNEIOrePlugin.VERSION,
- dependencies = "required-after:gregtech;required-after:NotEnoughItems")
-public class GTNEIOrePlugin {
-
- static {
- try {
- ConfigurationManager.registerConfig(Config.class);
- } catch (ConfigException e) {
- throw new RuntimeException(e);
- }
- }
-
- public static final String MODID = "gtneioreplugin";
- public static final String NAME = "GT NEI Ore Plugin GT:NH Mod";
- public static final String VERSION = GT_Version.VERSION;
- public static final Logger LOG = LogManager.getLogger(NAME);
- public static File instanceDir;
- public static final CreativeTabs creativeTab = new CreativeTabs(MODID) {
-
- @Override
- public Item getTabIconItem() {
- return GameRegistry.makeItemStack("gregtech:gt.blockores", 386, 1, null)
- .getItem();
- }
- };
-
- @Mod.Instance(MODID)
- public static GTNEIOrePlugin instance;
-
- @EventHandler
- public void preinit(FMLPreInitializationEvent event) {
- instanceDir = event.getModConfigurationDirectory()
- .getParentFile();
- }
-
- @EventHandler
- public void init(FMLInitializationEvent event) {
- ModBlocks.init();
- IMCForNEI.IMCSender();
- }
-
- @EventHandler
- public void onLoadComplete(FMLLoadCompleteEvent event) {
- GT5OreLayerHelper.init();
- GT5OreSmallHelper.init();
- GT5UndergroundFluidHelper.init();
- if (event.getSide() == Side.CLIENT) {
- if (Config.printCsv) {
- new CSVMaker().run();
- }
- }
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java
deleted file mode 100644
index bf59fa292c..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin;
-
-import net.minecraft.nbt.NBTTagCompound;
-
-import cpw.mods.fml.common.event.FMLInterModComms;
-import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
-
-public class IMCForNEI {
-
- public static void IMCSender() {
- // Though these 2 are already registered in NEI jar, we need to re-register
- // because new DimensionDisplayItems made tabs a bit taller.
- sendHandler("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat", "gregtech:gt.blockores:386");
-
- sendHandler("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat", "gregtech:gt.blockores:85");
-
- sendHandler(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.metaitem.01:32619");
- sendCatalyst(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.blockmachines:1157");
- sendCatalyst(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.blockmachines:141");
- sendCatalyst(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.blockmachines:142");
- sendCatalyst(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.blockmachines:149");
- sendCatalyst(
- "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid",
- "gregtech:gt.blockmachines:148");
- }
-
- private static void sendHandler(String name, String itemStack) {
- NBTTagCompound aNBT = new NBTTagCompound();
- aNBT.setString("handler", name);
- aNBT.setString("modName", GTNEIOrePlugin.NAME);
- aNBT.setString("modId", GTNEIOrePlugin.MODID);
- aNBT.setBoolean("modRequired", true);
- aNBT.setString("itemName", itemStack);
- aNBT.setInteger("handlerHeight", 160);
- aNBT.setInteger("handlerWidth", 166);
- aNBT.setInteger("maxRecipesPerPage", 2);
- aNBT.setInteger("yShift", 0);
- FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT);
- }
-
- @SuppressWarnings("SameParameterValue")
- private static void sendCatalyst(String name, String itemStack, int priority) {
- NBTTagCompound aNBT = new NBTTagCompound();
- aNBT.setString("handlerID", name);
- aNBT.setString("itemName", itemStack);
- aNBT.setInteger("priority", priority);
- FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT);
- }
-
- @SuppressWarnings("SameParameterValue")
- private static void sendCatalyst(String name, String itemStack) {
- sendCatalyst(name, itemStack, 0);
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
deleted file mode 100644
index 6996cba220..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin;
-
-import codechicken.nei.api.API;
-import codechicken.nei.api.IConfigureNEI;
-import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat;
-
-@SuppressWarnings("unused")
-public class NEIPluginConfig implements IConfigureNEI {
-
- @Override
- public String getName() {
- return "GregTech Ore Plugin";
- }
-
- @Override
- public String getVersion() {
- return GTNEIOrePlugin.VERSION;
- }
-
- @Override
- public void loadConfig() {
- PluginGT5VeinStat pluginVeinStat = new PluginGT5VeinStat();
- PluginGT5SmallOreStat pluginSmallOreStat = new PluginGT5SmallOreStat();
- PluginGT5UndergroundFluid pluginGT5UndergroundFluid = new PluginGT5UndergroundFluid();
- API.registerRecipeHandler(pluginVeinStat);
- API.registerUsageHandler(pluginVeinStat);
- API.registerRecipeHandler(pluginSmallOreStat);
- API.registerUsageHandler(pluginSmallOreStat);
- API.registerRecipeHandler(pluginGT5UndergroundFluid);
- API.registerUsageHandler(pluginGT5UndergroundFluid);
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
deleted file mode 100644
index 0db39c8e28..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin;
-
-import java.awt.Rectangle;
-
-import net.minecraft.client.resources.I18n;
-import net.minecraft.util.EnumChatFormatting;
-
-import codechicken.lib.gui.GuiDraw;
-import codechicken.nei.recipe.TemplateRecipeHandler;
-
-public abstract class PluginBase extends TemplateRecipeHandler {
-
- @Override
- public int recipiesPerPage() {
- return 1;
- }
-
- @Override
- public String getRecipeName() {
- return null;
- }
-
- @Override
- public String getGuiTexture() {
- return "gtneioreplugin:textures/gui/nei/guiBase.png";
- }
-
- @Override
- public void loadTransferRects() {
- int stringLength = GuiDraw.getStringWidth(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"));
- transferRects.add(
- new RecipeTransferRect(new Rectangle(getGuiWidth() - stringLength - 3, 5, stringLength, 9), getOutputId()));
- }
-
- public abstract String getOutputId();
-
- public int getGuiWidth() {
- return 166;
- }
-
- /**
- * Draw the "see all recipes" transfer label
- */
- protected void drawSeeAllRecipesLabel() {
- GuiDraw.drawStringR(
- EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"),
- getGuiWidth() - 3,
- 5,
- 0x404040,
- false);
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/BlockDimensionDisplay.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/BlockDimensionDisplay.java
deleted file mode 100644
index 7d3b1eb5bc..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/BlockDimensionDisplay.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.block;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.MathHelper;
-
-import pers.gwyog.gtneioreplugin.plugin.renderer.ItemDimensionDisplayRenderer;
-
-public class BlockDimensionDisplay extends Block {
-
- private final String dimension;
-
- @SuppressWarnings("unused")
- public long getDimensionRocketTier() {
- return this.dimensionRocketTier;
- }
-
- private final long dimensionRocketTier;
- private final IIcon[] icons = new IIcon[6];
-
- public BlockDimensionDisplay(String dimension) {
- super(Material.rock);
- this.dimension = dimension;
- this.dimensionRocketTier = ItemDimensionDisplayRenderer.getPrefix(dimension);
- }
-
- @Override
- public IIcon getIcon(int side, int meta) {
- return this.icons[MathHelper.clamp_int(side, 0, 5)];
- }
-
- @Override
- public void registerBlockIcons(IIconRegister iconRegister) {
- this.icons[0] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_bottom");
- this.icons[1] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_top");
- this.icons[2] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_back");
- this.icons[3] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_front");
- this.icons[4] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_left");
- this.icons[5] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_right");
- }
-
- public String getDimension() {
- return this.dimension;
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java
deleted file mode 100644
index db953c7112..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/block/ModBlocks.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.block;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import net.minecraft.block.Block;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
-import pers.gwyog.gtneioreplugin.util.DimensionHelper;
-
-public class ModBlocks {
-
- public static final Map<String, Block> blocks = new HashMap<>();
-
- public static void init() {
- for (String dimension : DimensionHelper.DimNameDisplayed) {
- Block block = new BlockDimensionDisplay(dimension);
- GameRegistry.registerBlock(block, ItemDimensionDisplay.class, "blockDimensionDisplay_" + dimension);
- blocks.put(dimension, block);
- }
- }
-
- public static Block getBlock(String dimension) {
- return blocks.get(dimension);
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
deleted file mode 100644
index 895a23ddb1..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.gregtech5;
-
-import net.minecraft.client.resources.I18n;
-
-import codechicken.lib.gui.GuiDraw;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.util.GT_LanguageManager;
-import pers.gwyog.gtneioreplugin.plugin.PluginBase;
-
-public abstract class PluginGT5Base extends PluginBase {
-
- protected static String getLocalizedNameForItem(Materials aMaterial, String aFormat) {
- return String.format(
- aFormat.replace("%s", "%temp")
- .replace("%material", "%s"),
- aMaterial.mLocalizedName)
- .replace("%temp", "%s");
- }
-
- protected static String getLocalizedNameForItem(String aFormat, int aMaterialID) {
- if (aMaterialID >= 0 && aMaterialID < 1000) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[aMaterialID];
- if (aMaterial != null) {
- return getLocalizedNameForItem(aMaterial, aFormat);
- }
- }
- return aFormat;
- }
-
- public static String getGTOreLocalizedName(short index) {
-
- if (!getLocalizedNameForItem(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)), index % 1000)
- .contains("Awakened"))
- return getLocalizedNameForItem(
- GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)),
- index % 1000);
- else return "Aw. Draconium Ore";
- }
-
- protected static String getGTOreUnlocalizedName(short index) {
- return "gt.blockores." + index + ".name";
- }
-
- static void drawLine(String lineKey, String value, int x, int y) {
- GuiDraw.drawString(I18n.format(lineKey) + ": " + value, x, y, 0x404040, false);
- }
-
- protected int getMaximumMaterialIndex(short meta, boolean smallOre) {
- int offset = smallOre ? 16000 : 0;
- if (!getGTOreLocalizedName((short) (meta + offset + 5000))
- .equals(getGTOreUnlocalizedName((short) (meta + offset + 5000)))) return 7;
- else if (!getGTOreLocalizedName((short) (meta + offset + 5000))
- .equals(getGTOreUnlocalizedName((short) (meta + offset + 5000)))) return 6;
- else return 5;
- }
-
- /**
- * Draw the dimension header and the dimension names over up to 3 lines
- *
- */
- protected void drawDimNames() {
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": ", 2, 100, 0x404040, false);
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
deleted file mode 100644
index 7e42f912a7..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.gregtech5;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import net.minecraft.client.resources.I18n;
-import net.minecraft.item.ItemStack;
-
-import codechicken.nei.PositionedStack;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_OreDictUnificator;
-import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
-import pers.gwyog.gtneioreplugin.util.DimensionHelper;
-import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
-import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper.OreSmallWrapper;
-
-public class PluginGT5SmallOreStat extends PluginGT5Base {
-
- private static final int SMALL_ORE_BASE_META = 16000;
-
- @Override
- public void drawExtras(int recipe) {
- OreSmallWrapper oreSmall = getSmallOre(recipe);
-
- drawSmallOreName(oreSmall);
- drawSmallOreInfo(oreSmall);
-
- drawDimNames();
-
- drawSeeAllRecipesLabel();
- }
-
- private void drawSmallOreName(OreSmallWrapper oreSmall) {
- String oreName = getGTOreLocalizedName((short) (oreSmall.oreMeta + SMALL_ORE_BASE_META));
- drawLine("gtnop.gui.nei.oreName", oreName, 2, 18);
- }
-
- private void drawSmallOreInfo(OreSmallWrapper oreSmall) {
- drawLine("gtnop.gui.nei.genHeight", oreSmall.worldGenHeightRange, 2, 31);
- drawLine("gtnop.gui.nei.amount", String.valueOf(oreSmall.amountPerChunk), 2, 44);
- drawLine("gtnop.gui.nei.chanceDrops", "", 2, 83 + getRestrictBiomeOffset());
- drawLine("gtnop.gui.nei.worldNames", "", 2, 100);
- }
-
- private OreSmallWrapper getSmallOre(int recipe) {
- CachedOreSmallRecipe crecipe = (CachedOreSmallRecipe) this.arecipes.get(recipe);
- return GT5OreSmallHelper.mapOreSmallWrapper.get(crecipe.oreGenName);
- }
-
- public int getRestrictBiomeOffset() {
- return GT5OreSmallHelper.restrictBiomeSupport ? 0 : -13;
- }
-
- @Override
- public void loadCraftingRecipes(String outputId, Object... results) {
- if (outputId.equals(getOutputId()))
- for (ItemStack stack : GT5OreSmallHelper.oreSmallList) loadCraftingRecipes(stack);
- else super.loadCraftingRecipes(outputId, results);
- }
-
- @Override
- public void loadCraftingRecipes(ItemStack stack) {
- if (stack.getUnlocalizedName()
- .startsWith("gt.blockores")) {
- short oreMeta = (short) (stack.getItemDamage() % 1000);
- loadSmallOre(oreMeta, getMaximumMaterialIndex(oreMeta, true));
- } else if (GT5OreSmallHelper.mapOreDropUnlocalizedNameToOreMeta.containsKey(stack.getUnlocalizedName())) {
- short oreMeta = GT5OreSmallHelper.mapOreDropUnlocalizedNameToOreMeta.get(stack.getUnlocalizedName());
- loadSmallOre(oreMeta, 7);
- } else super.loadCraftingRecipes(stack);
- }
-
- @Override
- public void loadUsageRecipes(ItemStack stack) {
- String dimension = ItemDimensionDisplay.getDimension(stack);
- if (dimension == null) {
- return;
- }
-
- for (OreSmallWrapper oreVein : GT5OreSmallHelper.mapOreSmallWrapper.values()) {
- if (Arrays.asList(getDimNameArrayFromVeinName(oreVein.oreGenName))
- .contains(dimension)) {
- addSmallOre(oreVein, 7);
- }
- }
- }
-
- private void loadSmallOre(short oreMeta, int maximumIndex) {
- OreSmallWrapper smallOre = getSmallOre(oreMeta);
- if (smallOre != null) {
- addSmallOre(smallOre, maximumIndex);
- }
- }
-
- private OreSmallWrapper getSmallOre(short oreMeta) {
- for (OreSmallWrapper oreSmallWorldGen : GT5OreSmallHelper.mapOreSmallWrapper.values()) {
- if (oreSmallWorldGen.oreMeta == oreMeta) {
- return oreSmallWorldGen;
- }
- }
- return null;
- }
-
- private void addSmallOre(OreSmallWrapper smallOre, int maximumIndex) {
- this.arecipes.add(
- new CachedOreSmallRecipe(
- smallOre.oreGenName,
- smallOre.getMaterialDrops(maximumIndex),
- getStoneDusts(maximumIndex),
- GT5OreSmallHelper.mapOreMetaToOreDrops.get(smallOre.oreMeta)));
- }
-
- private List<ItemStack> getStoneDusts(int maximumIndex) {
- List<ItemStack> materialDustStackList = new ArrayList<>();
- for (int i = 0; i < maximumIndex; i++) materialDustStackList
- .add(GT_OreDictUnificator.get(OrePrefixes.dust, GT5OreSmallHelper.getDroppedDusts()[i], 1L));
- return materialDustStackList;
- }
-
- @Override
- public String getOutputId() {
- return "GTOrePluginOreSmall";
- }
-
- @Override
- public String getRecipeName() {
- return I18n.format("gtnop.gui.smallOreStat.name");
- }
-
- private String[] getDimNameArrayFromVeinName(String veinName) {
- OreSmallWrapper oreSmall = GT5OreSmallHelper.mapOreSmallWrapper.get(veinName);
- String[] dims = GT5OreSmallHelper.bufferedDims.get(oreSmall)
- .keySet()
- .toArray(new String[0]);
- Arrays.sort(
- dims,
- Comparator.comparingInt(
- s -> Arrays.asList(DimensionHelper.DimNameDisplayed)
- .indexOf(s)));
- return dims;
- }
-
- public class CachedOreSmallRecipe extends CachedRecipe {
-
- public final String oreGenName;
- public final PositionedStack positionedStackOreSmall;
- public final PositionedStack positionedStackMaterialDust;
- public final List<PositionedStack> positionedDropStackList;
- private final List<PositionedStack> dimensionDisplayItems = new ArrayList<>();
-
- public CachedOreSmallRecipe(String oreGenName, List<ItemStack> stackList, List<ItemStack> materialDustStackList,
- List<ItemStack> dropStackList) {
- this.oreGenName = oreGenName;
- this.positionedStackOreSmall = new PositionedStack(stackList, 2, 0);
- this.positionedStackMaterialDust = new PositionedStack(
- materialDustStackList,
- 43,
- 79 + getRestrictBiomeOffset());
- List<PositionedStack> positionedDropStackList = new ArrayList<>();
- int i = 1;
- for (ItemStack stackDrop : dropStackList) positionedDropStackList.add(
- new PositionedStack(stackDrop, 43 + 20 * (i % 4), 79 + 16 * ((i++) / 4) + getRestrictBiomeOffset()));
- this.positionedDropStackList = positionedDropStackList;
- setDimensionDisplayItems();
- }
-
- private void setDimensionDisplayItems() {
- int x = 2;
- int y = 110;
- int count = 0;
- int itemsPerLine = 9;
- int itemSize = 18;
- for (String dim : getDimNameArrayFromVeinName(this.oreGenName)) {
- ItemStack item = ItemDimensionDisplay.getItem(dim);
- if (item != null) {
- int xPos = x + itemSize * (count % itemsPerLine);
- int yPos = y + itemSize * (count / itemsPerLine);
- dimensionDisplayItems.add(new PositionedStack(item, xPos, yPos, false));
- count++;
- }
- }
- }
-
- @Override
- public List<PositionedStack> getIngredients() {
- return dimensionDisplayItems;
- }
-
- @Override
- public PositionedStack getResult() {
- return null;
- }
-
- @Override
- public List<PositionedStack> getOtherStacks() {
- List<PositionedStack> outputs = new ArrayList<>();
- positionedStackOreSmall.setPermutationToRender((cycleticks / 20) % positionedStackOreSmall.items.length);
- positionedStackMaterialDust
- .setPermutationToRender((cycleticks / 20) % positionedStackMaterialDust.items.length);
- outputs.add(positionedStackOreSmall);
- outputs.add(positionedStackMaterialDust);
- outputs.addAll(positionedDropStackList);
- return outputs;
- }
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java
deleted file mode 100644
index 5530f5b145..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.gregtech5;
-
-import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import net.minecraft.client.resources.I18n;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-import codechicken.lib.gui.GuiDraw;
-import codechicken.nei.PositionedStack;
-import gregtech.api.util.GT_Utility;
-import pers.gwyog.gtneioreplugin.plugin.PluginBase;
-import pers.gwyog.gtneioreplugin.plugin.item.ItemDimensionDisplay;
-import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
-import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper.UndergroundFluidWrapper;
-
-public class PluginGT5UndergroundFluid extends PluginBase {
-
- private static final int lineSpace = 20;
- private static final int xDimensionDisplay = 30;
- private static final int halfItemLength = 16 / 2;
- private static final DecimalFormat format = new DecimalFormat("0.#");
-
- @Override
- public void loadCraftingRecipes(String outputId, Object... results) {
- if (outputId.equals(getOutputId())) {
- for (Map.Entry<String, List<UndergroundFluidWrapper>> entry : GT5UndergroundFluidHelper.getAllEntries()
- .entrySet()) {
- Fluid fluid = FluidRegistry.getFluid(entry.getKey());
- if (fluid != null) {
- this.arecipes.add(new CachedUndergroundFluidRecipe(fluid, entry.getValue()));
- }
- }
- } else {
- super.loadCraftingRecipes(outputId, results);
- }
- }
-
- @Override
- public void loadCraftingRecipes(ItemStack result) {
- Fluid fluid = null;
- FluidStack containerFluid = GT_Utility.getFluidForFilledItem(result, true);
- if (containerFluid != null) {
- fluid = containerFluid.getFluid();
- }
- if (fluid == null) {
- FluidStack displayFluid = GT_Utility.getFluidFromDisplayStack(result);
- if (displayFluid != null) {
- fluid = displayFluid.getFluid();
- }
- }
- if (fluid == null) return;
-
- List<UndergroundFluidWrapper> wrappers = GT5UndergroundFluidHelper.getEntry(fluid.getName());
- if (wrappers != null) {
- this.arecipes.add(new CachedUndergroundFluidRecipe(fluid, wrappers));
- }
- }
-