diff options
| author | boubou19 <miisterunknown@gmail.com> | 2024-08-26 22:42:57 +0200 |
|---|---|---|
| committer | boubou19 <miisterunknown@gmail.com> | 2024-08-26 22:42:57 +0200 |
| commit | e8a543c2996e1da2ea6923b13e2b353d3fcb29c2 (patch) | |
| tree | e6f61da48a9470753b2ce6a0ec782c14df5d3681 /src/main/java/pers/gwyog | |
| parent | 05aa235493d7c453999e317392c2273abca170ef (diff) | |
| download | GT5-Unofficial-e8a543c2996e1da2ea6923b13e2b353d3fcb29c2.tar.gz GT5-Unofficial-e8a543c2996e1da2ea6923b13e2b353d3fcb29c2.tar.bz2 GT5-Unofficial-e8a543c2996e1da2ea6923b13e2b353d3fcb29c2.zip | |
fix issues caused by merge
Diffstat (limited to 'src/main/java/pers/gwyog')
18 files changed, 334 insertions, 273 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java index f16fa148e0..e277ba915c 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java @@ -13,6 +13,7 @@ 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; @@ -21,15 +22,15 @@ 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") + modid = GTNEIOrePlugin.MODID, + name = GTNEIOrePlugin.NAME, + version = GTNEIOrePlugin.VERSION, + dependencies = "required-after:gregtech;required-after:NotEnoughItems") public class GTNEIOrePlugin { public static final String MODID = "gtneioreplugin"; public static final String NAME = "GT NEI Ore Plugin GT:NH Mod"; - public static final String VERSION = Tags.VERSION; + public static final String VERSION = GT_Version.VERSION; public static final Logger LOG = LogManager.getLogger(NAME); public static boolean csv = false; public static String CSVname; @@ -39,7 +40,8 @@ public class GTNEIOrePlugin { @Override public Item getTabIconItem() { - return GameRegistry.makeItemStack("gregtech:gt.blockores", 386, 1, null).getItem(); + return GameRegistry.makeItemStack("gregtech:gt.blockores", 386, 1, null) + .getItem(); } }; @@ -50,27 +52,27 @@ public class GTNEIOrePlugin { public void preinit(FMLPreInitializationEvent event) { Config c = new Config(event, MODID + ".cfg"); csv = c.tConfig.getBoolean( - "print csv", - "ALL", - false, - "print csv, you need apache commons collections to be injected in the minecraft jar."); + "print csv", + "ALL", + false, + "print csv, you need apache commons collections to be injected in the minecraft jar."); CSVname = c.tConfig.getString( - "CSV_name", - "ALL", - event.getModConfigurationDirectory() + "/GTNH-Oresheet.csv", - "rename the oresheet here, it will appear in /config"); + "CSV_name", + "ALL", + event.getModConfigurationDirectory() + "/GTNH-Oresheet.csv", + "rename the oresheet here, it will appear in /config"); CSVnameSmall = c.tConfig.getString( - "CSV_name_for_Small_Ore_Sheet", - "ALL", - event.getModConfigurationDirectory() + "/GTNH-Small-Ores-Sheet.csv", - "rename the oresheet here, it will appear in /config"); + "CSV_name_for_Small_Ore_Sheet", + "ALL", + event.getModConfigurationDirectory() + "/GTNH-Small-Ores-Sheet.csv", + "rename the oresheet here, it will appear in /config"); maxTooltipLines = c.tConfig.getInt( - "MaxToolTipLines", - "ALL", - 11, - 1, - Integer.MAX_VALUE, - "Maximum number of lines the dimension names tooltip can have before it wraps around."); + "MaxToolTipLines", + "ALL", + 11, + 1, + Integer.MAX_VALUE, + "Maximum number of lines the dimension names tooltip can have before it wraps around."); c.save(); } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java index 2c69b68a4a..bf59fa292c 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/IMCForNEI.java @@ -15,23 +15,23 @@ public class IMCForNEI { sendHandler("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat", "gregtech:gt.blockores:85"); sendHandler( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.metaitem.01:32619"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.metaitem.01:32619"); sendCatalyst( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.blockmachines:1157"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.blockmachines:1157"); sendCatalyst( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.blockmachines:141"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.blockmachines:141"); sendCatalyst( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.blockmachines:142"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.blockmachines:142"); sendCatalyst( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.blockmachines:149"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.blockmachines:149"); sendCatalyst( - "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", - "gregtech:gt.blockmachines:148"); + "pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5UndergroundFluid", + "gregtech:gt.blockmachines:148"); } private static void sendHandler(String name, String itemStack) { diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java index 5509341696..0db39c8e28 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java @@ -1,6 +1,6 @@ package pers.gwyog.gtneioreplugin.plugin; -import java.awt.*; +import java.awt.Rectangle; import net.minecraft.client.resources.I18n; import net.minecraft.util.EnumChatFormatting; @@ -29,9 +29,7 @@ public abstract class PluginBase extends TemplateRecipeHandler { 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())); + new RecipeTransferRect(new Rectangle(getGuiWidth() - stringLength - 3, 5, stringLength, 9), getOutputId())); } public abstract String getOutputId(); @@ -45,10 +43,10 @@ public abstract class PluginBase extends TemplateRecipeHandler { */ protected void drawSeeAllRecipesLabel() { GuiDraw.drawStringR( - EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), - getGuiWidth() - 3, - 5, - 0x404040, - false); + EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), + getGuiWidth() - 3, + 5, + 0x404040, + false); } } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java index 646e6d2bc7..895a23ddb1 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java @@ -11,8 +11,11 @@ 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"); + return String.format( + aFormat.replace("%s", "%temp") + .replace("%material", "%s"), + aMaterial.mLocalizedName) + .replace("%temp", "%s"); } protected static String getLocalizedNameForItem(String aFormat, int aMaterialID) { @@ -28,10 +31,10 @@ public abstract class PluginGT5Base extends PluginBase { public static String getGTOreLocalizedName(short index) { if (!getLocalizedNameForItem(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)), index % 1000) - .contains("Awakened")) + .contains("Awakened")) return getLocalizedNameForItem( - GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)), - index % 1000); + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)), + index % 1000); else return "Aw. Draconium Ore"; } @@ -46,11 +49,9 @@ public abstract class PluginGT5Base extends PluginBase { 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; + .equals(getGTOreUnlocalizedName((short) (meta + offset + 5000)))) return 7; else if (!getGTOreLocalizedName((short) (meta + offset + 5000)) - .equals(getGTOreUnlocalizedName((short) (meta + offset + 5000)))) - return 6; + .equals(getGTOreUnlocalizedName((short) (meta + offset + 5000)))) return 6; else return 5; } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java index 76bd66d280..1cf0157354 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java @@ -62,7 +62,8 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { @Override public void loadCraftingRecipes(ItemStack stack) { - if (stack.getUnlocalizedName().startsWith("gt.blockores")) { + if (stack.getUnlocalizedName() + .startsWith("gt.blockores")) { short oreMeta = (short) (stack.getItemDamage() % 1000); loadSmallOre(oreMeta, getMaximumMaterialIndex(oreMeta, true)); } else if (GT5OreSmallHelper.mapOreDropUnlocalizedNameToOreMeta.containsKey(stack.getUnlocalizedName())) { @@ -79,7 +80,8 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { } for (OreSmallWrapper oreVein : GT5OreSmallHelper.mapOreSmallWrapper.values()) { - if (Arrays.asList(getDimNameArrayFromVeinName(oreVein.oreGenName)).contains(dimension)) { + if (Arrays.asList(getDimNameArrayFromVeinName(oreVein.oreGenName)) + .contains(dimension)) { addSmallOre(oreVein, 7); } } @@ -103,17 +105,17 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { private void addSmallOre(OreSmallWrapper smallOre, int maximumIndex) { this.arecipes.add( - new CachedOreSmallRecipe( - smallOre.oreGenName, - smallOre.getMaterialDrops(maximumIndex), - getStoneDusts(maximumIndex), - GT5OreSmallHelper.mapOreMetaToOreDrops.get(smallOre.oreMeta))); + 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)); + .add(GT_OreDictUnificator.get(OrePrefixes.dust, GT5OreSmallHelper.getDroppedDusts()[i], 1L)); return materialDustStackList; } @@ -130,7 +132,11 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { private String[] getDimNameArrayFromVeinName(String veinName) { OreSmallWrapper oreSmall = GT5OreSmallHelper.mapOreSmallWrapper.get(veinName); String[] dims = DimensionHelper.parseDimNames(GT5OreSmallHelper.bufferedDims.get(oreSmall)); - Arrays.sort(dims, Comparator.comparingInt(s -> Arrays.asList(DimensionHelper.DimNameDisplayed).indexOf(s))); + Arrays.sort( + dims, + Comparator.comparingInt( + s -> Arrays.asList(DimensionHelper.DimNameDisplayed) + .indexOf(s))); return dims; } @@ -143,20 +149,17 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { private final List<PositionedStack> dimensionDisplayItems = new ArrayList<>(); public CachedOreSmallRecipe(String oreGenName, List<ItemStack> stackList, List<ItemStack> materialDustStackList, - List<ItemStack> dropStackList) { + List<ItemStack> dropStackList) { this.oreGenName = oreGenName; this.positionedStackOreSmall = new PositionedStack(stackList, 2, 0); this.positionedStackMaterialDust = new PositionedStack( - materialDustStackList, - 43, - 79 + getRestrictBiomeOffset()); + 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())); + new PositionedStack(stackDrop, 43 + 20 * (i % 4), 79 + 16 * ((i++) / 4) + getRestrictBiomeOffset())); this.positionedDropStackList = positionedDropStackList; setDimensionDisplayItems(); } @@ -193,7 +196,7 @@ public class PluginGT5SmallOreStat extends PluginGT5Base { List<PositionedStack> outputs = new ArrayList<>(); positionedStackOreSmall.setPermutationToRender((cycleticks / 20) % positionedStackOreSmall.items.length); positionedStackMaterialDust - .setPermutationToRender((cycleticks / 20) % positionedStackMaterialDust.items.length); + .setPermutationToRender((cycleticks / 20) % positionedStackMaterialDust.items.length); outputs.add(positionedStackOreSmall); outputs.add(positionedStackMaterialDust); outputs.addAll(positionedDropStackList); diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java index 8f7754bbde..5530f5b145 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5UndergroundFluid.java @@ -30,7 +30,7 @@ public class PluginGT5UndergroundFluid extends PluginBase { public void loadCraftingRecipes(String outputId, Object... results) { if (outputId.equals(getOutputId())) { for (Map.Entry<String, List<UndergroundFluidWrapper>> entry : GT5UndergroundFluidHelper.getAllEntries() - .entrySet()) { + .entrySet()) { Fluid fluid = FluidRegistry.getFluid(entry.getKey()); if (fluid != null) { this.arecipes.add(new CachedUndergroundFluidRecipe(fluid, entry.getValue())); @@ -67,7 +67,7 @@ public class PluginGT5UndergroundFluid extends PluginBase { String dimension = ItemDimensionDisplay.getDimension(ingredient); if (dimension != null) { for (Map.Entry<String, List<UndergroundFluidWrapper>> entry : GT5UndergroundFluidHelper.getAllEntries() - .entrySet()) { + .entrySet()) { boolean found = false; for (UndergroundFluidWrapper wrapper : entry.getValue()) { if (wrapper.dimension.equals(dimension)) { @@ -103,11 +103,14 @@ public class PluginGT5UndergroundFluid extends PluginBase { for (int i = 0; i < recipe.dimensionDisplayItems.size(); i++) { GuiDraw.drawStringC(format.format((double) recipe.chances.get(i) / 100) + "%", xChance, y, black, false); GuiDraw.drawStringC( - recipe.minAmounts.get(i).toString() + "-" + recipe.maxAmounts.get(i).toString(), - xAmount, - y, - black, - false); + recipe.minAmounts.get(i) + .toString() + "-" + + recipe.maxAmounts.get(i) + .toString(), + xAmount, + y, + black, + false); y += lineSpace; } } @@ -132,18 +135,18 @@ public class PluginGT5UndergroundFluid extends PluginBase { private CachedUndergroundFluidRecipe(Fluid fluid, List<UndergroundFluidWrapper> wrappers) { targetFluidDisplay = new PositionedStack( - GT_Utility.getFluidDisplayStack(fluid), - getGuiWidth() / 2 - halfItemLength, - 3); + GT_Utility.getFluidDisplayStack(fluid), + getGuiWidth() / 2 - halfItemLength, + 3); int y = 50 - halfItemLength; for (UndergroundFluidWrapper wrapper : wrappers) { ItemStack dimensionDisplay = ItemDimensionDisplay.getItem(wrapper.dimension); if (dimensionDisplay != null) { dimensionDisplayItems.add( - new PositionedStack( - dimensionDisplay, - xDimensionDisplay - halfItemLength, - y + GuiDraw.fontRenderer.FONT_HEIGHT / 2)); + new PositionedStack( + dimensionDisplay, + xDimensionDisplay - halfItemLength, + y + GuiDraw.fontRenderer.FONT_HEIGHT / 2)); y += lineSpace; chances.add(wrapper.chance); maxAmounts.add(wrapper.maxAmount); diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java index 98f168c2a7..0f3322a500 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java @@ -31,7 +31,8 @@ public class PluginGT5VeinStat extends PluginGT5Base { @Override public void loadCraftingRecipes(ItemStack stack) { - if (stack.getUnlocalizedName().startsWith("gt.blockores")) { + if (stack.getUnlocalizedName() + .startsWith("gt.blockores")) { loadMatchingVeins((short) (stack.getItemDamage() % 1000)); } else super.loadCraftingRecipes(stack); } @@ -52,7 +53,8 @@ public class PluginGT5VeinStat extends PluginGT5Base { } for (OreLayerWrapper oreVein : getAllVeins()) { - if (Arrays.asList(getDimNameArrayFromVeinName(oreVein.veinName)).contains(dimension)) { + if (Arrays.asList(getDimNameArrayFromVeinName(oreVein.veinName)) + .contains(dimension)) { addVeinWithLayers(oreVein, getMaximumMaterialIndex((short) (stack.getItemDamage() % 1000), false)); } } @@ -60,12 +62,12 @@ public class PluginGT5VeinStat extends PluginGT5Base { private void addVeinWithLayers(OreLayerWrapper oreVein, int maximumMaterialIndex) { this.arecipes.add( - new CachedVeinStatRecipe( - oreVein.veinName, - oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_PRIMARY), - oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_SECONDARY), - oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_BETWEEN), - oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_SPORADIC))); + new CachedVeinStatRecipe( + oreVein.veinName, + oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_PRIMARY), + oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_SECONDARY), + oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_BETWEEN), + oreVein.getVeinLayerOre(maximumMaterialIndex, VEIN_SPORADIC))); } private Collection<OreLayerWrapper> getAllVeins() { @@ -134,7 +136,11 @@ public class PluginGT5VeinStat extends PluginGT5Base { private String[] getDimNameArrayFromVeinName(String veinName) { OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(veinName); String[] dims = DimensionHelper.parseDimNames(GT5OreLayerHelper.bufferedDims.get(oreLayer)); - Arrays.sort(dims, Comparator.comparingInt(s -> Arrays.asList(DimensionHelper.DimNameDisplayed).indexOf(s))); + Arrays.sort( + dims, + Comparator.comparingInt( + s -> Arrays.asList(DimensionHelper.DimNameDisplayed) + .indexOf(s))); return dims; } @@ -148,8 +154,7 @@ public class PluginGT5VeinStat extends PluginGT5Base { private final List<PositionedStack> dimensionDisplayItems = new ArrayList<>(); public CachedVeinStatRecipe(String veinName, List<ItemStack> stackListPrimary, - List<ItemStack> stackListSecondary, List<ItemStack> stackListBetween, - List<ItemStack> stackListSporadic) { + List<ItemStack> stackListSecondary, List<ItemStack> stackListBetween, List<ItemStack> stackListSporadic) { this.veinName = veinName; positionedStackPrimary = new PositionedStack(stackListPrimary, 2, 0); positionedStackSecondary = new PositionedStack(stackListSecondary, 22, 0); diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java index b8e9301f3b..01a0b4bebb 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/item/ItemDimensionDisplay.java @@ -21,7 +21,8 @@ public class ItemDimensionDisplay extends ItemBlock { super(block); setCreativeTab(GTNEIOrePlugin.creativeTab); - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { + if (FMLCommonHandler.instance() + .getEffectiveSide() == Side.CLIENT) { MinecraftForgeClient.registerItemRenderer(this, new ItemDimensionDisplayRenderer()); } } @@ -48,7 +49,8 @@ public class ItemDimensionDisplay extends ItemBlock { public String getItemStackDisplayName(ItemStack stack) { String dimension = getDimension(stack); if (dimension != null) { - return DimensionHelper.convertCondensedStringToToolTip(dimension).get(0); + return DimensionHelper.convertCondensedStringToToolTip(dimension) + .get(0); } return super.getItemStackDisplayName(stack); } diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/renderer/ItemDimensionDisplayRenderer.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/renderer/ItemDimensionDisplayRenderer.java index 0c670a6d3d..12c62c9830 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/renderer/ItemDimensionDisplayRenderer.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/renderer/ItemDimensionDisplayRenderer.java @@ -33,12 +33,12 @@ public class ItemDimensionDisplayRenderer implements IItemRenderer { } renderItem.renderItemIntoGUI( - Minecraft.getMinecraft().fontRenderer, - Minecraft.getMinecraft().renderEngine, - stack, - 0, - 0, - false); + Minecraft.getMinecraft().fontRenderer, + Minecraft.getMinecraft().renderEngine, + stack, + 0, + 0, + false); FontRenderer fontRender = Minecraft.getMinecraft().fontRenderer; float smallTextScale = 3F / 4F; @@ -51,7 +51,7 @@ public class ItemDimensionDisplayRenderer implements IItemRenderer { String tooltipPrefix = prefix != -1 ? "T" + prefix : "INVALID. Please, report this to the GTNH team"; fontRender - .drawString(tooltipPrefix, 0, (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); + .drawString(tooltipPrefix, 0, (int) (16 / smallTextScale) - fontRender.FONT_HEIGHT + 1, 0xFFFFFF, true); GL11.glPopMatrix(); diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java b/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java index 1a56044219..1a99b469af 100644 --- a/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java +++ b/src/main/java/pers/gwyog/gtneioreplugin/util/CSVMaker.java @@ -34,8 +34,14 @@ public class CSVMaker implements Runnable { step = (int) (step / 1.3); } for (int i = 0; i < list2.size() - step; i++) { - if (list2.get(i).getOreName().substring(0, 3) - .compareTo((list2.get(i + step).getOreName().substring(0, 3))) > 0) { + if (list2.get(i) + .getOreName() + .substring(0, 3) + .compareTo( + (list2.get(i + step) + .getOreName() + .substring(0, 3))) + > 0) { Oremix tmp = list2.get(i); list2.set(i, list2.get(i + step)); list2.set(i + step, tmp); @@ -53,7 +59,8 @@ public class CSVMaker implements Runnable { public void runSmallOres() { try { Iterator<Map.Entry<String, GT5OreSmallHelper.OreSmallWrapper>> it = GT5OreSmallHelper.mapOreSmallWrapper - .entrySet().iterator(); + .entrySet() + .iterator(); List<Oremix> OreVeins = new ArrayList<>(); while (it.hasNext()) { Oremix oremix = new Oremix(); @@ -113,13 +120,15 @@ public class CSVMaker implements Runnable { ColumnPositionMappingStrategy<Oremix> strat = new ColumnPositionMappingStrategy<>(); strat.setType(Oremix.class); String[] columns = "ORENAME,mix,DENSITY,overworld,nether,end,ea,tf,mo,ma,ph,de,as,ce,eu,ga,ca,io,ve,me,en,ti,mi,ob,pr,tr,pl,kb,ha,make,dd,cb,vb,bc,be,bf,tcetie,an,ho,np,mh,mb,se" - .split("\\,"); + .split("\\,"); strat.setColumnMapping(columns); StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder<Oremix>(one) - .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER).withMappingStrategy(strat).build(); + .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER) + .withMappingStrategy(strat) + .build(); List<Oremix> towrite = Combsort(OreVeins); one.write( - "Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight Forest,Moon,Mars,Phobos,Deimos,Asteroids,Ceres,Europa,Ganymede,Callisto,Io,Venus,Mercury,Enceladus,Titan,Miranda,Oberon,Proteus,Triton,Pluto,Kuiper Belt,Haumea,Makemake,Deep Dark,Centauri Bb,Vega B,Barnard C,Barnard E,Barnard F,T Ceti E,Anubis,Horus,Neper,Maahes,Mehen Belt,Seth"); + "Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight Forest,Moon,Mars,Phobos,Deimos,Asteroids,Ceres,Europa,Ganymede,Callisto,Io,Venus,Mercury,Enceladus,Titan,Miranda,Oberon,Proteus,Triton,Pluto,Kuiper Belt,Haumea,Makemake,Deep Dark,Centauri Bb,Vega B,Barnard C,Barnard E,Barnard F,T Ceti E,Anubis,Horus,Neper,Maahes,Mehen Belt,Seth"); one.newLine(); beanToCsv.write(towrite); one.flush(); @@ -138,7 +147,7 @@ public class CSVMaker implements Runnable { public void runVeins() { try { Iterator<Map.Entry<String, OreLayerWrapper>> it = GT5OreLayerHelper.mapOreLayerWrapper.entrySet() - .iterator(); + .iterator(); List<Oremix> OreVeins = new ArrayList<>(); while (it.hasNext()) { Oremix oremix = new Oremix(); @@ -156,12 +165,12 @@ public class CSVMaker implements Runnable { oremix.setDensity(oreLayer.density); oremix.setWeight(oreLayer.randomWeight); oremix.setMix( - Integer.toString(oreLayer.Meta[0]) + "|" - + Integer.toString(oreLayer.Meta[1]) - + "|" - + Integer.toString(oreLayer.Meta[2]) - + "|" - + Integer.toString(oreLayer.Meta[3])); + Integer.toString(oreLayer.Meta[0]) + "|" + + Integer.toString(oreLayer.Meta[1]) + + "|" + + Integer.toString(oreLayer.Meta[2]) + + "|" + + Integer.toString(oreLayer.Meta[3])); oremix.an = Dims.contains("An"); oremix.as = Dims.contains("As"); oremix.bc = Dims.contains("BC"); @@ -211,13 +220,15 @@ public class CSVMaker implements Runnable { ColumnPositionMappingStrategy<Oremix> strat = new ColumnPositionMappingStrategy<>(); strat.setType(Oremix.class); String[] columns = "ORENAME,PRIMARY,SECONDARY,INBETWEEN,AROUND,mix,TIER,HEIGHT,DENSITY,SIZE,WEIGHT,overworld,nether,end,ea,tf,mo,ma,ph,de,as,ce,eu,ga,ca,io,ve,me,en,ti,mi,ob,pr,tr,pl,kb,ha,make,dd,cb,vb,bc,be,bf,tcetie,an,ho,np,mh,mb,se" - .split("\\,"); + .split("\\,"); strat.setColumnMapping(columns); StatefulBeanToCsv<Oremix> beanToCsv = new StatefulBeanToCsvBuilder<Oremix>(one) - .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER).withMappingStrategy(strat).build(); + .withQuotechar(CSVWriter.NO_QUOTE_CHARACTER) + .withMappingStrategy(strat) + .build(); List<Oremix> towrite = Combsort(OreVeins); one.write( - "Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight Forest,Moon,Mars,Phobos,Deimos,Asteroids,Ceres,Europa,Ganymede,Callisto,Io,Venus,Mercury,Enceladus,Titan,Miranda,Oberon,Proteus,Triton,Pluto,Kuiper Belt,Haumea,Makemake,Deep Dark,Centauri Bb,Vega B,Barnard C,Barnard E,Barnard F,T Ceti E,Anubis,Horus,Neper,Maahes,Mehen Belt,Seth"); + "Ore Name,Primary,Secondary,Inbetween,Around,ID,Tier,Height,Density,Size,Weight,Overworld,Nether,End,End Asteroids,Twilight |
