Skip to content

Commit

Permalink
Light rearrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Jul 19, 2024
1 parent 8df8aac commit 51e1760
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/main/java/gripe/_90/megacells/definition/MEGAConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ public final class MEGAConfig {
public static final MEGAConfig CONFIG;
public static final ModConfigSpec SPEC;

static {
var configured = new ModConfigSpec.Builder().configure(MEGAConfig::new);
CONFIG = configured.getKey();
SPEC = configured.getValue();
}

private final ModConfigSpec.BooleanValue spentNuclearWasteAllowed;

public MEGAConfig(ModConfigSpec.Builder builder) {
Expand All @@ -18,10 +24,4 @@ public MEGAConfig(ModConfigSpec.Builder builder) {
public boolean isSpentWasteAllowed() {
return spentNuclearWasteAllowed.get();
}

static {
var configured = new ModConfigSpec.Builder().configure(MEGAConfig::new);
CONFIG = configured.getKey();
SPEC = configured.getValue();
}
}
4 changes: 2 additions & 2 deletions src/main/java/gripe/_90/megacells/definition/MEGAMenus.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public final class MEGAMenus {
public static final MenuType<MEGAPatternProviderMenu> MEGA_PATTERN_PROVIDER =
create("mega_pattern_provider", MEGAPatternProviderMenu::new, PatternProviderLogicHost.class);

private static <C extends AEBaseMenu, I> MenuType<C> create(
String id, MenuTypeBuilder.MenuFactory<C, I> factory, Class<I> host) {
private static <M extends AEBaseMenu, H> MenuType<M> create(
String id, MenuTypeBuilder.MenuFactory<M, H> factory, Class<H> host) {
var menu = MenuTypeBuilder.create(factory, host).build(MEGACells.makeId(id));
DR.register(id, () -> menu);
return menu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ private boolean overrideRecipe(CraftingRecipe recipe, RegistryAccess access) {
var compressed = !isDecompressionRecipe(recipe, access);
var output = recipe.getResultItem(access);

var smaller = compressed ? input.getItem() : output.getItem();
var larger = compressed ? output.getItem() : input.getItem();
var smaller = (compressed ? input : output).getItem();
var larger = (compressed ? output : input).getItem();
var factor = (byte) (compressed ? recipe.getIngredients().size() : output.getCount());

overrides.add(new Override(smaller, larger, factor));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static Set<Item> getLavaTransformableItems(Level level) {
lavaCache.add(stack.getItem());
}

// Don't break here unlike AE2's TransformLogic, otherwise non-processed items will burn up
// Don't break here unlike AE2's TransformLogic, otherwise unprocessed items will burn up
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "../schema.json",
"includes": ["../common/common.json", "../common/player_inventory.json"],
"background": {
"texture": "guis/megacells/mega_interface.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "../schema.json",
"includes": ["../common/common.json", "../common/player_inventory.json"],
"background": {
"texture": "guis/megacells/mega_pattern_provider.png",
Expand Down

0 comments on commit 51e1760

Please sign in to comment.