Skip to content

Commit

Permalink
good god - we gonna rock down to electric avenue
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Feb 21, 2025
1 parent d20c190 commit c3e532a
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 13 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Dense coils no longer have recipes either for the most part, all coils with no recipes can be recycled back into dense wires
* Natural gas can now be processed in a pyrolysis oven, 12k of gas yields 8k hydrogen and one graphite ingot
* Saturnite now has an alternate recipe, adding one pile of borax for doubled output
* All mass storage units (except wood) are now substantially cheaper

## Fixed
* Fixed an issue where `/ntmreload` would load fluids after recipes, meaning that recipes using newly added fluids would not work correctly, as the fluids don't exist by the time the recipe is loaded
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/api/hbm/energymk2/PowerNetMK2.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void transferPower() {

toTransfer -= energyUsed;
}

this.energyTracker += energyUsed;
long leftover = energyUsed;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ public static void AddCraftingRec() {
// Note: voids the last few slots when placed, because a safe's inventory is smaller than a crate's one
GameRegistry.addRecipe(new ContainerUpgradeCraftingHandler(new ItemStack(ModBlocks.safe, 1), new Object[] { "LAL", "ACA", "LAL", 'L', PB.plate(), 'A', ALLOY.plate(), 'C', ModBlocks.crate_steel }));
// Note: doesn't preserve storage because a crate's contents are different items, but a mass storage's is just one
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 0), new Object[] { "ICI", "CLC", "ICI", 'I', TI.ingot(), 'C', ModBlocks.crate_steel, 'L', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
GameRegistry.addRecipe(new ContainerUpgradeCraftingHandler(new ItemStack(ModBlocks.mass_storage, 1, 1), new Object[] { "PCP", "PMP", "PPP", 'P', DESH.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'M', new ItemStack(ModBlocks.mass_storage, 1, 0) }));
GameRegistry.addRecipe(new ContainerUpgradeCraftingHandler(new ItemStack(ModBlocks.mass_storage, 1, 2), new Object[] { "PCP", "PMP", "PPP", 'P', ANY_RESISTANTALLOY.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', new ItemStack(ModBlocks.mass_storage, 1, 1) }));
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 0), new Object[] { " L ", "ICI", " I ", 'I', TI.ingot(), 'C', ModBlocks.crate_steel, 'L', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
GameRegistry.addRecipe(new ContainerUpgradeCraftingHandler(new ItemStack(ModBlocks.mass_storage, 1, 1), new Object[] { " C ", "PMP", " P ", 'P', DESH.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'M', new ItemStack(ModBlocks.mass_storage, 1, 0) }));
GameRegistry.addRecipe(new ContainerUpgradeCraftingHandler(new ItemStack(ModBlocks.mass_storage, 1, 2), new Object[] { " C ", "PMP", " P ", 'P', ANY_RESISTANTALLOY.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', new ItemStack(ModBlocks.mass_storage, 1, 1) }));
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 3), new Object[] { "PPP", "PIP", "PPP", 'P', KEY_PLANKS, 'I', IRON.plate() });

addRecipeAuto(new ItemStack(ModBlocks.machine_autocrafter, 1), new Object[] { "SCS", "MWM", "SCS", 'S', STEEL.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'M', ModItems.motor, 'W', Blocks.crafting_table });
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/hbm/qmaw/IManualElement.java

This file was deleted.

12 changes: 12 additions & 0 deletions src/main/java/com/hbm/qmaw/ManualElement.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.hbm.qmaw;

public abstract class ManualElement {

public int x;
public int y;

public abstract int getWidth();
public abstract int getHeight();
public abstract void render(boolean isMouseOver, int mouseX, int mouseY);
public abstract void onClick();
}
44 changes: 44 additions & 0 deletions src/main/java/com/hbm/qmaw/components/QComponentText.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.hbm.qmaw.components;

import com.hbm.qmaw.ManualElement;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;

public class QComponentText extends ManualElement {

protected String text;
protected FontRenderer font;
protected int color = 0xFFFFFF;

public QComponentText(String text) {
this(text, Minecraft.getMinecraft().fontRenderer);
}

public QComponentText(String text, FontRenderer font) {
this.text = text;
this.font = font;
}

public QComponentText setColor(int color) {
this.color = color;
return this;
}

@Override
public int getWidth() {
return font.getStringWidth(text);
}

@Override
public int getHeight() {
return font.FONT_HEIGHT;
}

@Override
public void render(boolean isMouseOver, int mouseX, int mouseY) {
font.drawString(text, x, y, color);
}

@Override public void onClick() { }
}

0 comments on commit c3e532a

Please sign in to comment.