From 63643199209060eca58b367af3d163ba8594f3ea Mon Sep 17 00:00:00 2001 From: tech22 Date: Wed, 8 Dec 2021 22:16:13 -0500 Subject: [PATCH 1/4] add handheld prospectors --- .../java/gregtech/common/items/MetaItem1.java | 18 +- .../java/gregtech/common/items/MetaItems.java | 3 + .../behaviors/ProspectorScannerBehavior.java | 161 ++++++++++++++++++ .../widget/WidgetProspectingMap.java | 13 +- .../resources/assets/gregtech/lang/en_us.lang | 6 +- 5 files changed, 186 insertions(+), 15 deletions(-) create mode 100644 src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java diff --git a/src/main/java/gregtech/common/items/MetaItem1.java b/src/main/java/gregtech/common/items/MetaItem1.java index abf2b24303f..26571f07faa 100644 --- a/src/main/java/gregtech/common/items/MetaItem1.java +++ b/src/main/java/gregtech/common/items/MetaItem1.java @@ -379,24 +379,26 @@ public void registerSubItems() { DYNAMITE = addItem(460, "dynamite").addComponents(new DynamiteBehaviour()).setMaxStackSize(16); INTEGRATED_CIRCUIT = addItem(461, "circuit.integrated").addComponents(new IntCircuitBehaviour()).setModelAmount(33); FOAM_SPRAYER = addItem(462, "foam_sprayer").addComponents(new FoamSprayerBehavior()).setMaxStackSize(1); - NANO_SABER = addItem(463, "nano_saber").addComponents(ElectricStats.createElectricItem(4000000L, GTValues.HV)).addComponents(new NanoSaberBehavior()).setMaxStackSize(1); - // Free ID 464 - SCANNER = addItem(465, "scanner").addComponents(ElectricStats.createElectricItem(200_000L, GTValues.LV), new ScannerBehavior(50)); - CLIPBOARD = addItem(466, "clipboard").addComponents(new ClipboardBehavior()).setMaxStackSize(1); - TERMINAL = addItem(467, "terminal").addComponents(new HardwareProvider(), new TerminalBehaviour()).setMaxStackSize(1); - WIRELESS = addItem(468, "wireless"); - CAMERA = addItem(469, "camera"); + NANO_SABER = addItem(463, "nano_saber").addComponents(ElectricStats.createElectricItem(4_000_000L, GTValues.HV)).addComponents(new NanoSaberBehavior()).setMaxStackSize(1); + SCANNER = addItem(464, "scanner").addComponents(ElectricStats.createElectricItem(200_000L, GTValues.LV), new ScannerBehavior(50)); + CLIPBOARD = addItem(465, "clipboard").addComponents(new ClipboardBehavior()).setMaxStackSize(1); + TERMINAL = addItem(466, "terminal").addComponents(new HardwareProvider(), new TerminalBehaviour()).setMaxStackSize(1); + PROSPECTOR_LV = addItem(467, "prospector.lv").addComponents(ElectricStats.createElectricItem(100_000L, GTValues.LV), new ProspectorScannerBehavior(2, GTValues.LV)); + PROSPECTOR_HV = addItem(468, "prospector.hv").addComponents(ElectricStats.createElectricItem(1_600_000L, GTValues.HV), new ProspectorScannerBehavior(4, GTValues.HV)); + PROSPECTOR_LUV = addItem(469, "prospector.luv").addComponents(ElectricStats.createElectricItem(1_000_000_000L, GTValues.LuV), new ProspectorScannerBehavior(5, GTValues.LuV)); // Misc Crafting Items: ID 491-515 - //Free ID: 493, 494, 495, 496 ENERGIUM_DUST = addItem(491, "energium_dust"); ENGRAVED_LAPOTRON_CHIP = addItem(492, "engraved.lapotron_chip"); + //Free ID: 493, 494, 495, 496 NEUTRON_REFLECTOR = addItem(497, "neutron_reflector"); GELLED_TOLUENE = addItem(498, "gelled_toluene"); CARBON_FIBERS = addItem(499, "carbon.fibers"); CARBON_MESH = addItem(500, "carbon.mesh"); CARBON_PLATE = addItem(501, "carbon.plate"); DUCT_TAPE = addItem(502, "duct_tape"); + WIRELESS = addItem(503, "wireless"); + CAMERA = addItem(504, "camera"); // Circuit Components: ID 516-565 VACUUM_TUBE = addItem(516, "circuit.vacuum_tube").setUnificationData(OrePrefix.circuit, Tier.Primitive); diff --git a/src/main/java/gregtech/common/items/MetaItems.java b/src/main/java/gregtech/common/items/MetaItems.java index 285ea08b8a4..e1908c878ca 100644 --- a/src/main/java/gregtech/common/items/MetaItems.java +++ b/src/main/java/gregtech/common/items/MetaItems.java @@ -441,6 +441,9 @@ private MetaItems() { public static MetaItem.MetaValueItem NANO_SABER; public static MetaItem.MetaValueItem SCANNER; + public static MetaItem.MetaValueItem PROSPECTOR_LV; + public static MetaItem.MetaValueItem PROSPECTOR_HV; + public static MetaItem.MetaValueItem PROSPECTOR_LUV; public static MetaItem.MetaValueItem WIRELESS; public static MetaItem.MetaValueItem CAMERA; public static MetaItem.MetaValueItem TERMINAL; diff --git a/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java new file mode 100644 index 00000000000..d0bc1cb6677 --- /dev/null +++ b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java @@ -0,0 +1,161 @@ +package gregtech.common.items.behaviors; + +import gregtech.api.GTValues; +import gregtech.api.capability.GregtechCapabilities; +import gregtech.api.capability.IElectricItem; +import gregtech.api.gui.GuiTextures; +import gregtech.api.gui.ModularUI; +import gregtech.api.gui.impl.ModularUIContainer; +import gregtech.api.gui.widgets.ToggleButtonWidget; +import gregtech.api.items.gui.ItemUIFactory; +import gregtech.api.items.gui.PlayerInventoryHolder; +import gregtech.api.items.metaitem.stats.IItemBehaviour; +import gregtech.common.terminal.app.prospector.widget.WidgetOreList; +import gregtech.common.terminal.app.prospector.widget.WidgetProspectingMap; +import gregtech.common.terminal.component.SearchComponent; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumHand; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nonnull; +import java.util.Locale; +import java.util.Map; +import java.util.function.Consumer; + +public class ProspectorScannerBehavior implements IItemBehaviour, ItemUIFactory, SearchComponent.IWidgetSearch { + + private static final long VOLTAGE_FACTOR = 16L; + private static final int FLUID_PROSPECTION_THRESHOLD = GTValues.HV; + + private final int radius; + private final int tier; + private int mode; + + private WidgetOreList widgetOreList; + private WidgetProspectingMap widgetProspectingMap; + + public ProspectorScannerBehavior(int radius, int tier) { + this.radius = radius + 1; + this.tier = tier; + this.mode = 0; + } + + @Override + public ActionResult onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, EnumHand hand) { + ItemStack heldItem = player.getHeldItem(hand); + if (!world.isRemote) { + if (player.isSneaking()) { + if (getNextMode() == WidgetProspectingMap.ORE_PROSPECTING_MODE) { + if (this.tier >= FLUID_PROSPECTION_THRESHOLD) + incrementMode(); + player.sendMessage(new TextComponentTranslation("Ore Prospection")); + } else if (getNextMode() == WidgetProspectingMap.FLUID_PROSPECTING_MODE && this.tier >= FLUID_PROSPECTION_THRESHOLD) { + incrementMode(); + player.sendMessage(new TextComponentTranslation("Fluid Prospection")); + } + } else if (checkCanUseScanner(heldItem, player, true)) { + PlayerInventoryHolder holder = new PlayerInventoryHolder(player, hand); + holder.openUI(); + } else { + player.sendMessage(new TextComponentTranslation("behavior.scanner.not_enough_energy")); + } + } + return ActionResult.newResult(EnumActionResult.SUCCESS, heldItem); + } + + private int getNextMode() { + return (this.mode + 1) % 2; + } + + private void incrementMode() { + this.mode = getNextMode(); + } + + private boolean checkCanUseScanner(ItemStack stack, @Nonnull EntityPlayer player, boolean simulate) { + return player.isCreative() || drainEnergy(stack, GTValues.V[tier] / VOLTAGE_FACTOR, simulate); + } + + private boolean drainEnergy(@Nonnull ItemStack stack, long amount, boolean simulate) { + IElectricItem electricItem = stack.getCapability(GregtechCapabilities.CAPABILITY_ELECTRIC_ITEM, null); + if (electricItem == null) + return false; + + return electricItem.discharge(amount, Integer.MAX_VALUE, true, false, simulate) >= amount; + } + + @Override + public ModularUI createUI(PlayerInventoryHolder holder, @Nonnull EntityPlayer entityPlayer) { + ModularUI.Builder builder = ModularUI.builder(GuiTextures.BACKGROUND, 332, 200); + this.widgetOreList = new WidgetOreList(32 * radius - 6, 18, 332 - 32 * radius, 176); + builder.widget(this.widgetOreList); + this.widgetProspectingMap = new WidgetProspectingMap(6, 18, radius, this.widgetOreList, mode, 1); + builder.widget(widgetProspectingMap); + builder.widget(new ToggleButtonWidget(311, 3, 18, 18, widgetProspectingMap::getDarkMode, this::setDarkMode) + .setButtonTexture(GuiTextures.BUTTON_BLACKLIST)); + return builder.label(6, 6, getTranslationKey()).build(holder, entityPlayer); + } + + private String getTranslationKey() { + return String.format("metaitem.prospector.%s.name", GTValues.VN[tier].toLowerCase(Locale.ROOT)); + } + + @SideOnly(Side.CLIENT) + private void setDarkMode(boolean isDarkMode) { + this.widgetProspectingMap.setDarkMode(isDarkMode); + this.widgetProspectingMap.updateScreen(); + } + + @Override + public String resultDisplay(String result) { + if (widgetOreList != null) { + return widgetOreList.ores.get(result); + } + return ""; + } + + @Override + public void selectResult(String result) { + if (widgetOreList != null) { + widgetOreList.setSelected(result); + } + } + + @Override + public void search(String word, Consumer find) { + if (widgetOreList != null) { + word = word.toLowerCase(); + for (Map.Entry entry : widgetOreList.ores.entrySet()) { + if (entry.getKey().toLowerCase().contains(word) || entry.getValue().toLowerCase().contains(word)) { + find.accept(entry.getKey()); + } + } + } + } + + @Override + public void onUpdate(ItemStack itemStack, Entity entity) { + if (entity instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) entity; + if (player.openContainer instanceof ModularUIContainer) { + ModularUIContainer modularUIContainer = (ModularUIContainer) player.openContainer; + if (modularUIContainer.getModularUI().holder instanceof PlayerInventoryHolder) { + if (((PlayerInventoryHolder) (modularUIContainer).getModularUI().holder).getCurrentItem() == itemStack) { + if (!player.isCreative()) { + if (checkCanUseScanner(itemStack, player, true)) + drainEnergy(itemStack, GTValues.V[tier] / VOLTAGE_FACTOR, false); + else + player.closeScreen(); + } + } + } + } + } + } +} diff --git a/src/main/java/gregtech/common/terminal/app/prospector/widget/WidgetProspectingMap.java b/src/main/java/gregtech/common/terminal/app/prospector/widget/WidgetProspectingMap.java index 4c1bef82d62..f9dea40f406 100644 --- a/src/main/java/gregtech/common/terminal/app/prospector/widget/WidgetProspectingMap.java +++ b/src/main/java/gregtech/common/terminal/app/prospector/widget/WidgetProspectingMap.java @@ -4,8 +4,7 @@ import gregtech.api.gui.Widget; import gregtech.api.net.SProspectingPacket; import gregtech.api.unification.OreDictUnifier; -import gregtech.api.unification.material.info.MaterialIconType; -import gregtech.api.unification.ore.OrePrefix; +import gregtech.api.util.GTUtility; import gregtech.api.util.Position; import gregtech.api.util.Size; import gregtech.api.worldgen.bedrockFluids.BedrockFluidVeinHandler; @@ -39,6 +38,9 @@ public class WidgetProspectingMap extends Widget { @SideOnly(Side.CLIENT) private ProspectingTexture texture; + public static final int ORE_PROSPECTING_MODE = 0; + public static final int FLUID_PROSPECTING_MODE = 1; + public WidgetProspectingMap(int xPosition, int yPosition, int chunkRadius, WidgetOreList widgetOreList, int mode, int scanTick) { super(new Position(xPosition, yPosition), new Size(16 * (chunkRadius * 2 - 1), 16 * (chunkRadius * 2 - 1))); this.chunkRadius = chunkRadius; @@ -88,21 +90,20 @@ public void detectAndSendChanges() { SProspectingPacket packet = new SProspectingPacket(cX + ox, cZ + oz, (int) player.posX, (int) player.posZ, this.mode); switch (mode) { - case 0: + case ORE_PROSPECTING_MODE: for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { int ySize = chunk.getHeightValue(x, z); for (int y = 1; y < ySize; y++) { Block block = chunk.getBlockState(x, y, z).getBlock(); - OrePrefix orePrefix = OreDictUnifier.getPrefix(block); - if (orePrefix != null && orePrefix.materialIconType == MaterialIconType.ore) { + if (GTUtility.isOre(block)) { packet.addBlock(x, y, z, OreDictUnifier.getOreDictionaryNames(new ItemStack(block)).stream().findFirst().get()); } } } } break; - case 1: + case FLUID_PROSPECTING_MODE: BedrockFluidVeinHandler.FluidVeinWorldEntry fStack = BedrockFluidVeinHandler.getFluidVeinWorldEntry(world, chunk.x, chunk.z); if (fStack != null && fStack.getVein() != null) { packet.addBlock(0, 2, 0, fStack.getCurrentFluidAmount() + ""); diff --git a/src/main/resources/assets/gregtech/lang/en_us.lang b/src/main/resources/assets/gregtech/lang/en_us.lang index d62bacdedfe..e14fe97b5a3 100644 --- a/src/main/resources/assets/gregtech/lang/en_us.lang +++ b/src/main/resources/assets/gregtech/lang/en_us.lang @@ -2154,7 +2154,11 @@ metaitem.scanner.tooltip=Hold right mouse button on surface rocks/nto discover u behavior.scanner.analyzing=Analyzing... behavior.scanner.analyzing_failed=Analyzing failed! behavior.scanner.analyzing_complete=Analyzing complete! -behavior.scanner.not_enough_energy=Analyzing failed: Not Enough Energy! +behavior.scanner.not_enough_energy=Not Enough Energy! + +metaitem.prospector.lv.name=Low Voltage Prospector's Scanner +metaitem.prospector.hv.name=High Voltage Prospector's Scanner +metaitem.prospector.luv.name=Ludicrous Voltage Prospector's Scanner metaitem.terminal.name=Terminal metaitem.terminal.tooltip=Sharp tools make good work From 56585b5cd4c45b641e82ce7097020dfccfff86d4 Mon Sep 17 00:00:00 2001 From: tech22 Date: Wed, 8 Dec 2021 23:23:53 -0500 Subject: [PATCH 2/4] textures and lang --- .../java/gregtech/common/items/MetaItem1.java | 2 +- .../behaviors/ProspectorScannerBehavior.java | 16 +++++++++++----- .../resources/assets/gregtech/lang/en_us.lang | 4 ++++ .../models/item/metaitems/prospector.hv.json | 6 ++++++ .../models/item/metaitems/prospector.luv.json | 6 ++++++ .../models/item/metaitems/prospector.lv.json | 6 ++++++ .../textures/items/metaitems/prospector.hv.png | Bin 0 -> 5447 bytes .../textures/items/metaitems/prospector.luv.png | Bin 0 -> 5319 bytes .../textures/items/metaitems/prospector.lv.png | Bin 0 -> 5315 bytes 9 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/prospector.hv.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/prospector.luv.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/prospector.lv.json create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/prospector.hv.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/prospector.luv.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/prospector.lv.png diff --git a/src/main/java/gregtech/common/items/MetaItem1.java b/src/main/java/gregtech/common/items/MetaItem1.java index 26571f07faa..1914ce1ecc7 100644 --- a/src/main/java/gregtech/common/items/MetaItem1.java +++ b/src/main/java/gregtech/common/items/MetaItem1.java @@ -384,7 +384,7 @@ public void registerSubItems() { CLIPBOARD = addItem(465, "clipboard").addComponents(new ClipboardBehavior()).setMaxStackSize(1); TERMINAL = addItem(466, "terminal").addComponents(new HardwareProvider(), new TerminalBehaviour()).setMaxStackSize(1); PROSPECTOR_LV = addItem(467, "prospector.lv").addComponents(ElectricStats.createElectricItem(100_000L, GTValues.LV), new ProspectorScannerBehavior(2, GTValues.LV)); - PROSPECTOR_HV = addItem(468, "prospector.hv").addComponents(ElectricStats.createElectricItem(1_600_000L, GTValues.HV), new ProspectorScannerBehavior(4, GTValues.HV)); + PROSPECTOR_HV = addItem(468, "prospector.hv").addComponents(ElectricStats.createElectricItem(1_600_000L, GTValues.HV), new ProspectorScannerBehavior(3, GTValues.HV)); PROSPECTOR_LUV = addItem(469, "prospector.luv").addComponents(ElectricStats.createElectricItem(1_000_000_000L, GTValues.LuV), new ProspectorScannerBehavior(5, GTValues.LuV)); // Misc Crafting Items: ID 491-515 diff --git a/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java index d0bc1cb6677..1b0bf605750 100644 --- a/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java +++ b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java @@ -13,6 +13,7 @@ import gregtech.common.terminal.app.prospector.widget.WidgetOreList; import gregtech.common.terminal.app.prospector.widget.WidgetProspectingMap; import gregtech.common.terminal.component.SearchComponent; +import net.minecraft.client.resources.I18n; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -21,10 +22,9 @@ import net.minecraft.util.EnumHand; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; import javax.annotation.Nonnull; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.function.Consumer; @@ -55,10 +55,10 @@ public ActionResult onItemRightClick(@Nonnull World world, @Nonnull E if (getNextMode() == WidgetProspectingMap.ORE_PROSPECTING_MODE) { if (this.tier >= FLUID_PROSPECTION_THRESHOLD) incrementMode(); - player.sendMessage(new TextComponentTranslation("Ore Prospection")); + player.sendMessage(new TextComponentTranslation("metaitem.prospector.mode.ores")); } else if (getNextMode() == WidgetProspectingMap.FLUID_PROSPECTING_MODE && this.tier >= FLUID_PROSPECTION_THRESHOLD) { incrementMode(); - player.sendMessage(new TextComponentTranslation("Fluid Prospection")); + player.sendMessage(new TextComponentTranslation("metaitem.prospector.mode.fluid")); } } else if (checkCanUseScanner(heldItem, player, true)) { PlayerInventoryHolder holder = new PlayerInventoryHolder(player, hand); @@ -106,7 +106,13 @@ private String getTranslationKey() { return String.format("metaitem.prospector.%s.name", GTValues.VN[tier].toLowerCase(Locale.ROOT)); } - @SideOnly(Side.CLIENT) + @Override + public void addInformation(ItemStack itemStack, List lines) { + IItemBehaviour.super.addInformation(itemStack, lines); + if (tier >= GTValues.HV) lines.add(I18n.format("metaitem.prospector.tooltip.fluids", radius)); + else lines.add(I18n.format("metaitem.prospector.tooltip.ores", radius)); + } + private void setDarkMode(boolean isDarkMode) { this.widgetProspectingMap.setDarkMode(isDarkMode); this.widgetProspectingMap.updateScreen(); diff --git a/src/main/resources/assets/gregtech/lang/en_us.lang b/src/main/resources/assets/gregtech/lang/en_us.lang index e14fe97b5a3..9c7b366be8a 100644 --- a/src/main/resources/assets/gregtech/lang/en_us.lang +++ b/src/main/resources/assets/gregtech/lang/en_us.lang @@ -2159,6 +2159,10 @@ behavior.scanner.not_enough_energy=Not Enough Energy! metaitem.prospector.lv.name=Low Voltage Prospector's Scanner metaitem.prospector.hv.name=High Voltage Prospector's Scanner metaitem.prospector.luv.name=Ludicrous Voltage Prospector's Scanner +metaitem.prospector.mode.ores=Ore Prospection Mode +metaitem.prospector.mode.fluid=Fluid Prospection Mode +metaitem.prospector.tooltip.ores=Scans Ores in a %s Chunk Radius +metaitem.prospector.tooltip.fluids=Scans Ores and Fluids in a %s Chunk Radius metaitem.terminal.name=Terminal metaitem.terminal.tooltip=Sharp tools make good work diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/prospector.hv.json b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.hv.json new file mode 100644 index 00000000000..68d4e4d1dfc --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.hv.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/prospector.hv" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/prospector.luv.json b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.luv.json new file mode 100644 index 00000000000..eb8e6cc9843 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.luv.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/prospector.luv" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/prospector.lv.json b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.lv.json new file mode 100644 index 00000000000..651216e01d9 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/prospector.lv.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/prospector.lv" + } +} diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/prospector.hv.png b/src/main/resources/assets/gregtech/textures/items/metaitems/prospector.hv.png new file mode 100644 index 0000000000000000000000000000000000000000..d6be89e87ad053f3dd7f7beaa67d01f502c57d15 GIT binary patch literal 5447 zcmeHKc|25m8=q0xU6PctOe0A(W;aX5zD-PIDN;BybB4hzW?`h|rrbnXqLfIax^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mG$#Fn}Kl zLf7}FhWc#h{=;Np0SZ81lCUV26$YAb7LkNvvN=o?he!n30GY{Qg2b=c#R85b1`vVv zp-`nzHBbX7szEGQNNMpkIwlO1>x98!QCJ)bL-xhtsaWWTMPZ0k32Co_4gp(r0;jRzRUGZ3Vajz zdv|@8>zfq#Ch+&}`oGDg{`U(H$cLVSVxZRu5o^eUvxba!=v^+Mk_Q%b{wkVQ@C z79fVfG<4+~{C?l|DafcIp);IS9&4)2*3wvTZ~rXF)Jk`<_a!$KWfbYg+vz2wvh%LH zcCic6GQ)?o#*~wC?Mlhj@DjUF)n&W(uQ4NQHj^DG$^p9%g3*~i<9&UVPq$C1Or1&a zC^Pc6Zb|xG{pA5q6bvD?7dq=MtrN z4;wRFrsc8v?!|;y6L0_I@oY)uAw*ei8P@csagBwKObW* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/prospector.luv.png b/src/main/resources/assets/gregtech/textures/items/metaitems/prospector.luv.png new file mode 100644 index 0000000000000000000000000000000000000000..5ca652b0def995355826c1329e5ace352750c0de GIT binary patch literal 5319 zcmeHKdpMM78y_VaQBqkErjbg_%sWRj!;l;rX*4?~A*pv}-eF=6&4D4QlvPoqTD29a z)KW>UD6I~3+_E~XN+B%Sc0NVOAtm2CL#6B6f4Z)3|7+%Y-+7+<@O$q2ci->x%)6Bx zxX{eR+5~|>nE5k(IPkBz?iz0d-|f4HKm@|@MgliP$pPa~GPzVJih)qdco~F()FL4Q zp{_l(EVQVFV*37;libjtX^dTJGbhvLdA|tzxV!sFeDC6;Ma;>l`#zgCFMgGC#cePp zV3rll9&^-uVmS7~tm(FHk27EFp5&VIuC-Kkd3&{^xv5jwiqn?oK8Uk4(mmAN7agXd zPm{aLP#46FcBbNmbaNzKWwWR*eRL|FCSxT>p8p1eEh-GS~fS^p=}?IG)$vPQ2SV)^-Zoz@rUS-o+%!%v%K*c(1O@ZQQf8v~C_+h+HwcGHYD z$_Dd_5@V}i0P#44VeD~)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ZfIOrH*EN6JW-~xt%{fxxO*gJX7h+45KbiOz1H^(nguaCEb1#l zrTuF!Y?))W;U+}xy35T<^Uz?)>P;Lgi+tX7#}&tm_vk+MEB!V1&BD#d8v`D; zhU9L{APZ$|@GP>gJVE+W*s7zcAJGwSn{zobrlw(Y>(bYIUCR58VWMeWTN3uR7;cZt pb#<$4C@;t_I_1<_HttiE-hq2z7fDa!3*mARu8tmzV@rc#{|nO1K|%lk literal 0 HcmV?d00001 From c7432ad53fd7e708e94ecedbfee9b2578e667112 Mon Sep 17 00:00:00 2001 From: tech22 Date: Thu, 9 Dec 2021 00:11:18 -0500 Subject: [PATCH 3/4] prospector recipes --- .../java/gregtech/common/items/MetaItem1.java | 2 +- .../java/gregtech/common/items/MetaItems.java | 2 +- .../gregtech/integration/jei/GTJeiPlugin.java | 3 + .../oreprocessing/ToolRecipeHandler.java | 59 +++++++++++++++++-- .../loaders/recipe/AssemblyLineLoader.java | 2 +- .../loaders/recipe/CircuitRecipes.java | 4 +- .../loaders/recipe/CraftingRecipeLoader.java | 12 ---- .../loaders/recipe/MetaTileEntityLoader.java | 4 +- .../resources/assets/gregtech/lang/en_us.lang | 6 +- 9 files changed, 68 insertions(+), 26 deletions(-) diff --git a/src/main/java/gregtech/common/items/MetaItem1.java b/src/main/java/gregtech/common/items/MetaItem1.java index 1914ce1ecc7..d30a7d3eebb 100644 --- a/src/main/java/gregtech/common/items/MetaItem1.java +++ b/src/main/java/gregtech/common/items/MetaItem1.java @@ -561,7 +561,7 @@ public void registerSubItems() { BATTERY_UV_NAQUADRIA = addItem(747, "battery.uv.naquadria").addComponents(ElectricStats.createRechargeableBattery(2621440000L, GTValues.UV)).setUnificationData(OrePrefix.battery, Tier.Super).setModelAmount(8); ENERGY_LAPOTRONIC_ORB = addItem(748, "energy.lapotronicorb").addComponents(ElectricStats.createRechargeableBattery(100000000L, GTValues.IV)).setUnificationData(OrePrefix.battery, Tier.Elite).setModelAmount(8); - ENERGY_LAPOTRONIC_ORB2 = addItem(749, "energy.lapotronicorb2").addComponents(ElectricStats.createRechargeableBattery(1000000000L, GTValues.LuV)).setUnificationData(OrePrefix.battery, Tier.Master).setModelAmount(8); + ENERGY_LAPOTRONIC_ORB_CLUSTER = addItem(749, "energy.lapotronicorb2").addComponents(ElectricStats.createRechargeableBattery(1000000000L, GTValues.LuV)).setUnificationData(OrePrefix.battery, Tier.Master).setModelAmount(8); ENERGY_LAPOTRONIC_MODULE = addItem(750, "energy.module").addComponents(new IItemComponent[]{ElectricStats.createRechargeableBattery(10000000000L, GTValues.ZPM)}).setUnificationData(OrePrefix.battery, Tier.Ultimate).setModelAmount(8); ENERGY_LAPOTRONIC_CLUSTER = addItem(751, "energy.cluster").addComponents(new IItemComponent[]{ElectricStats.createRechargeableBattery(100000000000L, GTValues.UV)}).setUnificationData(OrePrefix.battery, Tier.Super).setModelAmount(8); diff --git a/src/main/java/gregtech/common/items/MetaItems.java b/src/main/java/gregtech/common/items/MetaItems.java index e1908c878ca..746ce23a1ff 100644 --- a/src/main/java/gregtech/common/items/MetaItems.java +++ b/src/main/java/gregtech/common/items/MetaItems.java @@ -151,7 +151,7 @@ private MetaItems() { public static MetaItem.MetaValueItem BATTERY_UV_NAQUADRIA; public static MetaItem.MetaValueItem ENERGY_LAPOTRONIC_ORB; - public static MetaItem.MetaValueItem ENERGY_LAPOTRONIC_ORB2; + public static MetaItem.MetaValueItem ENERGY_LAPOTRONIC_ORB_CLUSTER; public static MetaItem.MetaValueItem ZERO_POINT_MODULE; public static MetaItem.MetaValueItem ULTIMATE_BATTERY; diff --git a/src/main/java/gregtech/integration/jei/GTJeiPlugin.java b/src/main/java/gregtech/integration/jei/GTJeiPlugin.java index a0ab898ecb0..cd43eeb568c 100755 --- a/src/main/java/gregtech/integration/jei/GTJeiPlugin.java +++ b/src/main/java/gregtech/integration/jei/GTJeiPlugin.java @@ -214,6 +214,9 @@ public void register(IModRegistry registry) { String oreSpawnID = GTValues.MODID + ":" + "ore_spawn_location"; registry.addRecipes(oreInfoList, oreSpawnID); registry.addRecipeCatalyst(MetaItems.SCANNER.getStackForm(), oreSpawnID); + registry.addRecipeCatalyst(MetaItems.PROSPECTOR_LV.getStackForm(), oreSpawnID); + registry.addRecipeCatalyst(MetaItems.PROSPECTOR_HV.getStackForm(), oreSpawnID); + registry.addRecipeCatalyst(MetaItems.PROSPECTOR_LUV.getStackForm(), oreSpawnID); //Ore Veins End diff --git a/src/main/java/gregtech/loaders/oreprocessing/ToolRecipeHandler.java b/src/main/java/gregtech/loaders/oreprocessing/ToolRecipeHandler.java index 78aeddbdaf0..2e6562086ee 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ToolRecipeHandler.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ToolRecipeHandler.java @@ -1,5 +1,6 @@ package gregtech.loaders.oreprocessing; +import gregtech.api.GTValues; import gregtech.api.capability.GregtechCapabilities; import gregtech.api.items.metaitem.MetaItem.MetaValueItem; import gregtech.api.items.toolitem.ToolMetaItem.MetaToolValueItem; @@ -61,16 +62,20 @@ public static void initializeMetaItems() { baseMaterials = new Material[]{Materials.Steel, Materials.Aluminium, Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel}; powerUnitItems = new MetaValueItem[]{MetaItems.POWER_UNIT_LV, MetaItems.POWER_UNIT_MV, MetaItems.POWER_UNIT_HV, MetaItems.POWER_UNIT_EV, MetaItems.POWER_UNIT_IV}; batteryItems = new MetaValueItem[][]{ + {MetaItems.BATTERY_ULV_TANTALUM}, {MetaItems.BATTERY_LV_LITHIUM, MetaItems.BATTERY_LV_CADMIUM, MetaItems.BATTERY_LV_SODIUM}, {MetaItems.BATTERY_MV_LITHIUM, MetaItems.BATTERY_MV_CADMIUM, MetaItems.BATTERY_MV_SODIUM}, - {MetaItems.BATTERY_HV_LITHIUM, MetaItems.BATTERY_HV_CADMIUM, MetaItems.BATTERY_HV_SODIUM}, - {MetaItems.LAPOTRON_CRYSTAL}, - {MetaItems.ENERGY_LAPOTRONIC_ORB}}; + {MetaItems.BATTERY_HV_LITHIUM, MetaItems.BATTERY_HV_CADMIUM, MetaItems.BATTERY_HV_SODIUM, MetaItems.ENERGIUM_CRYSTAL}, + {MetaItems.BATTERY_EV_VANADIUM, MetaItems.LAPOTRON_CRYSTAL}, + {MetaItems.BATTERY_IV_VANADIUM, MetaItems.ENERGY_LAPOTRONIC_ORB}, + {MetaItems.BATTERY_LUV_VANADIUM, MetaItems.ENERGY_LAPOTRONIC_ORB_CLUSTER}, + {MetaItems.BATTERY_ZPM_NAQUADRIA, MetaItems.ENERGY_LAPOTRONIC_MODULE}, + {MetaItems.BATTERY_UV_NAQUADRIA, MetaItems.ENERGY_LAPOTRONIC_CLUSTER}}; } public static void registerPowerUnitRecipes() { for (int i = 0; i < powerUnitItems.length; i++) { - for (MetaValueItem batteryItem : batteryItems[i]) { + for (MetaValueItem batteryItem : batteryItems[i + 1]) { ItemStack batteryStack = batteryItem.getStackForm(); long maxCharge = batteryStack.getCapability(GregtechCapabilities.CAPABILITY_ELECTRIC_ITEM, null).getMaxCharge(); ItemStack powerUnitStack = powerUnitItems[i].getMaxChargeOverrideStack(maxCharge); @@ -399,6 +404,7 @@ public static void registerManualToolRecipes() { registerFlintToolRecipes(); registerMortarRecipes(); registerSoftHammerRecipes(); + registerProspectorRecipes(); } private static void registerFlintToolRecipes() { @@ -482,4 +488,49 @@ private static void registerSoftHammerRecipes() { } } } + + private static void registerProspectorRecipes() { + for (MetaValueItem batteryItem : batteryItems[GTValues.LV]) { + ModHandler.addShapedEnergyTransferRecipe("scanner_" + batteryItem.unlocalizedName, MetaItems.SCANNER.getStackForm(), + batteryItem::isItemEqual, true, true, + "DGD", "CGC", "SBS", + 'D', new UnificationEntry(OrePrefix.plate, Materials.Diamond), + 'G', new UnificationEntry(OrePrefix.paneGlass), + 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Basic), + 'S', new UnificationEntry(OrePrefix.plate, Materials.Steel), + 'B', batteryItem.getStackForm()); + + ModHandler.addShapedEnergyTransferRecipe("prospector_lv_" + batteryItem.unlocalizedName, MetaItems.PROSPECTOR_LV.getStackForm(), + batteryItem::isItemEqual, true, true, + "EPS", "CDC", "PBP", + 'E', MetaItems.EMITTER_LV.getStackForm(), + 'P', new UnificationEntry(OrePrefix.plate, Materials.Steel), + 'S', MetaItems.SENSOR_LV.getStackForm(), + 'D', new UnificationEntry(OrePrefix.plate, Materials.Glass), + 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Basic), + 'B', batteryItem.getStackForm()); + } + for (MetaValueItem batteryItem : batteryItems[GTValues.HV]) { + ModHandler.addShapedEnergyTransferRecipe("prospector_hv_" + batteryItem.unlocalizedName, MetaItems.PROSPECTOR_HV.getStackForm(), + batteryItem::isItemEqual, true, true, + "EPS", "CDC", "PBP", + 'E', MetaItems.EMITTER_HV.getStackForm(), + 'P', new UnificationEntry(OrePrefix.plate, Materials.StainlessSteel), + 'S', MetaItems.SENSOR_HV.getStackForm(), + 'D', MetaItems.COVER_SCREEN.getStackForm(), + 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Advanced), + 'B', batteryItem.getStackForm()); + } + for (MetaValueItem batteryItem : batteryItems[GTValues.LuV]) { + ModHandler.addShapedEnergyTransferRecipe("prospector_luv_" + batteryItem.unlocalizedName, MetaItems.PROSPECTOR_LUV.getStackForm(), + batteryItem::isItemEqual, true, true, + "EPS", "CDC", "PBP", + 'E', MetaItems.EMITTER_LUV.getStackForm(), + 'P', new UnificationEntry(OrePrefix.plate, Materials.RhodiumPlatedPalladium), + 'S', MetaItems.SENSOR_LUV.getStackForm(), + 'D', MetaItems.COVER_SCREEN.getStackForm(), + 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Master), + 'B', batteryItem.getStackForm()); + } + } } diff --git a/src/main/java/gregtech/loaders/recipe/AssemblyLineLoader.java b/src/main/java/gregtech/loaders/recipe/AssemblyLineLoader.java index 70833f11883..95dff9b1f6c 100644 --- a/src/main/java/gregtech/loaders/recipe/AssemblyLineLoader.java +++ b/src/main/java/gregtech/loaders/recipe/AssemblyLineLoader.java @@ -41,7 +41,7 @@ public static void init() { RecipeMaps.FUSION_RECIPES.recipeBuilder().fluidInputs(Materials.Lanthanum.getFluid(16), Materials.Silicon.getFluid(16)).fluidOutputs(Materials.Lutetium.getFluid(16)).duration(16).EUt(8192).EUToStart(80000000).buildAndRegister(); RecipeMaps.FUSION_RECIPES.recipeBuilder().fluidInputs(Materials.Plutonium241.getFluid(16), Materials.Titanium.getFluid(16)).fluidOutputs(Materials.Livermorium.getFluid(16)).duration(32).EUt(32768).EUToStart(200000000).buildAndRegister(); - RecipeMaps.ASSEMBLY_LINE_RECIPES.recipeBuilder().inputs(OreDictUnifier.get(OrePrefix.plate, Materials.Europium, 16), MetaItems.WETWARE_SUPER_COMPUTER_UV.getStackForm(4), MetaItems.ENERGY_LAPOTRONIC_ORB2.getStackForm(8), MetaItems.FIELD_GENERATOR_LUV.getStackForm(2), MetaItems.NANO_CENTRAL_PROCESSING_UNIT.getStackForm(64), MetaItems.NANO_CENTRAL_PROCESSING_UNIT.getStackForm(64), MetaItems.SMD_DIODE.getStackForm(8), OreDictUnifier.get(OrePrefix.cableGtSingle, Materials.Naquadah, 32)).fluidInputs(Materials.SolderingAlloy.getFluid(2880), Materials.Polybenzimidazole.getFluid(288)).outputs(MetaItems.ENERGY_LAPOTRONIC_MODULE.getStackForm()).duration(2000).EUt(100000).buildAndRegister(); + RecipeMaps.ASSEMBLY_LINE_RECIPES.recipeBuilder().inputs(OreDictUnifier.get(OrePrefix.plate, Materials.Europium, 16), MetaItems.WETWARE_SUPER_COMPUTER_UV.getStackForm(4), MetaItems.ENERGY_LAPOTRONIC_ORB_CLUSTER.getStackForm(8), MetaItems.FIELD_GENERATOR_LUV.getStackForm(2), MetaItems.NANO_CENTRAL_PROCESSING_UNIT.getStackForm(64), MetaItems.NANO_CENTRAL_PROCESSING_UNIT.getStackForm(64), MetaItems.SMD_DIODE.getStackForm(8), OreDictUnifier.get(OrePrefix.cableGtSingle, Materials.Naquadah, 32)).fluidInputs(Materials.SolderingAlloy.getFluid(2880), Materials.Polybenzimidazole.getFluid(288)).outputs(MetaItems.ENERGY_LAPOTRONIC_MODULE.getStackForm()).duration(2000).EUt(100000).buildAndRegister(); RecipeMaps.ASSEMBLY_LINE_RECIPES.recipeBuilder().inputs(OreDictUnifier.get(OrePrefix.plate, Materials.Americium, 16), MetaItems.WETWARE_SUPER_COMPUTER_UV.getStackForm(4), MetaItems.ENERGY_LAPOTRONIC_MODULE.getStackForm(8), MetaItems.FIELD_GENERATOR_ZPM.getStackForm(2), MetaItems.HIGH_POWER_INTEGRATED_CIRCUIT.getStackForm(64), MetaItems.HIGH_POWER_INTEGRATED_CIRCUIT.getStackForm(64), MetaItems.SMD_DIODE.getStackForm(16), OreDictUnifier.get(OrePrefix.cableGtSingle, Materials.NaquadahAlloy, 32)).fluidInputs(Materials.SolderingAlloy.getFluid(2880), Materials.Polybenzimidazole.getFluid(576)).outputs(MetaItems.ENERGY_LAPOTRONIC_CLUSTER.getStackForm()).duration(2000).EUt(200000).buildAndRegister(); RecipeMaps.ASSEMBLY_LINE_RECIPES.recipeBuilder().inputs(OreDictUnifier.get(OrePrefix.plate, Materials.Neutronium, 16), MetaItems.WETWARE_MAINFRAME_UHV.getStackForm(), MetaItems.WETWARE_MAINFRAME_UHV.getStackForm(), MetaItems.WETWARE_MAINFRAME_UHV.getStackForm(), MetaItems.WETWARE_MAINFRAME_UHV.getStackForm(), MetaItems.ENERGY_LAPOTRONIC_CLUSTER.getStackForm(8), MetaItems.FIELD_GENERATOR_UV.getStackForm(2), MetaItems.HIGH_POWER_INTEGRATED_CIRCUIT_WAFER.getStackForm(64), MetaItems.HIGH_POWER_INTEGRATED_CIRCUIT_WAFER.getStackForm(64), MetaItems.SMD_DIODE.getStackForm(16), OreDictUnifier.get(OrePrefix.wireGtSingle, Materials.EnrichedNaquadahTriniumEuropiumDuranide, 32)).fluidInputs(Materials.SolderingAlloy.getFluid(2880), Materials.Polybenzimidazole.getFluid(1000), Materials.Naquadria.getFluid(1152)).outputs(MetaItems.ULTIMATE_BATTERY.getStackForm()).duration(2000).EUt(300000).buildAndRegister(); diff --git a/src/main/java/gregtech/loaders/recipe/CircuitRecipes.java b/src/main/java/gregtech/loaders/recipe/CircuitRecipes.java index 561e38320b6..de7445c398a 100644 --- a/src/main/java/gregtech/loaders/recipe/CircuitRecipes.java +++ b/src/main/java/gregtech/loaders/recipe/CircuitRecipes.java @@ -1400,7 +1400,7 @@ private static void circuitRecipes() { .input(SMD_TRANSISTOR, 32) .input(wireFine, Platinum, 64) .fluidInputs(SolderingAlloy.getFluid(L * 5)) - .output(ENERGY_LAPOTRONIC_ORB2) + .output(ENERGY_LAPOTRONIC_ORB_CLUSTER) .buildAndRegister(); ASSEMBLY_LINE_RECIPES.recipeBuilder().EUt(80000).duration(500) @@ -1416,7 +1416,7 @@ private static void circuitRecipes() { .input(ADVANCED_SMD_TRANSISTOR, 8) .input(wireFine, Platinum, 64) .fluidInputs(SolderingAlloy.getFluid(L * 5)) - .output(ENERGY_LAPOTRONIC_ORB2) + .output(ENERGY_LAPOTRONIC_ORB_CLUSTER) .buildAndRegister(); } } diff --git a/src/main/java/gregtech/loaders/recipe/CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/recipe/CraftingRecipeLoader.java index 8f8e92a1a3f..dcf4d7af4dd 100644 --- a/src/main/java/gregtech/loaders/recipe/CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/recipe/CraftingRecipeLoader.java @@ -1,6 +1,5 @@ package gregtech.loaders.recipe; -import gregtech.api.items.metaitem.MetaItem.MetaValueItem; import gregtech.api.recipes.ModHandler; import gregtech.api.recipes.ingredients.IntCircuitIngredient; import gregtech.api.unification.OreDictUnifier; @@ -73,17 +72,6 @@ private static void loadCraftingRecipes() { ModHandler.addShapedRecipe("clipboard", MetaItems.CLIPBOARD.getStackForm(), " Sd", "BWR", "PPP", 'P', Items.PAPER, 'R', new UnificationEntry(OrePrefix.springSmall, Iron), 'B', new UnificationEntry(OrePrefix.bolt, Iron), 'S', new UnificationEntry(OrePrefix.screw, Iron), 'W', new UnificationEntry(OrePrefix.plate, Wood)); - for (MetaValueItem batteryItem : ToolRecipeHandler.batteryItems[0]) { - ModHandler.addShapedEnergyTransferRecipe("scanner_" + batteryItem.unlocalizedName, MetaItems.SCANNER.getStackForm(), - batteryItem::isItemEqual, true, true, - "DGD", "CGC", "SBS", - 'D', new UnificationEntry(OrePrefix.plate, Materials.Diamond), - 'G', new UnificationEntry(OrePrefix.paneGlass), - 'C', new UnificationEntry(OrePrefix.circuit, Tier.Basic), - 'S', new UnificationEntry(OrePrefix.plate, Materials.Steel), - 'B', batteryItem.getStackForm()); - } - for (Material material : new Material[]{Materials.Lapis, Materials.Lazurite, Materials.Sodalite}) { String recipeName = "lapotron_crystal_" + material.toString(); ModHandler.addShapedEnergyTransferRecipe(recipeName, MetaItems.LAPOTRON_CRYSTAL.getStackForm(), diff --git a/src/main/java/gregtech/loaders/recipe/MetaTileEntityLoader.java b/src/main/java/gregtech/loaders/recipe/MetaTileEntityLoader.java index 98cad720820..5d8a43016e5 100644 --- a/src/main/java/gregtech/loaders/recipe/MetaTileEntityLoader.java +++ b/src/main/java/gregtech/loaders/recipe/MetaTileEntityLoader.java @@ -13,10 +13,10 @@ import gregtech.api.unification.ore.OrePrefix; import gregtech.api.unification.stack.UnificationEntry; import gregtech.common.ConfigHolder; +import gregtech.common.blocks.BlockGlassCasing; import gregtech.common.blocks.BlockMetalCasing.MetalCasingType; import gregtech.common.blocks.BlockMultiblockCasing; import gregtech.common.blocks.BlockMultiblockCasing.MultiblockCasingType; -import gregtech.common.blocks.BlockGlassCasing; import gregtech.common.blocks.BlockWireCoil.CoilType; import gregtech.common.blocks.BlockWireCoil2.CoilType2; import gregtech.common.blocks.MetaBlocks; @@ -294,7 +294,7 @@ public static void init() { ModHandler.addShapedRecipe("charger_hv", MetaTileEntities.CHARGER[GTValues.HV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.HV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.Gold), 'T', OreDictNames.chestWood, 'B', MetaItems.BATTERY_HV_LITHIUM, 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Advanced)); ModHandler.addShapedRecipe("charger_ev", MetaTileEntities.CHARGER[GTValues.EV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.EV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.Aluminium), 'T', OreDictNames.chestWood, 'B', MetaItems.LAPOTRON_CRYSTAL, 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Extreme)); ModHandler.addShapedRecipe("charger_iv", MetaTileEntities.CHARGER[GTValues.IV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.IV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.Tungsten), 'T', OreDictNames.chestWood, 'B', MetaItems.ENERGY_LAPOTRONIC_ORB, 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Elite)); - ModHandler.addShapedRecipe("charger_luv", MetaTileEntities.CHARGER[GTValues.LuV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.LuV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.VanadiumGallium), 'T', OreDictNames.chestWood, 'B', MetaItems.ENERGY_LAPOTRONIC_ORB2, 'C', new UnificationEntry(OrePrefix.circuit, Tier.Master)); + ModHandler.addShapedRecipe("charger_luv", MetaTileEntities.CHARGER[GTValues.LuV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.LuV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.VanadiumGallium), 'T', OreDictNames.chestWood, 'B', MetaItems.ENERGY_LAPOTRONIC_ORB_CLUSTER, 'C', new UnificationEntry(OrePrefix.circuit, Tier.Master)); ModHandler.addShapedRecipe("charger_zpm", MetaTileEntities.CHARGER[GTValues.ZPM].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.ZPM].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.Naquadah), 'T', OreDictNames.chestWood, 'B', MetaItems.ENERGY_LAPOTRONIC_MODULE, 'C', new UnificationEntry(OrePrefix.circuit, Tier.Ultimate)); ModHandler.addShapedRecipe("charger_uv", MetaTileEntities.CHARGER[GTValues.UV].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.UV].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.NaquadahAlloy), 'T', OreDictNames.chestWood, 'B', MetaItems.ENERGY_LAPOTRONIC_CLUSTER, 'C', new UnificationEntry(OrePrefix.circuit, Tier.Super)); ModHandler.addShapedRecipe("charger_max", MetaTileEntities.CHARGER[GTValues.MAX].getStackForm(), "WTW", "WMW", "BCB", 'M', MetaTileEntities.HULL[GTValues.MAX].getStackForm(), 'W', new UnificationEntry(OrePrefix.wireGtHex, Materials.RutheniumTriniumAmericiumNeutronate), 'T', OreDictNames.chestWood, 'B', MetaItems.ULTIMATE_BATTERY, 'C', new UnificationEntry(OrePrefix.circuit, MarkerMaterials.Tier.Infinite)); diff --git a/src/main/resources/assets/gregtech/lang/en_us.lang b/src/main/resources/assets/gregtech/lang/en_us.lang index 9c7b366be8a..6c911cd7c15 100644 --- a/src/main/resources/assets/gregtech/lang/en_us.lang +++ b/src/main/resources/assets/gregtech/lang/en_us.lang @@ -2156,9 +2156,9 @@ behavior.scanner.analyzing_failed=Analyzing failed! behavior.scanner.analyzing_complete=Analyzing complete! behavior.scanner.not_enough_energy=Not Enough Energy! -metaitem.prospector.lv.name=Low Voltage Prospector's Scanner -metaitem.prospector.hv.name=High Voltage Prospector's Scanner -metaitem.prospector.luv.name=Ludicrous Voltage Prospector's Scanner +metaitem.prospector.lv.name=Electric Prospector's Scanner (LV) +metaitem.prospector.hv.name=Electric Prospector's Scanner (HV) +metaitem.prospector.luv.name=Electric Prospector's Scanner (LuV) metaitem.prospector.mode.ores=Ore Prospection Mode metaitem.prospector.mode.fluid=Fluid Prospection Mode metaitem.prospector.tooltip.ores=Scans Ores in a %s Chunk Radius From e357b02f02dc2463c514d544ced1fab8da35af37 Mon Sep 17 00:00:00 2001 From: DStrand1 Date: Thu, 9 Dec 2021 00:26:52 -0600 Subject: [PATCH 4/4] remove dark mode from prospectors (item only) --- .../items/behaviors/ProspectorScannerBehavior.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java index 1b0bf605750..c62a8569631 100644 --- a/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java +++ b/src/main/java/gregtech/common/items/behaviors/ProspectorScannerBehavior.java @@ -6,7 +6,6 @@ import gregtech.api.gui.GuiTextures; import gregtech.api.gui.ModularUI; import gregtech.api.gui.impl.ModularUIContainer; -import gregtech.api.gui.widgets.ToggleButtonWidget; import gregtech.api.items.gui.ItemUIFactory; import gregtech.api.items.gui.PlayerInventoryHolder; import gregtech.api.items.metaitem.stats.IItemBehaviour; @@ -39,7 +38,6 @@ public class ProspectorScannerBehavior implements IItemBehaviour, ItemUIFactory, private int mode; private WidgetOreList widgetOreList; - private WidgetProspectingMap widgetProspectingMap; public ProspectorScannerBehavior(int radius, int tier) { this.radius = radius + 1; @@ -95,10 +93,7 @@ public ModularUI createUI(PlayerInventoryHolder holder, @Nonnull EntityPlayer en ModularUI.Builder builder = ModularUI.builder(GuiTextures.BACKGROUND, 332, 200); this.widgetOreList = new WidgetOreList(32 * radius - 6, 18, 332 - 32 * radius, 176); builder.widget(this.widgetOreList); - this.widgetProspectingMap = new WidgetProspectingMap(6, 18, radius, this.widgetOreList, mode, 1); - builder.widget(widgetProspectingMap); - builder.widget(new ToggleButtonWidget(311, 3, 18, 18, widgetProspectingMap::getDarkMode, this::setDarkMode) - .setButtonTexture(GuiTextures.BUTTON_BLACKLIST)); + builder.widget(new WidgetProspectingMap(6, 18, radius, this.widgetOreList, mode, 1)); return builder.label(6, 6, getTranslationKey()).build(holder, entityPlayer); } @@ -113,11 +108,6 @@ public void addInformation(ItemStack itemStack, List lines) { else lines.add(I18n.format("metaitem.prospector.tooltip.ores", radius)); } - private void setDarkMode(boolean isDarkMode) { - this.widgetProspectingMap.setDarkMode(isDarkMode); - this.widgetProspectingMap.updateScreen(); - } - @Override public String resultDisplay(String result) { if (widgetOreList != null) {