Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Roelymole committed Dec 16, 2024
2 parents f4dbd7d + ea47050 commit 67b5207
Show file tree
Hide file tree
Showing 7 changed files with 652 additions and 174 deletions.
36 changes: 18 additions & 18 deletions src/main/generated/assets/galacticraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@
"biome.galacticraft.venus_valley": "Venus Valley",
"block.galacticraft.advanced_solar_panel": "Advanced Solar Panel",
"block.galacticraft.advanced_solar_panel.description": "Advanced Solar Panels collect energy from the sun, and store it for further use. Adjusts position to face the sun, to collect more electricity.",
"block.galacticraft.air_lock_controller": "Air Lock Controller",
"block.galacticraft.air_lock_frame": "Air Lock Frame",
"block.galacticraft.air_lock_seal": "Air Lock Seal",
"block.galacticraft.raw_meteoric_iron_block": "Block of Raw Meteoric Iron",
"block.galacticraft.raw_desh_block": "Block of Raw Desh",
"block.galacticraft.raw_aluminum_block": "Block of Raw Aluminum",
"block.galacticraft.raw_tin_block": "Block of Raw Tin",
"block.galacticraft.raw_titanium_block": "Block of Raw Titanium",
"block.galacticraft.raw_lead_block": "Block of Raw Lead",
"block.galacticraft.air_lock_controller": "Airlock Controller",
"block.galacticraft.air_lock_frame": "Airlock Frame",
"block.galacticraft.air_lock_seal": "Airlock Seal",
"block.galacticraft.aluminum_block": "Block of Aluminum",
"block.galacticraft.aluminum_decoration": "Aluminum Decoration",
"block.galacticraft.aluminum_decoration_slab": "Aluminum Decoration Slab",
Expand Down Expand Up @@ -136,7 +130,6 @@
"block.galacticraft.glass_fluid_pipe": "Glass Fluid Pipe",
"block.galacticraft.glowstone_lantern": "Glowstone Lantern",
"block.galacticraft.glowstone_torch": "Glowstone Torch",
"block.galacticraft.iron_grating": "Iron Grating",
"block.galacticraft.gray_candle_moon_cheese_wheel": "Moon Cheese Wheel with Gray Candle",
"block.galacticraft.green_candle_moon_cheese_wheel": "Moon Cheese Wheel with Green Candle",
"block.galacticraft.hard_venus_rock": "Hard Venus Rock",
Expand All @@ -146,6 +139,7 @@
"block.galacticraft.iron_decoration_slab": "Iron Decoration Slab",
"block.galacticraft.iron_decoration_stairs": "Iron Decoration Stairs",
"block.galacticraft.iron_decoration_wall": "Iron Decoration Wall",
"block.galacticraft.iron_grating": "Iron Grating",
"block.galacticraft.lead_block": "Block of Lead",
"block.galacticraft.light_blue_candle_moon_cheese_wheel": "Moon Cheese Wheel with Light Blue Candle",
"block.galacticraft.light_gray_candle_moon_cheese_wheel": "Moon Cheese Wheel with Light Gray Candle",
Expand Down Expand Up @@ -223,6 +217,12 @@
"block.galacticraft.polished_moon_rock_wall": "Polished Moon Rock Wall",
"block.galacticraft.pumice": "Pumice",
"block.galacticraft.purple_candle_moon_cheese_wheel": "Moon Cheese Wheel with Purple Candle",
"block.galacticraft.raw_aluminum_block": "Block of Raw Aluminum",
"block.galacticraft.raw_desh_block": "Block of Raw Desh",
"block.galacticraft.raw_lead_block": "Block of Raw Lead",
"block.galacticraft.raw_meteoric_iron_block": "Block of Raw Meteoric Iron",
"block.galacticraft.raw_tin_block": "Block of Raw Tin",
"block.galacticraft.raw_titanium_block": "Block of Raw Titanium",
"block.galacticraft.red_candle_moon_cheese_wheel": "Moon Cheese Wheel with Red Candle",
"block.galacticraft.refinery": "Refinery",
"block.galacticraft.refinery.description": "Refinery will take an input of oil and energy, and output fuel used for rockets and vehicles.",
Expand Down Expand Up @@ -462,7 +462,6 @@
"item.galacticraft.raw_desh": "Raw Desh",
"item.galacticraft.raw_lead": "Raw Lead",
"item.galacticraft.raw_meteoric_iron": "Raw Meteoric Iron",
"item.galacticraft.silicon": "Silicon",
"item.galacticraft.raw_tin": "Raw Tin",
"item.galacticraft.raw_titanium": "Raw Titanium",
"item.galacticraft.red_parachute": "Red Parachute",
Expand All @@ -472,6 +471,7 @@
"item.galacticraft.sensor_glasses": "Sensor Glasses",
"item.galacticraft.sensor_lens": "Sensor Lens",
"item.galacticraft.shield_controller": "Shield Controller",
"item.galacticraft.silicon": "Silicon",
"item.galacticraft.single_solar_module": "Single Solar Module",
"item.galacticraft.small_oxygen_tank": "Small Oxygen Tank",
"item.galacticraft.solar_array_wafer": "Solar Array Wafer",
Expand Down Expand Up @@ -561,7 +561,7 @@
"ui.galacticraft.booster": "Booster",
"ui.galacticraft.bubble_distributor.current_size": "Current Size: %s",
"ui.galacticraft.bubble_distributor.not_visible": "Bubble Not Visible",
"ui.galacticraft.bubble_distributor.size": "Target Size:",
"ui.galacticraft.bubble_distributor.size": "Target Size: ",
"ui.galacticraft.bubble_distributor.visible": "Bubble Visible",
"ui.galacticraft.celestialselection.apply": "Apply",
"ui.galacticraft.celestialselection.assign_name": "Assign Name",
Expand Down Expand Up @@ -612,7 +612,7 @@
"ui.galacticraft.machine.status": "Status: ",
"ui.galacticraft.player_inv_screen.oxygen_tank_level": "Oxygen Tank %s: %s/%s",
"ui.galacticraft.prepare_for_entry": "Prepare for entry!",
"ui.galacticraft.rocket.fuel": "Fuel:",
"ui.galacticraft.rocket.fuel": "Fuel: ",
"ui.galacticraft.rocket.full": "% full",
"ui.galacticraft.rocket.no_fuel": "No fuel",
"ui.galacticraft.satellite": "Satellite",
Expand Down Expand Up @@ -655,16 +655,16 @@
"ui.galacticraft.status.missing_oxygen_tank": "Missing Oxygen Tank",
"ui.galacticraft.status.night": "Night",
"ui.galacticraft.status.no_fuel": "No Fuel",
"ui.galacticraft.status.no_rocket": "No rocket",
"ui.galacticraft.status.not_enough_fuel": "Not enough fuel",
"ui.galacticraft.status.no_rocket": "No Rocket",
"ui.galacticraft.status.not_enough_fuel": "Not Enough Fuel",
"ui.galacticraft.status.not_enough_oxygen": "Not Enough Oxygen",
"ui.galacticraft.status.oxygen_tank_full": "Oxygen Tank Full",
"ui.galacticraft.status.partially_blocked": "Partially Blocked",
"ui.galacticraft.status.rain": "Rain",
"ui.galacticraft.status.rocket_is_full": "Rocket is full",
"ui.galacticraft.status.rocket_is_full": "Rocket Is Full",
"ui.galacticraft.status.sealed": "Sealed",
"ui.galacticraft.status.warming_up": "Warming up",
"ui.galacticraft.travelling_to": "Travelling to: ",
"ui.galacticraft.status.warming_up": "Warming Up",
"ui.galacticraft.travelling_to": "Traveling to: ",
"ui.galacticraft.upgrade": "Upgrade",
"ui.lander.velocity": "Entry Velocity",
"ui.lander.velocityu": "m/s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void renderBg(GuiGraphics graphics, float partialTicks, int mouseX, in

@Override
protected void renderLabels(GuiGraphics graphics, int i, int j) {
graphics.drawString(this.font, Component.literal(Minecraft.getInstance().player.getGameProfile().getName() + "'s Air Lock Controller"), this.titleLabelX, this.titleLabelY, 4210752, false);
graphics.drawString(this.font, Component.literal(Minecraft.getInstance().player.getGameProfile().getName() + "'s Airlock Controller"), this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class RocketWorkbenchScreen extends AbstractContainerScreen<RocketWorkben
private static final int HEIGHT_EXT_U = BASE_UI_WIDTH;

private static final int ROCKET_PREVIEW_X = 209;
private static final int ROCKET_PREVIEW_Y = 106;
private static final int ROCKET_PREVIEW_Y = 100;

private static final int RECIPES_PER_PAGE = 35;

Expand Down Expand Up @@ -183,7 +183,7 @@ protected void renderBg(GuiGraphics guiGraphics, float delta, int mouseX, int mo
drawSelection(guiGraphics, mouseX, mouseY, delta);

try (Graphics graphics = Graphics.managed(guiGraphics, this.font)) {
try (Graphics.Texture texture = graphics.texture(Constant.ScreenTexture.ROCKET_WORKBENCH_SCREEN, 512, 512)) {
try (Graphics.Texture texture = graphics.texture(Constant.ScreenTexture.ROCKET_WORKBENCH_SCREEN, 512, 256)) {
texture.blit(this.leftPos, this.topPos + this.menu.additionalHeight + CAP_HEIGHT, 0, 0, BASE_UI_WIDTH, BASE_UI_HEIGHT);

if (this.menu.additionalHeight > 0) {
Expand All @@ -200,7 +200,7 @@ protected void renderBg(GuiGraphics guiGraphics, float delta, int mouseX, int mo
}
}

renderEntityInInventory(guiGraphics, this.leftPos + ROCKET_PREVIEW_X, this.topPos + ROCKET_PREVIEW_Y, 15, SmithingScreen.ARMOR_STAND_ANGLE, null, this.entity);
renderEntityInInventory(guiGraphics, this.leftPos + ROCKET_PREVIEW_X, this.topPos + ROCKET_PREVIEW_Y + this.menu.additionalHeight, 15, SmithingScreen.ARMOR_STAND_ANGLE, null, this.entity);
}

@Override
Expand Down Expand Up @@ -285,7 +285,7 @@ private void drawSelection(GuiGraphics guiGraphics, int mouseX, int mouseY, floa

int size = this.recipes != null ? this.recipes.size() : 0;
try (Graphics graphics = Graphics.managed(guiGraphics, this.font)) {
try (Graphics.Texture texture = graphics.texture(Constant.ScreenTexture.ROCKET_WORKBENCH_SCREEN, 512, 512)) {
try (Graphics.Texture texture = graphics.texture(Constant.ScreenTexture.ROCKET_SELECTION, 256, 256)) {
texture.blit(0, 0, 0, 0, SELECTION_SCREEN_WIDTH, SELECTION_SCREEN_HEIGHT);

{
Expand Down Expand Up @@ -331,10 +331,12 @@ private void drawSelection(GuiGraphics guiGraphics, int mouseX, int mouseY, floa
int y = 8;
for (Tab tab : Tab.values()) {
if (tab == Tab.COLOR) {
continue;
// graphics.renderFakeItem(new ItemStack(Items.RED_DYE), -TAB_WIDTH + TAB_ICON_OFFSET, y);
continue;
} else {
guiGraphics.pose().translate(0, 0, 100);
RocketPartRendererRegistry.INSTANCE.getRenderer(tab.part).renderGUI(guiGraphics, -TAB_WIDTH + TAB_ICON_OFFSET, y, mouseX, mouseY, delta);
guiGraphics.pose().translate(0, 0, -100);
}
y += TAB_SPACING + TAB_HEIGHT;
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/dev/galacticraft/mod/client/util/Graphics.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ private Texture(int texture, int textureWidth, int textureHeight) {
Graphics.this.renderers.add(this);
}

public void blit(int x, int y, int width, int height, int z, int u, int v) {
this.blit(x, y, width, height, z, u, v, width, height);
public void blit(int x, int y, int z, int u, int v, int width, int height) {
this.blit(x, y, z, width, height, u, v, width, height);
}

public void blit(int x, int y, int width, int height, int z, int u, int v, int uWidth, int vHeight) {
public void blit(int x, int y, int z, int width, int height, int u, int v, int uWidth, int vHeight) {
this.blitRaw(x, y, x + width, y + height, z, (float) u / this.textureWidth, (float) v / this.textureHeight, (float) (u + uWidth) / this.textureWidth, (float) (v + vHeight) / this.textureHeight);
}

public void blit(float x, float y, float width, float height, float z, float u, float v, float uWidth, float vHeight) {
public void blit(float x, float y, float z, float width, float height, float u, float v, float uWidth, float vHeight) {
this.blitRaw(x, y, x + width, y + height, z, u / this.textureWidth, v / this.textureHeight, (u + uWidth) / this.textureWidth, (v + vHeight) / this.textureHeight);
}

Expand All @@ -337,20 +337,20 @@ public void blitRaw(float x1, float y1, float x2, float y2, float z, float u1, f
.addVertex(matrix, x2, y1, z).setUv(u2, v1);
}

public void blit(int x, int y, int width, int height, int u, int v) {
this.blit(x, y, width, height, 0, u, v, width, height);
public void blit(int x, int y, int u, int v, int width, int height) {
this.blit(x, y, 0, width, height, u, v, width, height);
}

public void blit(int x, int y, int width, int height, int u, int v, int uWidth, int vHeight) {
this.blit(x, y, width, height, 0, u, v, uWidth, vHeight);
this.blit(x, y, 0, width, height, u, v, uWidth, vHeight);
}

public void blit(float x, float y, float width, float height, float u, float v) {
this.blit(x, y, width, height, 0.0f, u, v, width, height);
public void blit(float x, float y, float u, float v, float width, float height) {
this.blit(x, y, 0.0f, width, height, u, v, width, height);
}

public void blit(float x, float y, float width, float height, float u, float v, float uWidth, float vHeight) {
this.blit(x, y, width, height, 0.0f, u, v, uWidth, vHeight);
this.blit(x, y, 0.0f, width, height, u, v, uWidth, vHeight);
}

private void ensureOpen() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public void unsealAirLock()

@Override
public Component getDisplayName() {
return Component.literal(ownerName + "'s Air Lock Controller");
return Component.literal(ownerName + "'s Airlock Controller");
}

@Override
Expand Down
Loading

0 comments on commit 67b5207

Please sign in to comment.