diff --git a/build.gradle b/build.gradle index dd5a97c..46203e4 100644 --- a/build.gradle +++ b/build.gradle @@ -10,13 +10,12 @@ plugins { } version = "${mc_version}-${mod_version}-neoforge" -group = 'com.aetherteam.nitrogen' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +group = 'com.aetherteam.nitrogen' base { archivesName = mod_id } -// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) apply plugin: 'org.moddingx.modgradle.sourcejar' @@ -24,42 +23,17 @@ apply plugin: 'org.moddingx.modgradle.sourcejar' minecraft { mappings channel: 'sugarcane', version: project.mappings - // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. - // In most cases, it is not necessary to enable. - //enableEclipsePrepareRuns = true - //enableIdeaPrepareRuns = true - - // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. - // It is REQUIRED to be set to true for this template to function. - // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html copyIdeResources = true - // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. - // The folder name can be set on a run configuration using the "folderName" property. - // By default, the folder name of a run configuration is the name of the Gradle project containing it. - //generateRunFolders = true - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') runs { - // applies to all the run configs below configureEach { workingDirectory project.file('run') - // Applies a JVM property which can be referenced in your code to check if you are running in IDE/Gradle. property "${mod_id}.iside", 'true' - // Recommended logging data for a userdev environment - // The markers can be added/remove as needed separated by commas. - // "SCAN": For mods scan. - // "REGISTRIES": For firing of registry events. - // "REGISTRYDUMP": For getting the contents of all registries. - //property 'forge.logging.markers', 'REGISTRIES' - - // Recommended logging level for the console - // You can set various levels here. - // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels - property 'forge.logging.console.level', 'info' // info is the default for production + property 'forge.logging.console.level', 'info' mods { "${mod_id}" { @@ -69,7 +43,6 @@ minecraft { } client { - // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } @@ -79,9 +52,6 @@ minecraft { args '--nogui' } - // This run config launches GameTestServer and runs all registered gametests, then exits. - // By default, the server will crash when no gametests are provided. - // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } @@ -132,7 +102,6 @@ tasks.named('jar', Jar).configure { ]) } - // This is the preferred method to reobfuscate your jar file finalizedBy 'reobfJar' } diff --git a/gradle.properties b/gradle.properties index 7314a7c..3cca5b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,6 @@ mappings=2023.08.20-1.20.1 # Dependencies jei_version=15.2.0.27 - rei_version=12.0.684 cloth_config_version=11.1.118 architectury_version=9.1.12 diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/FluidStateRenderer.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/FluidStateRenderer.java index cf83d10..a8e0c6b 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/FluidStateRenderer.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/FluidStateRenderer.java @@ -24,7 +24,6 @@ import net.minecraft.world.level.material.FluidState; public class FluidStateRenderer implements EntryRenderer { - @Override public void render(EntryStack entry, GuiGraphics guiGraphics, Rectangle bounds, int mouseX, int mouseY, float delta) { PoseStack poseStack = guiGraphics.pose(); diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/REIClientUtils.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/REIClientUtils.java index c5f8298..72aa8ae 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/REIClientUtils.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/REIClientUtils.java @@ -12,12 +12,11 @@ import java.util.function.Consumer; public class REIClientUtils { - - public static Collection> setupRendering(Collection> entryStacks, BlockPropertyPair pair, @Nullable Consumer processor){ + public static Collection> setupRendering(Collection> entryStacks, BlockPropertyPair pair, @Nullable Consumer processor) { return setupRendering(entryStacks, new BlockPropertyPair[]{pair}, processor); } - public static Collection> setupRendering(Collection> entryStacks, BlockPropertyPair[] pairs, @Nullable Consumer processor){ + public static Collection> setupRendering(Collection> entryStacks, BlockPropertyPair[] pairs, @Nullable Consumer processor) { for (EntryStack entry : entryStacks) { if(processor != null) { ClientEntryStacks.setTooltipProcessor(entry, (entryStack, tooltip) -> { @@ -34,7 +33,7 @@ public static Collection> setupRendering(Colle return entryStacks; } - public static Collection> setupRendering(Collection> entryStacks, Consumer processor){ + public static Collection> setupRendering(Collection> entryStacks, Consumer processor) { for (EntryStack entry : entryStacks) { ClientEntryStacks.setTooltipProcessor(entry, (entryStack, tooltip) -> { processor.accept(tooltip); diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/REIUtils.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/REIUtils.java index e89f6fe..c81cb16 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/REIUtils.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/REIUtils.java @@ -20,7 +20,6 @@ import java.util.Map; public class REIUtils { - public static List toIngredientList(BlockPropertyPair ...pairs) { if (pairs == null) return List.of(); // Sets up input slots. diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/AbstractRecipeCategory.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/AbstractRecipeCategory.java index 64f02a0..e409703 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/AbstractRecipeCategory.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/AbstractRecipeCategory.java @@ -4,7 +4,6 @@ import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.Renderer; import me.shedaniel.rei.api.client.gui.widgets.Widget; -import me.shedaniel.rei.api.client.gui.widgets.WidgetWithBounds; import me.shedaniel.rei.api.client.gui.widgets.Widgets; import me.shedaniel.rei.api.client.registry.display.DisplayCategory; import me.shedaniel.rei.api.common.category.CategoryIdentifier; @@ -14,7 +13,6 @@ import java.util.List; public abstract class AbstractRecipeCategory implements DisplayCategory { - protected final String id; protected final CategoryIdentifier uid; @@ -52,15 +50,15 @@ public List setupDisplay(T display, Rectangle bounds) { @Override public int getDisplayHeight() { - return height + (padding * 2); + return this.height + (this.padding * 2); } @Override public int getDisplayWidth(T display) { - return width + (padding * 2); + return this.width + (this.padding * 2); } - protected Point startingOffset(Rectangle bounds){ - return new Point(bounds.x + padding, bounds.y + padding); + protected Point startingOffset(Rectangle bounds) { + return new Point(bounds.x + this.padding, bounds.y + this.padding); } } diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/block/AbstractBlockStateRecipeCategory.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/block/AbstractBlockStateRecipeCategory.java index fa85499..ef82734 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/block/AbstractBlockStateRecipeCategory.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/block/AbstractBlockStateRecipeCategory.java @@ -16,7 +16,6 @@ import java.util.List; public abstract class AbstractBlockStateRecipeCategory extends AbstractRecipeCategory> { - public AbstractBlockStateRecipeCategory(String id, CategoryIdentifier> uid, int width, int height, Renderer icon) { super(id, uid, width, height, icon); } @@ -51,5 +50,5 @@ public List setupDisplay(BlockStateRecipeDisplay display, Rectangle b return widgets; } - protected void populateTooltip(BlockStateRecipeDisplay display, Tooltip tooltip) {} + protected void populateTooltip(BlockStateRecipeDisplay display, Tooltip tooltip) { } } diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/fuel/AbstractFuelCategory.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/fuel/AbstractFuelCategory.java index 3c25639..4092dfd 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/fuel/AbstractFuelCategory.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/categories/fuel/AbstractFuelCategory.java @@ -14,7 +14,6 @@ import java.util.List; public abstract class AbstractFuelCategory extends AbstractRecipeCategory { - private final ResourceLocation texture; public AbstractFuelCategory(CategoryIdentifier categoryIdentifier, ResourceLocation texture) { @@ -24,7 +23,7 @@ public AbstractFuelCategory(CategoryIdentifier categoryIdentifier, this.texture = texture; } - public ResourceLocation getTexture(){ + public ResourceLocation getTexture() { return this.texture; } @@ -48,7 +47,9 @@ public List setupDisplay(FuelDisplay display, Rectangle bounds) { (graphics, bound, mouseX, mouseY, delta) -> { lastTick.getAndAdd(delta); - if(lastTick.getValue() > burnTime) lastTick.setValue(0); + if (lastTick.getValue() > burnTime) { + lastTick.setValue(0); + } var height = (int) Math.round(11 * (lastTick.getValue() / burnTime)); diff --git a/src/main/java/com/aetherteam/nitrogen/integration/rei/displays/BlockStateRecipeDisplay.java b/src/main/java/com/aetherteam/nitrogen/integration/rei/displays/BlockStateRecipeDisplay.java index 534198d..6334520 100644 --- a/src/main/java/com/aetherteam/nitrogen/integration/rei/displays/BlockStateRecipeDisplay.java +++ b/src/main/java/com/aetherteam/nitrogen/integration/rei/displays/BlockStateRecipeDisplay.java @@ -10,7 +10,6 @@ import java.util.List; public class BlockStateRecipeDisplay extends BasicDisplay { - private final CategoryIdentifier categoryIdentifier; private final R recipe; @@ -40,6 +39,6 @@ public R getRecipe() { @Override public CategoryIdentifier getCategoryIdentifier() { - return categoryIdentifier; + return this.categoryIdentifier; } }