From 877e54ed700a62260923aefd658f2cf77fc960a6 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:16:25 +0300 Subject: [PATCH 01/17] fix fuel tank KJS builder --- build.gradle | 14 +++++++++--- .../kjs/builders/FuelTankBlockBuilder.java | 15 ++++++------- src/main/resources/META-INF/mods.toml | 22 +++++++++---------- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 91b0ce1f..3be87150 100644 --- a/build.gradle +++ b/build.gradle @@ -184,11 +184,19 @@ dependencies { } processResources { - inputs.property "version", project.version - inputs.property "mod_id", project.mod_id + // set up properties for filling into metadata + var properties = [ + "version": version, + "mod_id": project.mod_id, + "forge_version": forge.versions.forgeShortVersion.get().split("\\.")[0], // only specify major version of forge + "minecraft_version": libs.versions.minecraft.get(), + "gtceu_version": forge.versions.gtceu.get(), + "mod_name": mod_name, + ] + inputs.properties(properties) filesMatching("META-INF/mods.toml") { - expand "version": project.version + expand properties } } diff --git a/src/main/java/argent_matter/gcyr/integration/kjs/builders/FuelTankBlockBuilder.java b/src/main/java/argent_matter/gcyr/integration/kjs/builders/FuelTankBlockBuilder.java index e66e2002..409b5032 100644 --- a/src/main/java/argent_matter/gcyr/integration/kjs/builders/FuelTankBlockBuilder.java +++ b/src/main/java/argent_matter/gcyr/integration/kjs/builders/FuelTankBlockBuilder.java @@ -1,12 +1,9 @@ package argent_matter.gcyr.integration.kjs.builders; import argent_matter.gcyr.api.block.impl.SimpleFuelTankProperties; -import argent_matter.gcyr.api.block.impl.SimpleRocketMotorType; import argent_matter.gcyr.common.block.FuelTankBlock; -import argent_matter.gcyr.common.block.RocketMotorBlock; import argent_matter.gcyr.common.data.GCyRBlocks; import dev.latvian.mods.kubejs.block.BlockBuilder; -import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; import net.minecraft.resources.ResourceLocation; @@ -14,8 +11,10 @@ @Accessors(chain = true, fluent = true) public class FuelTankBlockBuilder extends BlockBuilder { - @Getter - public transient int tier, maxCarryWeight, motorCount; + @Setter + public transient int tier; + @Setter + public transient long fuelStorage; @Setter public transient String typeId = ""; @@ -25,9 +24,9 @@ public FuelTankBlockBuilder(ResourceLocation i) { @Override public Block createObject() { - SimpleRocketMotorType fuelTankProperties = new SimpleRocketMotorType(this.typeId, tier, maxCarryWeight, motorCount); - RocketMotorBlock result = new RocketMotorBlock(this.createProperties(), fuelTankProperties); - GCyRBlocks.ALL_ROCKET_MOTORS.put(fuelTankProperties, () -> result); + SimpleFuelTankProperties fuelTankProperties = new SimpleFuelTankProperties(this.typeId, tier, fuelStorage); + FuelTankBlock result = new FuelTankBlock(this.createProperties(), fuelTankProperties); + GCyRBlocks.ALL_FUEL_TANKS.put(fuelTankProperties, () -> result); return result; } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index b8883509..f466332f 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -6,22 +6,22 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[43,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +loaderVersion="${forge_version}" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. # The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. -license="GNU GPL 3.0" +license="GNU LGPL 3.0" # A URL to refer people to when problems occur with this mod issueTrackerURL="https://github.com/argent-matter/gcyr/issues" # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod - modId="gcyr" #mandatory + modId="${mod_id}" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${version} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build version="${version}" #mandatory # A display name for the mod - displayName="Gregicality Rocketry" #mandatory + displayName="${mod_name}" #mandatory # A URL to query for updates for this mod. See the JSON update specification #updateJSONURL="http://myurl.me/" #optional # A URL for the "homepage" for this mod, displayed in the mod UI @@ -31,7 +31,7 @@ issueTrackerURL="https://github.com/argent-matter/gcyr/issues" # A text field displayed in the mod UI #credits="Thanks for this example mod goes to Java" #optional # A text field displayed in the mod UI - authors="screret,NemEzanevem" #optional + authors="screret,NemEzanevem,voltaic" #optional # Display Test controls the display for your mod in the server connection screen # MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod. # IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod. @@ -45,7 +45,7 @@ issueTrackerURL="https://github.com/argent-matter/gcyr/issues" A space addon for GregTechCEu ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. - [[dependencies.gcyr]] #optional + [[dependencies.${mod_id}]] #optional # the modid of the dependency modId="forge" #mandatory # Does this dependency have to exist - if not, ordering below must be specified @@ -56,17 +56,17 @@ issueTrackerURL="https://github.com/argent-matter/gcyr/issues" ordering="NONE" # Side this dependency is applied on - BOTH, CLIENT or SERVER side="BOTH" - # Here's another dependency - [[dependencies.gcyr]] + # Here's another dependency + [[dependencies.${mod_id}]] modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version - versionRange="[1.20,1.21)" + versionRange="${minecraft_version}" ordering="NONE" side="BOTH" - [[dependencies.gcyr]] + [[dependencies.${mod_id}]] modId="gtceu" mandatory=true - versionRange="[1.0.14.a,)" + versionRange="[${gtceu_version},)" ordering="AFTER" side="BOTH" \ No newline at end of file From 7f4f5088af6975b21b3f3255faf4d1267bac407e Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:57:45 +0300 Subject: [PATCH 02/17] start on ore scanner machine --- .../texture/SatelliteProspectingTexture.java | 188 +++++++++++++++++ .../gui/widget/SatelliteScanWidget.java | 197 ++++++++++++++++++ .../gcyr/common/data/GCyRMachines.java | 10 - .../gcyr/common/data/GCyRSatellites.java | 6 +- .../machine/electric/FluidLoaderMachine.java | 122 ----------- .../electric/OreFinderScannerMachine.java | 60 ++++++ .../gcyr/common/satellite/EmptySatellite.java | 1 - .../gcyr/common/satellite/GpsSatellite.java | 4 +- .../common/satellite/OreFinderSatellite.java | 46 +++- 9 files changed, 491 insertions(+), 143 deletions(-) create mode 100644 src/main/java/argent_matter/gcyr/client/gui/texture/SatelliteProspectingTexture.java create mode 100644 src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java delete mode 100644 src/main/java/argent_matter/gcyr/common/machine/electric/FluidLoaderMachine.java create mode 100644 src/main/java/argent_matter/gcyr/common/machine/electric/OreFinderScannerMachine.java diff --git a/src/main/java/argent_matter/gcyr/client/gui/texture/SatelliteProspectingTexture.java b/src/main/java/argent_matter/gcyr/client/gui/texture/SatelliteProspectingTexture.java new file mode 100644 index 00000000..5c52823a --- /dev/null +++ b/src/main/java/argent_matter/gcyr/client/gui/texture/SatelliteProspectingTexture.java @@ -0,0 +1,188 @@ +package argent_matter.gcyr.client.gui.texture; + +import argent_matter.gcyr.common.satellite.OreFinderSatellite; +import com.gregtechceu.gtceu.api.gui.GuiTextures; +import com.gregtechceu.gtceu.api.gui.misc.PacketProspecting; +import com.lowdragmc.lowdraglib.gui.editor.ColorPattern; +import com.lowdragmc.lowdraglib.gui.util.DrawerHelper; +import com.lowdragmc.lowdraglib.utils.ColorUtils; +import com.mojang.blaze3d.platform.NativeImage; +import com.mojang.blaze3d.platform.TextureUtil; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.BufferBuilder; +import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.vertex.VertexFormat; +import lombok.Getter; +import net.minecraft.MethodsReturnNonnullByDefault; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.client.renderer.texture.AbstractTexture; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import javax.annotation.ParametersAreNonnullByDefault; +import java.lang.reflect.Array; +import java.util.function.Function; + +import static com.mojang.blaze3d.vertex.DefaultVertexFormat.POSITION_TEX_COLOR; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +@OnlyIn(Dist.CLIENT) +public class SatelliteProspectingTexture extends AbstractTexture { + public static final String SELECTED_ALL = "[all]"; + @Getter + private String selected = SELECTED_ALL; + private boolean darkMode; + @Getter + private final int imageWidth; + @Getter + private final int imageHeight; + public final BlockState[][][] data; + public final Function colorFunction; + private final int playerXGui; + private final int playerYGui; + private final float direction; + private final int playerChunkX; + private final int playerChunkZ; + private final int radius; + + public SatelliteProspectingTexture(int playerChunkX, int playerChunkZ, int posX, int posZ, float direction, int radius, boolean darkMode, Function colorFunction) { + this.darkMode = darkMode; + this.radius = radius; + this.data = (BlockState[][][]) Array.newInstance(BlockState.class, (radius * 2 - 1) * OreFinderSatellite.CELL_SIZE, (radius * 2 - 1) * OreFinderSatellite.CELL_SIZE, 0); + this.colorFunction = colorFunction; + this.imageWidth = (radius * 2 - 1) * 16; + this.imageHeight = (radius * 2 - 1) * 16; + this.playerChunkX = playerChunkX; + this.playerChunkZ = playerChunkZ; + this.direction = (direction + 180) % 360; + this.playerXGui = posX - (playerChunkX - this.radius + 1) * 16 + (posX > 0 ? 1 : 0); + playerYGui = posZ - (playerChunkZ - this.radius + 1) * 16 + (posX > 0 ? 1 : 0); + } + + public void updateTexture(BlockState[][][] data, ChunkPos chunk) { + int ox; + if ((chunk.x > 0 && playerChunkX > 0) || (chunk.x < 0 && playerChunkX < 0)) { + ox = Math.abs(Math.abs(chunk.x) - Math.abs(playerChunkX)); + } else { + ox = Math.abs(playerChunkX) + Math.abs(chunk.x); + } + if (playerChunkX > chunk.x) { + ox = -ox; + } + + int oy; + if ((chunk.z > 0 && playerChunkZ > 0) || (chunk.z < 0 && playerChunkZ < 0)) { + oy = Math.abs(Math.abs(chunk.z) - Math.abs(playerChunkZ)); + } else { + oy = Math.abs(playerChunkZ) + Math.abs(chunk.z); + } + if (playerChunkZ > chunk.z) { + oy = -oy; + } + + int currentColumn = (this.radius - 1) + ox; + int currentRow = (this.radius - 1) + oy; + if (currentRow < 0) { + return; + } + + for (int x = 0; x < OreFinderSatellite.CELL_SIZE; x++) { + System.arraycopy(data[x], 0, data[x + currentColumn * OreFinderSatellite.CELL_SIZE], currentRow * OreFinderSatellite.CELL_SIZE, OreFinderSatellite.CELL_SIZE); + } + load(); + } + + private NativeImage getImage() { + int wh = (this.radius * 2 - 1) * 16; + NativeImage image = new NativeImage(wh, wh, false); + for (int i = 0; i < wh; i++) { + for (int j = 0; j < wh; j++) { + var items = this.data[i * OreFinderSatellite.CELL_SIZE / 16][j * OreFinderSatellite.CELL_SIZE / 16]; + // draw bg + image.setPixelRGBA(i, j, (darkMode ? ColorPattern.GRAY.color : ColorPattern.WHITE.color)); + //draw items + for (var item : items) { + if (!selected.equals(SELECTED_ALL)) continue; + var color = colorFunction.apply(item); + image.setPixelRGBA(i, j, combine(255, ColorUtils.blueI(color), ColorUtils.greenI(color), ColorUtils.redI(color))); + break; + } + // draw grid + if ((i) % 16 == 0 || (j) % 16 == 0) { + image.setPixelRGBA(i, j, ColorUtils.averageColor(image.getPixelRGBA(i, j), 0xff000000)); + } + } + } + return image; + } + + /** + * The resulting color of this operation is stored as least to most significant bits. + */ + public static int combine(int alpha, int blue, int green, int red) { + return (alpha & 0xFF) << 24 | (blue & 0xFF) << 16 | (green & 0xFF) << 8 | (red & 0xFF) << 0; + } + + public void load() { + doLoad(getImage()); + } + + private void doLoad(NativeImage image) { + TextureUtil.prepareImage(this.getId(), 0, image.getWidth(), image.getHeight()); + image.upload(0, 0, 0, 0, 0, image.getWidth(), image.getHeight(), false, false, false, true); + } + + public void draw(GuiGraphics graphics, int x, int y) { + if (this.getId() == -1) return; + Tesselator tessellator = Tesselator.getInstance(); + BufferBuilder bufferbuilder = tessellator.getBuilder(); + RenderSystem.setShader(GameRenderer::getPositionTexColorShader); + RenderSystem.setShaderTexture(0, this.getId()); + var matrix4f = graphics.pose().last().pose(); + bufferbuilder.begin(VertexFormat.Mode.QUADS, POSITION_TEX_COLOR); + bufferbuilder.vertex(matrix4f, x, y + imageHeight, 0).uv(0, 1).color(-1).endVertex(); + bufferbuilder.vertex(matrix4f, x + imageWidth, y + imageHeight, 0).uv(1, 1).color(-1).endVertex(); + bufferbuilder.vertex(matrix4f, x + imageWidth, y, 0).uv(1, 0).color(-1).endVertex(); + bufferbuilder.vertex(matrix4f, x, y, 0).uv(0, 0).color(-1).endVertex(); + tessellator.end(); + + GuiTextures.UP.copy().setColor(ColorPattern.RED.color).rotate(direction / 2).draw(graphics, 0, 0, x + playerXGui - 20, y + playerYGui - 20, 40, 40); + + //draw red vertical line + if (playerXGui % 16 > 7 || playerXGui % 16 == 0) { + DrawerHelper.drawSolidRect(graphics, x + playerXGui - 1, y, 1, imageHeight, ColorPattern.RED.color); + } else { + DrawerHelper.drawSolidRect(graphics, x + playerXGui, y, 1, imageHeight, ColorPattern.RED.color); + } + //draw red horizontal line + if (playerYGui % 16 > 7 || playerYGui % 16 == 0) { + DrawerHelper.drawSolidRect(graphics, x, y + playerYGui - 1, imageWidth, 1, ColorPattern.RED.color); + } else { + DrawerHelper.drawSolidRect(graphics, x, y + playerYGui, imageWidth, 1, ColorPattern.RED.color); + } + } + + @Override + public void load(ResourceManager resourceManager) { + + } + + public void setDarkMode(boolean darkMode) { + if (this.darkMode != darkMode) { + this.darkMode = darkMode; + load(); + } + } + + public void setSelected(String uniqueID) { + if (!this.selected.equals(uniqueID)) { + this.selected = uniqueID; + load(); + } + } +} diff --git a/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java b/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java new file mode 100644 index 00000000..81be429c --- /dev/null +++ b/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java @@ -0,0 +1,197 @@ +package argent_matter.gcyr.client.gui.widget; + +import argent_matter.gcyr.client.gui.texture.SatelliteProspectingTexture; +import argent_matter.gcyr.common.machine.electric.OreFinderScannerMachine; +import argent_matter.gcyr.common.satellite.OreFinderSatellite; +import com.gregtechceu.gtceu.api.gui.GuiTextures; +import com.gregtechceu.gtceu.api.gui.misc.PacketProspecting; +import com.gregtechceu.gtceu.api.item.ComponentItem; +import com.gregtechceu.gtceu.common.item.ProspectorScannerBehavior; +import com.lowdragmc.lowdraglib.gui.editor.ColorPattern; +import com.lowdragmc.lowdraglib.gui.util.DrawerHelper; +import com.lowdragmc.lowdraglib.gui.widget.*; +import com.mojang.datafixers.util.Pair; +import lombok.Getter; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import org.jetbrains.annotations.NotNull; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.LinkedBlockingQueue; + +public class SatelliteScanWidget extends WidgetGroup { + private final int chunkRadius; + private final int scanTick; + public final OreFinderScannerMachine machine; + @Getter + private boolean darkMode = false; + private final DraggableScrollableWidgetGroup itemList; + @OnlyIn(Dist.CLIENT) + private SatelliteProspectingTexture texture; + private int playerChunkX; + private int playerChunkZ; + //runtime + private int chunkIndex = 0; + private final Queue> packetQueue = new LinkedBlockingQueue<>(); + private final Set items = new CopyOnWriteArraySet<>(); + private final Map selectedMap = new ConcurrentHashMap<>(); + + public SatelliteScanWidget(int xPosition, int yPosition, int width, int height, int chunkRadius, int scanTick, OreFinderScannerMachine machine) { + super(xPosition, yPosition, width, height); + this.chunkRadius = chunkRadius; + this.scanTick = scanTick; + this.machine = machine; + int imageWidth = (chunkRadius * 2 - 1) * 16; + int imageHeight = (chunkRadius * 2 - 1) * 16; + addWidget(new ImageWidget(0, (height - imageHeight) / 2 - 4, imageWidth + 8, imageHeight + 8, GuiTextures.BACKGROUND_INVERSE)); + var group = (WidgetGroup) new WidgetGroup(imageWidth + 10, 0, width - (imageWidth + 10), height).setBackground(GuiTextures.BACKGROUND_INVERSE); + group.addWidget(itemList = new DraggableScrollableWidgetGroup(4, 28, group.getSize().width - 8, group.getSize().height - 32) + .setYScrollBarWidth(2).setYBarStyle(null, ColorPattern.T_WHITE.rectTexture().setRadius(1))); + addWidget(group); + } + + @Override + public void writeInitialData(FriendlyByteBuf buffer) { + super.writeInitialData(buffer); + buffer.writeVarInt(playerChunkX = gui.entityPlayer.chunkPosition().x); + buffer.writeVarInt(playerChunkZ = gui.entityPlayer.chunkPosition().z); + buffer.writeVarInt(gui.entityPlayer.getBlockX()); + buffer.writeVarInt(gui.entityPlayer.getBlockZ()); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void readInitialData(FriendlyByteBuf buffer) { + super.readInitialData(buffer); + texture = new SatelliteProspectingTexture( + buffer.readVarInt(), + buffer.readVarInt(), + buffer.readVarInt(), + buffer.readVarInt(), + gui.entityPlayer.getVisualRotationYInDegrees(), chunkRadius, darkMode, machine::getItemColor); + } + + public void setDarkMode(boolean mode) { + if (darkMode != mode) { + darkMode = mode; + if (isRemote()) { + texture.setDarkMode(darkMode); + } + } + } + + private void addOresToList(Object[][][] data) { + var newItems = new HashSet<>(); + for (int x = 0; x < OreFinderSatellite.CELL_SIZE; x++) { + for (int z = 0; z < OreFinderSatellite.CELL_SIZE; z++) { + newItems.addAll(Arrays.asList(data[x][z])); + } + } + items.addAll(newItems); + } + + @Override + public void detectAndSendChanges() { + var player = gui.entityPlayer; + var world = player.level(); + if (gui.getTickCount() % scanTick == 0 && chunkIndex < (chunkRadius * 2 - 1) * (chunkRadius * 2 - 1)) { + + int row = chunkIndex / (chunkRadius * 2 - 1); + int column = chunkIndex % (chunkRadius * 2 - 1); + + int ox = column - chunkRadius + 1; + int oz = row - chunkRadius + 1; + + var chunk = world.getChunk(playerChunkX + ox, playerChunkZ + oz); + BlockState[][][] data = new BlockState[OreFinderSatellite.CELL_SIZE][OreFinderSatellite.CELL_SIZE][0]; + machine.scanOres(data); + //writeUpdateInfo(-1, packet::writePacketData); + chunkIndex++; + } + var held = player.getItemInHand(InteractionHand.MAIN_HAND); + if (held.getItem() instanceof ComponentItem componentItem) { + for (var component : componentItem.getComponents()) { + if (component instanceof ProspectorScannerBehavior prospector) { + if (!player.isCreative() && !prospector.drainEnergy(held, false)) { + player.closeContainer(); + } + } + } + } + } + + @OnlyIn(Dist.CLIENT) + @Override + public void readUpdateInfo(int id, FriendlyByteBuf buffer) { + if (id == -1) { + //addPacketToQueue(PacketProspecting.readPacketData(mode, buffer)); + } else { + super.readUpdateInfo(id, buffer); + } + } + + @Override + @OnlyIn(Dist.CLIENT) + public void updateScreen() { + super.updateScreen(); + if (packetQueue != null) { + int max = 10; + while (max-- > 0 && !packetQueue.isEmpty()) { + var packet = packetQueue.poll(); + texture.updateTexture(packet.getFirst(), packet.getSecond()); + addOresToList(packet.getFirst()); + } + } + } + + + @OnlyIn(Dist.CLIENT) + private void addPacketToQueue(Pair packet) { + packetQueue.add(packet); + } + + @Override + @OnlyIn(Dist.CLIENT) + public void drawInBackground(@NotNull GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { + super.drawInBackground(graphics, mouseX, mouseY, partialTicks); + var position = getPosition(); + var size = getSize(); + //draw background + var x = position.x + 3; + var y = position.y + (size.getHeight() - texture.getImageHeight()) / 2 - 1; + texture.draw(graphics, x, y); + int cX = (mouseX - x) / 16; + int cZ = (mouseY - y) / 16; + if (cX >= 0 && cZ >= 0 && cX < chunkRadius * 2 - 1 && cZ < chunkRadius * 2 - 1) { + // draw hover layer + DrawerHelper.drawSolidRect(graphics, cX * 16 + x, cZ * 16 + y, 16, 16,0x4B6C6C6C); + } + } + + @Override + @OnlyIn(Dist.CLIENT) + public void drawInForeground(@NotNull GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { + super.drawInForeground(graphics, mouseX, mouseY, partialTicks); + // draw tooltips + var position = getPosition(); + var size = getSize(); + var x = position.x + 3; + var y = position.y + (size.getHeight() - texture.getImageHeight()) / 2 - 1; + int cX = (mouseX - x) / 16; + int cZ = (mouseY - y) / 16; + if (cX >= 0 && cZ >= 0 && cX < chunkRadius * 2 - 1 && cZ < chunkRadius * 2 - 1) { + // draw hover layer + List tooltips = new ArrayList<>(); + gui.getModularUIGui().setHoverTooltip(tooltips, ItemStack.EMPTY, null, null); + } + } +} diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java index 74a3094d..14eaf42e 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java @@ -1,7 +1,6 @@ package argent_matter.gcyr.common.data; import argent_matter.gcyr.GCyR; -import argent_matter.gcyr.common.machine.electric.FluidLoaderMachine; import argent_matter.gcyr.common.machine.electric.OxygenSpreaderMachine; import argent_matter.gcyr.common.machine.multiblock.RocketScannerMachine; import argent_matter.gcyr.common.machine.multiblock.SpaceStationPackagerMachine; @@ -60,15 +59,6 @@ public class GCyRMachines { .register(), HIGH_TIERS); - public final static MachineDefinition[] FLUID_LOADER = registerTieredMachines("fluid_loader", FluidLoaderMachine::new, - (tier, builder) -> builder - .langValue("%s Fluid Loader".formatted(VNF[tier])) - .rotationState(RotationState.ALL) - .renderer(() -> new TieredHullMachineRenderer(tier, GCyR.id("block/machine/fluid_loader"))) - .recipeType(GTRecipeTypes.DUMMY_RECIPES) - .register(), - LOW_TIERS); - public static final MachineDefinition ROCKET_SCANNER = REGISTRATE.multiblock("rocket_scanner", RocketScannerMachine::new) .langValue("Rocket Scanner") .rotationState(RotationState.NON_Y_AXIS) diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRSatellites.java b/src/main/java/argent_matter/gcyr/common/data/GCyRSatellites.java index 38304885..75778f3f 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRSatellites.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRSatellites.java @@ -4,10 +4,7 @@ import argent_matter.gcyr.api.registries.GCyRRegistries; import argent_matter.gcyr.api.space.satellite.Satellite; import argent_matter.gcyr.api.space.satellite.SatelliteType; -import argent_matter.gcyr.common.satellite.DysonSwarmSatellite; -import argent_matter.gcyr.common.satellite.EmptySatellite; -import argent_matter.gcyr.common.satellite.GpsSatellite; -import argent_matter.gcyr.common.satellite.LaserSatellite; +import argent_matter.gcyr.common.satellite.*; import net.minecraft.resources.ResourceLocation; /** @@ -19,6 +16,7 @@ public class GCyRSatellites { public static final SatelliteType EMPTY = register("empty", new SatelliteType<>(EmptySatellite::new, EmptySatellite.CODEC)); public static final SatelliteType GPS = register("gps", new SatelliteType<>(GpsSatellite::new, GpsSatellite.CODEC)); + public static final SatelliteType ORE_FINDER = register("ore_finder", new SatelliteType<>(OreFinderSatellite::new, OreFinderSatellite.CODEC)); public static final SatelliteType LASER = register("laser", new SatelliteType<>(LaserSatellite::new, LaserSatellite.CODEC)); public static final SatelliteType DYSON_SWARM = register("dyson_swarm", new SatelliteType<>(DysonSwarmSatellite::new, DysonSwarmSatellite.CODEC)); diff --git a/src/main/java/argent_matter/gcyr/common/machine/electric/FluidLoaderMachine.java b/src/main/java/argent_matter/gcyr/common/machine/electric/FluidLoaderMachine.java deleted file mode 100644 index b4cc37ef..00000000 --- a/src/main/java/argent_matter/gcyr/common/machine/electric/FluidLoaderMachine.java +++ /dev/null @@ -1,122 +0,0 @@ -package argent_matter.gcyr.common.machine.electric; - -import com.gregtechceu.gtceu.api.capability.IControllable; -import com.gregtechceu.gtceu.api.cover.CoverBehavior; -import com.gregtechceu.gtceu.api.gui.GuiTextures; -import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; -import com.gregtechceu.gtceu.api.machine.TieredEnergyMachine; -import com.gregtechceu.gtceu.api.machine.feature.IFancyUIMachine; -import com.gregtechceu.gtceu.api.machine.feature.IMachineModifyDrops; -import com.gregtechceu.gtceu.api.misc.IOFluidTransferList; -import com.gregtechceu.gtceu.common.machine.electric.ChargerMachine; -import com.lowdragmc.lowdraglib.gui.texture.GuiTextureGroup; -import com.lowdragmc.lowdraglib.gui.texture.ProgressTexture; -import com.lowdragmc.lowdraglib.gui.widget.SlotWidget; -import com.lowdragmc.lowdraglib.gui.widget.TankWidget; -import com.lowdragmc.lowdraglib.gui.widget.Widget; -import com.lowdragmc.lowdraglib.gui.widget.WidgetGroup; -import com.lowdragmc.lowdraglib.misc.FluidStorage; -import com.lowdragmc.lowdraglib.misc.ItemStackTransfer; -import com.lowdragmc.lowdraglib.side.fluid.FluidStack; -import com.lowdragmc.lowdraglib.side.fluid.FluidTransferHelper; -import com.lowdragmc.lowdraglib.side.fluid.IFluidTransfer; -import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; -import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; -import com.lowdragmc.lowdraglib.syncdata.annotation.RequireRerender; -import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; -import com.lowdragmc.lowdraglib.utils.Position; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.core.Direction; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import org.jetbrains.annotations.Nullable; - -import java.util.List; - -public class FluidLoaderMachine extends TieredEnergyMachine implements IControllable, IFancyUIMachine, IMachineModifyDrops { - protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder(FluidLoaderMachine.class, TieredEnergyMachine.MANAGED_FIELD_HOLDER); - - @Persisted - @Getter - @Setter - private boolean isWorkingEnabled; - @Getter - @Persisted - protected final ItemStackTransfer loaderInventory; - @Getter - @Persisted - protected final FluidStorage fluidStorage; - - public FluidLoaderMachine(IMachineBlockEntity holder, int tier, Object... args) { - super(holder, tier, args); - this.loaderInventory = createLoaderInventory(args); - this.fluidStorage = createFluidStorage(tier, args); - } - - protected ItemStackTransfer createLoaderInventory(Object... args) { - var itemTransfer = new ItemStackTransfer(1); - itemTransfer.setFilter(item -> FluidTransferHelper.getFluidTransfer(new ItemStackTransfer(item), 0) != null); - return itemTransfer; - } - - @Nullable - @Override - public IFluidTransfer getFluidTransferCap(@Nullable Direction side, boolean useCoverCapability) { - if (!useCoverCapability || side == null) return fluidStorage; - - CoverBehavior cover = getCoverContainer().getCoverAtSide(side); - return cover != null ? cover.getFluidTransferCap(fluidStorage) : fluidStorage; - } - - protected FluidStorage createFluidStorage(int tier, Object... args) { - long capacity = tier * 2500L; - return new FluidStorage(capacity) { - @Override - public long fill(int tank, FluidStack resource, boolean simulate, boolean notifyChanges) { - IFluidTransfer transfer = FluidTransferHelper.getFluidTransfer(loaderInventory, 0); - long drained = 0; - if (transfer != null) { - drained = transfer.fill(resource, simulate, notifyChanges); - } - - FluidStack fluidStack = resource.copy(); - fluidStack.setAmount(fluidStack.getAmount() - drained); - long filled = super.fill(tank, fluidStack, simulate, notifyChanges); - return filled + drained; - } - }; - } - - @Override - public ManagedFieldHolder getFieldHolder() { - return MANAGED_FIELD_HOLDER; - } - - @Override - public void onDrops(List drops, Player entity) { - clearInventory(drops, loaderInventory); - } - - ////////////////////////////////////// - //********** GUI ***********// - ////////////////////////////////////// - - @Override - public Widget createUIWidget() { - var template = new WidgetGroup(0, 0, 18 + 8 + 64 + 8, 18 + 8 + 32); - - template.addWidget(new SlotWidget(loaderInventory, 0, 16, 50, true, true) - .setBackgroundTexture(new GuiTextureGroup(GuiTextures.SLOT, GuiTextures.CANISTER_OVERLAY))); - template.addWidget(new TankWidget(fluidStorage, 16, 0, 18, 48, true, true) - .setShowAmount(false).setBackground(GuiTextures.FLUID_SLOT).setFillDirection(ProgressTexture.FillDirection.DOWN_TO_UP)); - - var group = new WidgetGroup(0, 0, Math.max(template.getSize().width + 4 + 8, 172), template.getSize().height + 8); - var size = group.getSize(); - template.setSelfPosition(new Position( - (size.width - 4 - template.getSize().width) / 2 + 2 + 2, - (size.height - template.getSize().height) / 2)); - group.addWidget(template); - return group; - } -} diff --git a/src/main/java/argent_matter/gcyr/common/machine/electric/OreFinderScannerMachine.java b/src/main/java/argent_matter/gcyr/common/machine/electric/OreFinderScannerMachine.java new file mode 100644 index 00000000..7175b834 --- /dev/null +++ b/src/main/java/argent_matter/gcyr/common/machine/electric/OreFinderScannerMachine.java @@ -0,0 +1,60 @@ +package argent_matter.gcyr.common.machine.electric; + +import argent_matter.gcyr.api.space.satellite.capability.SatelliteWorldSavedData; +import argent_matter.gcyr.common.satellite.OreFinderSatellite; +import argent_matter.gcyr.util.Vec2i; +import com.gregtechceu.gtceu.api.data.chemical.ChemicalHelper; +import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; +import com.gregtechceu.gtceu.api.machine.TieredEnergyMachine; +import com.gregtechceu.gtceu.common.data.GTMaterials; +import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +public class OreFinderScannerMachine extends TieredEnergyMachine { + public static final int MACHINE_RANGE_MULTIPLIER = 16; + private final Map BLOCK_CACHE = new HashMap<>(); + + private final int range; + + public OreFinderScannerMachine(IMachineBlockEntity holder, int tier, Object... args) { + super(holder, tier, args); + this.range = this.tier * MACHINE_RANGE_MULTIPLIER; + } + + public void scanOres(BlockState[][][] storage) { + if (this.getLevel() instanceof ServerLevel serverLevel) { + BlockPos myPos = this.getPos(); + storage = new BlockState[OreFinderSatellite.CELL_SIZE][OreFinderSatellite.CELL_SIZE][0]; + var satellites = SatelliteWorldSavedData.getOrCreate(serverLevel).getSatellitesNearPos(new Vec2i(myPos.getX(), myPos.getZ()), range).stream().filter(OreFinderSatellite.class::isInstance).map(OreFinderSatellite.class::cast).collect(Collectors.toList()); + for (OreFinderSatellite satellite : satellites) { + satellite.scan(storage, serverLevel); + } + } + } + + public int getItemColor(BlockState state) { + var itemName = BLOCK_CACHE.computeIfAbsent(state, blockState -> { + var name = BuiltInRegistries.BLOCK.getKey(blockState.getBlock()).toString(); + var entry = ChemicalHelper.getUnificationEntry(blockState.getBlock()); + if (entry != null && entry.material != null) { + name = "material_" + entry.material; + } + return name; + }); + if (itemName.startsWith("material_")) { + var mat = GTMaterials.get(itemName.substring(9)); + if (mat != null) { + return mat.getMaterialRGB(); + } + } + return BuiltInRegistries.BLOCK.get(new ResourceLocation(itemName)).defaultMapColor().col; + } + +} diff --git a/src/main/java/argent_matter/gcyr/common/satellite/EmptySatellite.java b/src/main/java/argent_matter/gcyr/common/satellite/EmptySatellite.java index 842f0bb7..5b08175d 100644 --- a/src/main/java/argent_matter/gcyr/common/satellite/EmptySatellite.java +++ b/src/main/java/argent_matter/gcyr/common/satellite/EmptySatellite.java @@ -26,7 +26,6 @@ public EmptySatellite(SatelliteType type, SatelliteData data, ResourceKey CODEC = RecordCodecBuilder.create(instance -> Satellite.baseCodec(instance).apply(instance, OreFinderSatellite::new)); + public static final int CELL_SIZE = 32; + + private BlockPos centerPos; public OreFinderSatellite(SatelliteType type, SatelliteData data, ResourceKey level) { super(type, data, level); } @@ -25,13 +41,37 @@ public boolean runSatelliteFunction(Level level) { return false; } + public void scan(BlockState[][][] storage, Level level) { + LevelChunk chunk = level.getChunkAt(this.centerPos); + + BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(); + var oreTag = TagUtil.createBlockTag("ores"); + for (int x = 0; x < CELL_SIZE; x++) { + for (int z = 0; z < CELL_SIZE; z++) { + if (storage[x][z] != null) continue; + for (int y = chunk.getMaxBuildHeight() - 1; y >= chunk.getMinBuildHeight(); y--) { + pos.set(x, y, z); + var state = chunk.getBlockState(pos); + if (state.is(oreTag)) { + storage[x][z] = ArrayUtils.add(storage[x][z], state); + } + } + } + } + + } + @Override public CompoundTag serializeExtraData() { - return null; + CompoundTag tag = new CompoundTag(); + tag.put("centerPos", NbtUtils.writeBlockPos(this.centerPos)); + return tag; } @Override public void deserializeExtraData(Tag tag, Level level) { - + if (tag instanceof CompoundTag compoundTag) { + this.centerPos = NbtUtils.readBlockPos(compoundTag.getCompound("centerPos")); + } } } From 6ee701900d00bdb8e8e388480ac0d878444e63ac Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:21:38 +0300 Subject: [PATCH 03/17] add way to get bromine --- .../gcyr/common/data/GCyRBlocks.java | 2 + .../gcyr/common/data/GCyRMachines.java | 50 ++++++++++++++---- .../gcyr/common/data/GCyRMaterials.java | 6 +++ .../gcyr/common/data/GCyRRecipeTypes.java | 4 ++ .../gcyr/common/data/GCyRRecipes.java | 2 + .../gcyr/data/recipe/MiscRecipes.java | 7 +++ .../recipe/chemistry/ChemistryRecipes.java | 35 ++++++++++++ .../machine_casing_stainless_evaporation.png | Bin 0 -> 929 bytes ...ne_casing_stainless_evaporation.png.mcmeta | 5 ++ .../machine_casing_stainless_evaporation.xcf | Bin 0 -> 1787 bytes ...chine_casing_stainless_evaporation_ctm.png | Bin 0 -> 3249 bytes ...chine_casing_stainless_evaporation_ctm.xcf | Bin 0 -> 4241 bytes 12 files changed, 102 insertions(+), 9 deletions(-) create mode 100644 src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java create mode 100644 src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png create mode 100644 src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png.mcmeta create mode 100644 src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.xcf create mode 100644 src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.png create mode 100644 src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.xcf diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRBlocks.java b/src/main/java/argent_matter/gcyr/common/data/GCyRBlocks.java index 902757a7..bfa80802 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRBlocks.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRBlocks.java @@ -48,6 +48,8 @@ public class GCyRBlocks { public static final BlockEntry CASING_DYSON_CELL = createCasingBlock("dyson_solar_cell", GCyR.id("block/casings/solid/dyson_solar_cell")); public static final BlockEntry CASING_DYSON_PORT = createCasingBlock("dyson_sphere_maintenance_port", GCyR.id("block/casings/solid/dyson_sphere_maintenance_port")); + public static final BlockEntry CASING_STAINLESS_EVAPORATION = createCasingBlock("stainless_evaporation_casing", GCyR.id("block/casings/solid/machine_casing_stainless_evaporation")); + // endregion // region mercury diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java index 14eaf42e..cbdff472 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java @@ -18,19 +18,28 @@ import com.gregtechceu.gtceu.api.machine.MachineDefinition; import com.gregtechceu.gtceu.api.machine.MetaMachine; import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition; +import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility; import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine; import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern; +import com.gregtechceu.gtceu.api.pattern.MultiblockShapeInfo; import com.gregtechceu.gtceu.api.pattern.Predicates; import com.gregtechceu.gtceu.api.recipe.GTRecipeType; +import com.gregtechceu.gtceu.api.recipe.OverclockingLogic; import com.gregtechceu.gtceu.api.registry.registrate.MachineBuilder; import com.gregtechceu.gtceu.client.renderer.machine.TieredHullMachineRenderer; import com.gregtechceu.gtceu.common.data.GTBlocks; import com.gregtechceu.gtceu.common.data.GTMaterials; +import com.gregtechceu.gtceu.common.data.GTRecipeModifiers; import com.gregtechceu.gtceu.common.data.GTRecipeTypes; import com.gregtechceu.gtceu.config.ConfigHolder; +import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; import java.util.function.BiFunction; @@ -38,11 +47,12 @@ import static argent_matter.gcyr.common.data.GCyRBlocks.*; import static com.gregtechceu.gtceu.api.GTValues.*; import static com.gregtechceu.gtceu.api.pattern.Predicates.*; +import static com.gregtechceu.gtceu.api.pattern.util.RelativeDirection.*; import static com.gregtechceu.gtceu.common.data.GCyMBlocks.CASING_ATOMIC; import static com.gregtechceu.gtceu.common.data.GTBlocks.*; import static com.gregtechceu.gtceu.common.data.GTMachines.POWER_TRANSFORMER; -@SuppressWarnings({"Convert2MethodRef", "FunctionalExpressionCanBeFolded", "unused"}) +@SuppressWarnings({"Convert2MethodRef", "FunctionalExpressionCanBeFolded", "unused", "DataFlowIssue"}) public class GCyRMachines { public final static int[] ELECTRIC_TIERS = GTValues.tiersBetween(LV, GTCEuAPI.isHighTier() ? OpV : UV); public final static int[] LOW_TIERS = GTValues.tiersBetween(LV, EV); @@ -59,11 +69,35 @@ public class GCyRMachines { .register(), HIGH_TIERS); + public static final MachineDefinition EVAPORATION_PLANT = REGISTRATE.multiblock("evaporation_plant", WorkableElectricMultiblockMachine::new) + .langValue("Evaporation Tower") + .rotationState(RotationState.NON_Y_AXIS) + .recipeType(GCyRRecipeTypes.EVAPORATION_RECIPES) + .recipeModifier(GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK)) + .appearanceBlock(CASING_STAINLESS_EVAPORATION) + .pattern(definition -> FactoryBlockPattern.start(RIGHT, BACK, UP) + .aisle("YSYY", "YYYY", "YYYY") + .aisle("XXXX", "X##X", "XXXX").setRepeatable(3, 5) + .aisle(" XX ", "X##X", " XX ") + .where('S', Predicates.controller(blocks(definition.getBlock()))) + .where('Y', blocks(CASING_STAINLESS_EVAPORATION.get()) + .or(Predicates.abilities(PartAbility.INPUT_ENERGY).setMinGlobalLimited(1).setMaxGlobalLimited(2)) + .or(Predicates.abilities(PartAbility.IMPORT_FLUIDS).setExactLimit(1))) + .where('X', blocks(CASING_STAINLESS_EVAPORATION.get()) + .or(Predicates.abilities(PartAbility.EXPORT_FLUIDS_1X).setMaxLayerLimited(1))) + .where('#', Predicates.air()) + .where(' ', Predicates.any()) + .build()) + .partSorter(Comparator.comparingInt(a -> a.self().getPos().getY())) + .workableCasingRenderer(GCyR.id("block/casings/solid/machine_casing_stainless_evaporation"), + GTCEu.id("block/multiblock/distillation_tower"), false) + .register(); + public static final MachineDefinition ROCKET_SCANNER = REGISTRATE.multiblock("rocket_scanner", RocketScannerMachine::new) .langValue("Rocket Scanner") .rotationState(RotationState.NON_Y_AXIS) .tier(GTValues.EV) - .pattern((definition) -> FactoryBlockPattern.start() + .pattern(definition -> FactoryBlockPattern.start() .aisle(" ", " K ", " K ", " K ", " K ", " K ") .aisle(" BBB ", " ", " ", " ", " ", " ") .aisle(" BBB ", " ", " ", " ", " ", " ") @@ -73,8 +107,7 @@ public class GCyRMachines { .where('B', blocks(LAUNCH_PAD.get())) .where('K', blocks(GTBlocks.MATERIAL_BLOCKS.get(TagPrefix.frameGt, GTMaterials.StainlessSteel).get())) .where(' ', any()) - .build() - )/* + .build()) .shapeInfos(definition -> { ArrayList shapeInfo = new ArrayList<>(); MultiblockShapeInfo.ShapeInfoBuilder builder = MultiblockShapeInfo.builder() @@ -96,7 +129,7 @@ public class GCyRMachines { .where('T', BASIC_FUEL_TANK) .where('C', SEAT).build()); return shapeInfo; - })*/ + }) .workableCasingRenderer(GTCEu.id("block/casings/voltage/ev/side"), GTCEu.id("block/multiblock/assembly_line"), false) .register(); @@ -117,9 +150,8 @@ public class GCyRMachines { .where('B', blocks(LAUNCH_PAD.get())) .where('K', blocks(GTBlocks.MATERIAL_BLOCKS.get(TagPrefix.frameGt, GTMaterials.StainlessSteel).get())) .where(' ', any()) - .build() - ) - /*.shapeInfos(definition -> { + .build()) + .shapeInfos(definition -> { ArrayList shapeInfo = new ArrayList<>(); MultiblockShapeInfo.ShapeInfoBuilder builder = MultiblockShapeInfo.builder() .aisle(" ", " S ", " ", " ", " ", " ") @@ -146,7 +178,7 @@ public class GCyRMachines { .where('G', CASING_TEMPERED_GLASS) .where('C', Blocks.WHITE_CONCRETE).build()); return shapeInfo; - })*/ + }) .workableCasingRenderer(GTCEu.id("block/casings/voltage/luv/side"), GTCEu.id("block/multiblock/assembly_line"), false) .register(); diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java index 5d13efb2..5bcd0cd6 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java @@ -135,6 +135,12 @@ public static void modifyMaterials() { .components(Epoxy, 2, SiliconDioxide, 7) .buildAndRegister(); + public static final Material Brine = new Material.Builder(GCyR.id("brine")) + .liquid() + .color(0x9F6B26) + .components(Water, 4, Salt, 20, Magnesium, 3, Lithium, 2, Bromine, 1) + .buildAndRegister(); + //endregion diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java index ceff1c93..5fea52b2 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java @@ -21,6 +21,10 @@ public class GCyRRecipeTypes { .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) .setSound(GTSoundEntries.MOTOR); + public static final GTRecipeType EVAPORATION_RECIPES = register("evaporation", ELECTRIC).setMaxIOSize(0, 0, 1, 6).setEUIO(IO.IN) + .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) + .setSound(GTSoundEntries.MOTOR); + public static final GTRecipeType DYSON_ENERGY_RECIPES = register("dyson_controller", MULTIBLOCK) .setMaxIOSize(8, 0, 0, 0).setEUIO(IO.BOTH) .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW_MULTIPLE, LEFT_TO_RIGHT) diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipes.java b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipes.java index 70755edf..0a996e7d 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipes.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipes.java @@ -1,6 +1,7 @@ package argent_matter.gcyr.common.data; import argent_matter.gcyr.data.recipe.*; +import argent_matter.gcyr.data.recipe.chemistry.ChemistryRecipes; import argent_matter.gcyr.data.recipe.chemistry.PolymerRecipes; import net.minecraft.data.recipes.FinishedRecipe; @@ -12,6 +13,7 @@ public static void init(Consumer provider) { OxygenSpreaderRecipeLoader.init(provider); DysonSphereRecipeLoader.init(provider); PolymerRecipes.init(provider); + ChemistryRecipes.init(provider); MiscRecipes.init(provider); RocketFuelRecipes.init(provider); diff --git a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java index ec3ecc05..d3e2ad0b 100644 --- a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java +++ b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java @@ -116,6 +116,7 @@ public static void init(Consumer provider) { //region machines MetaTileEntityLoader.registerMachineRecipe(provider, GCyRMachines.OXYGEN_SPREADER, "PCP", "FHF", "PCP", 'H', HULL, 'P', PUMP, 'F', GTItems.FLUID_FILTER, 'C', CIRCUIT); + VanillaRecipeHelper.addShapedRecipe(provider, true, GCyR.id("evaporation_plant"), GCyRMachines.EVAPORATION_PLANT.asStack(), "CBC", "FMF", "CBC", 'M', GTMachines.HULL[HV].asStack(), 'B', new UnificationEntry(wireGtDouble, Kanthal), 'C', CustomTags.HV_CIRCUITS, 'F', GTItems.ELECTRIC_PUMP_HV); VanillaRecipeHelper.addShapedRecipe(provider, GCyR.id("rocket_scanner"), GCyRMachines.ROCKET_SCANNER.asStack(), "PCP", "CHC", "SCS", 'H', GTMachines.HULL[EV].asStack(), 'P', GCyRBlocks.LAUNCH_PAD.asStack(), 'C', CustomTags.EV_CIRCUITS, 'S', new UnificationEntry(plate, Titanium)); VanillaRecipeHelper.addShapedRecipe(provider, GCyR.id("space_station_packager"), GCyRMachines.SPACE_STATION_PACKAGER.asStack(), "PCP", "FHF", "PCP", 'H', GTMachines.HULL[LuV].asStack(), 'P', new UnificationEntry(frameGt, StainlessSteel), 'C', CustomTags.LuV_CIRCUITS, 'F', GTBlocks.PLASTCRETE.asStack()); VanillaRecipeHelper.addShapedRecipe(provider, GCyR.id("dyson_system_controller"), GCyRMachines.DYSON_SYSTEM_CONTROLLER.asStack(), "PCP", "FHF", "PCP", 'H', GTMachines.HULL[UHV].asStack(), 'P', new UnificationEntry(plate, Darmstadtium), 'C', CustomTags.UHV_CIRCUITS, 'F', GCyMBlocks.CASING_ATOMIC.asStack()); @@ -158,6 +159,12 @@ public static void init(Consumer provider) { .save(provider); //endregion + + GTRecipeTypes.ASSEMBLER_RECIPES.recipeBuilder(GCyR.id("stainless_evaporation_casing")) + .inputItems(GTBlocks.CASING_STAINLESS_CLEAN.asStack(1)) + .inputItems(wireGtDouble, AnnealedCopper, 4) + .outputItems(GCyRBlocks.CASING_STAINLESS_EVAPORATION.asStack(1)) + .duration(30).EUt(VA[HV]).save(provider); } } diff --git a/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java new file mode 100644 index 00000000..8534f1e3 --- /dev/null +++ b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java @@ -0,0 +1,35 @@ +package argent_matter.gcyr.data.recipe.chemistry; + +import argent_matter.gcyr.GCyR; +import net.minecraft.data.recipes.FinishedRecipe; + +import java.util.function.Consumer; + +import static argent_matter.gcyr.common.data.GCyRMaterials.*; +import static argent_matter.gcyr.common.data.GCyRRecipeTypes.*; +import static com.gregtechceu.gtceu.api.GTValues.*; +import static com.gregtechceu.gtceu.api.data.tag.TagPrefix.*; +import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.*; +import static com.gregtechceu.gtceu.common.data.GTMaterials.*; + +public class ChemistryRecipes { + + public static void init(Consumer provider) { + bromineProcess(provider); + } + + private static void bromineProcess(Consumer provider) { + EVAPORATION_RECIPES.recipeBuilder(GCyR.id("brine")) + .inputFluids(SaltWater.getFluid(20000)) + .outputFluids(Brine.getFluid(1000)) + .duration(1000).EUt(VA[HV]).save(provider); + CENTRIFUGE_RECIPES.recipeBuilder(GCyR.id("brine_separation")) + .inputFluids(Brine.getFluid(1000)) + .outputItems(dust, Salt, 20) + .outputItems(dust, Magnesium, 3) + .outputItems(dust, Lithium, 2) + .outputFluids(Bromine.getFluid(33)) + .duration(200).EUt(VA[HV]).save(provider); + } + +} diff --git a/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png new file mode 100644 index 0000000000000000000000000000000000000000..b8206dba769d781a7d4a236872a25e9216e1fc41 GIT binary patch literal 929 zcmZuvON-So6i%9?N!t4uXB^++fPyYm@VOCu&Y)LOLdu}10$1Wr z5clFra3L!G0a3wGncJE6woQ{X@pKedrnG5Kzweyyd?yc2o;ci&Rz(P*cJIjKDcDDv zTLkcY^!V~_*yN2P=WZdib$xT=yHEGsh9K|vj!*Gf+K$#QnSJ(TIfPdBr_S~dUB7yD z=2{;ex;b;9KXYl~&XxY%6|V)4CWYcR&7srCQmJ;J#8 zRXgOpr+_|vbcMC`_ryugmX3Cf$_WV|l2>(0Qp$wYMVhOjGH>5y6moz0S-$^}Zdn^U zT-jfRwjS~^f+@j?M*+?Tx&8Dl-?hC9V7gd~?3ifj4bwx?{hF0yBV8#(;cBgo5K%sy zFO%;Z?aSIxkk=4EN#%@}%N$=iIujgjD^1j z2?t0gPz z&Cr0P#!l!G`fHECFujy9B}i8~FLQ)kKuD3pr2>qcYs_c}fDS3P#ny<- zXoQd`ju@i=4uYnKhR}_g_NCxuk*D)>gSo_78<0jifNWjE+`whQ$X`h^?nnmGl`3+m zUKAyeqc{$EsFXquan5BJjCEkji%n~lmByv%Kr_|?k12}dsIHwc3Vf+`g{gxgW^tg6 zOO>{ns_Wq#kBATwGc-)*ZKc6RYn%`v)hQgL*+l&v+`>?O{F-kvFFKNdXpq-2j)HpU zp|Y)g6b5fUXFIob8%aRr%x~S?9_>gljZr+vj2Fle3}o*7cuZ#pB^;!dzyJn+{Hr$$ qaH_mdA;F&orD6U1gm;L5vjD!hZO`lduXgNh0KKUblg|&HfAAZHhh7^1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png.mcmeta b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png.mcmeta new file mode 100644 index 00000000..6170ddba --- /dev/null +++ b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.png.mcmeta @@ -0,0 +1,5 @@ +{ + "ldlib": { + "connection": "gcyr:block/casings/solid/machine_casing_stainless_evaporation_ctm" + } +} diff --git a/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.xcf b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation.xcf new file mode 100644 index 0000000000000000000000000000000000000000..72e2dccda1d3b74c71199c7746b2e83decd040e3 GIT binary patch literal 1787 zcmb_c?N6Fl6i3{gt#fs+pM08UFP+GX@79`qSe7nZmcp&c_79*UVig!*Ey`7F)gl7I z!#g}E0)jXcL9NcWHgijsxoq7(v1Fh3ZH;B;A|y|fep#~f!5<*M*G$SJl zwE@;VVtnhSP9Zla`sp#1VUYgvD_IY*)D>M-BXXreqSUGSiH>+@1bTyUSV8MG!>azq z%Yp%ApJrI2qXorDqEq(D>6YTx+6d;}mzZ1W;z!K)^jdkJO0A?@TVQ2;VO3g4M%5|< zty1?5D)eNBW?(?CFwjMR4!@u;I+Htdq(aA80Dbi$X%|Xvj%$15dXf;S+^8t-A^9Xy z1t9q?0NyA3Q!|Y48vux&BUja_eE6Zy@$k`@0_~Dn>K*irK>z^CPtFf8)mkHx>n_lMc7 zWX$2Px|q;v3ge#-_EQ0;)#-FQ!s`(KkJGJX`Y}wI07U6pMyp zzS)6E8Jbl`66?9WbeeTc_hN*sqcJA1l8m|*7|WemgdVDc>GhRJ$m{ZZltvkP@NGK1 zo$$H59-DP=Oorx06OT65JdDHdUsM_qavCz3h}Y@$20e>I5I<~;$J`5nDC=T;S{p)c zgEz$b<59oM=F?gbvJcO@!z{Dln0GnV5O4anQmY%&8FV8BA>8(P2E%j$T)!Ek4`FZyzH#)mN>uMHKl=y06qev(e@x^A|PXbCz zQO&|h`;0pra7XNhh8BwI5PH_~2T!uum}lZzD@ApRL;h%bYdz!+JP>pcyK5_-Nye9g ztgWG$qS{3(+2c$!z_QFtLlfA=?8#o14f>W@3$fo2$F~zpfu*Hr&?0D~s4tqrYpi!U zod^UMh1V&nTRb0)v*{EYVC=$9IIr=p&Fi(z&COU%LJ37lt~Llo5|LQcC=inSibWmQ zyV}~?JKDRN#1aagSuC$|SzP&AF|6n_s5EL?CfDB~ML;T$NV!9hYP#qUMfHE~5HxHn z$9$v2Np~SvC{^XhKuMF}O1Zd+D@UrnfkpZDC0mu2<50GNs>)K<*A;4c70^Fw3eR{j Y6)y4qf$@JO&x!$S3g-~FmRDE!7n3X#c>n+a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.png b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.png new file mode 100644 index 0000000000000000000000000000000000000000..96ea407376cbef6f38378adfa90e9337821cbea9 GIT binary patch literal 3249 zcmbVOTWB4}8Qz_lz0F?EIXaS#Y(`w$2u$OH@~PbCkD38baP351YRr?wT}bBuVzlkwZVi??UnE1g)6qyoDd**GGQ*TS0iD0;;GZC($l{=^|RGeKVSI6FIRuD zu)Ol@iRb_1)FjDzVCB%k=Z@I&f^~Huzp=K)7*kaht7Tb6o98(?XtOL+7^9RHQ-q90 zqd1Pgc>8xxEIEwG!S_xFN;Q|s7Cff7=o%lrCer-xS3DSJ-?{&O-}l?So?#dZb91ii zDvBb6@H}s3X2vwlZnq0Se=tbXloEOI;4}RT=Tlu*?ehG-`K@?vc#SK`r$k@cPuD*o z*!$J%*Uy|eQ*j(q*MSyE5(WVr!}|C@y*5Fhacz4?{Gi`^|Du~` z2_+IiG~y&VdGaJYAsVetM>h!gRtrmPYH#ZTw!EhJ^0b+%bVhyh*Sx4tw z=FZ-G=C15}#k#KFx^)Y2_iWp;EL>^5ULOPjPNr!Z0N4uL5E&QF zh=MWwW~1Q^hFkEO!mxnrlrW=kFeVA^5CK_S1WTnPN#F$zuwR@BBk(;Oz*oQ&mS(Krx6$W}2+%{{xS- zDmEh*iHx+6rza*5U&Nv3dG(ErAPoI5)Kyh649o^`j23r*aDfZxtM*Ks-_pkTdSeSd zOcEU!CNsT6_xo*FY?Q=~7OlaEeMgtwKv@g^?kAh&B zitTt+VO-&q5s)p*C1j3*2|8&UHtRQK zbLMV%f1*_2@-!(zgsiajZ8+O(HnA>8p82g{=#6}z zk`U2OXc_i|f~q9y{igN{xCw z78w%lk^Qz_uAqdVnr^{Q*w*bEpFO^0D|||1ml+t@Y&H@7W~T$YDA8afm^y9|9Nau= zbs|JzJxSs;AGtTc!fv+{uv{QyU&n{Tfk_As8uhQGSLMu2kX!SEIfW>fx+SJ58wOf+Th81krz@( zE{#)MW~xl+NVDXB{e6k+jsZW zYLE?F4=$`yE^pK~I;}?P_ax{+ny`UfDo<1biCg7D52p7+s7!39Io5+#Ytxs#NDV^4 zc`1{NO_VE@FjFnZL6*+W-m^^)`mP^^L1yv_@T?#mW!$oLgBN*z52i5c z_ItQGyk|fd6jCV_w#iYHAg!21)pQIUg)fXkRFtpq?M?^pjl1aq^us_28RHq=kwL3q z1-LzU)2l!poG~ z(2vP#HHl-0Hd1{6J&(d^PT%{>=`o(gBAAU`+4kj6N uu$VrvoS@{PKm{z@K@a4y9=!AJ?fcHY{L=^L7ta?~R}LRPbndB>fBr9w=B5My literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.xcf b/src/main/resources/assets/gcyr/textures/block/casings/solid/machine_casing_stainless_evaporation_ctm.xcf new file mode 100644 index 0000000000000000000000000000000000000000..62169dcc7c733b64ff4d580ff58b1f182a87f197 GIT binary patch literal 4241 zcmdUydu&tJ9mgG0jkO&O?H+$jQ*y)BiE21FttJGtViQ$2q((~`+gZw_Ed&#yLeeFH zB(N0+(isOv|EXx&@CY`sbFUxQj^Eezz1OeU#*QCx?AUn_LPB6vbgL$fuHBlQn`3w8 zFlpMKJ6FGZexGyBb*}yWeeca_Z9Dol*4uIjJ1(rL;emz~g3B+0cosxi8903t#Mk$N zAud4s7KkT6Yyk0{Le8!GHi*B1*whL>TF}yQ^r*DG8!(TXd~R>2w7FY)5bJ5{K8*cr zUu_*Xvw3}K+tKD$si3v9?I1VCt=4Vr>h3!t#kx9klmsjY`vTRM((bYffAJ3(jb zfo4p&e$>1GrVspw=^AYP;HG=K-fnJbYj4GBgn;@Up#lhwwYPO+ZS5_GrCr<=9fuBe zNxQN2^(8q>A6?Adb4e@fECG-{gO@M{axS>Gsjj(;`$1lB?vt)x!-wO%uYsQXeb+!# zarqt@I0FqpaO2z$^kg9i9dAoX{=Jg?sgfKk$)7ICzfqEJD#^=1&i%b&+XxcwZ*!mj zd?5!N?+0AI1{&zUUy>JVr1+h{6xaBtV84FGz?loKjzHrN!+!mYfioAN@y)R3@nmJ+ zy{f`-g1`w}qa#TpuIhI&RxM;B zL!o3gdy8&05{l^yk%Tkuo`LLg1v7HO6HF{E&8K5N2j$Qy z)q}Zsy1*_ko0Q|`*y^o^^I-?=(2>N5T9Hi_SxDlngx zm2G8`a$P+8@!fd9MtfMB&7#+wUr60Au$>7`D|9ROma<-xHySiMd_G!rer5W0ft`_9 zPHxQPgV87(k9zE6Fzisjx0s5?ARD8J8M!fNxBKET+F~)WUXOD0!d!^;L-vMmB;|UG zR2K;3LXi+<2^}C*=d**3AY|*LJS`u!<19^+q{(9Pjp``nA7+>k1KB^$=FVIhQRBEq z4GxuBtx;Z*C26Y`@|c-U%K8Tsiorp}ph9u}!XMuo9OzG#RzP~db#pG0TbjSQkh`^f zb2dAbx*2zsRKOJDzYvS_6SA^jCsV1Z=s73P3Bul*v!T zVqT!B!#ELfjsY&I2&}*@J|M)ikJk+$`jPx_9gil^Q(R^*V6i zI-Opltoz_NVSub1J3drb-yjxCBw~qJ+}QNXCP_p6ho$;oZa8K$D97C6HZwtat%mEv zA3m!8a8F;;DcR}%{&(f_bMG{s=mpFc_4feQ5}`oA7R^s57sED#c1){{M2hu5k=ikx zCp4YA^Ow)>tfoAMQBnuEq#j5esz1u8{wSmRqm1g0GOGV$jOdTngLP&uG&$)_OfqhB z=!QoN_}}#a*yOX@nMl}WwT`=KN~JdWobF;h_}nUW-$_ZYOeXI?-T(WO{i5DufDHxx zsQ}<(>dSnh?Ao&Ox>EPim9e3Z9@T%S?hTPxyixQ(+)#%~FXQu3_g8Ea3>%>P$49CK zm8knGJB2D5y8kvUtjAFIWBaO16VUxj`l{D4)cx4rm+TSf{z;ACRSb1MCJ}mPp!?m! zKLYcJ`>{87L>TCPT3KC-p=x7q3hCR>{WKxiiJ@v^zxZ)x3A&#g5$wQFwK2&n>Ayku z(`s-%s&-ZTuDN^A{Z38w&oNZ(s`Ia>!0KXLZAE%keLcM7i;wP%F&dj!>0Lg7m_H9L0g z`l+z0S^(Hy)ZPsE(lBMWYv_15ka20QUK+Y|iJkcB$v=8|Nb8@0Ziv*5k&8lQ-`3BaM^n;-;OX~A)m z+oe~lRR*K({fkN~=_o$=neq283aT-IP`JD1#hUHaHJD%RB8~xumO&GYQ_?gcX@-onG22t3k{1BwvzNxeo_dDFul2+ad04qdc zuKY~Ng5n$)D*tN#Q_kbBJqe Date: Sat, 13 Apr 2024 15:02:46 +0300 Subject: [PATCH 04/17] fix space suit filling --- .../gcyr/common/item/armor/SpaceSuitArmorItem.java | 2 +- .../java/argent_matter/gcyr/forge/ForgeCommonEventListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java b/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java index 12522ea2..a8e2bb46 100644 --- a/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java +++ b/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java @@ -33,7 +33,7 @@ public SpaceSuitArmorItem(ArmorItem.Type type, Properties properties) { } public static LazyOptional getCapability(@Nonnull final ItemStack itemStack, @Nonnull final Capability cap) { - if (itemStack.is(Tags.Items.ARMORS_CHESTPLATES) && cap == ForgeCapabilities.FLUID_HANDLER_ITEM) { + if (cap == ForgeCapabilities.FLUID_HANDLER_ITEM) { return ForgeCapabilities.FLUID_HANDLER_ITEM.orEmpty(cap, LazyOptional.of(() -> new FluidHandlerItemStack(itemStack, Math.toIntExact(SpaceSuitArmorItem.CAPACITY)) { @Override public boolean canFillFluidType(net.minecraftforge.fluids.FluidStack fluid) { diff --git a/src/main/java/argent_matter/gcyr/forge/ForgeCommonEventListener.java b/src/main/java/argent_matter/gcyr/forge/ForgeCommonEventListener.java index ff3cf069..b62bbb81 100644 --- a/src/main/java/argent_matter/gcyr/forge/ForgeCommonEventListener.java +++ b/src/main/java/argent_matter/gcyr/forge/ForgeCommonEventListener.java @@ -42,7 +42,7 @@ public class ForgeCommonEventListener { @SubscribeEvent public static void registerItemStackCapabilities(AttachCapabilitiesEvent event) { final ItemStack itemStack = event.getObject(); - if (itemStack.is(Tags.Items.ARMORS_CHESTPLATES) && itemStack.hasTag() && itemStack.getTag().getBoolean(SmithingSpaceSuitRecipe.SPACE_SUIT_ARMOR_KEY)) { + if (itemStack.is(Tags.Items.ARMORS_CHESTPLATES) && (itemStack.getItem() instanceof SpaceSuitArmorItem || itemStack.hasTag() && itemStack.getTag().getBoolean(SmithingSpaceSuitRecipe.SPACE_SUIT_ARMOR_KEY))) { event.addCapability(GCyR.id("spacesuit"), new ICapabilityProvider() { @Override public @NotNull LazyOptional getCapability(@NotNull Capability capability, @Nullable Direction arg) { From 310f9961fb13dbaed30412b0bc23c2ecdb820d21 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:10:20 +0300 Subject: [PATCH 05/17] add PVC into evaporation casing recipe, make evaporation tower actually 4x4 --- .../java/argent_matter/gcyr/common/data/GCyRMachines.java | 6 +++--- .../java/argent_matter/gcyr/data/recipe/MiscRecipes.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java index cbdff472..9b4570e9 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java @@ -76,9 +76,9 @@ public class GCyRMachines { .recipeModifier(GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK)) .appearanceBlock(CASING_STAINLESS_EVAPORATION) .pattern(definition -> FactoryBlockPattern.start(RIGHT, BACK, UP) - .aisle("YSYY", "YYYY", "YYYY") - .aisle("XXXX", "X##X", "XXXX").setRepeatable(3, 5) - .aisle(" XX ", "X##X", " XX ") + .aisle("YSYY", "YYYY", "YYYY", "YYYY") + .aisle("XXXX", "X##X", "X##X", "XXXX").setRepeatable(3, 5) + .aisle(" XX ", "X##X", "X##X", " XX ") .where('S', Predicates.controller(blocks(definition.getBlock()))) .where('Y', blocks(CASING_STAINLESS_EVAPORATION.get()) .or(Predicates.abilities(PartAbility.INPUT_ENERGY).setMinGlobalLimited(1).setMaxGlobalLimited(2)) diff --git a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java index d3e2ad0b..3a86b5a5 100644 --- a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java +++ b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java @@ -15,7 +15,6 @@ import com.gregtechceu.gtceu.data.recipe.VanillaRecipeHelper; import com.gregtechceu.gtceu.data.recipe.misc.MetaTileEntityLoader; import net.minecraft.data.recipes.FinishedRecipe; -import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.common.Tags; @@ -163,6 +162,7 @@ public static void init(Consumer provider) { GTRecipeTypes.ASSEMBLER_RECIPES.recipeBuilder(GCyR.id("stainless_evaporation_casing")) .inputItems(GTBlocks.CASING_STAINLESS_CLEAN.asStack(1)) .inputItems(wireGtDouble, AnnealedCopper, 4) + .inputFluids(PolyvinylChloride.getFluid(L * 2)) .outputItems(GCyRBlocks.CASING_STAINLESS_EVAPORATION.asStack(1)) .duration(30).EUt(VA[HV]).save(provider); } From 3ec09247b0bf32938ff044404578769c1f8b9774 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:29:44 +0300 Subject: [PATCH 06/17] run data --- .../resources/assets/gcyr/lang/en_ud.json | 7 +++---- .../resources/assets/gcyr/lang/en_us.json | 7 +++---- .../forge/tags/blocks/mineable/wrench.json | 1 + .../blocks/stainless_evaporation_casing.json | 21 +++++++++++++++++++ .../tags/blocks/mineable/pickaxe.json | 1 + 5 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 src/generated/resources/data/gcyr/loot_tables/blocks/stainless_evaporation_casing.json diff --git a/src/generated/resources/assets/gcyr/lang/en_ud.json b/src/generated/resources/assets/gcyr/lang/en_ud.json index a42ccc8a..323ce2cd 100644 --- a/src/generated/resources/assets/gcyr/lang/en_ud.json +++ b/src/generated/resources/assets/gcyr/lang/en_ud.json @@ -14,18 +14,15 @@ "block.gcyr.dyson_system_controller": "ɹǝןןoɹʇuoƆ ɯǝʇsʎS uosʎᗡ", "block.gcyr.elite_fuel_tank": "ʞuɐ⟘ ןǝnℲ ǝʇıןƎ", "block.gcyr.elite_rocket_motor": "ɹoʇoW ʇǝʞɔoᴚ ǝʇıןƎ", - "block.gcyr.ev_fluid_loader": "ɹǝpɐoꞀ pınןℲ ΛƎϛ§", - "block.gcyr.hv_fluid_loader": "ɹǝpɐoꞀ pınןℲ ΛH9§", + "block.gcyr.evaporation_plant": "ɹǝʍo⟘ uoıʇɐɹodɐʌƎ", "block.gcyr.iv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛI6§", "block.gcyr.launch_pad": "pɐԀ ɥɔunɐꞀ", "block.gcyr.luv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛnꞀp§", - "block.gcyr.lv_fluid_loader": "ɹǝpɐoꞀ pınןℲ ΛꞀㄥ§", "block.gcyr.mars_regolith": "ɥʇıןobǝᴚ sɹɐW", "block.gcyr.martian_rock": "ʞɔoᴚ uɐıʇɹɐW", "block.gcyr.mercury_rock": "ʞɔoᴚ ʎɹnɔɹǝW", "block.gcyr.moon_sand": "puɐS uooW", "block.gcyr.moon_stone": "ǝuoʇS uooW", - "block.gcyr.mv_fluid_loader": "ɹǝpɐoꞀ pınןℲ ΛWq§", "block.gcyr.opv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛdOן§6§", "block.gcyr.prb_underground_mushroom": "ɯooɹɥsnW punoɹbɹǝpu∩ qɹԀ", "block.gcyr.rocket_scanner": "ɹǝuuɐɔS ʇǝʞɔoᴚ", @@ -33,6 +30,7 @@ "block.gcyr.space_elevator": "ɹoʇɐʌǝןƎ ǝɔɐdS", "block.gcyr.space_elevator_support": "ʇɹoddnS ɹoʇɐʌǝןƎ ǝɔɐdS", "block.gcyr.space_station_packager": "ɹǝbɐʞɔɐԀ uoıʇɐʇS ǝɔɐdS", + "block.gcyr.stainless_evaporation_casing": "buısɐƆ uoıʇɐɹodɐʌƎ ssǝןuıɐʇS", "block.gcyr.uev_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛƎ∩ɐ§", "block.gcyr.uhv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛH∩ㄣ§", "block.gcyr.uiv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛI∩ᄅ§", @@ -87,6 +85,7 @@ "material.gcyr.aminophenol": "ןouǝɥdouıɯⱯ", "material.gcyr.bis_trichloromethyl_benzene": "ǝuǝzuǝq)ןʎɥʇǝɯoɹoןɥɔıɹʇ(sıᗺ", "material.gcyr.bisalloy_400": "00ㄣ-ʎoןןɐsıᗺ", + "material.gcyr.brine": "ǝuıɹᗺ", "material.gcyr.chromic_acid": "pıɔⱯ ɔıɯoɹɥƆ", "material.gcyr.co_mn_br_catalyst": "ʇsʎןɐʇɐƆ ɹᗺ-uW-oƆ", "material.gcyr.cobalt_bromide": "ǝpıɯoɹᗺ ʇןɐqoƆ", diff --git a/src/generated/resources/assets/gcyr/lang/en_us.json b/src/generated/resources/assets/gcyr/lang/en_us.json index 4c2bc736..45b8d7d1 100644 --- a/src/generated/resources/assets/gcyr/lang/en_us.json +++ b/src/generated/resources/assets/gcyr/lang/en_us.json @@ -14,18 +14,15 @@ "block.gcyr.dyson_system_controller": "Dyson System Controller", "block.gcyr.elite_fuel_tank": "Elite Fuel Tank", "block.gcyr.elite_rocket_motor": "Elite Rocket Motor", - "block.gcyr.ev_fluid_loader": "§5EV Fluid Loader", - "block.gcyr.hv_fluid_loader": "§6HV Fluid Loader", + "block.gcyr.evaporation_plant": "Evaporation Tower", "block.gcyr.iv_oxygen_spreader": "§9IV Oxygen Spreader", "block.gcyr.launch_pad": "Launch Pad", "block.gcyr.luv_oxygen_spreader": "§dLuV Oxygen Spreader", - "block.gcyr.lv_fluid_loader": "§7LV Fluid Loader", "block.gcyr.mars_regolith": "Mars Regolith", "block.gcyr.martian_rock": "Martian Rock", "block.gcyr.mercury_rock": "Mercury Rock", "block.gcyr.moon_sand": "Moon Sand", "block.gcyr.moon_stone": "Moon Stone", - "block.gcyr.mv_fluid_loader": "§bMV Fluid Loader", "block.gcyr.opv_oxygen_spreader": "§9§lOpV Oxygen Spreader", "block.gcyr.prb_underground_mushroom": "Prb Underground Mushroom", "block.gcyr.rocket_scanner": "Rocket Scanner", @@ -33,6 +30,7 @@ "block.gcyr.space_elevator": "Space Elevator", "block.gcyr.space_elevator_support": "Space Elevator Support", "block.gcyr.space_station_packager": "Space Station Packager", + "block.gcyr.stainless_evaporation_casing": "Stainless Evaporation Casing", "block.gcyr.uev_oxygen_spreader": "§aUEV Oxygen Spreader", "block.gcyr.uhv_oxygen_spreader": "§4UHV Oxygen Spreader", "block.gcyr.uiv_oxygen_spreader": "§2UIV Oxygen Spreader", @@ -87,6 +85,7 @@ "material.gcyr.aminophenol": "Aminophenol", "material.gcyr.bis_trichloromethyl_benzene": "Bis(trichloromethyl)benzene", "material.gcyr.bisalloy_400": "Bisalloy-400", + "material.gcyr.brine": "Brine", "material.gcyr.chromic_acid": "Chromic Acid", "material.gcyr.co_mn_br_catalyst": "Co-Mn-Br Catalyst", "material.gcyr.cobalt_bromide": "Cobalt Bromide", diff --git a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json index 4ccb138f..0d7be067 100644 --- a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json +++ b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json @@ -6,6 +6,7 @@ "gcyr:dyson_sphere_casing", "gcyr:dyson_solar_cell", "gcyr:dyson_sphere_maintenance_port", + "gcyr:stainless_evaporation_casing", "gcyr:basic_rocket_motor", "gcyr:advanced_rocket_motor", "gcyr:elite_rocket_motor", diff --git a/src/generated/resources/data/gcyr/loot_tables/blocks/stainless_evaporation_casing.json b/src/generated/resources/data/gcyr/loot_tables/blocks/stainless_evaporation_casing.json new file mode 100644 index 00000000..822242b9 --- /dev/null +++ b/src/generated/resources/data/gcyr/loot_tables/blocks/stainless_evaporation_casing.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "gcyr:stainless_evaporation_casing" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "gcyr:blocks/stainless_evaporation_casing" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index b63ba97e..a3ac8d0c 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -6,6 +6,7 @@ "gcyr:dyson_sphere_casing", "gcyr:dyson_solar_cell", "gcyr:dyson_sphere_maintenance_port", + "gcyr:stainless_evaporation_casing", "gcyr:airlock_door", "gcyr:launch_pad", "gcyr:seat" From 90d583231d6a1799bee9b8110642bc38b63eb46f Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:24:05 +0300 Subject: [PATCH 07/17] brine chain --- .../gui/widget/SatelliteScanWidget.java | 3 - .../gcyr/common/data/GCyRMachines.java | 38 +++++++++-- .../gcyr/common/data/GCyRMaterials.java | 63 +++++++++++++++++- .../gcyr/common/data/GCyRRecipeTypes.java | 4 ++ .../gcyr/data/recipe/MiscRecipes.java | 1 + .../recipe/chemistry/ChemistryRecipes.java | 65 ++++++++++++++++--- 6 files changed, 155 insertions(+), 19 deletions(-) diff --git a/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java b/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java index 81be429c..90df2ae4 100644 --- a/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java +++ b/src/main/java/argent_matter/gcyr/client/gui/widget/SatelliteScanWidget.java @@ -34,7 +34,6 @@ public class SatelliteScanWidget extends WidgetGroup { public final OreFinderScannerMachine machine; @Getter private boolean darkMode = false; - private final DraggableScrollableWidgetGroup itemList; @OnlyIn(Dist.CLIENT) private SatelliteProspectingTexture texture; private int playerChunkX; @@ -54,8 +53,6 @@ public SatelliteScanWidget(int xPosition, int yPosition, int width, int height, int imageHeight = (chunkRadius * 2 - 1) * 16; addWidget(new ImageWidget(0, (height - imageHeight) / 2 - 4, imageWidth + 8, imageHeight + 8, GuiTextures.BACKGROUND_INVERSE)); var group = (WidgetGroup) new WidgetGroup(imageWidth + 10, 0, width - (imageWidth + 10), height).setBackground(GuiTextures.BACKGROUND_INVERSE); - group.addWidget(itemList = new DraggableScrollableWidgetGroup(4, 28, group.getSize().width - 8, group.getSize().height - 32) - .setYScrollBarWidth(2).setYBarStyle(null, ColorPattern.T_WHITE.rectTexture().setRadius(1))); addWidget(group); } diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java index 9b4570e9..eb662d9d 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMachines.java @@ -14,10 +14,7 @@ import com.gregtechceu.gtceu.api.data.RotationState; import com.gregtechceu.gtceu.api.data.chemical.ChemicalHelper; import com.gregtechceu.gtceu.api.data.tag.TagPrefix; -import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; -import com.gregtechceu.gtceu.api.machine.MachineDefinition; -import com.gregtechceu.gtceu.api.machine.MetaMachine; -import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition; +import com.gregtechceu.gtceu.api.machine.*; import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility; import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine; import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern; @@ -32,6 +29,8 @@ import com.gregtechceu.gtceu.common.data.GTRecipeModifiers; import com.gregtechceu.gtceu.common.data.GTRecipeTypes; import com.gregtechceu.gtceu.config.ConfigHolder; +import com.lowdragmc.lowdraglib.side.fluid.FluidHelper; +import it.unimi.dsi.fastutil.ints.Int2LongFunction; import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; import net.minecraft.world.level.block.Blocks; @@ -51,12 +50,17 @@ import static com.gregtechceu.gtceu.common.data.GCyMBlocks.CASING_ATOMIC; import static com.gregtechceu.gtceu.common.data.GTBlocks.*; import static com.gregtechceu.gtceu.common.data.GTMachines.POWER_TRANSFORMER; +import static com.gregtechceu.gtceu.utils.FormattingUtil.toEnglishName; @SuppressWarnings({"Convert2MethodRef", "FunctionalExpressionCanBeFolded", "unused", "DataFlowIssue"}) public class GCyRMachines { public final static int[] ELECTRIC_TIERS = GTValues.tiersBetween(LV, GTCEuAPI.isHighTier() ? OpV : UV); public final static int[] LOW_TIERS = GTValues.tiersBetween(LV, EV); public final static int[] HIGH_TIERS = GTValues.tiersBetween(IV, GTCEuAPI.isHighTier() ? OpV : UHV); + public static final Int2LongFunction defaultTankSizeFunction = tier -> (tier <= GTValues.LV ? 8 : tier == GTValues.MV ? 12 : tier == GTValues.HV ? 16 : tier == GTValues.EV ? 32 : 64) * FluidHelper.getBucket(); + + + public final static MachineDefinition[] HEAT_EXCHANGER = registerSimpleMachines("heat_exchanger", GCyRRecipeTypes.HEAT_EXCHANGER_RECIPES); public final static MachineDefinition[] OXYGEN_SPREADER = registerTieredMachines("oxygen_spreader", OxygenSpreaderMachine::new, (tier, builder) -> builder @@ -69,6 +73,7 @@ public class GCyRMachines { .register(), HIGH_TIERS); + public static final MachineDefinition EVAPORATION_PLANT = REGISTRATE.multiblock("evaporation_plant", WorkableElectricMultiblockMachine::new) .langValue("Evaporation Tower") .rotationState(RotationState.NON_Y_AXIS) @@ -270,6 +275,31 @@ public class GCyRMachines { .workableCasingRenderer(GTCEu.id("block/casings/solid/machine_casing_frost_proof"), GTCEu.id("block/multiblock/vacuum_freezer"), false) .register(); + + + public static MachineDefinition[] registerSimpleMachines(String name, + GTRecipeType recipeType, + Int2LongFunction tankScalingFunction, + int... tiers) { + return registerTieredMachines(name, (holder, tier) -> new SimpleTieredMachine(holder, tier, tankScalingFunction), (tier, builder) -> builder + .langValue("%s %s %s".formatted(VLVH[tier], toEnglishName(name), VLVT[tier])) + .editableUI(SimpleTieredMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id(name), recipeType)) + .rotationState(RotationState.NON_Y_AXIS) + .recipeType(recipeType) + .recipeModifier(GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK)) + .workableTieredHullRenderer(GTCEu.id("block/machines/" + name)) + .tooltips(workableTiered(tier, GTValues.V[tier], GTValues.V[tier] * 64, recipeType, tankScalingFunction.apply(tier), true)) + .compassNode(name) + .register(), tiers); + } + + public static MachineDefinition[] registerSimpleMachines(String name, GTRecipeType recipeType, Int2LongFunction tankScalingFunction) { + return registerSimpleMachines(name, recipeType, tankScalingFunction, ELECTRIC_TIERS); + } + + public static MachineDefinition[] registerSimpleMachines(String name, GTRecipeType recipeType) { + return registerSimpleMachines(name, recipeType, defaultTankSizeFunction); + } public static MachineDefinition[] registerTieredMachines(String name, BiFunction factory, diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java b/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java index 5bcd0cd6..de2b66cd 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRMaterials.java @@ -135,12 +135,69 @@ public static void modifyMaterials() { .components(Epoxy, 2, SiliconDioxide, 7) .buildAndRegister(); - public static final Material Brine = new Material.Builder(GCyR.id("brine")) + //endregion + + + //region bromine chain + public static final Material RawBrine = new Material.Builder(GCyR.id("raw_brine")) .liquid() - .color(0x9F6B26) + .color(0x9f6b26) .components(Water, 4, Salt, 20, Magnesium, 3, Lithium, 2, Bromine, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material HotBrine = new Material.Builder(GCyR.id("hot_brine")) + .liquid(320) + .color(0xbe6026) + .components(Water, 4, Salt, 20, Magnesium, 3, Lithium, 2, Bromine, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material HotChlorinatedBrominatedBrine = new Material.Builder(GCyR.id("hot_chlorinated_brominated_brine")) + .liquid(320) + .color(0xab765d) + .components(HotBrine, 1, Chlorine, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material DebrominatedBrine = new Material.Builder(GCyR.id("debrominated_brine")) + .liquid() + .color(0xab8c6d) + .components(Water, 4, Salt, 20, Magnesium, 3, Lithium, 2) + .flags(DECOMPOSITION_BY_ELECTROLYZING) + .buildAndRegister(); + public static final Material HotDebrominatedBrine = new Material.Builder(GCyR.id("hot_debrominated_brine")) + .liquid(320) + .color(0xab896d) + .components(Water, 4, Salt, 20, Magnesium, 3, Lithium, 2) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material HotAlkalineDebrominatedBrine = new Material.Builder(GCyR.id("hot_alkaline_debrominated_brine")) + .liquid(320) + .color(0xbe8938) + .components(HotDebrominatedBrine, 2, Chlorine, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material BrominatedChlorineVapor = new Material.Builder(GCyR.id("brominated_chlorine_vapor")) + .gas() + .color(0xbb9b72) + .components(Chlorine, 1, Bromine, 1, Steam, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material AcidicBromineSolution = new Material.Builder(GCyR.id("acidic_bromine_solution")) + .liquid() + .color(0xc49b52) + .components(Chlorine, 1, Bromine, 1) + .flags(DISABLE_DECOMPOSITION) + .buildAndRegister(); + public static final Material AcidicBromineExhaust = new Material.Builder(GCyR.id("acidic_bromine_exhaust")) + .gas() + .color(0x8f681e) + .components(Steam, 3, Chlorine, 1) + .buildAndRegister(); + public static final Material ConcentratedBromineSolution = new Material.Builder(GCyR.id("concentrated_bromine_solution")) + .liquid() + .color(0x91481e) + .components(Bromine, 2, Chlorine, 1) + .flags(DISABLE_DECOMPOSITION) .buildAndRegister(); - //endregion diff --git a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java index 5fea52b2..afaac813 100644 --- a/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java +++ b/src/main/java/argent_matter/gcyr/common/data/GCyRRecipeTypes.java @@ -25,6 +25,10 @@ public class GCyRRecipeTypes { .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) .setSound(GTSoundEntries.MOTOR); + public static final GTRecipeType HEAT_EXCHANGER_RECIPES = register("heat_exchanger", ELECTRIC).setMaxIOSize(2, 2, 2, 2).setEUIO(IO.IN) + .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) + .setSound(GTSoundEntries.MOTOR); + public static final GTRecipeType DYSON_ENERGY_RECIPES = register("dyson_controller", MULTIBLOCK) .setMaxIOSize(8, 0, 0, 0).setEUIO(IO.BOTH) .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW_MULTIPLE, LEFT_TO_RIGHT) diff --git a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java index 3a86b5a5..73cc1e45 100644 --- a/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java +++ b/src/main/java/argent_matter/gcyr/data/recipe/MiscRecipes.java @@ -115,6 +115,7 @@ public static void init(Consumer provider) { //region machines MetaTileEntityLoader.registerMachineRecipe(provider, GCyRMachines.OXYGEN_SPREADER, "PCP", "FHF", "PCP", 'H', HULL, 'P', PUMP, 'F', GTItems.FLUID_FILTER, 'C', CIRCUIT); + MetaTileEntityLoader.registerMachineRecipe(provider, GCyRMachines.HEAT_EXCHANGER, "PCP", "DHD", "PCP", 'H', HULL, 'P', PUMP, 'D', VOLTAGE_COIL, 'C', CIRCUIT); VanillaRecipeHelper.addShapedRecipe(provider, true, GCyR.id("evaporation_plant"), GCyRMachines.EVAPORATION_PLANT.asStack(), "CBC", "FMF", "CBC", 'M', GTMachines.HULL[HV].asStack(), 'B', new UnificationEntry(wireGtDouble, Kanthal), 'C', CustomTags.HV_CIRCUITS, 'F', GTItems.ELECTRIC_PUMP_HV); VanillaRecipeHelper.addShapedRecipe(provider, GCyR.id("rocket_scanner"), GCyRMachines.ROCKET_SCANNER.asStack(), "PCP", "CHC", "SCS", 'H', GTMachines.HULL[EV].asStack(), 'P', GCyRBlocks.LAUNCH_PAD.asStack(), 'C', CustomTags.EV_CIRCUITS, 'S', new UnificationEntry(plate, Titanium)); VanillaRecipeHelper.addShapedRecipe(provider, GCyR.id("space_station_packager"), GCyRMachines.SPACE_STATION_PACKAGER.asStack(), "PCP", "FHF", "PCP", 'H', GTMachines.HULL[LuV].asStack(), 'P', new UnificationEntry(frameGt, StainlessSteel), 'C', CustomTags.LuV_CIRCUITS, 'F', GTBlocks.PLASTCRETE.asStack()); diff --git a/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java index 8534f1e3..190a0002 100644 --- a/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java +++ b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java @@ -19,17 +19,64 @@ public static void init(Consumer provider) { } private static void bromineProcess(Consumer provider) { - EVAPORATION_RECIPES.recipeBuilder(GCyR.id("brine")) + EVAPORATION_RECIPES.recipeBuilder(GCyR.id("brine_evaporation")) .inputFluids(SaltWater.getFluid(20000)) - .outputFluids(Brine.getFluid(1000)) + .outputFluids(RawBrine.getFluid(1000)) .duration(1000).EUt(VA[HV]).save(provider); - CENTRIFUGE_RECIPES.recipeBuilder(GCyR.id("brine_separation")) - .inputFluids(Brine.getFluid(1000)) - .outputItems(dust, Salt, 20) - .outputItems(dust, Magnesium, 3) - .outputItems(dust, Lithium, 2) - .outputFluids(Bromine.getFluid(33)) - .duration(200).EUt(VA[HV]).save(provider); + FLUID_HEATER_RECIPES.recipeBuilder(GCyR.id("brine_heating")) + .inputFluids(RawBrine.getFluid(1000)) + .outputFluids(HotBrine.getFluid(1000)) + .duration(12000).EUt(VA[HV]); + + // Main chain + CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_chlorination")) + .inputFluids(HotBrine.getFluid(1000)) + .inputFluids(Chlorine.getFluid(1000)) + .outputFluids(HotChlorinatedBrominatedBrine.getFluid(2000)) + .duration(100).EUt(VA[HV]); + CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_filtration")) + .inputFluids(HotChlorinatedBrominatedBrine.getFluid(1000)) + .inputFluids(Chlorine.getFluid(1000)) + .inputFluids(Steam.getFluid(1000)) + .outputFluids(HotAlkalineDebrominatedBrine.getFluid(1000)) + .outputFluids(BrominatedChlorineVapor.getFluid(2000)) + .duration(300).EUt(VA[HV]); + HEAT_EXCHANGER_RECIPES.recipeBuilder(GCyR.id("brominated_chlorine_vapor_condensation")) + .inputFluids(BrominatedChlorineVapor.getFluid(1000)) + .inputFluids(Water.getFluid(1000)) + .outputFluids(AcidicBromineSolution.getFluid(1000)) + .outputFluids(Water.getFluid(1000)) + .duration(200).EUt(VA[HV]); + CHEMICAL_RECIPES.recipeBuilder(GCyR.id("bromine_vapor_concentration")) + .inputFluids(AcidicBromineSolution.getFluid(1000)) + .inputFluids(Steam.getFluid(1000)) + .outputFluids(ConcentratedBromineSolution.getFluid(1000)) + .outputFluids(AcidicBromineExhaust.getFluid(1000)) + .duration(100).EUt(VA[HV]); + DISTILLATION_RECIPES.recipeBuilder(GCyR.id("bromine_distillation")) + .inputFluids(ConcentratedBromineSolution.getFluid(1000)) + .outputFluids(Chlorine.getFluid(500)) + .outputFluids(Bromine.getFluid(1000)) + .duration(500).EUt(VA[HV]); + + // byproduct loop + CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_neutralization")) + .inputFluids(HotAlkalineDebrominatedBrine.getFluid(3000)) + .outputFluids(Chlorine.getFluid(1000)) + .outputFluids(HotDebrominatedBrine.getFluid(2000)) + .duration(100).EUt(VA[HV]); + HEAT_EXCHANGER_RECIPES.recipeBuilder(GCyR.id("debrominated_brine_raw_brine_mixing")) + .inputFluids(RawBrine.getFluid(1000)) + .inputFluids(HotDebrominatedBrine.getFluid(1000)) + .outputFluids(HotBrine.getFluid(1000)) + .outputFluids(DebrominatedBrine.getFluid(1000)) + .duration(200).EUt(VA[HV]); + CHEMICAL_RECIPES.recipeBuilder(GCyR.id("acidic_bromine_exhaust_heating")) + .inputFluids(AcidicBromineExhaust.getFluid(1000)) + .inputFluids(HotBrine.getFluid(1000)) + .outputFluids(HotChlorinatedBrominatedBrine.getFluid(1000)) + .outputFluids(Steam.getFluid(3000)) + .duration(100).EUt(VA[HV]); } } From bb86e54278df35a3060cc537c2588d4a33b1bad3 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:24:42 +0300 Subject: [PATCH 08/17] fix rocket fuel loading --- .../gcyr/common/entity/RocketEntity.java | 13 +++++++------ .../argent_matter/gcyr/data/lang/LangHandler.java | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java b/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java index 91fc9267..1538c2b3 100644 --- a/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java +++ b/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java @@ -244,7 +244,7 @@ public ModularUI createUI(Player entityPlayer) { .widget(new SlotWidget(satelliteSlot, 0, 60, 20)) .widget(new ButtonWidget(40, 60, 38, 18, new GuiTextureGroup(GuiTextures.BUTTON.copy().setColor(0xFFAA0000), new TextTexture("menu.gcyr.launch")), (clickData) -> this.startRocket())) .widget(new ButtonWidget(40, 40, 38, 18, new GuiTextureGroup(GuiTextures.BUTTON.copy().setColor(0xFFE0B900), new TextTexture("menu.gcyr.rocket.unbuild")), (clickData) -> this.unBuild())) - .widget(new LabelWidget(84, 25, this.getDisplayThrust())) + .widget(new LabelWidget(84, 25, this.getDisplayThrust().getString())) .widget(UITemplate.bindPlayerInventory(entityPlayer.getInventory(), GuiTextures.SLOT, 7, 84, true)) .background(GuiTextures.BACKGROUND); } @@ -426,8 +426,9 @@ public void startRocket() { return; } - if (this.fuelTank.getFluidAmount() < computeRequiredFuelAmountForDestination(this.getDestination())) { - sendVehicleHasNoFuelMessage(player); + long requiredFuel = computeRequiredFuelAmountForDestination(this.getDestination()); + if (this.fuelTank.getFluidAmount() < requiredFuel) { + sendVehicleHasNoFuelMessage(player, this.fuelTank.getFluidAmount(), requiredFuel); return; } @@ -899,7 +900,7 @@ public Component getDisplayThrust() { style = ChatFormatting.GREEN; } var thrustComponent = Component.literal(String.format("%.1f", thrust)).withStyle(style); - return Component.translatable("menu.gcyr.rocket.thrust", thrustComponent); + return Component.translatable("menu.gcyr.rocket.thrust", style + thrustComponent.getString() + ChatFormatting.RESET); } public double getRocketSpeed() { @@ -999,9 +1000,9 @@ public static void setEntityRotation(Entity vehicle, float rotation) { vehicle.yRotO = vehicle.getYRot(); } - public static void sendVehicleHasNoFuelMessage(Player player) { + public static void sendVehicleHasNoFuelMessage(Player player, long fuel, long required) { if (!player.level().isClientSide) { - player.displayClientMessage(Component.translatable("message.gcyr.no_fuel"), false); + player.displayClientMessage(Component.translatable("message.gcyr.no_fuel", fuel, required), false); } } diff --git a/src/main/java/argent_matter/gcyr/data/lang/LangHandler.java b/src/main/java/argent_matter/gcyr/data/lang/LangHandler.java index d4685b5f..07aed7d0 100644 --- a/src/main/java/argent_matter/gcyr/data/lang/LangHandler.java +++ b/src/main/java/argent_matter/gcyr/data/lang/LangHandler.java @@ -93,7 +93,7 @@ public static void init(RegistrateLangProvider provider) { provider.add("menu.gcyr.oxygen.false", "Doesn't have oxygen"); // messages - provider.add("message.gcyr.no_fuel", "The rocket must be fueled fully."); + provider.add("message.gcyr.no_fuel", "The rocket must be fueled fully. Has %s mB fuel, destination requires %s mB."); provider.add("message.gcyr.invalid_id", "The rocket must have a valid Planet ID Chip."); provider.add("message.gcyr.rocket_not_good_enough", "The rocket doesn't have enough tier %s components to travel to the selected planet."); provider.add("message.gcyr.notice_id_changed", "The destination of your Space Station ID chip might have changed. Remember to rewrite the personal destination chip with the new data before setting a new target!"); From 98960af0466441e7a7ec835deed2c191033b820c Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:26:03 +0300 Subject: [PATCH 09/17] run data --- .../resources/assets/gcyr/lang/en_ud.json | 26 +++++++++++++++++-- .../resources/assets/gcyr/lang/en_us.json | 26 +++++++++++++++++-- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src/generated/resources/assets/gcyr/lang/en_ud.json b/src/generated/resources/assets/gcyr/lang/en_ud.json index 323ce2cd..a485ba3f 100644 --- a/src/generated/resources/assets/gcyr/lang/en_ud.json +++ b/src/generated/resources/assets/gcyr/lang/en_ud.json @@ -14,15 +14,22 @@ "block.gcyr.dyson_system_controller": "ɹǝןןoɹʇuoƆ ɯǝʇsʎS uosʎᗡ", "block.gcyr.elite_fuel_tank": "ʞuɐ⟘ ןǝnℲ ǝʇıןƎ", "block.gcyr.elite_rocket_motor": "ɹoʇoW ʇǝʞɔoᴚ ǝʇıןƎ", + "block.gcyr.ev_heat_exchanger": "ɹ§III ɹǝbuɐɥɔxƎ ʇɐǝH pǝɔuɐʌpⱯϛ§", "block.gcyr.evaporation_plant": "ɹǝʍo⟘ uoıʇɐɹodɐʌƎ", + "block.gcyr.hv_heat_exchanger": "ɹ§II ɹǝbuɐɥɔxƎ ʇɐǝH pǝɔuɐʌpⱯ9§", + "block.gcyr.iv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH ǝʇıןƎ6§", "block.gcyr.iv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛI6§", "block.gcyr.launch_pad": "pɐԀ ɥɔunɐꞀ", + "block.gcyr.luv_heat_exchanger": "ɹ§II ɹǝbuɐɥɔxƎ ʇɐǝH ǝʇıןƎp§", "block.gcyr.luv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛnꞀp§", + "block.gcyr.lv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH ɔısɐᗺ", "block.gcyr.mars_regolith": "ɥʇıןobǝᴚ sɹɐW", "block.gcyr.martian_rock": "ʞɔoᴚ uɐıʇɹɐW", "block.gcyr.mercury_rock": "ʞɔoᴚ ʎɹnɔɹǝW", "block.gcyr.moon_sand": "puɐS uooW", "block.gcyr.moon_stone": "ǝuoʇS uooW", + "block.gcyr.mv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH pǝɔuɐʌpⱯq§", + "block.gcyr.opv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH ʎɹɐpuǝbǝꞀן§6§", "block.gcyr.opv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛdOן§6§", "block.gcyr.prb_underground_mushroom": "ɯooɹɥsnW punoɹbɹǝpu∩ qɹԀ", "block.gcyr.rocket_scanner": "ɹǝuuɐɔS ʇǝʞɔoᴚ", @@ -31,14 +38,20 @@ "block.gcyr.space_elevator_support": "ʇɹoddnS ɹoʇɐʌǝןƎ ǝɔɐdS", "block.gcyr.space_station_packager": "ɹǝbɐʞɔɐԀ uoıʇɐʇS ǝɔɐdS", "block.gcyr.stainless_evaporation_casing": "buısɐƆ uoıʇɐɹodɐʌƎ ssǝןuıɐʇS", + "block.gcyr.uev_heat_exchanger": "ɹ§II ɹǝbuɐɥɔxƎ ʇɐǝH ɔıdƎɐ§", "block.gcyr.uev_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛƎ∩ɐ§", + "block.gcyr.uhv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH ɔıdƎㄣ§", "block.gcyr.uhv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛH∩ㄣ§", + "block.gcyr.uiv_heat_exchanger": "ɹ§III ɹǝbuɐɥɔxƎ ʇɐǝH ɔıdƎᄅ§", "block.gcyr.uiv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛI∩ᄅ§", + "block.gcyr.uv_heat_exchanger": "ɹ§ ɹǝbuɐɥɔxƎ ʇɐǝH ǝʇɐɯıʇן∩Ɛ§", "block.gcyr.uv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO Λ∩Ɛ§", + "block.gcyr.uxv_heat_exchanger": "ɹ§ΛI ɹǝbuɐɥɔxƎ ʇɐǝH ɔıdƎǝ§", "block.gcyr.uxv_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO ΛX∩ǝ§", "block.gcyr.venus_rock": "ʞɔoᴚ snuǝΛ", "block.gcyr.venus_sand": "puɐS snuǝΛ", "block.gcyr.venusian_regolith": "ɥʇıןobǝᴚ uɐısnuǝΛ", + "block.gcyr.zpm_heat_exchanger": "ɹ§III ɹǝbuɐɥɔxƎ ʇɐǝH ǝʇıןƎɔ§", "block.gcyr.zpm_oxygen_spreader": "ɹǝpɐǝɹdS uǝbʎxO WԀZɔ§", "entity.gcyr.rocket": "ʇǝʞɔoᴚ", "gcyr.alpha_centauri": "ıɹnɐʇuǝƆ ɐɥdןⱯ", @@ -82,17 +95,25 @@ "level.gcyr.moon": "uooW", "level.gcyr.venus": "snuǝΛ", "level.overworld": "ɥʇɹɐƎ", + "material.gcyr.acidic_bromine_exhaust": "ʇsnɐɥxƎ ǝuıɯoɹᗺ ɔıpıɔⱯ", + "material.gcyr.acidic_bromine_solution": "uoıʇnןoS ǝuıɯoɹᗺ ɔıpıɔⱯ", "material.gcyr.aminophenol": "ןouǝɥdouıɯⱯ", "material.gcyr.bis_trichloromethyl_benzene": "ǝuǝzuǝq)ןʎɥʇǝɯoɹoןɥɔıɹʇ(sıᗺ", "material.gcyr.bisalloy_400": "00ㄣ-ʎoןןɐsıᗺ", - "material.gcyr.brine": "ǝuıɹᗺ", + "material.gcyr.brominated_chlorine_vapor": "ɹodɐΛ ǝuıɹoןɥƆ pǝʇɐuıɯoɹᗺ", "material.gcyr.chromic_acid": "pıɔⱯ ɔıɯoɹɥƆ", "material.gcyr.co_mn_br_catalyst": "ʇsʎןɐʇɐƆ ɹᗺ-uW-oƆ", "material.gcyr.cobalt_bromide": "ǝpıɯoɹᗺ ʇןɐqoƆ", + "material.gcyr.concentrated_bromine_solution": "uoıʇnןoS ǝuıɯoɹᗺ pǝʇɐɹʇuǝɔuoƆ", + "material.gcyr.debrominated_brine": "ǝuıɹᗺ pǝʇɐuıɯoɹqǝᗡ", "material.gcyr.dimethylformamide": "ǝpıɯɐɯɹoɟןʎɥʇǝɯıᗡ", "material.gcyr.durene": "ǝuǝɹnᗡ", "material.gcyr.fiberglass": "ssɐןbɹǝqıℲ", "material.gcyr.fluorite": "ǝʇıɹonןℲ", + "material.gcyr.hot_alkaline_debrominated_brine": "ǝuıɹᗺ pǝʇɐuıɯoɹqǝᗡ ǝuıןɐʞןⱯ ʇoH", + "material.gcyr.hot_brine": "ǝuıɹᗺ ʇoH", + "material.gcyr.hot_chlorinated_brominated_brine": "ǝuıɹᗺ pǝʇɐuıɯoɹᗺ pǝʇɐuıɹoןɥƆ ʇoH", + "material.gcyr.hot_debrominated_brine": "ǝuıɹᗺ pǝʇɐuıɯoɹqǝᗡ ʇoH", "material.gcyr.hydrobromic_acid": "pıɔⱯ ɔıɯoɹqoɹpʎH", "material.gcyr.iron_oxide": "ǝpıxO uoɹI", "material.gcyr.kapton_k": "ʞ uoʇdɐʞ", @@ -109,6 +130,7 @@ "material.gcyr.potassium_chloride": "ǝpıɹoןɥƆ ɯnıssɐʇoԀ", "material.gcyr.potassium_hydroxide": "ǝpıxoɹpʎH ɯnıssɐʇoԀ", "material.gcyr.pyrometillic_dianhydride": "ǝpıɹpʎɥuɐıᗡ ɔıןןıʇǝɯoɹʎԀ", + "material.gcyr.raw_brine": "ǝuıɹᗺ ʍɐᴚ", "material.gcyr.terephthaloyl_chloride": "ǝpıɹoןɥƆ ןʎoןɐɥʇɥdǝɹǝ⟘", "material.gcyr.therephthalic_acid": "pıɔⱯ ɔıןɐɥʇɥdǝɹǝɥ⟘", "material.gcyr.trinaquadalloy": "ʎoןןɐpɐnbɐuıɹ⟘", @@ -138,7 +160,7 @@ "menu.gcyr.temperature": "ǝɹnʇɐɹǝdɯǝ⟘", "menu.gcyr.type": "ǝdʎ⟘", "message.gcyr.invalid_id": "˙dıɥƆ ᗡI ʇǝuɐןԀ pıןɐʌ ɐ ǝʌɐɥ ʇsnɯ ʇǝʞɔoɹ ǝɥ⟘", - "message.gcyr.no_fuel": "˙ʎןןnɟ pǝןǝnɟ ǝq ʇsnɯ ʇǝʞɔoɹ ǝɥ⟘", + "message.gcyr.no_fuel": "˙ᗺɯ %s sǝɹınbǝɹ uoıʇɐuıʇsǝp 'ןǝnɟ ᗺɯ %s sɐH ˙ʎןןnɟ pǝןǝnɟ ǝq ʇsnɯ ʇǝʞɔoɹ ǝɥ⟘", "message.gcyr.notice_id_changed": "¡ʇǝbɹɐʇ ʍǝu ɐ buıʇʇǝs ǝɹoɟǝq ɐʇɐp ʍǝu ǝɥʇ ɥʇıʍ dıɥɔ uoıʇɐuıʇsǝp ןɐuosɹǝd ǝɥʇ ǝʇıɹʍǝɹ oʇ ɹǝqɯǝɯǝᴚ ˙pǝbuɐɥɔ ǝʌɐɥ ʇɥbıɯ dıɥɔ ᗡI uoıʇɐʇS ǝɔɐdS ɹnoʎ ɟo uoıʇɐuıʇsǝp ǝɥ⟘", "message.gcyr.rocket_not_good_enough": "˙ʇǝuɐןd pǝʇɔǝןǝs ǝɥʇ oʇ ןǝʌɐɹʇ oʇ sʇuǝuodɯoɔ %s ɹǝıʇ ɥbnouǝ ǝʌɐɥ ʇ,usǝop ʇǝʞɔoɹ ǝɥ⟘", "metaitem.gcyr.satellite_package.has_satellite": "uoıʇɐʇs ǝɔɐds ɹo ǝʇıןןǝʇɐs sɐH", diff --git a/src/generated/resources/assets/gcyr/lang/en_us.json b/src/generated/resources/assets/gcyr/lang/en_us.json index 45b8d7d1..fe88ab81 100644 --- a/src/generated/resources/assets/gcyr/lang/en_us.json +++ b/src/generated/resources/assets/gcyr/lang/en_us.json @@ -14,15 +14,22 @@ "block.gcyr.dyson_system_controller": "Dyson System Controller", "block.gcyr.elite_fuel_tank": "Elite Fuel Tank", "block.gcyr.elite_rocket_motor": "Elite Rocket Motor", + "block.gcyr.ev_heat_exchanger": "§5Advanced Heat Exchanger III§r", "block.gcyr.evaporation_plant": "Evaporation Tower", + "block.gcyr.hv_heat_exchanger": "§6Advanced Heat Exchanger II§r", + "block.gcyr.iv_heat_exchanger": "§9Elite Heat Exchanger §r", "block.gcyr.iv_oxygen_spreader": "§9IV Oxygen Spreader", "block.gcyr.launch_pad": "Launch Pad", + "block.gcyr.luv_heat_exchanger": "§dElite Heat Exchanger II§r", "block.gcyr.luv_oxygen_spreader": "§dLuV Oxygen Spreader", + "block.gcyr.lv_heat_exchanger": "Basic Heat Exchanger §r", "block.gcyr.mars_regolith": "Mars Regolith", "block.gcyr.martian_rock": "Martian Rock", "block.gcyr.mercury_rock": "Mercury Rock", "block.gcyr.moon_sand": "Moon Sand", "block.gcyr.moon_stone": "Moon Stone", + "block.gcyr.mv_heat_exchanger": "§bAdvanced Heat Exchanger §r", + "block.gcyr.opv_heat_exchanger": "§9§lLegendary Heat Exchanger §r", "block.gcyr.opv_oxygen_spreader": "§9§lOpV Oxygen Spreader", "block.gcyr.prb_underground_mushroom": "Prb Underground Mushroom", "block.gcyr.rocket_scanner": "Rocket Scanner", @@ -31,14 +38,20 @@ "block.gcyr.space_elevator_support": "Space Elevator Support", "block.gcyr.space_station_packager": "Space Station Packager", "block.gcyr.stainless_evaporation_casing": "Stainless Evaporation Casing", + "block.gcyr.uev_heat_exchanger": "§aEpic Heat Exchanger II§r", "block.gcyr.uev_oxygen_spreader": "§aUEV Oxygen Spreader", + "block.gcyr.uhv_heat_exchanger": "§4Epic Heat Exchanger §r", "block.gcyr.uhv_oxygen_spreader": "§4UHV Oxygen Spreader", + "block.gcyr.uiv_heat_exchanger": "§2Epic Heat Exchanger III§r", "block.gcyr.uiv_oxygen_spreader": "§2UIV Oxygen Spreader", + "block.gcyr.uv_heat_exchanger": "§3Ultimate Heat Exchanger §r", "block.gcyr.uv_oxygen_spreader": "§3UV Oxygen Spreader", + "block.gcyr.uxv_heat_exchanger": "§eEpic Heat Exchanger IV§r", "block.gcyr.uxv_oxygen_spreader": "§eUXV Oxygen Spreader", "block.gcyr.venus_rock": "Venus Rock", "block.gcyr.venus_sand": "Venus Sand", "block.gcyr.venusian_regolith": "Venusian Regolith", + "block.gcyr.zpm_heat_exchanger": "§cElite Heat Exchanger III§r", "block.gcyr.zpm_oxygen_spreader": "§cZPM Oxygen Spreader", "entity.gcyr.rocket": "Rocket", "gcyr.alpha_centauri": "Alpha Centauri", @@ -82,17 +95,25 @@ "level.gcyr.moon": "Moon", "level.gcyr.venus": "Venus", "level.overworld": "Earth", + "material.gcyr.acidic_bromine_exhaust": "Acidic Bromine Exhaust", + "material.gcyr.acidic_bromine_solution": "Acidic Bromine Solution", "material.gcyr.aminophenol": "Aminophenol", "material.gcyr.bis_trichloromethyl_benzene": "Bis(trichloromethyl)benzene", "material.gcyr.bisalloy_400": "Bisalloy-400", - "material.gcyr.brine": "Brine", + "material.gcyr.brominated_chlorine_vapor": "Brominated Chlorine Vapor", "material.gcyr.chromic_acid": "Chromic Acid", "material.gcyr.co_mn_br_catalyst": "Co-Mn-Br Catalyst", "material.gcyr.cobalt_bromide": "Cobalt Bromide", + "material.gcyr.concentrated_bromine_solution": "Concentrated Bromine Solution", + "material.gcyr.debrominated_brine": "Debrominated Brine", "material.gcyr.dimethylformamide": "Dimethylformamide", "material.gcyr.durene": "Durene", "material.gcyr.fiberglass": "Fiberglass", "material.gcyr.fluorite": "Fluorite", + "material.gcyr.hot_alkaline_debrominated_brine": "Hot Alkaline Debrominated Brine", + "material.gcyr.hot_brine": "Hot Brine", + "material.gcyr.hot_chlorinated_brominated_brine": "Hot Chlorinated Brominated Brine", + "material.gcyr.hot_debrominated_brine": "Hot Debrominated Brine", "material.gcyr.hydrobromic_acid": "Hydrobromic Acid", "material.gcyr.iron_oxide": "Iron Oxide", "material.gcyr.kapton_k": "Kapton K", @@ -109,6 +130,7 @@ "material.gcyr.potassium_chloride": "Potassium Chloride", "material.gcyr.potassium_hydroxide": "Potassium Hydroxide", "material.gcyr.pyrometillic_dianhydride": "Pyrometillic Dianhydride", + "material.gcyr.raw_brine": "Raw Brine", "material.gcyr.terephthaloyl_chloride": "Terephthaloyl Chloride", "material.gcyr.therephthalic_acid": "Therephthalic Acid", "material.gcyr.trinaquadalloy": "Trinaquadalloy", @@ -138,7 +160,7 @@ "menu.gcyr.temperature": "Temperature", "menu.gcyr.type": "Type", "message.gcyr.invalid_id": "The rocket must have a valid Planet ID Chip.", - "message.gcyr.no_fuel": "The rocket must be fueled fully.", + "message.gcyr.no_fuel": "The rocket must be fueled fully. Has %s mB fuel, destination requires %s mB.", "message.gcyr.notice_id_changed": "The destination of your Space Station ID chip might have changed. Remember to rewrite the personal destination chip with the new data before setting a new target!", "message.gcyr.rocket_not_good_enough": "The rocket doesn't have enough tier %s components to travel to the selected planet.", "metaitem.gcyr.satellite_package.has_satellite": "Has satellite or space station", From 1b9febe2efc076c94ea2e1e02a1859a61df1f569 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:26:57 +0300 Subject: [PATCH 10/17] changelog, version --- CHANGELOG.md | 12 ++++++++++-- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2385bdf3..eef3b88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ ### ADDITIONS: +- added a brine chain for getting bromine + - heat exchanger! + - 10 new materials! + - evaporation tower! ### FIXES: -- updated the mod to work with GTCEuM 1.2.0 - - new recipes coming soon:tm: +- fixed space suits not being fillable with oxygen +- fixed rockets not being fillable with fuel +- fixed fuel tank builder not building a fuel tank, but a rocket motor +- ### CHANGES: +- removed fluid loader, use a tank/drum instead for filling spacesuits +- updated ingame modlist logo \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 5772710a..2c1c292a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G -Xss4M mod_id=gcyr mod_name=Gregicality Rocketry -mod_version=0.1.5 +mod_version=0.1.6 maven_group=argent_matter loom.platform=forge \ No newline at end of file From 1c4849ecbca27ac53cd4c59982d0c91d67d7507a Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 14 Apr 2024 20:29:36 +0300 Subject: [PATCH 11/17] change rocket thrust text formatting to be more efficient --- CHANGELOG.md | 2 +- .../java/argent_matter/gcyr/common/entity/RocketEntity.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eef3b88a..49280533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ - fixed space suits not being fillable with oxygen - fixed rockets not being fillable with fuel - fixed fuel tank builder not building a fuel tank, but a rocket motor -- +- kevlar (para-aramid) is now obtainable thanks to brine chain ### CHANGES: - removed fluid loader, use a tank/drum instead for filling spacesuits diff --git a/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java b/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java index 1538c2b3..ace727de 100644 --- a/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java +++ b/src/main/java/argent_matter/gcyr/common/entity/RocketEntity.java @@ -899,8 +899,7 @@ public Component getDisplayThrust() { } else { style = ChatFormatting.GREEN; } - var thrustComponent = Component.literal(String.format("%.1f", thrust)).withStyle(style); - return Component.translatable("menu.gcyr.rocket.thrust", style + thrustComponent.getString() + ChatFormatting.RESET); + return Component.translatable("menu.gcyr.rocket.thrust", style + String.format("%.1f", thrust) + ChatFormatting.RESET); } public double getRocketSpeed() { From 3051cc6f13c4930dd5697742b2499356fbb13400 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Thu, 2 May 2024 20:53:57 +0300 Subject: [PATCH 12/17] fix bromine --- settings.gradle | 4 ++-- .../recipe/chemistry/ChemistryRecipes.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/settings.gradle b/settings.gradle index 61a00e41..aaf5ae80 100644 --- a/settings.gradle +++ b/settings.gradle @@ -36,8 +36,8 @@ dependencyResolutionManagement { def vineFlowerVersion = "1.+" def macheteVersion = "1.+" def configurationVersion = "2.2.0" - def gtCeuVersion = "1.2.0" - def ldLibVersion = "1.0.25.c" + def gtCeuVersion = "1.2.0.a" + def ldLibVersion = "1.0.25.e" def mixinExtrasVersion = "0.2.0" def mixinVersion = "0.8.6-SNAPSHOT" diff --git a/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java index 190a0002..1efc7708 100644 --- a/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java +++ b/src/main/java/argent_matter/gcyr/data/recipe/chemistry/ChemistryRecipes.java @@ -26,57 +26,57 @@ private static void bromineProcess(Consumer provider) { FLUID_HEATER_RECIPES.recipeBuilder(GCyR.id("brine_heating")) .inputFluids(RawBrine.getFluid(1000)) .outputFluids(HotBrine.getFluid(1000)) - .duration(12000).EUt(VA[HV]); + .duration(12000).EUt(VA[HV]).save(provider); // Main chain CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_chlorination")) .inputFluids(HotBrine.getFluid(1000)) .inputFluids(Chlorine.getFluid(1000)) .outputFluids(HotChlorinatedBrominatedBrine.getFluid(2000)) - .duration(100).EUt(VA[HV]); + .duration(100).EUt(VA[HV]).save(provider); CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_filtration")) .inputFluids(HotChlorinatedBrominatedBrine.getFluid(1000)) .inputFluids(Chlorine.getFluid(1000)) .inputFluids(Steam.getFluid(1000)) .outputFluids(HotAlkalineDebrominatedBrine.getFluid(1000)) .outputFluids(BrominatedChlorineVapor.getFluid(2000)) - .duration(300).EUt(VA[HV]); + .duration(300).EUt(VA[HV]).save(provider); HEAT_EXCHANGER_RECIPES.recipeBuilder(GCyR.id("brominated_chlorine_vapor_condensation")) .inputFluids(BrominatedChlorineVapor.getFluid(1000)) .inputFluids(Water.getFluid(1000)) .outputFluids(AcidicBromineSolution.getFluid(1000)) .outputFluids(Water.getFluid(1000)) - .duration(200).EUt(VA[HV]); + .duration(200).EUt(VA[HV]).save(provider); CHEMICAL_RECIPES.recipeBuilder(GCyR.id("bromine_vapor_concentration")) .inputFluids(AcidicBromineSolution.getFluid(1000)) .inputFluids(Steam.getFluid(1000)) .outputFluids(ConcentratedBromineSolution.getFluid(1000)) .outputFluids(AcidicBromineExhaust.getFluid(1000)) - .duration(100).EUt(VA[HV]); + .duration(100).EUt(VA[HV]).save(provider); DISTILLATION_RECIPES.recipeBuilder(GCyR.id("bromine_distillation")) .inputFluids(ConcentratedBromineSolution.getFluid(1000)) .outputFluids(Chlorine.getFluid(500)) .outputFluids(Bromine.getFluid(1000)) - .duration(500).EUt(VA[HV]); + .duration(500).EUt(VA[HV]).save(provider); // byproduct loop CHEMICAL_RECIPES.recipeBuilder(GCyR.id("brine_neutralization")) .inputFluids(HotAlkalineDebrominatedBrine.getFluid(3000)) .outputFluids(Chlorine.getFluid(1000)) .outputFluids(HotDebrominatedBrine.getFluid(2000)) - .duration(100).EUt(VA[HV]); + .duration(100).EUt(VA[HV]).save(provider); HEAT_EXCHANGER_RECIPES.recipeBuilder(GCyR.id("debrominated_brine_raw_brine_mixing")) .inputFluids(RawBrine.getFluid(1000)) .inputFluids(HotDebrominatedBrine.getFluid(1000)) .outputFluids(HotBrine.getFluid(1000)) .outputFluids(DebrominatedBrine.getFluid(1000)) - .duration(200).EUt(VA[HV]); + .duration(200).EUt(VA[HV]).save(provider); CHEMICAL_RECIPES.recipeBuilder(GCyR.id("acidic_bromine_exhaust_heating")) .inputFluids(AcidicBromineExhaust.getFluid(1000)) .inputFluids(HotBrine.getFluid(1000)) .outputFluids(HotChlorinatedBrominatedBrine.getFluid(1000)) .outputFluids(Steam.getFluid(3000)) - .duration(100).EUt(VA[HV]); + .duration(100).EUt(VA[HV]).save(provider); } } From 78b491cf8d1a32206959d9089024aa5c32e60c2a Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Fri, 3 May 2024 09:38:15 +0300 Subject: [PATCH 13/17] fix PlatformUtils#changeDimension not moving passengers to new dimension --- .../argent_matter/gcyr/util/PlatformUtils.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/argent_matter/gcyr/util/PlatformUtils.java b/src/main/java/argent_matter/gcyr/util/PlatformUtils.java index 4277f5c1..e1b5bcea 100644 --- a/src/main/java/argent_matter/gcyr/util/PlatformUtils.java +++ b/src/main/java/argent_matter/gcyr/util/PlatformUtils.java @@ -5,14 +5,26 @@ import net.minecraft.world.entity.Entity; import net.minecraftforge.common.util.ITeleporter; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Set; + public class PlatformUtils { - public static Entity changeDimension(Entity entity, ServerLevel newDim) { - return entity.changeDimension(newDim, new ITeleporter() { + public static Entity changeDimension(final Entity originalEntity, final ServerLevel newDim) { + List passengers = originalEntity.getPassengers(); + Entity dimensionChanged = originalEntity.changeDimension(newDim, new ITeleporter() { @Override public boolean playTeleportSound(ServerPlayer player, ServerLevel sourceWorld, ServerLevel destWorld) { return false; } }); + final Entity entity = Objects.requireNonNullElse(dimensionChanged, originalEntity); + passengers.forEach(passenger -> { + Entity newPassenger = PlatformUtils.changeDimension(passenger, newDim); + Objects.requireNonNullElse(newPassenger, passenger).startRiding(entity); + }); + return entity; } } From 3c0b58897960e15cf3e11ee17f348d1d9b0b3bcd Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Fri, 3 May 2024 09:38:23 +0300 Subject: [PATCH 14/17] update to GT 1.2.1 --- settings.gradle | 4 ++-- .../multiblock/electric/DysonSystemControllerMachine.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/settings.gradle b/settings.gradle index aaf5ae80..48c5ec4a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -36,8 +36,8 @@ dependencyResolutionManagement { def vineFlowerVersion = "1.+" def macheteVersion = "1.+" def configurationVersion = "2.2.0" - def gtCeuVersion = "1.2.0.a" - def ldLibVersion = "1.0.25.e" + def gtCeuVersion = "1.2.1" + def ldLibVersion = "1.0.25.f" def mixinExtrasVersion = "0.2.0" def mixinVersion = "0.8.6-SNAPSHOT" diff --git a/src/main/java/argent_matter/gcyr/common/machine/multiblock/electric/DysonSystemControllerMachine.java b/src/main/java/argent_matter/gcyr/common/machine/multiblock/electric/DysonSystemControllerMachine.java index 96222022..e6a6fbcf 100644 --- a/src/main/java/argent_matter/gcyr/common/machine/multiblock/electric/DysonSystemControllerMachine.java +++ b/src/main/java/argent_matter/gcyr/common/machine/multiblock/electric/DysonSystemControllerMachine.java @@ -69,8 +69,8 @@ public void onStructureFormed() { } @Override - public void onWorking() { - super.onWorking(); + public boolean onWorking() { + boolean value = super.onWorking(); Level level = this.getLevel(); // THE RECEIVER IS A DEADLY LAZER Direction frontFacing = this.getFrontFacing(); @@ -80,6 +80,7 @@ public void onWorking() { for (LivingEntity entity : level.getEntitiesOfClass(LivingEntity.class, AABB.ofSize(Vec3.atCenterOf(pos), 3, 512, 3), EntitySelector.LIVING_ENTITY_STILL_ALIVE)) { entity.hurt(GTDamageTypes.ELECTRIC.source(level), GCyRConfig.INSTANCE.machine.dysonControllerBeamDamage); } + return value; } @Override From dbce5746e1a84c8d2ff998294457adffcc2742d6 Mon Sep 17 00:00:00 2001 From: code-onigiri <140694827+code-onigiri@users.noreply.github.com> Date: Fri, 3 May 2024 15:38:49 +0900 Subject: [PATCH 15/17] add (#31) Co-authored-by: Shibata Masanari --- .../resources/assets/gcyr/lang/ja_jp.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/resources/assets/gcyr/lang/ja_jp.json b/src/main/resources/assets/gcyr/lang/ja_jp.json index 26664115..7b40d32b 100644 --- a/src/main/resources/assets/gcyr/lang/ja_jp.json +++ b/src/main/resources/assets/gcyr/lang/ja_jp.json @@ -16,8 +16,11 @@ "block.gcyr.elite_rocket_motor": "精鋭ロケットモーター", "block.gcyr.ev_fluid_loader": "§5EV 流体ローダー", "block.gcyr.hv_fluid_loader": "§6HV 流体ローダー", + "block.gcyr.hv_heat_exchanger": "§6発展型熱交換器 II§r", + "block.gcyr.iv_heat_exchanger": "§9精鋭型熱交換器 §r", "block.gcyr.iv_oxygen_spreader": "§1IV 酸素拡散機", "block.gcyr.launch_pad": "発射台", + "block.gcyr.luv_heat_exchanger": "§d精鋭型熱交換器 II§r", "block.gcyr.luv_oxygen_spreader": "§dLuV 酸素拡散機", "block.gcyr.lv_fluid_loader": "§7LV 流体ローダー", "block.gcyr.mars_regolith": "火星のレゴリス", @@ -26,6 +29,7 @@ "block.gcyr.moon_sand": "月の砂", "block.gcyr.moon_stone": "月の石", "block.gcyr.mv_fluid_loader": "§bMV 流体ローダー", + "block.gcyr.opv_heat_exchanger": "§9§l伝説の熱交換器 §r", "block.gcyr.opv_oxygen_spreader": "§9§lOpV 酸素拡散機", "block.gcyr.prb_underground_mushroom": "地下マッシュルーム", "block.gcyr.rocket_scanner": "ロケットスキャナー", @@ -33,14 +37,21 @@ "block.gcyr.space_elevator": "軌道エレベータ", "block.gcyr.space_elevator_support": "軌道エレベーターのサポート", "block.gcyr.space_station_packager": "宇宙ステーション梱包機", + "block.gcyr.stainless_evaporation_casing": "ステンレス製エバポレーション筐体", + "block.gcyr.uev_heat_exchanger": "§a史上最高の熱交換器 II§r", "block.gcyr.uev_oxygen_spreader": "§aUEV 酸素拡散機", + "block.gcyr.uhv_heat_exchanger": "§4史上最高の熱交換器 §r", "block.gcyr.uhv_oxygen_spreader": "§3UHV 酸素拡散機", + "block.gcyr.uiv_heat_exchanger": "§2史上最高の熱交換器 III§r", "block.gcyr.uiv_oxygen_spreader": "§2UIV 酸素拡散機", + "block.gcyr.uv_heat_exchanger": "§3究極型熱交換器 §r", "block.gcyr.uv_oxygen_spreader": "§4UV 酸素拡散機", + "block.gcyr.uxv_heat_exchanger": "§e史上最高の熱交換器 IV§r", "block.gcyr.uxv_oxygen_spreader": "§eUXV 酸素拡散機", "block.gcyr.venus_rock": "金星の岩", "block.gcyr.venus_sand": "金星の砂", "block.gcyr.venusian_regolith": "金星のレゴリス", + "block.gcyr.zpm_heat_exchanger": "§c精鋭型熱交換器 III§r", "block.gcyr.zpm_oxygen_spreader": "§cZPM 酸素拡散機", "entity.gcyr.rocket": "ロケット", "gcyr.alpha_centauri": "ケンタウルス座アルファ星", @@ -84,16 +95,25 @@ "level.gcyr.moon": "月", "level.gcyr.venus": "金星", "level.overworld": "地球", + "material.gcyr.acidic_bromine_exhaust": "酸性臭素排気", + "material.gcyr.acidic_bromine_solution": "酸性臭素溶液", "material.gcyr.aminophenol": "アミノフェノール", "material.gcyr.bis_trichloromethyl_benzene": "ヘキサクロロキシレン", "material.gcyr.bisalloy_400": "バイサロイ-400(Bisalloy-400)", + "material.gcyr.brominated_chlorine_vapor": "臭素化塩素蒸気", "material.gcyr.chromic_acid": "クロム酸", "material.gcyr.co_mn_br_catalyst": "Co-Mn-Br 触媒", "material.gcyr.cobalt_bromide": "臭化コバルト", + "material.gcyr.concentrated_bromine_solution": "濃縮臭素溶液", + "material.gcyr.debrominated_brine": "脱臭塩水", "material.gcyr.dimethylformamide": "ジメチルホルムアミド", "material.gcyr.durene": "デュレン", "material.gcyr.fiberglass": "ファイバーグラス", "material.gcyr.fluorite": "蛍石", + "material.gcyr.hot_alkaline_debrominated_brine": "熱いアルカリ脱臭塩水", + "material.gcyr.hot_brine": "熱い塩水", + "material.gcyr.hot_chlorinated_brominated_brine": "熱い塩素化臭素化塩水", + "material.gcyr.hot_debrominated_brine": "熱い脱臭塩水", "material.gcyr.hydrobromic_acid": "臭化水素酸", "material.gcyr.iron_oxide": "酸化鉄", "material.gcyr.kapton_k": "カプトンK", @@ -110,6 +130,7 @@ "material.gcyr.potassium_chloride": "塩化カリウム", "material.gcyr.potassium_hydroxide": "水酸化カリウム", "material.gcyr.pyrometillic_dianhydride": "ピロメリット酸無水物", + "material.gcyr.raw_brine": "生の塩水", "material.gcyr.terephthaloyl_chloride": "テレフタロイルクロリド", "material.gcyr.therephthalic_acid": "テレフタル酸", "material.gcyr.trinaquadalloy": "トリナクアダロイ", From e6583f7df79a99a4a1df316d46033575f30c111e Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Fri, 3 May 2024 09:40:19 +0300 Subject: [PATCH 16/17] changelog, version --- CHANGELOG.md | 14 ++++---------- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49280533..6a59bc57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,9 @@ ### ADDITIONS: -- added a brine chain for getting bromine - - heat exchanger! - - 10 new materials! - - evaporation tower! ### FIXES: -- fixed space suits not being fillable with oxygen -- fixed rockets not being fillable with fuel -- fixed fuel tank builder not building a fuel tank, but a rocket motor -- kevlar (para-aramid) is now obtainable thanks to brine chain +- fixed mod not working with latest GTM +- fixed bromine process +- fixed passengers not teleporting when you fall off a space station, locking the client in unknown state ### CHANGES: -- removed fluid loader, use a tank/drum instead for filling spacesuits -- updated ingame modlist logo \ No newline at end of file +- updated ja-jp translation \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 2c1c292a..c654041f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G -Xss4M mod_id=gcyr mod_name=Gregicality Rocketry -mod_version=0.1.6 +mod_version=0.1.7 maven_group=argent_matter loom.platform=forge \ No newline at end of file From 379c34f148b48d493011b067a6362e396906ef68 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 4 May 2024 11:52:49 +0300 Subject: [PATCH 17/17] fix crash when using modified non-default space suit, release patch --- CHANGELOG.md | 7 ++----- gradle.properties | 2 +- .../gcyr/common/entity/data/EntityTemperatureSystem.java | 2 +- .../gcyr/common/item/armor/SpaceSuitArmorItem.java | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a59bc57..ada80d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,6 @@ ### ADDITIONS: ### FIXES: -- fixed mod not working with latest GTM -- fixed bromine process -- fixed passengers not teleporting when you fall off a space station, locking the client in unknown state +- fixed space crashing when using upgraded non-spacesuit armor -### CHANGES: -- updated ja-jp translation \ No newline at end of file +### CHANGES: \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c654041f..df6d1c86 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx4G -Xss4M mod_id=gcyr mod_name=Gregicality Rocketry -mod_version=0.1.7 +mod_version=0.1.7-a maven_group=argent_matter loom.platform=forge \ No newline at end of file diff --git a/src/main/java/argent_matter/gcyr/common/entity/data/EntityTemperatureSystem.java b/src/main/java/argent_matter/gcyr/common/entity/data/EntityTemperatureSystem.java index 0f3e2c80..161e7be9 100644 --- a/src/main/java/argent_matter/gcyr/common/entity/data/EntityTemperatureSystem.java +++ b/src/main/java/argent_matter/gcyr/common/entity/data/EntityTemperatureSystem.java @@ -47,7 +47,7 @@ public static void temperatureTick(LivingEntity entity, ServerLevel level) { UniformInt temperatureResistance = TEMP_RANGE; if (SpaceSuitArmorItem.hasFullSet(entity)) { - temperatureResistance = ((SpaceSuitArmorItem) entity.getArmorSlots().iterator().next().getItem()).getTemperatureThreshold(); + temperatureResistance = SpaceSuitArmorItem.getTemperatureThreshold(); } if (temperature > temperatureResistance.getMaxValue() && !entity.fireImmune() && !entity.hasEffect(MobEffects.FIRE_RESISTANCE) && !EntityTemperatureSystem.armourIsHeatResistant(entity)) { diff --git a/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java b/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java index a8e2bb46..cd555670 100644 --- a/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java +++ b/src/main/java/argent_matter/gcyr/common/item/armor/SpaceSuitArmorItem.java @@ -128,7 +128,7 @@ public static void consumeSpaceSuitOxygen(LivingEntity entity, int amount) { } - public UniformInt getTemperatureThreshold() { + public static UniformInt getTemperatureThreshold() { return UniformInt.of(60, 363); }