From 8214bffe8443d3dca7fc303e91e895ab0425cd78 Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Mon, 20 Nov 2023 17:05:34 +0100 Subject: [PATCH 1/8] Quadratic Progression Quadratic progression to Milestones. --- .../spiceoflife/foodtracker/ProgressInfo.java | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java index 872ec5a..b4f633a 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java @@ -1,5 +1,10 @@ package squeek.spiceoflife.foodtracker; +import static java.lang.Math.floor; +import static java.lang.Math.max; +import static java.lang.Math.pow; +import static java.lang.Math.sqrt; + import net.minecraft.item.ItemStack; /** @@ -8,6 +13,7 @@ public final class ProgressInfo { public static final int HAUNCHES_PER_MILESTONE = 50; + public static final double INCREMENT_RATIO = 0.02; public static final int HEARTS_PER_MILESTONE = 1; /** * the number of haunches from unique foods eaten @@ -27,20 +33,46 @@ public static boolean shouldCount(ItemStack food) { * the number of foods remaining until the next milestone, or a negative value if the maximum has been reached */ public int foodsUntilNextMilestone() { - return nextMilestone() - foodsHaunchesEaten; + return nextMilestoneHaunches() - foodsHaunchesEaten; } /** * the next milestone to reach, or a negative value if the maximum has been reached */ - public int nextMilestone() { - return (milestonesAchieved() + 1) * HAUNCHES_PER_MILESTONE; + public int nextMilestoneHaunches() { + int nextMilestone = (milestonesAchieved() + 1); + + // Quadratic Progression + if (INCREMENT_RATIO > 0) { + double quadraticIncrement = HAUNCHES_PER_MILESTONE * INCREMENT_RATIO; + double quadraticBase = HAUNCHES_PER_MILESTONE - quadraticIncrement; + + return (int) ((quadraticBase * nextMilestone) + (quadraticIncrement * pow(nextMilestone, 2))); + } + + // Linear Progression + return nextMilestone * HAUNCHES_PER_MILESTONE; } /** - * the number of milestones achieved, doubling as the index of the next milestone + * the number of milestones achieved based on foodsHaunchesEaten, doubling as the index of the next milestone */ public int milestonesAchieved() { + + // Quadratic Progression + if (INCREMENT_RATIO > 0) { + double quadraticIncrement = HAUNCHES_PER_MILESTONE * INCREMENT_RATIO; + double quadraticBase = HAUNCHES_PER_MILESTONE - quadraticIncrement; + + double discriminant = sqrt(pow(quadraticBase, 2) + 4 * quadraticIncrement * foodsHaunchesEaten); + + double milestone1 = (-quadraticBase + discriminant) / (2 * quadraticIncrement); + double milestone2 = (-quadraticBase - discriminant) / (2 * quadraticIncrement); + + return (int) floor(max(milestone1, milestone2)); + } + + // Linear Progression return (int) Math.floor((double) foodsHaunchesEaten / (double) HAUNCHES_PER_MILESTONE); } } From 3770f80b5238ac4a6df73ca4c3f30b1fddb7fbbe Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Mon, 20 Nov 2023 17:37:34 +0100 Subject: [PATCH 2/8] Cleanup Quadratic Progression - Haunches -> Food Points That's what the official wiki refers to it as, so let's use that for better clarity. - Added Configs - Simplify Calculations Increment is now given in flat Food Points rather than being a percentage value of the base milestone requirement. Hide powers as it may trigger some readers. --- .../java/squeek/spiceoflife/ModConfig.java | 40 +++++++++++++++++ .../foodtracker/MaxHealthHandler.java | 7 ++- .../spiceoflife/foodtracker/ProgressInfo.java | 43 ++++++++++--------- .../foodtracker/commands/CommandFoodList.java | 4 +- .../spiceoflife/gui/GuiScreenFoodJournal.java | 4 +- 5 files changed, 72 insertions(+), 26 deletions(-) diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index 5374b08..33cfbfc 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -38,6 +38,27 @@ public class ModConfig implements IPackable, IPacketProcessor { private static final String FOOD_MODIFIER_ENABLED_NAME = "food.modifier.enabled"; private static final boolean FOOD_MODIFIER_ENABLED_DEFAULT = true; private static final String FOOD_MODIFIER_ENABLED_COMMENT = "If false, disables the entire diminishing returns part of the mod"; + /* + * CARROT + */ + private static final String CATEGORY_CARROT = " carrot module "; + private static final String CATEGORY_CARROT_COMMENT = COMMENT_SERVER_SIDE_OPTIONS; + private static final String EXTRA_HEARTS_NAME = "hearts.milestones.enable"; + private static final String EXTRA_HEARTS_COMMENT = "Enable extra hearts module"; + private static final boolean EXTRA_HEARTS_DEFAULT = true; + public static boolean EXTRA_HEARTS_ENABLE = ModConfig.EXTRA_HEARTS_DEFAULT; + private static final String FOOD_MILESTONE_NAME = "hearts.milestones.base"; + private static final String FOOD_MILESTONE_COMMENT = "Base requirement for each Food Milestones (in food points) to award extra hearts"; + private static final int FOOD_MILESTONE_DEFAULT = 50; + public static int FOOD_MILESTONE_VALUE = ModConfig.FOOD_MILESTONE_DEFAULT; + private static final String MILESTONE_INCREMENT_NAME = "hearts.milestones.increment"; + private static final String MILESTONE_INCREMENT_COMMENT = "The increase per Milestone to the base Food Milestones value (in food points)"; + private static final int MILESTONE_INCREMENT_DEFAULT = 2; + public static int MILESTONE_INCREMENT_VALUE = ModConfig.MILESTONE_INCREMENT_DEFAULT; + private static final String HEARTS_PER_MILESTONE_NAME = "hearts.milestones.reward"; + private static final String HEARTS_PER_MILESTONE_COMMENT = "Extra hearts awarded per milestone achieved"; + private static final int HEARTS_PER_MILESTONE_DEFAULT = 1; + public static int HEARTS_PER_MILESTONE_VALUE = ModConfig.HEARTS_PER_MILESTONE_DEFAULT; /* * DEV */ @@ -202,6 +223,25 @@ public static void init(File file) { // config if (FMLCommonHandler.instance().getSide() == Side.SERVER) FOOD_MODIFIER_ENABLED = FOOD_MODIFIER_ENABLED_CONFIG_VAL; + /* + * CARROT + */ + config.getCategory(CATEGORY_CARROT).setComment(CATEGORY_CARROT_COMMENT); + EXTRA_HEARTS_ENABLE = config.get(CATEGORY_CARROT, EXTRA_HEARTS_NAME, EXTRA_HEARTS_DEFAULT, EXTRA_HEARTS_COMMENT) + .getBoolean(EXTRA_HEARTS_DEFAULT); + FOOD_MILESTONE_VALUE = config + .get(CATEGORY_CARROT, FOOD_MILESTONE_NAME, FOOD_MILESTONE_DEFAULT, FOOD_MILESTONE_COMMENT) + .getInt(FOOD_MILESTONE_DEFAULT); + MILESTONE_INCREMENT_VALUE = config.get( + CATEGORY_CARROT, + MILESTONE_INCREMENT_NAME, + MILESTONE_INCREMENT_DEFAULT, + MILESTONE_INCREMENT_COMMENT).getInt(MILESTONE_INCREMENT_DEFAULT); + HEARTS_PER_MILESTONE_VALUE = config.get( + CATEGORY_CARROT, + HEARTS_PER_MILESTONE_NAME, + HEARTS_PER_MILESTONE_DEFAULT, + HEARTS_PER_MILESTONE_COMMENT).getInt(HEARTS_PER_MILESTONE_DEFAULT); /* * DEV diff --git a/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java b/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java index 084bfae..b7e3098 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java @@ -7,6 +7,8 @@ import net.minecraft.entity.ai.attributes.IAttributeInstance; import net.minecraft.entity.player.EntityPlayer; +import squeek.spiceoflife.ModConfig; + public class MaxHealthHandler { private static final UUID SOL_HEALTH_MODIFIER_ID = UUID.fromString("f88d6ac1-4193-4ff0-85f5-f0357fe89d17"); @@ -16,10 +18,13 @@ public static boolean updateFoodHPModifier(EntityPlayer player) { return false; } + if (!ModConfig.EXTRA_HEARTS_ENABLE) { + return false; + } + final IAttributeInstance attribute = player.getAttributeMap() .getAttributeInstance(SharedMonsterAttributes.maxHealth); final AttributeModifier prevModifier = attribute.getModifier(SOL_HEALTH_MODIFIER_ID); - final FoodHistory foodHistory = FoodHistory.get(player); ProgressInfo progressInfo = foodHistory.getProgressInfo(); final int milestonesAchieved = progressInfo.milestonesAchieved(); diff --git a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java index b4f633a..69f4420 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java @@ -2,26 +2,27 @@ import static java.lang.Math.floor; import static java.lang.Math.max; -import static java.lang.Math.pow; import static java.lang.Math.sqrt; import net.minecraft.item.ItemStack; +import squeek.spiceoflife.ModConfig; + /** * contains all relevant variables for current progress */ public final class ProgressInfo { - public static final int HAUNCHES_PER_MILESTONE = 50; - public static final double INCREMENT_RATIO = 0.02; - public static final int HEARTS_PER_MILESTONE = 1; + public static final int FOOD_POINTS_PER_MILESTONE = ModConfig.FOOD_MILESTONE_VALUE; + public static final double INCREMENT_PER_MILESTONE = ModConfig.MILESTONE_INCREMENT_VALUE; + public static final int HEARTS_PER_MILESTONE = ModConfig.HEARTS_PER_MILESTONE_VALUE; /** - * the number of haunches from unique foods eaten + * the number of food points from unique foods eaten */ - public final int foodsHaunchesEaten; + public final int foodsPointsEaten; ProgressInfo(FoodHistory foodList) { - foodsHaunchesEaten = foodList.getFullHistory().stream().filter(eaten -> shouldCount(eaten.itemStack)) + foodsPointsEaten = foodList.getFullHistory().stream().filter(eaten -> shouldCount(eaten.itemStack)) .mapToInt(eaten -> eaten.foodValues.hunger).sum(); } @@ -32,39 +33,39 @@ public static boolean shouldCount(ItemStack food) { /** * the number of foods remaining until the next milestone, or a negative value if the maximum has been reached */ - public int foodsUntilNextMilestone() { - return nextMilestoneHaunches() - foodsHaunchesEaten; + public int foodPointsUntilNextMilestone() { + return nextMilestoneFoodPoints() - foodsPointsEaten; } /** * the next milestone to reach, or a negative value if the maximum has been reached */ - public int nextMilestoneHaunches() { + public int nextMilestoneFoodPoints() { int nextMilestone = (milestonesAchieved() + 1); // Quadratic Progression - if (INCREMENT_RATIO > 0) { - double quadraticIncrement = HAUNCHES_PER_MILESTONE * INCREMENT_RATIO; - double quadraticBase = HAUNCHES_PER_MILESTONE - quadraticIncrement; + if (INCREMENT_PER_MILESTONE > 0) { + double quadraticIncrement = INCREMENT_PER_MILESTONE * 0.5; + double quadraticBase = FOOD_POINTS_PER_MILESTONE - quadraticIncrement; - return (int) ((quadraticBase * nextMilestone) + (quadraticIncrement * pow(nextMilestone, 2))); + return (int) ((quadraticBase * nextMilestone) + (quadraticIncrement * nextMilestone * nextMilestone)); } // Linear Progression - return nextMilestone * HAUNCHES_PER_MILESTONE; + return nextMilestone * FOOD_POINTS_PER_MILESTONE; } /** - * the number of milestones achieved based on foodsHaunchesEaten, doubling as the index of the next milestone + * the number of milestones achieved based on foodPointsEaten, doubling as the index of the next milestone */ public int milestonesAchieved() { // Quadratic Progression - if (INCREMENT_RATIO > 0) { - double quadraticIncrement = HAUNCHES_PER_MILESTONE * INCREMENT_RATIO; - double quadraticBase = HAUNCHES_PER_MILESTONE - quadraticIncrement; + if (INCREMENT_PER_MILESTONE > 0) { + double quadraticIncrement = INCREMENT_PER_MILESTONE * 0.5; + double quadraticBase = FOOD_POINTS_PER_MILESTONE - quadraticIncrement; - double discriminant = sqrt(pow(quadraticBase, 2) + 4 * quadraticIncrement * foodsHaunchesEaten); + double discriminant = sqrt(quadraticBase * quadraticBase + 4 * quadraticIncrement * foodsPointsEaten); double milestone1 = (-quadraticBase + discriminant) / (2 * quadraticIncrement); double milestone2 = (-quadraticBase - discriminant) / (2 * quadraticIncrement); @@ -73,6 +74,6 @@ public int milestonesAchieved() { } // Linear Progression - return (int) Math.floor((double) foodsHaunchesEaten / (double) HAUNCHES_PER_MILESTONE); + return (int) Math.floor((double) foodsPointsEaten / (double) FOOD_POINTS_PER_MILESTONE); } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java index 54d13ae..dc44731 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java @@ -68,9 +68,9 @@ public void processCommand(ICommandSender commandSender, String[] args) { if (args[0].equals("size")) { final ProgressInfo progressInfo = foodHistory.getProgressInfo(); - final int foodsEaten = progressInfo.foodsHaunchesEaten; + final int foodsEaten = progressInfo.foodsPointsEaten; final int milestone = progressInfo.milestonesAchieved(); - final int foodsUntilNextMilestone = progressInfo.foodsUntilNextMilestone(); + final int foodsUntilNextMilestone = progressInfo.foodPointsUntilNextMilestone(); commandSender.addChatMessage( new ChatComponentText( diff --git a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java index 11c1e81..6e23325 100644 --- a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java +++ b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java @@ -120,9 +120,9 @@ public void drawScreen(int mouseX, int mouseY, float f) { FoodHistory foodHistory = FoodHistory.get(mc.thePlayer); if (pageNum == 0) { final ProgressInfo progressInfo = foodHistory.getProgressInfo(); - final int foodsEaten = progressInfo.foodsHaunchesEaten; + final int foodsEaten = progressInfo.foodsPointsEaten; final int extraHearts = progressInfo.milestonesAchieved() * ProgressInfo.HEARTS_PER_MILESTONE; - final int foodsUntilNextMilestone = progressInfo.foodsUntilNextMilestone(); + final int foodsUntilNextMilestone = progressInfo.foodPointsUntilNextMilestone(); int localX = x + leftMargin; int drawWidth = (bookImageWidth - rightMargin) - leftMargin; // width in which text can be drawn, so it From de429a09e3c0f2d87f080705eea94c3226964a0f Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Mon, 27 Nov 2023 21:47:05 +0100 Subject: [PATCH 3/8] Expert Mode configs Adds the following configs to the game: - Max allowed milestone [Default: -1] - Milestones persist through death [Default: true] Now SoL can now be fully tailored according to modpack creators. --- .../java/squeek/spiceoflife/ModConfig.java | 23 ++++++++++++++++ .../spiceoflife/foodtracker/FoodHistory.java | 19 ++++++++++--- .../spiceoflife/foodtracker/ProgressInfo.java | 27 ++++++++++++++----- 3 files changed, 58 insertions(+), 11 deletions(-) diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index 33cfbfc..2cc2e4f 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -59,6 +59,15 @@ public class ModConfig implements IPackable, IPacketProcessor { private static final String HEARTS_PER_MILESTONE_COMMENT = "Extra hearts awarded per milestone achieved"; private static final int HEARTS_PER_MILESTONE_DEFAULT = 1; public static int HEARTS_PER_MILESTONE_VALUE = ModConfig.HEARTS_PER_MILESTONE_DEFAULT; + + private static final String MAX_MILESTONE_NAME = "hearts.milestones.maximum"; + private static final String MAX_MILESTONE_COMMENT = "The maximum allowed number of Milestones a player can achieve"; + private static final int MAX_MILESTONE_DEFAULT = -1; + public static int MAX_MILESTONE_VALUE = ModConfig.MAX_MILESTONE_DEFAULT; + private static final String FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME = "hearts.milestones.persists.through.death"; + private static final String FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT = "If true, milestone progress will not get reset after every death"; + private static final boolean FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT = true; + public static boolean FOOD_MILESTONES_PERSISTS_THROUGH_DEATH = ModConfig.FOOD_HISTORY_PERSISTS_THROUGH_DEATH_DEFAULT; /* * DEV */ @@ -229,20 +238,34 @@ public static void init(File file) { config.getCategory(CATEGORY_CARROT).setComment(CATEGORY_CARROT_COMMENT); EXTRA_HEARTS_ENABLE = config.get(CATEGORY_CARROT, EXTRA_HEARTS_NAME, EXTRA_HEARTS_DEFAULT, EXTRA_HEARTS_COMMENT) .getBoolean(EXTRA_HEARTS_DEFAULT); + FOOD_MILESTONE_VALUE = config .get(CATEGORY_CARROT, FOOD_MILESTONE_NAME, FOOD_MILESTONE_DEFAULT, FOOD_MILESTONE_COMMENT) .getInt(FOOD_MILESTONE_DEFAULT); + MILESTONE_INCREMENT_VALUE = config.get( CATEGORY_CARROT, MILESTONE_INCREMENT_NAME, MILESTONE_INCREMENT_DEFAULT, MILESTONE_INCREMENT_COMMENT).getInt(MILESTONE_INCREMENT_DEFAULT); + HEARTS_PER_MILESTONE_VALUE = config.get( CATEGORY_CARROT, HEARTS_PER_MILESTONE_NAME, HEARTS_PER_MILESTONE_DEFAULT, HEARTS_PER_MILESTONE_COMMENT).getInt(HEARTS_PER_MILESTONE_DEFAULT); + MAX_MILESTONE_VALUE = config.get( + CATEGORY_CARROT, + MAX_MILESTONE_NAME, + MAX_MILESTONE_DEFAULT, + MAX_MILESTONE_COMMENT).getInt(MAX_MILESTONE_DEFAULT); + + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH = config.get( + CATEGORY_CARROT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT).getBoolean(FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT); /* * DEV */ diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java index 19cd57a..5b96599 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java @@ -298,9 +298,14 @@ public void writeToNBTData(NBTTagCompound data) { } } if (fullHistory.size() > 0) { - NBTTagCompound nbtFullHistory = new NBTTagCompound(); - fullHistory.writeToNBTData(nbtFullHistory); - persistentCompound.setTag("FullHistory", nbtFullHistory); + if (data != null || ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH) { + NBTTagCompound nbtFullHistory = new NBTTagCompound(); + + fullHistory.writeToNBTData(nbtFullHistory); + + if (ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH) persistentCompound.setTag("FullHistory", nbtFullHistory); + else nonPersistentCompound.setTag("FullHistory", nbtFullHistory); + } } if (totalFoodsEatenAllTime > 0) { persistentCompound.setInteger("Total", totalFoodsEatenAllTime); @@ -341,6 +346,13 @@ public void readFromNBTData(NBTTagCompound data) { ? persistentCompound.getCompoundTag("History") : nonPersistentCompound.getCompoundTag("History"); + NBTTagCompound nbtFullHistory = ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH + ? persistentCompound.getCompoundTag("FullHistory") + : nonPersistentCompound.getCompoundTag("FullHistory"); + + fullHistory.readFromNBTData(nbtHistory); + fullHistory.readFromNBTData(nbtFullHistory); + recentHistory.readFromNBTData(nbtHistory); totalFoodsEatenAllTime = persistentCompound.getInteger("Total"); @@ -348,6 +360,5 @@ public void readFromNBTData(NBTTagCompound data) { ticksActive = persistentCompound.getLong("Ticks"); } - fullHistory.readFromNBTData(persistentCompound.getCompoundTag("FullHistory")); } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java index 69f4420..8e7d21a 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java @@ -16,6 +16,9 @@ public final class ProgressInfo { public static final int FOOD_POINTS_PER_MILESTONE = ModConfig.FOOD_MILESTONE_VALUE; public static final double INCREMENT_PER_MILESTONE = ModConfig.MILESTONE_INCREMENT_VALUE; public static final int HEARTS_PER_MILESTONE = ModConfig.HEARTS_PER_MILESTONE_VALUE; + public static final int MAX_MILESTONE_VALUE = ModConfig.MAX_MILESTONE_VALUE; + public boolean hasCap = MAX_MILESTONE_VALUE > 0; + /** * the number of food points from unique foods eaten */ @@ -31,18 +34,22 @@ public static boolean shouldCount(ItemStack food) { } /** - * the number of foods remaining until the next milestone, or a negative value if the maximum has been reached + * the number of foods remaining until the next milestone, or 0 if the maximum has been reached */ public int foodPointsUntilNextMilestone() { - return nextMilestoneFoodPoints() - foodsPointsEaten; + return Math.max(0, nextMilestoneFoodPoints() - foodsPointsEaten); } /** - * the next milestone to reach, or a negative value if the maximum has been reached + * the next milestone to reach, or 0 if the maximum has been reached */ public int nextMilestoneFoodPoints() { int nextMilestone = (milestonesAchieved() + 1); + if (hasCap && nextMilestone > MAX_MILESTONE_VALUE){ + return 0; + } + // Quadratic Progression if (INCREMENT_PER_MILESTONE > 0) { double quadraticIncrement = INCREMENT_PER_MILESTONE * 0.5; @@ -59,9 +66,10 @@ public int nextMilestoneFoodPoints() { * the number of milestones achieved based on foodPointsEaten, doubling as the index of the next milestone */ public int milestonesAchieved() { + int milestonesTotal; - // Quadratic Progression if (INCREMENT_PER_MILESTONE > 0) { + // Quadratic Progression double quadraticIncrement = INCREMENT_PER_MILESTONE * 0.5; double quadraticBase = FOOD_POINTS_PER_MILESTONE - quadraticIncrement; @@ -70,10 +78,15 @@ public int milestonesAchieved() { double milestone1 = (-quadraticBase + discriminant) / (2 * quadraticIncrement); double milestone2 = (-quadraticBase - discriminant) / (2 * quadraticIncrement); - return (int) floor(max(milestone1, milestone2)); + milestonesTotal = (int) floor(max(milestone1, milestone2)); + } else { + // Linear Progression + milestonesTotal = (int) Math.floor((double) foodsPointsEaten / (double) FOOD_POINTS_PER_MILESTONE); } - // Linear Progression - return (int) Math.floor((double) foodsPointsEaten / (double) FOOD_POINTS_PER_MILESTONE); + if (hasCap && milestonesTotal >= MAX_MILESTONE_VALUE) + return MAX_MILESTONE_VALUE; + + return milestonesTotal; } } From e8eb43e3f8341cb81fec7fd11502fca5853087b6 Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Tue, 28 Nov 2023 13:10:04 +0100 Subject: [PATCH 4/8] Spotless Apply --- .../java/squeek/spiceoflife/ModConfig.java | 20 +++++++++---------- .../spiceoflife/foodtracker/FoodHistory.java | 3 ++- .../spiceoflife/foodtracker/ProgressInfo.java | 5 ++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index 2cc2e4f..e947ea6 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -255,17 +255,17 @@ public static void init(File file) { HEARTS_PER_MILESTONE_DEFAULT, HEARTS_PER_MILESTONE_COMMENT).getInt(HEARTS_PER_MILESTONE_DEFAULT); - MAX_MILESTONE_VALUE = config.get( - CATEGORY_CARROT, - MAX_MILESTONE_NAME, - MAX_MILESTONE_DEFAULT, - MAX_MILESTONE_COMMENT).getInt(MAX_MILESTONE_DEFAULT); + MAX_MILESTONE_VALUE = config + .get(CATEGORY_CARROT, MAX_MILESTONE_NAME, MAX_MILESTONE_DEFAULT, MAX_MILESTONE_COMMENT) + .getInt(MAX_MILESTONE_DEFAULT); - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH = config.get( - CATEGORY_CARROT, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT).getBoolean(FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT); + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH = config + .get( + CATEGORY_CARROT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT) + .getBoolean(FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT); /* * DEV */ diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java index 5b96599..2c706ea 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java @@ -303,7 +303,8 @@ public void writeToNBTData(NBTTagCompound data) { fullHistory.writeToNBTData(nbtFullHistory); - if (ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH) persistentCompound.setTag("FullHistory", nbtFullHistory); + if (ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH) + persistentCompound.setTag("FullHistory", nbtFullHistory); else nonPersistentCompound.setTag("FullHistory", nbtFullHistory); } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java index 8e7d21a..a2913f9 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java @@ -46,7 +46,7 @@ public int foodPointsUntilNextMilestone() { public int nextMilestoneFoodPoints() { int nextMilestone = (milestonesAchieved() + 1); - if (hasCap && nextMilestone > MAX_MILESTONE_VALUE){ + if (hasCap && nextMilestone > MAX_MILESTONE_VALUE) { return 0; } @@ -84,8 +84,7 @@ public int milestonesAchieved() { milestonesTotal = (int) Math.floor((double) foodsPointsEaten / (double) FOOD_POINTS_PER_MILESTONE); } - if (hasCap && milestonesTotal >= MAX_MILESTONE_VALUE) - return MAX_MILESTONE_VALUE; + if (hasCap && milestonesTotal >= MAX_MILESTONE_VALUE) return MAX_MILESTONE_VALUE; return milestonesTotal; } From 3aaed05bea473898f1cc345443b8563b38cda038 Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Sat, 9 Dec 2023 19:10:27 +0100 Subject: [PATCH 5/8] Update BS --- build.gradle | 750 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 549 insertions(+), 201 deletions(-) diff --git a/build.gradle b/build.gradle index fe8a2e7..50c3291 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1675110695 +//version: 1702141377 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -6,47 +6,35 @@ */ -import com.diffplug.blowdryer.Blowdryer -import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar +import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask +import com.gtnewhorizons.retrofuturagradle.util.Distribution import com.matthewprenger.cursegradle.CurseArtifact import com.matthewprenger.cursegradle.CurseRelation import com.modrinth.minotaur.dependencies.ModDependency import com.modrinth.minotaur.dependencies.VersionDependency import org.gradle.internal.logging.text.StyledTextOutput.Style import org.gradle.internal.logging.text.StyledTextOutputFactory -import org.jetbrains.gradle.ext.* +import org.gradle.internal.xml.XmlTransformer +import org.jetbrains.gradle.ext.Application +import org.jetbrains.gradle.ext.Gradle +import javax.inject.Inject import java.nio.file.Files import java.nio.file.Paths import java.util.concurrent.TimeUnit -import java.util.zip.ZipEntry -import java.util.zip.ZipOutputStream buildscript { repositories { - mavenLocal() - mavenCentral() - - maven { - name 'forge' - url 'https://maven.minecraftforge.net' - } maven { // GTNH RetroFuturaGradle and ASM Fork name "GTNH Maven" url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" allowInsecureProtocol = true } - maven { - name 'sonatype' - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - maven { - name 'Scala CI dependencies' - url 'https://repo1.maven.org/maven2/' - } + mavenLocal() } } plugins { @@ -58,22 +46,26 @@ plugins { id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false - id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version ,unused, available for addon.gradle - id 'com.github.johnrengelman.shadow' version '7.1.2' apply false - id 'com.palantir.git-version' version '0.13.0' apply false // 0.13.0 is the last jvm8 supporting version - id 'de.undercouch.download' version '5.3.0' + id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle + id 'com.github.johnrengelman.shadow' version '8.1.1' apply false + id 'com.palantir.git-version' version '3.0.0' apply false + id 'de.undercouch.download' version '5.4.0' id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle - id 'com.diffplug.spotless' version '6.7.2' apply false + id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.1.2' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26' } + +print("You might want to check out './gradlew :faq' if your build fails.\n") + boolean settingsupdated = verifySettingsGradle() settingsupdated = verifyGitAttributes() || settingsupdated if (settingsupdated) throw new GradleException("Settings has been updated, please re-run task.") -if (project.file('.git/HEAD').isFile()) { +// In submodules, .git is a file pointing to the real git dir +if (project.file('.git/HEAD').isFile() || project.file('.git').isFile()) { apply plugin: 'com.palantir.git-version' } @@ -82,6 +74,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output') def projectJavaVersion = JavaLanguageVersion.of(8) boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false +boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false + +final String CHECKSTYLE_CONFIG = """ + + + + + + + + + + + +""" checkPropertyExists("modName") checkPropertyExists("modId") @@ -108,6 +117,8 @@ propertyDefaultIfUnset("usesMixinDebug", project.usesMixins) propertyDefaultIfUnset("forceEnableMixins", false) propertyDefaultIfUnset("channel", "stable") propertyDefaultIfUnset("mappingsVersion", "12") +propertyDefaultIfUnset("usesMavenPublishing", true) +propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases") propertyDefaultIfUnset("modrinthProjectId", "") propertyDefaultIfUnset("modrinthRelations", "") propertyDefaultIfUnset("curseForgeProjectId", "") @@ -122,12 +133,26 @@ propertyDefaultIfUnset("gradleTokenGroupName", "") propertyDefaultIfUnset("enableModernJavaSyntax", false) // On by default for new projects only propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new projects only -project.extensions.add(Blowdryer, "Blowdryer", Blowdryer) // Make blowdryer available in "apply from:" scripts +// this is meant to be set using the user wide property file. by default we do nothing. +propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea" + +project.extensions.add(com.diffplug.blowdryer.Blowdryer, "Blowdryer", com.diffplug.blowdryer.Blowdryer) // Make blowdryer available in "apply from:" scripts if (!disableSpotless) { apply plugin: 'com.diffplug.spotless' apply from: Blowdryer.file('spotless.gradle') } +if (!disableCheckstyle) { + apply plugin: 'checkstyle' + tasks.named("checkstylePatchedMc") { enabled = false } + tasks.named("checkstyleMcLauncher") { enabled = false } + tasks.named("checkstyleIdeVirtualMain") { enabled = false } + tasks.named("checkstyleInjectedTags") { enabled = false } + checkstyle { + config = resources.text.fromString(CHECKSTYLE_CONFIG) + } +} + String javaSourceDir = "src/main/java/" String scalaSourceDir = "src/main/scala/" String kotlinSourceDir = "src/main/kotlin/" @@ -143,13 +168,21 @@ java { } else { languageVersion.set(projectJavaVersion) } - vendor.set(JvmVendorSpec.ADOPTIUM) + vendor.set(JvmVendorSpec.AZUL) } if (!noPublishedSources) { withSourcesJar() } } +tasks.withType(JavaCompile).configureEach { + options.encoding = "UTF-8" +} + +tasks.withType(ScalaCompile).configureEach { + options.encoding = "UTF-8" +} + pluginManager.withPlugin('org.jetbrains.kotlin.jvm') { // If Kotlin is enabled in the project kotlin { @@ -183,14 +216,34 @@ configurations { canBeConsumed = false canBeResolved = false } + + create("devOnlyNonPublishable") { + description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)" + canBeConsumed = false + canBeResolved = false + } + compileOnly.extendsFrom(devOnlyNonPublishable) + runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable) } if (enableModernJavaSyntax.toBoolean()) { + repositories { + mavenCentral { + mavenContent { + includeGroup("me.eigenraven.java8unsupported") + } + } + } + dependencies { annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0' + // workaround for https://github.com/bsideup/jabel/issues/174 + annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0' compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') { transitive = false // We only care about the 1 annotation class } + // Allow using jdk.unsupported classes like sun.misc.Unsafe in the compiled code, working around JDK-8206937. + patchedMinecraft('me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0') } tasks.withType(JavaCompile).configureEach { @@ -202,7 +255,7 @@ if (enableModernJavaSyntax.toBoolean()) { javaCompiler.set(javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(17)) - vendor.set(JvmVendorSpec.ADOPTIUM) + vendor.set(JvmVendorSpec.AZUL) }) } } @@ -234,12 +287,14 @@ if (apiPackage) { } if (accessTransformersFile) { - String targetFile = "src/main/resources/META-INF/" + accessTransformersFile - if (!getFile(targetFile).exists()) { - throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + for (atFile in accessTransformersFile.split(" ")) { + String targetFile = "src/main/resources/META-INF/" + atFile.trim() + if (!getFile(targetFile).exists()) { + throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) + } + tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile) + tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile) } - tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile) - tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile) } else { boolean atsFound = false for (File at : sourceSets.getByName("main").resources.files) { @@ -317,7 +372,27 @@ catch (Exception ignored) { String identifiedVersion String versionOverride = System.getenv("VERSION") ?: null try { - identifiedVersion = versionOverride == null ? gitVersion() : versionOverride + // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty + if (versionOverride == null) { + def gitDetails = versionDetails() + def isDirty = gitVersion().endsWith(".dirty") // No public API for this, isCleanTag has a different meaning + String branchName = gitDetails.branchName ?: (System.getenv('GIT_BRANCH') ?: 'git') + if (branchName.startsWith('origin/')) { + branchName = branchName.minus('origin/') + } + branchName = branchName.replaceAll("[^a-zA-Z0-9-]+", "-") // sanitize branch names for semver + identifiedVersion = gitDetails.lastTag ?: '${gitDetails.gitHash}' + if (gitDetails.commitDistance > 0) { + identifiedVersion += "-${branchName}.${gitDetails.commitDistance}+${gitDetails.gitHash}" + if (isDirty) { + identifiedVersion += "-dirty" + } + } else if (isDirty) { + identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty" + } + } else { + identifiedVersion = versionOverride + } } catch (Exception ignored) { out.style(Style.Failure).text( @@ -339,9 +414,13 @@ if (identifiedVersion == versionOverride) { group = "com.github.GTNewHorizons" if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { - archivesBaseName = customArchiveBaseName + base { + archivesName = customArchiveBaseName + } } else { - archivesBaseName = modId + base { + archivesName = modId + } } @@ -367,12 +446,14 @@ minecraft { injectMissingGenerics.set(true) } + username = developmentEnvironmentUserName.toString() + + lwjgl3Version = "3.3.2" + // Enable assertions in the current mod extraRunJvmArguments.add("-ea:${modGroup}") if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - extraTweakClasses.add("org.spongepowered.asm.launch.MixinTweaker") - if (usesMixinDebug.toBoolean()) { extraRunJvmArguments.addAll([ "-Dmixin.debug.countInjections=true", @@ -401,6 +482,16 @@ configurations.configureEach { } } } + def obfuscationAttr = it.attributes.getAttribute(ObfuscationAttribute.OBFUSCATION_ATTRIBUTE) + if (obfuscationAttr != null && obfuscationAttr.name == ObfuscationAttribute.SRG) { + resolutionStrategy.eachDependency { DependencyResolveDetails details -> + // Remap CoFH core cursemaven dev jar to the obfuscated version for runObfClient/Server + if (details.requested.group == 'curse.maven' && details.requested.name.endsWith('-69162') && details.requested.version == '2388751') { + details.useVersion '2388750' + details.because 'Pick obfuscated jar' + } + } + } } // Ensure tests have access to minecraft classes @@ -413,10 +504,19 @@ sourceSets { } } -if (file('addon.gradle').exists()) { +if (file('addon.gradle.kts').exists()) { + apply from: 'addon.gradle.kts' +} else if (file('addon.gradle').exists()) { apply from: 'addon.gradle' } +// File for local tweaks not commited to Git +if (file('addon.local.gradle.kts').exists()) { + apply from: 'addon.local.gradle.kts' +} else if (file('addon.local.gradle').exists()) { + apply from: 'addon.local.gradle' +} + // Allow unsafe repos but warn repositories.configureEach { repo -> if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) { @@ -427,11 +527,19 @@ repositories.configureEach { repo -> } } -apply from: 'repositories.gradle' +if (file('repositories.gradle.kts').exists()) { + apply from: 'repositories.gradle.kts' +} else if (file('repositories.gradle').exists()) { + apply from: 'repositories.gradle' +} else { + logger.error("Neither repositories.gradle.kts nor repositories.gradle was found, make sure you extracted the full ExampleMod template.") + throw new RuntimeException("Missing repositories.gradle[.kts]") +} configurations { + runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable) + testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable) for (config in [compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath]) { - config.extendsFrom(runtimeOnlyNonPublishable) if (usesShadowedDependencies.toBoolean()) { config.extendsFrom(shadowImplementation) // TODO: remove Compile after all uses are refactored to Implementation @@ -467,42 +575,48 @@ repositories { maven { name 'Overmind forge repo mirror' url 'https://gregtech.overminddl1.com/' - mavenContent { - excludeGroup("net.minecraftforge") // missing the `universal` artefact - } } maven { name = "GTNH Maven" url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" allowInsecureProtocol = true } - if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - if (usesMixinDebug.toBoolean()) { - maven { - name = "Fabric Maven" - url = "https://maven.fabricmc.net/" - } + maven { + name 'sonatype' + url 'https://oss.sonatype.org/content/repositories/snapshots/' + content { + includeGroup "org.lwjgl" } } if (includeWellKnownRepositories.toBoolean()) { - maven { - name "CurseMaven" - url "https://cursemaven.com" - content { + exclusiveContent { + forRepository { + maven { + name "CurseMaven" + url "https://cursemaven.com" + } + } + filter { includeGroup "curse.maven" } } - maven { - name = "ic2" - url = "https://maven.ic2.player.to/" - metadataSources { - mavenPom() - artifact() + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" } } maven { - name = "ic2-mirror" - url = "https://maven2.ic2.player.to/" + name = "ic2" + url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/") + content { + includeGroup "net.industrial-craft" + } metadataSources { mavenPom() artifact() @@ -515,35 +629,80 @@ repositories { } } +def mixinProviderGroup = "io.github.legacymoddingmc" +def mixinProviderModule = "unimixins" +def mixinProviderVersion = "0.1.13" +def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" +def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" +ext.mixinProviderSpec = mixinProviderSpec + +def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' + dependencies { if (usesMixins.toBoolean()) { annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3') annotationProcessor('com.google.guava:guava:24.1.1-jre') annotationProcessor('com.google.code.gson:gson:2.8.6') - annotationProcessor('com.gtnewhorizon:gtnhmixins:2.1.10:processor') + annotationProcessor(mixinProviderSpec) if (usesMixinDebug.toBoolean()) { runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16') } } - if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - implementation('com.gtnewhorizon:gtnhmixins:2.1.10') + if (usesMixins.toBoolean()) { + implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap)) + } else if (forceEnableMixins.toBoolean()) { + runtimeOnlyNonPublishable(mixinProviderSpec) } } pluginManager.withPlugin('org.jetbrains.kotlin.kapt') { if (usesMixins.toBoolean()) { dependencies { - kapt('com.gtnewhorizon:gtnhmixins:2.1.10:processor') + kapt(mixinProviderSpec) } } } -apply from: 'dependencies.gradle' +// Replace old mixin mods with unimixins +// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier +configurations.all { + resolutionStrategy.dependencySubstitution { + substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") + substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier") -def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' -def mixinTmpDir = buildDir.path + File.separator + 'tmp' + File.separator + 'mixins' -def refMap = "${mixinTmpDir}" + File.separator + mixingConfigRefMap -def mixinSrg = "${mixinTmpDir}" + File.separator + "mixins.srg" + substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets') + } +} + +dependencies { + constraints { + def minGtnhLibVersion = "0.0.13" + implementation("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + runtimeOnly("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + devOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { + because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") + } + } +} + +if (file('dependencies.gradle.kts').exists()) { + apply from: 'dependencies.gradle.kts' +} else if (file('dependencies.gradle').exists()) { + apply from: 'dependencies.gradle' +} else { + logger.error("Neither dependencies.gradle.kts nor dependencies.gradle was found, make sure you extracted the full ExampleMod template.") + throw new RuntimeException("Missing dependencies.gradle[.kts]") +} tasks.register('generateAssets') { group = "GTNH Buildscript" @@ -575,46 +734,17 @@ tasks.register('generateAssets') { } if (usesMixins.toBoolean()) { - tasks.named("reobfJar", ReobfuscatedJar).configure { - extraSrgFiles.from(mixinSrg) - } - tasks.named("processResources").configure { dependsOn("generateAssets") } tasks.named("compileJava", JavaCompile).configure { - doFirst { - new File(mixinTmpDir).mkdirs() - } options.compilerArgs += [ - "-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}", - "-AoutSrgFile=${mixinSrg}", - "-AoutRefMapFile=${refMap}", // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code "-XDenableSunApiLintControl", "-XDignore.symbol.file" ] } - - pluginManager.withPlugin('org.jetbrains.kotlin.kapt') { - kapt { - correctErrorTypes = true - javacOptions { - option("-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}") - option("-AoutSrgFile=$mixinSrg") - option("-AoutRefMapFile=$refMap") - } - } - tasks.configureEach { task -> - if (task.name == "kaptKotlin") { - task.doFirst { - new File(mixinTmpDir).mkdirs() - } - } - } - } - } tasks.named("processResources", ProcessResources).configure { @@ -632,10 +762,149 @@ tasks.named("processResources", ProcessResources).configure { } if (usesMixins.toBoolean()) { - from refMap + dependsOn("compileJava", "compileScala") + } +} + +ext.java17Toolchain = (JavaToolchainSpec spec) -> { + spec.languageVersion.set(JavaLanguageVersion.of(17)) + spec.vendor.set(JvmVendorSpec.matching("jetbrains")) +} + +ext.java17DependenciesCfg = configurations.create("java17Dependencies") { + extendsFrom(configurations.getByName("runtimeClasspath")) // Ensure consistent transitive dependency resolution + canBeConsumed = false +} +ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") { + canBeConsumed = false +} + +dependencies { + def lwjgl3ifyVersion = '1.5.7' + if (modId != 'lwjgl3ify') { + java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") + } + if (modId != 'hodgepodge') { + java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35') + } + + java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} +} + +ext.java17JvmArgs = [ + // Java 9+ support + "--illegal-access=warn", + "-Djava.security.manager=allow", + "-Dfile.encoding=UTF-8", + "--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED", + "--add-opens", "java.base/java.net=ALL-UNNAMED", + "--add-opens", "java.base/java.nio=ALL-UNNAMED", + "--add-opens", "java.base/java.io=ALL-UNNAMED", + "--add-opens", "java.base/java.lang=ALL-UNNAMED", + "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", + "--add-opens", "java.base/java.text=ALL-UNNAMED", + "--add-opens", "java.base/java.util=ALL-UNNAMED", + "--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED", + "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", + "--add-opens", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming", + "--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED", + "--add-modules", "jdk.dynalink", + "--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED", + "--add-modules", "java.sql.rowset", + "--add-opens", "java.sql.rowset/javax.sql.rowset.serial=ALL-UNNAMED" +] + +ext.hotswapJvmArgs = [ + // DCEVM advanced hot reload + "-XX:+AllowEnhancedClassRedefinition", + "-XX:HotswapAgent=fatjar" +] + +ext.setupHotswapAgentTask = tasks.register("setupHotswapAgent") { + group = "GTNH Buildscript" + description = "Installs a recent version of HotSwapAgent into the Java 17 JetBrains runtime directory" + def hsaUrl = 'https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jar' + def targetFolderProvider = javaToolchains.launcherFor(java17Toolchain).map {it.metadata.installationPath.dir("lib/hotswap")} + def targetFilename = "hotswap-agent.jar" + onlyIf { + !targetFolderProvider.get().file(targetFilename).asFile.exists() + } + doLast { + def targetFolder = targetFolderProvider.get() + targetFolder.asFile.mkdirs() + download.run { + src hsaUrl + dest targetFolder.file(targetFilename).asFile + overwrite false + tempAndMove true + } + } +} + +public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { + // IntelliJ doesn't seem to allow commandline arguments so we also support an env variable + private boolean enableHotswap = Boolean.valueOf(System.getenv("HOTSWAP")); + + @Input + public boolean getEnableHotswap() { return enableHotswap } + @Option(option = "hotswap", description = "Enables HotSwapAgent for enhanced class reloading under a debugger") + public boolean setEnableHotswap(boolean enable) { enableHotswap = enable } + + @Inject + public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) { + super(side, gradle) + + this.lwjglVersion = 3 + this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain) + this.extraJvmArgs.addAll(project.java17JvmArgs) + this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : [])) + + this.classpath(project.java17PatchDependenciesCfg) + if (side == Distribution.CLIENT) { + this.classpath(project.minecraftTasks.lwjgl3Configuration) + } + // Use a raw provider instead of map to not create a dependency on the task + this.classpath(project.provider(() -> project.tasks.named(superTask, RunMinecraftTask).get().classpath)) + this.classpath.filter { file -> + !file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2 + } + this.classpath(project.java17DependenciesCfg) + } + + public void setup(Project project) { + super.setup(project) + if (project.usesMixins.toBoolean()) { + this.extraJvmArgs.addAll(project.provider(() -> { + def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec)) + mixinCfg.canBeConsumed = false + mixinCfg.transitive = false + enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : [] + })) + } } } +def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient") +runClient17Task.configure { + setup(project) + group = "Modded Minecraft" + description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge" + dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar') + mainClass = "GradleStart" + username = minecraft.username + userUUID = minecraft.userUUID +} + +def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Distribution.DEDICATED_SERVER, "runServer") +runServer17Task.configure { + setup(project) + group = "Modded Minecraft" + description = "Runs the modded server using Java 17, lwjgl3ify and Hodgepodge" + dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar') + mainClass = "GradleStartServer" + extraArgs.add("nogui") +} + def getManifestAttributes() { def manifestAttributes = [:] if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) { @@ -667,11 +936,6 @@ tasks.named("jar", Jar).configure { } if (usesShadowedDependencies.toBoolean()) { - tasks.register('relocateShadowJar', ConfigureShadowRelocation) { - target = tasks.shadowJar - prefix = modGroup + ".shadow" - enabled = minimizeShadowedDependencies.toBoolean() - } tasks.named("shadowJar", ShadowJar).configure { manifest { attributes(getManifestAttributes()) @@ -686,8 +950,9 @@ if (usesShadowedDependencies.toBoolean()) { project.configurations.shadeCompile ] archiveClassifier.set('dev') - if (minimizeShadowedDependencies.toBoolean()) { - dependsOn(relocateShadowJar) + if (relocateShadowedDependencies.toBoolean()) { + relocationPrefix = modGroup + ".shadow" + enableRelocation = true } } configurations.runtimeElements.outgoing.artifacts.clear() @@ -705,7 +970,7 @@ if (usesShadowedDependencies.toBoolean()) { javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { skip() } - for (runTask in ["runClient", "runServer"]) { + for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) { tasks.named(runTask).configure { dependsOn("shadowJar") } @@ -743,16 +1008,47 @@ idea { module { downloadJavadoc = true downloadSources = true + inheritOutputDirs = true } project { settings { + if (ideaOverrideBuildType != "") { + delegateActions { + if ("gradle".equalsIgnoreCase(ideaOverrideBuildType)) { + delegateBuildRunToGradle = true + testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.GRADLE + } else if ("idea".equalsIgnoreCase(ideaOverrideBuildType)) { + delegateBuildRunToGradle = false + testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM + } else { + throw GradleScriptException('Accepted value for ideaOverrideBuildType is one of gradle or idea.') + } + } + } runConfigurations { + "0. Build and Test"(Gradle) { + taskNames = ["build"] + } "1. Run Client"(Gradle) { taskNames = ["runClient"] } "2. Run Server"(Gradle) { taskNames = ["runServer"] } + "1a. Run Client (Java 17)"(Gradle) { + taskNames = ["runClient17"] + } + "2a. Run Server (Java 17)"(Gradle) { + taskNames = ["runServer17"] + } + "1b. Run Client (Java 17, Hotswap)"(Gradle) { + taskNames = ["runClient17"] + envs = ["HOTSWAP": "true"] + } + "2b. Run Server (Java 17, Hotswap)"(Gradle) { + taskNames = ["runServer17"] + envs = ["HOTSWAP": "true"] + } "3. Run Obfuscated Client"(Gradle) { taskNames = ["runObfClient"] } @@ -770,7 +1066,7 @@ idea { } "Run Client (IJ Native)"(Application) { mainClass = "GradleStart" - moduleName = project.name + ".main" + moduleName = project.name + ".ideVirtualMain" afterEvaluate { workingDirectory = tasks.runClient.workingDir.absolutePath programParameters = tasks.runClient.calculateArgs(project).collect { '"' + it + '"' }.join(' ') @@ -781,7 +1077,7 @@ idea { } "Run Server (IJ Native)"(Application) { mainClass = "GradleStartServer" - moduleName = project.name + ".main" + moduleName = project.name + ".ideVirtualMain" afterEvaluate { workingDirectory = tasks.runServer.workingDir.absolutePath programParameters = tasks.runServer.calculateArgs(project).collect { '"' + it + '"' }.join(' ') @@ -793,11 +1089,57 @@ idea { } compiler.javac { afterEvaluate { + javacAdditionalOptions = "-encoding utf8" moduleJavacAdditionalOptions = [ (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ') ] } } + withIDEADir { File ideaDir -> + if (!ideaDir.path.contains(".idea")) { + // If an .ipr file exists, the project root directory is passed here instead of the .idea subdirectory + ideaDir = new File(ideaDir, ".idea") + } + if (ideaDir.isDirectory()) { + def miscFile = new File(ideaDir, "misc.xml") + if (miscFile.isFile()) { + boolean dirty = false + def miscTransformer = new XmlTransformer() + miscTransformer.addAction { root -> + Node rootNode = root.asNode() + def rootManager = rootNode + .component.find { it.@name == 'ProjectRootManager' } + if (!rootManager) { + rootManager = rootNode.appendNode('component', ['name': 'ProjectRootManager', 'version': '2']) + dirty = true + } + def output = rootManager.output + if (!output) { + output = rootManager.appendNode('output') + dirty = true + } + if (!output.@url) { + // Only modify the output url if it doesn't yet have one, or if the existing one is blank somehow. + // This is a sensible default for most setups + output.@url = 'file://$PROJECT_DIR$/build/ideaBuild' + dirty = true + } + } + def result = miscTransformer.transform(miscFile.text) + if (dirty) { + miscFile.write(result) + } + } else { + miscFile.text = """ + + + + + +""" + } + } + } } } } @@ -806,6 +1148,14 @@ tasks.named("processIdeaSettings").configure { dependsOn("injectTags") } +tasks.named("ideVirtualMainClasses").configure { + // Make IntelliJ "Build project" build the mod jars + dependsOn("jar", "reobfJar") + if (!disableSpotless) { + dependsOn("spotlessCheck") + } +} + // workaround variable hiding in pom processing def projectConfigs = project.configurations @@ -824,14 +1174,15 @@ publishing { version = System.getenv("RELEASE_VERSION") ?: identifiedVersion } } - repositories { - maven { - url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases" - allowInsecureProtocol = true - credentials { - username = System.getenv("MAVEN_USER") ?: "NONE" - password = System.getenv("MAVEN_PASSWORD") ?: "NONE" + if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) { + maven { + url = mavenPublishUrl + allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven + credentials { + username = System.getenv("MAVEN_USER") ?: "NONE" + password = System.getenv("MAVEN_PASSWORD") ?: "NONE" + } } } } @@ -867,7 +1218,7 @@ if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) { } } if (usesMixins.toBoolean()) { - addModrinthDep("required", "project", "gtnhmixins") + addModrinthDep("required", "project", "unimixins") } tasks.modrinth.dependsOn(build) tasks.publish.dependsOn(tasks.modrinth) @@ -911,7 +1262,7 @@ if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null } } if (usesMixins.toBoolean()) { - addCurseForgeRelation("requiredDependency", "gtnhmixins") + addCurseForgeRelation("requiredDependency", "unimixins") } tasks.curseforge.dependsOn(build) tasks.publish.dependsOn(tasks.curseforge) @@ -945,10 +1296,21 @@ def addCurseForgeRelation(String type, String name) { } // Updating + +def buildscriptGradleVersion = "8.5" + +tasks.named('wrapper', Wrapper).configure { + gradleVersion = buildscriptGradleVersion +} + tasks.register('updateBuildScript') { group = 'GTNH Buildscript' description = 'Updates the build script to the latest version' + if (gradle.gradleVersion != buildscriptGradleVersion && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_GRADLE_UPDATE')) { + dependsOn('wrapper') + } + doLast { if (performBuildScriptUpdate()) return @@ -961,6 +1323,26 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA performBuildScriptUpdate() } else { out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'") + if (gradle.gradleVersion != buildscriptGradleVersion) { + out.style(Style.SuccessHeader).println("updateBuildScript can update gradle from ${gradle.gradleVersion} to ${buildscriptGradleVersion}\n") + } + } +} + +// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large +tasks.register('faq') { + group = 'GTNH Buildscript' + description = 'Prints frequently asked questions about building a project' + + doLast { + print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " + + "Or you can manually check if the versions are still on the distributing sites - " + + "the links can be found in repositories.gradle and build.gradle:repositories, " + + "but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" + + "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " + + "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " + + "However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " + + "Java 9 or later.") } } @@ -1021,8 +1403,14 @@ boolean isNewBuildScriptVersionAvailable() { String currentBuildScript = getFile("build.gradle").getText() String currentBuildScriptHash = getVersionHash(currentBuildScript) - String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() - String availableBuildScriptHash = getVersionHash(availableBuildScript) + String availableBuildScriptHash + try { + String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() + availableBuildScriptHash = getVersionHash(availableBuildScript) + } catch (IOException e) { + logger.warn("Could not check for buildscript update availability: {}", e.message) + return false + } boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash return !isUpToDate @@ -1101,7 +1489,7 @@ static int replaceParams(File file, Map params) { return 0 } -// Dependency Deobfuscation +// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle) def deobf(String sourceURL) { try { @@ -1143,11 +1531,7 @@ def deobfMaven(String repoURL, String mavenDep) { } def deobfCurse(String curseDep) { - try { - return deobfMaven("https://www.cursemaven.com/", "curse.maven:$curseDep") - } catch (Exception ignored) { - out.style(Style.Failure).println("Failed to get $curseDep from cursemaven.") - } + return dependencies.rfg.deobf("curse.maven:$curseDep") } // The method above is to be preferred. Use this method if the filename is not at the end of the URL. @@ -1155,34 +1539,7 @@ def deobf(String sourceURL, String rawFileName) { String bon2Version = "2.5.1" String fileName = URLDecoder.decode(rawFileName, "UTF-8") String cacheDir = "$project.gradle.gradleUserHomeDir/caches" - String bon2Dir = "$cacheDir/forge_gradle/deobf" - String bon2File = "$bon2Dir/BON2-${bon2Version}.jar" String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar" - String deobfFile = "$cacheDir/modules-2/files-2.1/${fileName}-deobf.jar" - - if (file(deobfFile).exists()) { - return files(deobfFile) - } - - String mappingsVer - String remoteMappings = project.hasProperty('remoteMappings') ? project.remoteMappings : 'https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/' - if (remoteMappings) { - String id = "${forgeVersion.split("\\.")[3]}-$minecraftVersion" - String mappingsZIP = "$cacheDir/forge_gradle/maven_downloader/de/oceanlabs/mcp/mcp_snapshot_nodoc/$id/mcp_snapshot_nodoc-${id}.zip" - - zipMappings(mappingsZIP, remoteMappings, bon2Dir) - - mappingsVer = "snapshot_$id" - } else { - mappingsVer = "${channel}_$mappingsVersion" - } - - download.run { - src "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/com/github/parker8283/BON2/$bon2Version-CUSTOM/BON2-$bon2Version-CUSTOM-all.jar" - dest bon2File - quiet true - overwrite false - } download.run { src sourceURL @@ -1190,50 +1547,8 @@ def deobf(String sourceURL, String rawFileName) { quiet true overwrite false } - - exec { - commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', minecraftVersion, '--mappingsVer', mappingsVer, '--notch' - workingDir bon2Dir - standardOutput = new FileOutputStream("${deobfFile}.log") - } - - return files(deobfFile) -} - -def zipMappings(String zipPath, String url, String bon2Dir) { - File zipFile = new File(zipPath) - if (zipFile.exists()) { - return - } - - String fieldsCache = "$bon2Dir/data/fields.csv" - String methodsCache = "$bon2Dir/data/methods.csv" - - download.run { - src "${url}fields.csv" - dest fieldsCache - quiet true - } - download.run { - src "${url}methods.csv" - dest methodsCache - quiet true - } - - zipFile.getParentFile().mkdirs() - ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile)) - - zos.putNextEntry(new ZipEntry("fields.csv")) - Files.copy(Paths.get(fieldsCache), zos) - zos.closeEntry() - - zos.putNextEntry(new ZipEntry("methods.csv")) - Files.copy(Paths.get(methodsCache), zos) - zos.closeEntry() - - zos.close() + return dependencies.rfg.deobf(files(obfFile)) } - // Helper methods def checkPropertyExists(String propertyName) { @@ -1260,3 +1575,36 @@ def getSecondaryArtifacts() { if (apiPackage) secondaryArtifacts += [apiJar] return secondaryArtifacts } + +def getURL(String main, String fallback) { + return pingURL(main, 10000) ? main : fallback +} + +// credit: https://stackoverflow.com/a/3584332 +def pingURL(String url, int timeout) { + url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates. + try { + HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection() + connection.setConnectTimeout(timeout) + connection.setReadTimeout(timeout) + connection.setRequestMethod("HEAD") + int responseCode = connection.getResponseCode() + return 200 <= responseCode && responseCode <= 399 + } catch (IOException ignored) { + return false + } +} + +// For easier scripting of things that require variables defined earlier in the buildscript +if (file('addon.late.gradle.kts').exists()) { + apply from: 'addon.late.gradle.kts' +} else if (file('addon.late.gradle').exists()) { + apply from: 'addon.late.gradle' +} + +// File for local tweaks not commited to Git +if (file('addon.late.local.gradle.kts').exists()) { + apply from: 'addon.late.local.gradle.kts' +} else if (file('addon.late.local.gradle').exists()) { + apply from: 'addon.late.local.gradle' +} From cc06ae842901baf4fa692f8bc14b594df7a825f1 Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Sat, 9 Dec 2023 19:16:49 +0100 Subject: [PATCH 6/8] Remove wildcard imports --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/squeek/spiceoflife/ModConfig.java | 6 +++--- .../java/squeek/spiceoflife/ModContent.java | 2 +- .../squeek/spiceoflife/ModSpiceOfLife.java | 20 +++++++++---------- .../compat/PacketDispatcherNetty.java | 2 +- .../spiceoflife/foodtracker/FoodModifier.java | 9 ++++----- .../spiceoflife/foodtracker/FoodTracker.java | 14 ++++++------- .../foodtracker/foodgroups/FoodGroup.java | 6 +++--- .../foodgroups/FoodGroupConfig.java | 6 +++--- .../spiceoflife/gui/GuiScreenFoodJournal.java | 12 +++++++---- .../java/squeek/spiceoflife/gui/GuiUtils.java | 2 +- .../spiceoflife/gui/TooltipHandler.java | 6 +++--- .../gui/widget/WidgetButtonSortDirection.java | 2 +- .../gui/widget/WidgetFoodEaten.java | 4 ++-- .../squeek/spiceoflife/helpers/GuiHelper.java | 4 ++-- .../interfaces/IPacketProcessor.java | 2 +- .../inventory/FoodContainerInventory.java | 2 +- .../spiceoflife/items/ItemFoodContainer.java | 10 +++++----- .../spiceoflife/items/ItemFoodJournal.java | 4 ++-- .../spiceoflife/network/PacketBase.java | 4 ++-- .../spiceoflife/network/PacketConfigSync.java | 2 +- .../network/PacketFoodEatenAllTime.java | 2 +- .../spiceoflife/network/PacketFoodGroup.java | 2 +- .../network/PacketFoodHistory.java | 2 +- .../spiceoflife/network/PacketHandler.java | 4 ++-- .../network/PacketToggleFoodContainer.java | 2 +- 26 files changed, 68 insertions(+), 65 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..3499ded 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index e947ea6..d6b0b39 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -8,6 +8,9 @@ import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.compat.PacketDispatcher; import squeek.spiceoflife.foodtracker.FoodHistory; @@ -18,9 +21,6 @@ import squeek.spiceoflife.interfaces.IPacketProcessor; import squeek.spiceoflife.network.PacketBase; import squeek.spiceoflife.network.PacketConfigSync; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ModConfig implements IPackable, IPacketProcessor { diff --git a/src/main/java/squeek/spiceoflife/ModContent.java b/src/main/java/squeek/spiceoflife/ModContent.java index 4deee6a..15d916e 100644 --- a/src/main/java/squeek/spiceoflife/ModContent.java +++ b/src/main/java/squeek/spiceoflife/ModContent.java @@ -4,9 +4,9 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.registry.GameRegistry; import squeek.spiceoflife.items.ItemFoodContainer; import squeek.spiceoflife.items.ItemFoodJournal; -import cpw.mods.fml.common.registry.GameRegistry; public class ModContent { diff --git a/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java b/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java index 2a000b6..c1ac11f 100644 --- a/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java +++ b/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java @@ -7,16 +7,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import squeek.spiceoflife.foodtracker.FoodLists; -import squeek.spiceoflife.foodtracker.FoodModifier; -import squeek.spiceoflife.foodtracker.FoodTracker; -import squeek.spiceoflife.foodtracker.commands.CommandFoodList; -import squeek.spiceoflife.foodtracker.commands.CommandResetHistory; -import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupConfig; -import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupRegistry; -import squeek.spiceoflife.gui.TooltipHandler; -import squeek.spiceoflife.helpers.GuiHelper; -import squeek.spiceoflife.network.PacketHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; @@ -27,6 +17,16 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.relauncher.Side; +import squeek.spiceoflife.foodtracker.FoodLists; +import squeek.spiceoflife.foodtracker.FoodModifier; +import squeek.spiceoflife.foodtracker.FoodTracker; +import squeek.spiceoflife.foodtracker.commands.CommandFoodList; +import squeek.spiceoflife.foodtracker.commands.CommandResetHistory; +import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupConfig; +import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupRegistry; +import squeek.spiceoflife.gui.TooltipHandler; +import squeek.spiceoflife.helpers.GuiHelper; +import squeek.spiceoflife.network.PacketHandler; @Mod(modid = ModInfo.MODID, version = ModInfo.VERSION, dependencies = "required-after:AppleCore") public class ModSpiceOfLife { diff --git a/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java b/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java index 769dd31..666839d 100644 --- a/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java +++ b/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java @@ -2,10 +2,10 @@ import net.minecraft.entity.player.EntityPlayerMP; +import cpw.mods.fml.common.network.NetworkRegistry; import squeek.spiceoflife.compat.PacketDispatcher.PacketTarget; import squeek.spiceoflife.network.PacketBase; import squeek.spiceoflife.network.PacketHandler; -import cpw.mods.fml.common.network.NetworkRegistry; public class PacketDispatcherNetty implements IPacketDispatcher { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java index ca6442f..9741cf3 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java @@ -6,6 +6,10 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.PlayerUseItemEvent; +import com.udojava.evalex.Expression; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import squeek.applecore.api.AppleCoreAPI; import squeek.applecore.api.food.FoodEvent; import squeek.applecore.api.food.FoodValues; @@ -15,11 +19,6 @@ import squeek.spiceoflife.helpers.FoodHelper; import squeek.spiceoflife.items.ItemFoodContainer; -import com.udojava.evalex.Expression; - -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - public class FoodModifier { public static final FoodModifier GLOBAL = new FoodModifier(); diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java index 5e6d974..d660bea 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java @@ -6,13 +6,6 @@ import net.minecraftforge.event.entity.EntityEvent.EntityConstructing; import net.minecraftforge.event.entity.living.LivingDeathEvent; -import squeek.applecore.api.food.FoodEvent; -import squeek.spiceoflife.ModConfig; -import squeek.spiceoflife.compat.PacketDispatcher; -import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupRegistry; -import squeek.spiceoflife.items.ItemFoodJournal; -import squeek.spiceoflife.network.PacketFoodEatenAllTime; -import squeek.spiceoflife.network.PacketFoodHistory; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; @@ -20,6 +13,13 @@ import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent; import cpw.mods.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import cpw.mods.fml.relauncher.Side; +import squeek.applecore.api.food.FoodEvent; +import squeek.spiceoflife.ModConfig; +import squeek.spiceoflife.compat.PacketDispatcher; +import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupRegistry; +import squeek.spiceoflife.items.ItemFoodJournal; +import squeek.spiceoflife.network.PacketFoodEatenAllTime; +import squeek.spiceoflife.network.PacketFoodHistory; public class FoodTracker { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java index 633310d..2b2ee1f 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java @@ -12,14 +12,14 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.oredict.OreDictionary; +import com.google.gson.annotations.SerializedName; + +import cpw.mods.fml.common.registry.GameRegistry; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.foodtracker.FoodModifier; import squeek.spiceoflife.helpers.OreDictionaryHelper; import squeek.spiceoflife.interfaces.IPackable; -import com.google.gson.annotations.SerializedName; -import cpw.mods.fml.common.registry.GameRegistry; - public class FoodGroup implements IPackable { static final transient EnumChatFormatting DEFAULT_FORMATTING = EnumChatFormatting.GRAY; diff --git a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java index 11d1505..ade5d61 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java @@ -11,14 +11,14 @@ import org.apache.commons.io.FilenameUtils; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + import squeek.spiceoflife.ModInfo; import squeek.spiceoflife.ModSpiceOfLife; import squeek.spiceoflife.helpers.FileHelper; import squeek.spiceoflife.helpers.MiscHelper; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - public class FoodGroupConfig { private static final Gson gson = new GsonBuilder().enableComplexMapKeySerialization().setPrettyPrinting().create(); diff --git a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java index 6e23325..447736a 100644 --- a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java +++ b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java @@ -1,9 +1,13 @@ package squeek.spiceoflife.gui; -import java.awt.*; +import java.awt.Color; import java.text.DecimalFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; import java.util.List; +import java.util.Set; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -17,13 +21,13 @@ import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.spiceoflife.foodtracker.FoodEaten; import squeek.spiceoflife.foodtracker.FoodHistory; import squeek.spiceoflife.foodtracker.ProgressInfo; import squeek.spiceoflife.gui.widget.WidgetButtonNextPage; import squeek.spiceoflife.gui.widget.WidgetFoodEaten; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class GuiScreenFoodJournal extends GuiScreen { diff --git a/src/main/java/squeek/spiceoflife/gui/GuiUtils.java b/src/main/java/squeek/spiceoflife/gui/GuiUtils.java index 7bc26a8..a5f7c49 100644 --- a/src/main/java/squeek/spiceoflife/gui/GuiUtils.java +++ b/src/main/java/squeek/spiceoflife/gui/GuiUtils.java @@ -1,6 +1,6 @@ package squeek.spiceoflife.gui; -import java.awt.*; +import java.awt.Color; import java.util.List; import net.minecraft.client.gui.FontRenderer; diff --git a/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java b/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java index 9b18d3b..ee48442 100644 --- a/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java +++ b/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java @@ -13,6 +13,9 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.applecore.api.food.FoodValues; import squeek.spiceoflife.ModConfig; import squeek.spiceoflife.foodtracker.FoodHistory; @@ -23,9 +26,6 @@ import squeek.spiceoflife.helpers.FoodHelper; import squeek.spiceoflife.helpers.KeyHelper; import squeek.spiceoflife.helpers.StringHelper; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class TooltipHandler { diff --git a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java index e5d9f10..90a680f 100644 --- a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java +++ b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java @@ -8,9 +8,9 @@ import org.lwjgl.opengl.GL11; -import squeek.spiceoflife.ModInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import squeek.spiceoflife.ModInfo; @SideOnly(Side.CLIENT) public class WidgetButtonSortDirection extends GuiButton { diff --git a/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java b/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java index 198d5f5..1572c90 100644 --- a/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java +++ b/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java @@ -5,11 +5,11 @@ import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.applecore.api.food.FoodValues; import squeek.spiceoflife.foodtracker.FoodEaten; import squeek.spiceoflife.helpers.ColorHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class WidgetFoodEaten extends Gui { diff --git a/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java b/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java index d07aa7a..6c1b921 100644 --- a/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java @@ -6,13 +6,13 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; +import cpw.mods.fml.common.network.IGuiHandler; +import cpw.mods.fml.common.network.NetworkRegistry; import squeek.spiceoflife.ModSpiceOfLife; import squeek.spiceoflife.gui.GuiFoodContainer; import squeek.spiceoflife.inventory.ContainerFoodContainer; import squeek.spiceoflife.inventory.FoodContainerInventory; import squeek.spiceoflife.items.ItemFoodContainer; -import cpw.mods.fml.common.network.IGuiHandler; -import cpw.mods.fml.common.network.NetworkRegistry; public class GuiHelper implements IGuiHandler { diff --git a/src/main/java/squeek/spiceoflife/interfaces/IPacketProcessor.java b/src/main/java/squeek/spiceoflife/interfaces/IPacketProcessor.java index 2e44af2..4742c18 100644 --- a/src/main/java/squeek/spiceoflife/interfaces/IPacketProcessor.java +++ b/src/main/java/squeek/spiceoflife/interfaces/IPacketProcessor.java @@ -2,8 +2,8 @@ import net.minecraft.entity.player.EntityPlayer; -import squeek.spiceoflife.network.PacketBase; import cpw.mods.fml.relauncher.Side; +import squeek.spiceoflife.network.PacketBase; public interface IPacketProcessor { diff --git a/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java b/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java index a7c82df..c775ef5 100644 --- a/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java +++ b/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java @@ -3,11 +3,11 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import squeek.spiceoflife.items.ItemFoodContainer; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import squeek.spiceoflife.items.ItemFoodContainer; public class FoodContainerInventory extends NBTInventory { diff --git a/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java b/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java index 3a85fa2..335cd93 100644 --- a/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java +++ b/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java @@ -22,6 +22,11 @@ import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.item.ItemTossEvent; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.applecore.api.food.FoodEvent; import squeek.applecore.api.food.FoodValues; import squeek.applecore.api.food.IEdible; @@ -40,11 +45,6 @@ import squeek.spiceoflife.network.NetworkHelper; import squeek.spiceoflife.network.PacketHandler; import squeek.spiceoflife.network.PacketToggleFoodContainer; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemFoodContainer extends Item implements INBTInventoryHaver, IEdible { diff --git a/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java b/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java index b82cbf4..3c23650 100644 --- a/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java +++ b/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java @@ -10,12 +10,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import squeek.spiceoflife.ModConfig; import squeek.spiceoflife.ModContent; import squeek.spiceoflife.ModInfo; import squeek.spiceoflife.gui.GuiScreenFoodJournal; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemFoodJournal extends Item { diff --git a/src/main/java/squeek/spiceoflife/network/PacketBase.java b/src/main/java/squeek/spiceoflife/network/PacketBase.java index 4106d85..a613f98 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketBase.java +++ b/src/main/java/squeek/spiceoflife/network/PacketBase.java @@ -2,11 +2,11 @@ import net.minecraft.network.Packet; +import cpw.mods.fml.common.network.simpleimpl.IMessage; +import io.netty.buffer.ByteBuf; import squeek.spiceoflife.compat.ByteIO; import squeek.spiceoflife.interfaces.IPackable; import squeek.spiceoflife.interfaces.IPacketProcessor; -import cpw.mods.fml.common.network.simpleimpl.IMessage; -import io.netty.buffer.ByteBuf; public abstract class PacketBase implements IMessage, IPackable, IPacketProcessor { diff --git a/src/main/java/squeek/spiceoflife/network/PacketConfigSync.java b/src/main/java/squeek/spiceoflife/network/PacketConfigSync.java index 99a9c7b..91a5ec2 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketConfigSync.java +++ b/src/main/java/squeek/spiceoflife/network/PacketConfigSync.java @@ -2,9 +2,9 @@ import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; import squeek.spiceoflife.ModConfig; import squeek.spiceoflife.compat.IByteIO; -import cpw.mods.fml.relauncher.Side; public class PacketConfigSync extends PacketBase { diff --git a/src/main/java/squeek/spiceoflife/network/PacketFoodEatenAllTime.java b/src/main/java/squeek/spiceoflife/network/PacketFoodEatenAllTime.java index 47ee6fc..f0574fa 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketFoodEatenAllTime.java +++ b/src/main/java/squeek/spiceoflife/network/PacketFoodEatenAllTime.java @@ -2,9 +2,9 @@ import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.foodtracker.FoodHistory; -import cpw.mods.fml.relauncher.Side; public class PacketFoodEatenAllTime extends PacketBase { diff --git a/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java b/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java index a6f7bd0..50d2023 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java +++ b/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java @@ -2,10 +2,10 @@ import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.foodtracker.foodgroups.FoodGroup; import squeek.spiceoflife.foodtracker.foodgroups.FoodGroupRegistry; -import cpw.mods.fml.relauncher.Side; public class PacketFoodGroup extends PacketBase { diff --git a/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java b/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java index 9c4e509..6874b9c 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java +++ b/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java @@ -2,10 +2,10 @@ import net.minecraft.entity.player.EntityPlayer; +import cpw.mods.fml.relauncher.Side; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.foodtracker.FoodEaten; import squeek.spiceoflife.foodtracker.FoodHistory; -import cpw.mods.fml.relauncher.Side; public class PacketFoodHistory extends PacketBase { diff --git a/src/main/java/squeek/spiceoflife/network/PacketHandler.java b/src/main/java/squeek/spiceoflife/network/PacketHandler.java index 17bfaea..fc2c441 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketHandler.java +++ b/src/main/java/squeek/spiceoflife/network/PacketHandler.java @@ -1,10 +1,10 @@ package squeek.spiceoflife.network; -import squeek.spiceoflife.ModInfo; -import squeek.spiceoflife.network.simpleimpl.BetterSimpleNetworkWrapper; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.relauncher.Side; +import squeek.spiceoflife.ModInfo; +import squeek.spiceoflife.network.simpleimpl.BetterSimpleNetworkWrapper; public class PacketHandler implements IMessageHandler { diff --git a/src/main/java/squeek/spiceoflife/network/PacketToggleFoodContainer.java b/src/main/java/squeek/spiceoflife/network/PacketToggleFoodContainer.java index d498074..2aa1fa6 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketToggleFoodContainer.java +++ b/src/main/java/squeek/spiceoflife/network/PacketToggleFoodContainer.java @@ -3,10 +3,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import cpw.mods.fml.relauncher.Side; import squeek.spiceoflife.compat.IByteIO; import squeek.spiceoflife.helpers.FoodHelper; import squeek.spiceoflife.items.ItemFoodContainer; -import cpw.mods.fml.relauncher.Side; public class PacketToggleFoodContainer extends PacketBase { From 3880ba2562d9e694a2552548e5c5906d704a4896 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Wed, 12 Jun 2024 14:24:57 +0200 Subject: [PATCH 7/8] update bs, sa, deps, gradle etc --- build.gradle | 1609 +---------------- dependencies.gradle | 2 +- gradle.properties | 173 +- gradle/wrapper/gradle-wrapper.jar | Bin 61608 -> 43453 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 29 +- gradlew.bat | 20 +- settings.gradle | 15 +- .../java/squeek/spiceoflife/ModConfig.java | 294 +-- .../java/squeek/spiceoflife/ModContent.java | 12 +- .../squeek/spiceoflife/ModSpiceOfLife.java | 4 +- .../compat/PacketDispatcherNetty.java | 10 +- .../spiceoflife/foodtracker/FoodEaten.java | 9 +- .../spiceoflife/foodtracker/FoodHistory.java | 46 +- .../spiceoflife/foodtracker/FoodLists.java | 6 +- .../spiceoflife/foodtracker/FoodModifier.java | 50 +- .../spiceoflife/foodtracker/FoodTracker.java | 31 +- .../foodtracker/MaxHealthHandler.java | 13 +- .../spiceoflife/foodtracker/ProgressInfo.java | 7 +- .../foodtracker/commands/CommandFoodList.java | 28 +- .../commands/CommandResetHistory.java | 16 +- .../foodtracker/foodgroups/FoodGroup.java | 6 +- .../foodgroups/FoodGroupConfig.java | 11 +- .../foodgroups/FoodGroupRegistry.java | 8 +- .../spiceoflife/gui/GuiFoodContainer.java | 39 +- .../spiceoflife/gui/GuiScreenFoodJournal.java | 134 +- .../spiceoflife/gui/TooltipHandler.java | 121 +- .../gui/widget/WidgetButtonNextPage.java | 7 +- .../gui/widget/WidgetButtonSortDirection.java | 11 +- .../gui/widget/WidgetFoodEaten.java | 13 +- .../spiceoflife/helpers/ColorHelper.java | 8 +- .../squeek/spiceoflife/helpers/GuiHelper.java | 18 +- .../spiceoflife/helpers/InventoryHelper.java | 20 +- .../helpers/MealPrioritizationHelper.java | 17 +- .../spiceoflife/helpers/MiscHelper.java | 3 +- .../spiceoflife/helpers/StringHelper.java | 11 +- .../inventory/ContainerFoodContainer.java | 11 +- .../inventory/ContainerGeneric.java | 26 +- .../inventory/FoodContainerInventory.java | 8 +- .../spiceoflife/inventory/NBTInventory.java | 3 +- .../spiceoflife/items/ItemFoodContainer.java | 35 +- .../spiceoflife/items/ItemFoodJournal.java | 13 +- .../spiceoflife/network/NetworkHelper.java | 3 +- .../spiceoflife/network/PacketFoodGroup.java | 8 +- .../network/PacketFoodHistory.java | 9 +- .../BetterSimpleChannelHandlerWrapper.java | 15 +- .../BetterSimpleNetworkWrapper.java | 89 +- 47 files changed, 813 insertions(+), 2211 deletions(-) diff --git a/build.gradle b/build.gradle index 50c3291..e57a16f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,1610 +1,5 @@ -//version: 1702141377 -/* - DO NOT CHANGE THIS FILE! - Also, you may replace this file at any time if there is an update available. - Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/build.gradle for updates. - */ +//version: 1707058017 - -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute -import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar -import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask -import com.gtnewhorizons.retrofuturagradle.util.Distribution -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseRelation -import com.modrinth.minotaur.dependencies.ModDependency -import com.modrinth.minotaur.dependencies.VersionDependency -import org.gradle.internal.logging.text.StyledTextOutput.Style -import org.gradle.internal.logging.text.StyledTextOutputFactory -import org.gradle.internal.xml.XmlTransformer -import org.jetbrains.gradle.ext.Application -import org.jetbrains.gradle.ext.Gradle - -import javax.inject.Inject -import java.nio.file.Files -import java.nio.file.Paths -import java.util.concurrent.TimeUnit - -buildscript { - repositories { - maven { - // GTNH RetroFuturaGradle and ASM Fork - name "GTNH Maven" - url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - allowInsecureProtocol = true - } - mavenLocal() - } -} plugins { - id 'java-library' - id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" - id 'eclipse' - id 'scala' - id 'maven-publish' - id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false - id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false - id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false - id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle - id 'com.github.johnrengelman.shadow' version '8.1.1' apply false - id 'com.palantir.git-version' version '3.0.0' apply false - id 'de.undercouch.download' version '5.4.0' - id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle - id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version - id 'com.modrinth.minotaur' version '2.+' apply false - id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.3.26' -} - -print("You might want to check out './gradlew :faq' if your build fails.\n") - -boolean settingsupdated = verifySettingsGradle() -settingsupdated = verifyGitAttributes() || settingsupdated -if (settingsupdated) - throw new GradleException("Settings has been updated, please re-run task.") - -// In submodules, .git is a file pointing to the real git dir -if (project.file('.git/HEAD').isFile() || project.file('.git').isFile()) { - apply plugin: 'com.palantir.git-version' -} - -def out = services.get(StyledTextOutputFactory).create('an-output') - -def projectJavaVersion = JavaLanguageVersion.of(8) - -boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false -boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false - -final String CHECKSTYLE_CONFIG = """ - - - - - - - - - - - -""" - -checkPropertyExists("modName") -checkPropertyExists("modId") -checkPropertyExists("modGroup") -checkPropertyExists("autoUpdateBuildScript") -checkPropertyExists("minecraftVersion") -checkPropertyExists("forgeVersion") -checkPropertyExists("replaceGradleTokenInFile") -checkPropertyExists("gradleTokenVersion") -checkPropertyExists("apiPackage") -checkPropertyExists("accessTransformersFile") -checkPropertyExists("usesMixins") -checkPropertyExists("mixinPlugin") -checkPropertyExists("mixinsPackage") -checkPropertyExists("coreModClass") -checkPropertyExists("containsMixinsAndOrCoreModOnly") -checkPropertyExists("usesShadowedDependencies") -checkPropertyExists("developmentEnvironmentUserName") - -propertyDefaultIfUnset("generateGradleTokenClass", "") -propertyDefaultIfUnset("includeWellKnownRepositories", true) -propertyDefaultIfUnset("noPublishedSources", false) -propertyDefaultIfUnset("usesMixinDebug", project.usesMixins) -propertyDefaultIfUnset("forceEnableMixins", false) -propertyDefaultIfUnset("channel", "stable") -propertyDefaultIfUnset("mappingsVersion", "12") -propertyDefaultIfUnset("usesMavenPublishing", true) -propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases") -propertyDefaultIfUnset("modrinthProjectId", "") -propertyDefaultIfUnset("modrinthRelations", "") -propertyDefaultIfUnset("curseForgeProjectId", "") -propertyDefaultIfUnset("curseForgeRelations", "") -propertyDefaultIfUnset("minimizeShadowedDependencies", true) -propertyDefaultIfUnset("relocateShadowedDependencies", true) -// Deprecated properties (kept for backwards compat) -propertyDefaultIfUnset("gradleTokenModId", "") -propertyDefaultIfUnset("gradleTokenModName", "") -propertyDefaultIfUnset("gradleTokenGroupName", "") - -propertyDefaultIfUnset("enableModernJavaSyntax", false) // On by default for new projects only -propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new projects only - -// this is meant to be set using the user wide property file. by default we do nothing. -propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea" - -project.extensions.add(com.diffplug.blowdryer.Blowdryer, "Blowdryer", com.diffplug.blowdryer.Blowdryer) // Make blowdryer available in "apply from:" scripts -if (!disableSpotless) { - apply plugin: 'com.diffplug.spotless' - apply from: Blowdryer.file('spotless.gradle') -} - -if (!disableCheckstyle) { - apply plugin: 'checkstyle' - tasks.named("checkstylePatchedMc") { enabled = false } - tasks.named("checkstyleMcLauncher") { enabled = false } - tasks.named("checkstyleIdeVirtualMain") { enabled = false } - tasks.named("checkstyleInjectedTags") { enabled = false } - checkstyle { - config = resources.text.fromString(CHECKSTYLE_CONFIG) - } -} - -String javaSourceDir = "src/main/java/" -String scalaSourceDir = "src/main/scala/" -String kotlinSourceDir = "src/main/kotlin/" - -if (usesShadowedDependencies.toBoolean()) { - apply plugin: "com.github.johnrengelman.shadow" -} - -java { - toolchain { - if (enableModernJavaSyntax.toBoolean()) { - languageVersion.set(JavaLanguageVersion.of(17)) - } else { - languageVersion.set(projectJavaVersion) - } - vendor.set(JvmVendorSpec.AZUL) - } - if (!noPublishedSources) { - withSourcesJar() - } -} - -tasks.withType(JavaCompile).configureEach { - options.encoding = "UTF-8" -} - -tasks.withType(ScalaCompile).configureEach { - options.encoding = "UTF-8" -} - -pluginManager.withPlugin('org.jetbrains.kotlin.jvm') { - // If Kotlin is enabled in the project - kotlin { - jvmToolchain(8) - } - // Kotlin hacks our source sets, so we hack Kotlin's tasks - def disabledKotlinTaskList = [ - "kaptGenerateStubsMcLauncherKotlin", - "kaptGenerateStubsPatchedMcKotlin", - "kaptGenerateStubsInjectedTagsKotlin", - "compileMcLauncherKotlin", - "compilePatchedMcKotlin", - "compileInjectedTagsKotlin", - "kaptMcLauncherKotlin", - "kaptPatchedMcKotlin", - "kaptInjectedTagsKotlin", - "kspMcLauncherKotlin", - "kspPatchedMcKotlin", - "kspInjectedTagsKotlin", - ] - tasks.configureEach { task -> - if (task.name in disabledKotlinTaskList) { - task.enabled = false - } - } -} - -configurations { - create("runtimeOnlyNonPublishable") { - description = "Runtime only dependencies that are not published alongside the jar" - canBeConsumed = false - canBeResolved = false - } - - create("devOnlyNonPublishable") { - description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)" - canBeConsumed = false - canBeResolved = false - } - compileOnly.extendsFrom(devOnlyNonPublishable) - runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable) -} - -if (enableModernJavaSyntax.toBoolean()) { - repositories { - mavenCentral { - mavenContent { - includeGroup("me.eigenraven.java8unsupported") - } - } - } - - dependencies { - annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0' - // workaround for https://github.com/bsideup/jabel/issues/174 - annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0' - compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') { - transitive = false // We only care about the 1 annotation class - } - // Allow using jdk.unsupported classes like sun.misc.Unsafe in the compiled code, working around JDK-8206937. - patchedMinecraft('me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0') - } - - tasks.withType(JavaCompile).configureEach { - if (it.name in ["compileMcLauncherJava", "compilePatchedMcJava"]) { - return - } - sourceCompatibility = 17 // for the IDE support - options.release.set(8) - - javaCompiler.set(javaToolchains.compilerFor { - languageVersion.set(JavaLanguageVersion.of(17)) - vendor.set(JvmVendorSpec.AZUL) - }) - } -} - -eclipse { - classpath { - downloadSources = true - downloadJavadoc = true - } -} - -final String modGroupPath = modGroup.toString().replace('.' as char, '/' as char) -final String apiPackagePath = apiPackage.toString().replace('.' as char, '/' as char) - -String targetPackageJava = javaSourceDir + modGroupPath -String targetPackageScala = scalaSourceDir + modGroupPath -String targetPackageKotlin = kotlinSourceDir + modGroupPath -if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) { - throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin) -} - -if (apiPackage) { - targetPackageJava = javaSourceDir + modGroupPath + "/" + apiPackagePath - targetPackageScala = scalaSourceDir + modGroupPath + "/" + apiPackagePath - targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + apiPackagePath - if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) { - throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin) - } -} - -if (accessTransformersFile) { - for (atFile in accessTransformersFile.split(" ")) { - String targetFile = "src/main/resources/META-INF/" + atFile.trim() - if (!getFile(targetFile).exists()) { - throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile) - } - tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile) - tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile) - } -} else { - boolean atsFound = false - for (File at : sourceSets.getByName("main").resources.files) { - if (at.name.toLowerCase().endsWith("_at.cfg")) { - atsFound = true - tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at) - tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at) - } - } - for (File at : sourceSets.getByName("api").resources.files) { - if (at.name.toLowerCase().endsWith("_at.cfg")) { - atsFound = true - tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at) - tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at) - } - } - if (atsFound) { - logger.warn("Found and added access transformers in the resources folder, please configure gradle.properties to explicitly mention them by name") - } -} - -if (usesMixins.toBoolean()) { - if (mixinsPackage.isEmpty()) { - throw new GradleException("\"usesMixins\" requires \"mixinsPackage\" to be set!") - } - final String mixinPackagePath = mixinsPackage.toString().replaceAll("\\.", "/") - final String mixinPluginPath = mixinPlugin.toString().replaceAll("\\.", "/") - - targetPackageJava = javaSourceDir + modGroupPath + "/" + mixinPackagePath - targetPackageScala = scalaSourceDir + modGroupPath + "/" + mixinPackagePath - targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPackagePath - if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) { - throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin) - } - - if (!mixinPlugin.isEmpty()) { - String targetFileJava = javaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java" - String targetFileScala = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".scala" - String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java" - String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPluginPath + ".kt" - if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) { - throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin) - } - } -} - -if (coreModClass) { - final String coreModPath = coreModClass.toString().replaceAll("\\.", "/") - String targetFileJava = javaSourceDir + modGroupPath + "/" + coreModPath + ".java" - String targetFileScala = scalaSourceDir + modGroupPath + "/" + coreModPath + ".scala" - String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + coreModPath + ".java" - String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + coreModPath + ".kt" - if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) { - throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin) - } -} - -configurations.configureEach { - resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) - - // Make sure GregTech build won't time out - System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String) - System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String) -} - -// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version -try { - 'git config core.fileMode false'.execute() -} -catch (Exception ignored) { - out.style(Style.Failure).println("git isn't installed at all") -} - -// Pulls version first from the VERSION env and then git tag -String identifiedVersion -String versionOverride = System.getenv("VERSION") ?: null -try { - // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty - if (versionOverride == null) { - def gitDetails = versionDetails() - def isDirty = gitVersion().endsWith(".dirty") // No public API for this, isCleanTag has a different meaning - String branchName = gitDetails.branchName ?: (System.getenv('GIT_BRANCH') ?: 'git') - if (branchName.startsWith('origin/')) { - branchName = branchName.minus('origin/') - } - branchName = branchName.replaceAll("[^a-zA-Z0-9-]+", "-") // sanitize branch names for semver - identifiedVersion = gitDetails.lastTag ?: '${gitDetails.gitHash}' - if (gitDetails.commitDistance > 0) { - identifiedVersion += "-${branchName}.${gitDetails.commitDistance}+${gitDetails.gitHash}" - if (isDirty) { - identifiedVersion += "-dirty" - } - } else if (isDirty) { - identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty" - } - } else { - identifiedVersion = versionOverride - } -} -catch (Exception ignored) { - out.style(Style.Failure).text( - 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' + - 'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' + - 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)' - ) - versionOverride = 'NO-GIT-TAG-SET' - identifiedVersion = versionOverride -} -version = identifiedVersion -ext { - modVersion = identifiedVersion -} - -if (identifiedVersion == versionOverride) { - out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7') -} - -group = "com.github.GTNewHorizons" -if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) { - base { - archivesName = customArchiveBaseName - } -} else { - base { - archivesName = modId - } -} - - -minecraft { - if (replaceGradleTokenInFile) { - for (f in replaceGradleTokenInFile.split(',')) { - tagReplacementFiles.add f - } - } - if (gradleTokenModId) { - injectedTags.put gradleTokenModId, modId - } - if (gradleTokenModName) { - injectedTags.put gradleTokenModName, modName - } - if (gradleTokenVersion) { - injectedTags.put gradleTokenVersion, modVersion - } - if (gradleTokenGroupName) { - injectedTags.put gradleTokenGroupName, modGroup - } - if (enableGenericInjection.toBoolean()) { - injectMissingGenerics.set(true) - } - - username = developmentEnvironmentUserName.toString() - - lwjgl3Version = "3.3.2" - - // Enable assertions in the current mod - extraRunJvmArguments.add("-ea:${modGroup}") - - if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) { - if (usesMixinDebug.toBoolean()) { - extraRunJvmArguments.addAll([ - "-Dmixin.debug.countInjections=true", - "-Dmixin.debug.verbose=true", - "-Dmixin.debug.export=true" - ]) - } - } - - // Blowdryer is present in some old mod builds, do not propagate it further as a dependency - // IC2 has no reobf jars in its Maven - groupsToExcludeFromAutoReobfMapping.addAll(["com.diffplug", "com.diffplug.durian", "net.industrial-craft"]) -} - -if (generateGradleTokenClass) { - tasks.injectTags.outputClassName.set(generateGradleTokenClass) -} - -// Custom reobf auto-mappings -configurations.configureEach { - dependencies.configureEach { dep -> - if (dep instanceof org.gradle.api.artifacts.ExternalModuleDependency) { - if (dep.group == "net.industrial-craft" && dep.name == "industrialcraft-2") { - // https://www.curseforge.com/minecraft/mc-mods/industrial-craft/files/2353971 - project.dependencies.reobfJarConfiguration("curse.maven:ic2-242638:2353971") - } - } - } - def obfuscationAttr = it.attributes.getAttribute(ObfuscationAttribute.OBFUSCATION_ATTRIBUTE) - if (obfuscationAttr != null && obfuscationAttr.name == ObfuscationAttribute.SRG) { - resolutionStrategy.eachDependency { DependencyResolveDetails details -> - // Remap CoFH core cursemaven dev jar to the obfuscated version for runObfClient/Server - if (details.requested.group == 'curse.maven' && details.requested.name.endsWith('-69162') && details.requested.version == '2388751') { - details.useVersion '2388750' - details.because 'Pick obfuscated jar' - } - } - } -} - -// Ensure tests have access to minecraft classes -sourceSets { - test { - java { - compileClasspath += sourceSets.patchedMc.output + sourceSets.mcLauncher.output - runtimeClasspath += sourceSets.patchedMc.output + sourceSets.mcLauncher.output - } - } -} - -if (file('addon.gradle.kts').exists()) { - apply from: 'addon.gradle.kts' -} else if (file('addon.gradle').exists()) { - apply from: 'addon.gradle' -} - -// File for local tweaks not commited to Git -if (file('addon.local.gradle.kts').exists()) { - apply from: 'addon.local.gradle.kts' -} else if (file('addon.local.gradle').exists()) { - apply from: 'addon.local.gradle' -} - -// Allow unsafe repos but warn -repositories.configureEach { repo -> - if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) { - if (repo.getUrl() != null && repo.getUrl().getScheme() == "http" && !repo.allowInsecureProtocol) { - logger.warn("Deprecated: Allowing insecure connections for repo '${repo.name}' - add 'allowInsecureProtocol = true'") - repo.allowInsecureProtocol = true - } - } -} - -if (file('repositories.gradle.kts').exists()) { - apply from: 'repositories.gradle.kts' -} else if (file('repositories.gradle').exists()) { - apply from: 'repositories.gradle' -} else { - logger.error("Neither repositories.gradle.kts nor repositories.gradle was found, make sure you extracted the full ExampleMod template.") - throw new RuntimeException("Missing repositories.gradle[.kts]") -} - -configurations { - runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable) - testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable) - for (config in [compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath]) { - if (usesShadowedDependencies.toBoolean()) { - config.extendsFrom(shadowImplementation) - // TODO: remove Compile after all uses are refactored to Implementation - config.extendsFrom(shadeCompile) - config.extendsFrom(shadowCompile) - } - } - // A "bag-of-dependencies"-style configuration for backwards compatibility, gets put in "api" - create("compile") { - description = "Deprecated: use api or implementation instead, gets put in api" - canBeConsumed = false - canBeResolved = false - visible = false - } - create("testCompile") { - description = "Deprecated: use testImplementation instead" - canBeConsumed = false - canBeResolved = false - visible = false - } - api.extendsFrom(compile) - testImplementation.extendsFrom(testCompile) -} - -afterEvaluate { - if (!configurations.compile.allDependencies.empty || !configurations.testCompile.allDependencies.empty) { - logger.warn("This project uses deprecated `compile` dependencies, please migrate to using `api` and `implementation`") - logger.warn("For more details, see https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/dependencies.gradle") - } -} - -repositories { - maven { - name 'Overmind forge repo mirror' - url 'https://gregtech.overminddl1.com/' - } - maven { - name = "GTNH Maven" - url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - allowInsecureProtocol = true - } - maven { - name 'sonatype' - url 'https://oss.sonatype.org/content/repositories/snapshots/' - content { - includeGroup "org.lwjgl" - } - } - if (includeWellKnownRepositories.toBoolean()) { - exclusiveContent { - forRepository { - maven { - name "CurseMaven" - url "https://cursemaven.com" - } - } - filter { - includeGroup "curse.maven" - } - } - exclusiveContent { - forRepository { - maven { - name = "Modrinth" - url = "https://api.modrinth.com/maven" - } - } - filter { - includeGroup "maven.modrinth" - } - } - maven { - name = "ic2" - url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/") - content { - includeGroup "net.industrial-craft" - } - metadataSources { - mavenPom() - artifact() - } - } - maven { - name "MMD Maven" - url "https://maven.mcmoddev.com/" - } - } -} - -def mixinProviderGroup = "io.github.legacymoddingmc" -def mixinProviderModule = "unimixins" -def mixinProviderVersion = "0.1.13" -def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" -def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" -ext.mixinProviderSpec = mixinProviderSpec - -def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json' - -dependencies { - if (usesMixins.toBoolean()) { - annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3') - annotationProcessor('com.google.guava:guava:24.1.1-jre') - annotationProcessor('com.google.code.gson:gson:2.8.6') - annotationProcessor(mixinProviderSpec) - if (usesMixinDebug.toBoolean()) { - runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16') - } - } - if (usesMixins.toBoolean()) { - implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap)) - } else if (forceEnableMixins.toBoolean()) { - runtimeOnlyNonPublishable(mixinProviderSpec) - } -} - -pluginManager.withPlugin('org.jetbrains.kotlin.kapt') { - if (usesMixins.toBoolean()) { - dependencies { - kapt(mixinProviderSpec) - } - } -} - -// Replace old mixin mods with unimixins -// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier -configurations.all { - resolutionStrategy.dependencySubstitution { - substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") - substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") - substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") - substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods") - substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier") - - substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets') - } -} - -dependencies { - constraints { - def minGtnhLibVersion = "0.0.13" - implementation("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { - because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") - } - runtimeOnly("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { - because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") - } - devOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { - because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") - } - runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") { - because("fixes duplicate mod errors in java 17 configurations using old gtnhlib") - } - } -} - -if (file('dependencies.gradle.kts').exists()) { - apply from: 'dependencies.gradle.kts' -} else if (file('dependencies.gradle').exists()) { - apply from: 'dependencies.gradle' -} else { - logger.error("Neither dependencies.gradle.kts nor dependencies.gradle was found, make sure you extracted the full ExampleMod template.") - throw new RuntimeException("Missing dependencies.gradle[.kts]") -} - -tasks.register('generateAssets') { - group = "GTNH Buildscript" - description = "Generates a mixin config file at /src/main/resources/mixins.modid.json if needed" - onlyIf { usesMixins.toBoolean() } - doLast { - def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json") - if (!mixinConfigFile.exists()) { - def mixinPluginLine = "" - if (!mixinPlugin.isEmpty()) { - // We might not have a mixin plugin if we're using early/late mixins - mixinPluginLine += """\n "plugin": "${modGroup}.${mixinPlugin}", """ - } - - mixinConfigFile.text = """{ - "required": true, - "minVersion": "0.8.5-GTNH", - "package": "${modGroup}.${mixinsPackage}",${mixinPluginLine} - "refmap": "${mixingConfigRefMap}", - "target": "@env(DEFAULT)", - "compatibilityLevel": "JAVA_8", - "mixins": [], - "client": [], - "server": [] -} -""" - } - } -} - -if (usesMixins.toBoolean()) { - tasks.named("processResources").configure { - dependsOn("generateAssets") - } - - tasks.named("compileJava", JavaCompile).configure { - options.compilerArgs += [ - // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code - "-XDenableSunApiLintControl", - "-XDignore.symbol.file" - ] - } -} - -tasks.named("processResources", ProcessResources).configure { - // this will ensure that this task is redone when the versions change. - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.mcVersion - exclude("spotless.gradle") - - // replace stuff in mcmod.info, nothing else. replaces ${key} with value in text - filesMatching("mcmod.info") { - expand "minecraftVersion": project.minecraft.mcVersion, - "modVersion": modVersion, - "modId": modId, - "modName": modName - } - - if (usesMixins.toBoolean()) { - dependsOn("compileJava", "compileScala") - } -} - -ext.java17Toolchain = (JavaToolchainSpec spec) -> { - spec.languageVersion.set(JavaLanguageVersion.of(17)) - spec.vendor.set(JvmVendorSpec.matching("jetbrains")) -} - -ext.java17DependenciesCfg = configurations.create("java17Dependencies") { - extendsFrom(configurations.getByName("runtimeClasspath")) // Ensure consistent transitive dependency resolution - canBeConsumed = false -} -ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") { - canBeConsumed = false -} - -dependencies { - def lwjgl3ifyVersion = '1.5.7' - if (modId != 'lwjgl3ify') { - java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}") - } - if (modId != 'hodgepodge') { - java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35') - } - - java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false} -} - -ext.java17JvmArgs = [ - // Java 9+ support - "--illegal-access=warn", - "-Djava.security.manager=allow", - "-Dfile.encoding=UTF-8", - "--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED", - "--add-opens", "java.base/java.net=ALL-UNNAMED", - "--add-opens", "java.base/java.nio=ALL-UNNAMED", - "--add-opens", "java.base/java.io=ALL-UNNAMED", - "--add-opens", "java.base/java.lang=ALL-UNNAMED", - "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", - "--add-opens", "java.base/java.text=ALL-UNNAMED", - "--add-opens", "java.base/java.util=ALL-UNNAMED", - "--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED", - "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", - "--add-opens", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming", - "--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED", - "--add-modules", "jdk.dynalink", - "--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED", - "--add-modules", "java.sql.rowset", - "--add-opens", "java.sql.rowset/javax.sql.rowset.serial=ALL-UNNAMED" -] - -ext.hotswapJvmArgs = [ - // DCEVM advanced hot reload - "-XX:+AllowEnhancedClassRedefinition", - "-XX:HotswapAgent=fatjar" -] - -ext.setupHotswapAgentTask = tasks.register("setupHotswapAgent") { - group = "GTNH Buildscript" - description = "Installs a recent version of HotSwapAgent into the Java 17 JetBrains runtime directory" - def hsaUrl = 'https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jar' - def targetFolderProvider = javaToolchains.launcherFor(java17Toolchain).map {it.metadata.installationPath.dir("lib/hotswap")} - def targetFilename = "hotswap-agent.jar" - onlyIf { - !targetFolderProvider.get().file(targetFilename).asFile.exists() - } - doLast { - def targetFolder = targetFolderProvider.get() - targetFolder.asFile.mkdirs() - download.run { - src hsaUrl - dest targetFolder.file(targetFilename).asFile - overwrite false - tempAndMove true - } - } -} - -public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { - // IntelliJ doesn't seem to allow commandline arguments so we also support an env variable - private boolean enableHotswap = Boolean.valueOf(System.getenv("HOTSWAP")); - - @Input - public boolean getEnableHotswap() { return enableHotswap } - @Option(option = "hotswap", description = "Enables HotSwapAgent for enhanced class reloading under a debugger") - public boolean setEnableHotswap(boolean enable) { enableHotswap = enable } - - @Inject - public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) { - super(side, gradle) - - this.lwjglVersion = 3 - this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain) - this.extraJvmArgs.addAll(project.java17JvmArgs) - this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : [])) - - this.classpath(project.java17PatchDependenciesCfg) - if (side == Distribution.CLIENT) { - this.classpath(project.minecraftTasks.lwjgl3Configuration) - } - // Use a raw provider instead of map to not create a dependency on the task - this.classpath(project.provider(() -> project.tasks.named(superTask, RunMinecraftTask).get().classpath)) - this.classpath.filter { file -> - !file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2 - } - this.classpath(project.java17DependenciesCfg) - } - - public void setup(Project project) { - super.setup(project) - if (project.usesMixins.toBoolean()) { - this.extraJvmArgs.addAll(project.provider(() -> { - def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec)) - mixinCfg.canBeConsumed = false - mixinCfg.transitive = false - enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : [] - })) - } - } -} - -def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient") -runClient17Task.configure { - setup(project) - group = "Modded Minecraft" - description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge" - dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar') - mainClass = "GradleStart" - username = minecraft.username - userUUID = minecraft.userUUID -} - -def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Distribution.DEDICATED_SERVER, "runServer") -runServer17Task.configure { - setup(project) - group = "Modded Minecraft" - description = "Runs the modded server using Java 17, lwjgl3ify and Hodgepodge" - dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar') - mainClass = "GradleStartServer" - extraArgs.add("nogui") -} - -def getManifestAttributes() { - def manifestAttributes = [:] - if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) { - manifestAttributes += ["FMLCorePluginContainsFMLMod": true] - } - - if (accessTransformersFile) { - manifestAttributes += ["FMLAT": accessTransformersFile.toString()] - } - - if (coreModClass) { - manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] - } - - if (usesMixins.toBoolean()) { - manifestAttributes += [ - "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", - "MixinConfigs" : "mixins." + modId + ".json", - "ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean() - ] - } - return manifestAttributes -} - -tasks.named("jar", Jar).configure { - manifest { - attributes(getManifestAttributes()) - } -} - -if (usesShadowedDependencies.toBoolean()) { - tasks.named("shadowJar", ShadowJar).configure { - manifest { - attributes(getManifestAttributes()) - } - - if (minimizeShadowedDependencies.toBoolean()) { - minimize() // This will only allow shading for actually used classes - } - configurations = [ - project.configurations.shadowImplementation, - project.configurations.shadowCompile, - project.configurations.shadeCompile - ] - archiveClassifier.set('dev') - if (relocateShadowedDependencies.toBoolean()) { - relocationPrefix = modGroup + ".shadow" - enableRelocation = true - } - } - configurations.runtimeElements.outgoing.artifacts.clear() - configurations.apiElements.outgoing.artifacts.clear() - configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) - configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar)) - tasks.named("jar", Jar) { - enabled = false - finalizedBy(tasks.shadowJar) - } - tasks.named("reobfJar", ReobfuscatedJar) { - inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile})) - } - AdhocComponentWithVariants javaComponent = (AdhocComponentWithVariants) project.components.findByName("java") - javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { - skip() - } - for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) { - tasks.named(runTask).configure { - dependsOn("shadowJar") - } - } -} -ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar -ext.publishableObfJar = tasks.reobfJar - -tasks.register('apiJar', Jar) { - from(sourceSets.main.allSource) { - include modGroupPath + "/" + apiPackagePath + '/**' - } - - from(sourceSets.main.output) { - include modGroupPath + "/" + apiPackagePath + '/**' - } - - from(sourceSets.main.resources.srcDirs) { - include("LICENSE") - } - - getArchiveClassifier().set('api') -} - -artifacts { - if (!noPublishedSources) { - archives tasks.named("sourcesJar") - } - if (apiPackage) { - archives tasks.named("apiJar") - } -} - -idea { - module { - downloadJavadoc = true - downloadSources = true - inheritOutputDirs = true - } - project { - settings { - if (ideaOverrideBuildType != "") { - delegateActions { - if ("gradle".equalsIgnoreCase(ideaOverrideBuildType)) { - delegateBuildRunToGradle = true - testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.GRADLE - } else if ("idea".equalsIgnoreCase(ideaOverrideBuildType)) { - delegateBuildRunToGradle = false - testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM - } else { - throw GradleScriptException('Accepted value for ideaOverrideBuildType is one of gradle or idea.') - } - } - } - runConfigurations { - "0. Build and Test"(Gradle) { - taskNames = ["build"] - } - "1. Run Client"(Gradle) { - taskNames = ["runClient"] - } - "2. Run Server"(Gradle) { - taskNames = ["runServer"] - } - "1a. Run Client (Java 17)"(Gradle) { - taskNames = ["runClient17"] - } - "2a. Run Server (Java 17)"(Gradle) { - taskNames = ["runServer17"] - } - "1b. Run Client (Java 17, Hotswap)"(Gradle) { - taskNames = ["runClient17"] - envs = ["HOTSWAP": "true"] - } - "2b. Run Server (Java 17, Hotswap)"(Gradle) { - taskNames = ["runServer17"] - envs = ["HOTSWAP": "true"] - } - "3. Run Obfuscated Client"(Gradle) { - taskNames = ["runObfClient"] - } - "4. Run Obfuscated Server"(Gradle) { - taskNames = ["runObfServer"] - } - if (!disableSpotless) { - "5. Apply spotless"(Gradle) { - taskNames = ["spotlessApply"] - } - } - def coreModArgs = "" - if (coreModClass) { - coreModArgs = ' "-Dfml.coreMods.load=' + modGroup + '.' + coreModClass + '"' - } - "Run Client (IJ Native)"(Application) { - mainClass = "GradleStart" - moduleName = project.name + ".ideVirtualMain" - afterEvaluate { - workingDirectory = tasks.runClient.workingDir.absolutePath - programParameters = tasks.runClient.calculateArgs(project).collect { '"' + it + '"' }.join(' ') - jvmArgs = tasks.runClient.calculateJvmArgs(project).collect { '"' + it + '"' }.join(' ') + - ' ' + tasks.runClient.systemProperties.collect { '"-D' + it.key + '=' + it.value.toString() + '"' }.join(' ') + - coreModArgs - } - } - "Run Server (IJ Native)"(Application) { - mainClass = "GradleStartServer" - moduleName = project.name + ".ideVirtualMain" - afterEvaluate { - workingDirectory = tasks.runServer.workingDir.absolutePath - programParameters = tasks.runServer.calculateArgs(project).collect { '"' + it + '"' }.join(' ') - jvmArgs = tasks.runServer.calculateJvmArgs(project).collect { '"' + it + '"' }.join(' ') + - ' ' + tasks.runServer.systemProperties.collect { '"-D' + it.key + '=' + it.value.toString() + '"' }.join(' ') + - coreModArgs - } - } - } - compiler.javac { - afterEvaluate { - javacAdditionalOptions = "-encoding utf8" - moduleJavacAdditionalOptions = [ - (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ') - ] - } - } - withIDEADir { File ideaDir -> - if (!ideaDir.path.contains(".idea")) { - // If an .ipr file exists, the project root directory is passed here instead of the .idea subdirectory - ideaDir = new File(ideaDir, ".idea") - } - if (ideaDir.isDirectory()) { - def miscFile = new File(ideaDir, "misc.xml") - if (miscFile.isFile()) { - boolean dirty = false - def miscTransformer = new XmlTransformer() - miscTransformer.addAction { root -> - Node rootNode = root.asNode() - def rootManager = rootNode - .component.find { it.@name == 'ProjectRootManager' } - if (!rootManager) { - rootManager = rootNode.appendNode('component', ['name': 'ProjectRootManager', 'version': '2']) - dirty = true - } - def output = rootManager.output - if (!output) { - output = rootManager.appendNode('output') - dirty = true - } - if (!output.@url) { - // Only modify the output url if it doesn't yet have one, or if the existing one is blank somehow. - // This is a sensible default for most setups - output.@url = 'file://$PROJECT_DIR$/build/ideaBuild' - dirty = true - } - } - def result = miscTransformer.transform(miscFile.text) - if (dirty) { - miscFile.write(result) - } - } else { - miscFile.text = """ - - - - - -""" - } - } - } - } - } -} - -tasks.named("processIdeaSettings").configure { - dependsOn("injectTags") -} - -tasks.named("ideVirtualMainClasses").configure { - // Make IntelliJ "Build project" build the mod jars - dependsOn("jar", "reobfJar") - if (!disableSpotless) { - dependsOn("spotlessCheck") - } -} - -// workaround variable hiding in pom processing -def projectConfigs = project.configurations - -publishing { - publications { - create("maven", MavenPublication) { - from components.java - - if (apiPackage) { - artifact apiJar - } - - groupId = System.getenv("ARTIFACT_GROUP_ID") ?: project.group - artifactId = System.getenv("ARTIFACT_ID") ?: project.name - // Using the identified version, not project.version as it has the prepended 1.7.10 - version = System.getenv("RELEASE_VERSION") ?: identifiedVersion - } - } - repositories { - if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) { - maven { - url = mavenPublishUrl - allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven - credentials { - username = System.getenv("MAVEN_USER") ?: "NONE" - password = System.getenv("MAVEN_PASSWORD") ?: "NONE" - } - } - } - } -} - -if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) { - apply plugin: 'com.modrinth.minotaur' - - File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md") - - modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = modrinthProjectId - versionNumber = identifiedVersion - versionType = identifiedVersion.endsWith("-pre") ? "beta" : "release" - changelog = changelogFile.exists() ? changelogFile.getText("UTF-8") : "" - uploadFile = publishableObfJar - additionalFiles = getSecondaryArtifacts() - gameVersions = [minecraftVersion] - loaders = ["forge"] - debugMode = false - } - - if (modrinthRelations.size() != 0) { - String[] deps = modrinthRelations.split(";") - deps.each { dep -> - if (dep.size() == 0) { - return - } - String[] parts = dep.split(":") - String[] qual = parts[0].split("-") - addModrinthDep(qual[0], qual[1], parts[1]) - } - } - if (usesMixins.toBoolean()) { - addModrinthDep("required", "project", "unimixins") - } - tasks.modrinth.dependsOn(build) - tasks.publish.dependsOn(tasks.modrinth) -} - -if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null) { - apply plugin: 'com.matthewprenger.cursegradle' - - File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md") - - curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") - project { - id = curseForgeProjectId - if (changelogFile.exists()) { - changelogType = "markdown" - changelog = changelogFile - } - releaseType = identifiedVersion.endsWith("-pre") ? "beta" : "release" - addGameVersion minecraftVersion - addGameVersion "Forge" - mainArtifact publishableObfJar - for (artifact in getSecondaryArtifacts()) addArtifact artifact - } - - options { - javaIntegration = false - forgeGradleIntegration = false - debug = false - } - } - - if (curseForgeRelations.size() != 0) { - String[] deps = curseForgeRelations.split(";") - deps.each { dep -> - if (dep.size() == 0) { - return - } - String[] parts = dep.split(":") - addCurseForgeRelation(parts[0], parts[1]) - } - } - if (usesMixins.toBoolean()) { - addCurseForgeRelation("requiredDependency", "unimixins") - } - tasks.curseforge.dependsOn(build) - tasks.publish.dependsOn(tasks.curseforge) -} - -def addModrinthDep(String scope, String type, String name) { - com.modrinth.minotaur.dependencies.Dependency dep; - if (!(scope in ["required", "optional", "incompatible", "embedded"])) { - throw new Exception("Invalid modrinth dependency scope: " + scope) - } - switch (type) { - case "project": - dep = new ModDependency(name, scope) - break - case "version": - dep = new VersionDependency(name, scope) - break - default: - throw new Exception("Invalid modrinth dependency type: " + type) - } - project.modrinth.dependencies.add(dep) -} - -def addCurseForgeRelation(String type, String name) { - if (!(type in ["requiredDependency", "embeddedLibrary", "optionalDependency", "tool", "incompatible"])) { - throw new Exception("Invalid CurseForge relation type: " + type) - } - CurseArtifact artifact = project.curseforge.curseProjects[0].mainArtifact - CurseRelation rel = (artifact.curseRelations ?: (artifact.curseRelations = new CurseRelation())) - rel."$type"(name) -} - -// Updating - -def buildscriptGradleVersion = "8.5" - -tasks.named('wrapper', Wrapper).configure { - gradleVersion = buildscriptGradleVersion -} - -tasks.register('updateBuildScript') { - group = 'GTNH Buildscript' - description = 'Updates the build script to the latest version' - - if (gradle.gradleVersion != buildscriptGradleVersion && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_GRADLE_UPDATE')) { - dependsOn('wrapper') - } - - doLast { - if (performBuildScriptUpdate()) return - - print("Build script already up-to-date!") - } -} - -if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_UPDATE_CHECK') && isNewBuildScriptVersionAvailable()) { - if (autoUpdateBuildScript.toBoolean()) { - performBuildScriptUpdate() - } else { - out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'") - if (gradle.gradleVersion != buildscriptGradleVersion) { - out.style(Style.SuccessHeader).println("updateBuildScript can update gradle from ${gradle.gradleVersion} to ${buildscriptGradleVersion}\n") - } - } -} - -// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large -tasks.register('faq') { - group = 'GTNH Buildscript' - description = 'Prints frequently asked questions about building a project' - - doLast { - print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " + - "Or you can manually check if the versions are still on the distributing sites - " + - "the links can be found in repositories.gradle and build.gradle:repositories, " + - "but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" + - "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " + - "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " + - "However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " + - "Java 9 or later.") - } -} - -static URL availableBuildScriptUrl() { - new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle") -} - -static URL exampleSettingsGradleUrl() { - new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/settings.gradle.example") -} - -static URL exampleGitAttributesUrl() { - new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/.gitattributes") -} - - -boolean verifyGitAttributes() { - def gitattributesFile = getFile(".gitattributes") - if (!gitattributesFile.exists()) { - println("Downloading default .gitattributes") - exampleGitAttributesUrl().withInputStream { i -> gitattributesFile.withOutputStream { it << i } } - exec { - workingDir '.' - commandLine 'git', 'add', '--renormalize', '.' - } - return true - } - return false -} - -boolean verifySettingsGradle() { - def settingsFile = getFile("settings.gradle") - if (!settingsFile.exists()) { - println("Downloading default settings.gradle") - exampleSettingsGradleUrl().withInputStream { i -> settingsFile.withOutputStream { it << i } } - return true - } - return false -} - -boolean performBuildScriptUpdate() { - if (isNewBuildScriptVersionAvailable()) { - def buildscriptFile = getFile("build.gradle") - availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } } - def out = services.get(StyledTextOutputFactory).create('buildscript-update-output') - out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!") - boolean settingsupdated = verifySettingsGradle() - settingsupdated = verifyGitAttributes() || settingsupdated - if (settingsupdated) - throw new GradleException("Settings has been updated, please re-run task.") - return true - } - return false -} - -boolean isNewBuildScriptVersionAvailable() { - Map parameters = ["connectTimeout": 2000, "readTimeout": 2000] - - String currentBuildScript = getFile("build.gradle").getText() - String currentBuildScriptHash = getVersionHash(currentBuildScript) - String availableBuildScriptHash - try { - String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText() - availableBuildScriptHash = getVersionHash(availableBuildScript) - } catch (IOException e) { - logger.warn("Could not check for buildscript update availability: {}", e.message) - return false - } - - boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash - return !isUpToDate -} - -static String getVersionHash(String buildScriptContent) { - String versionLine = buildScriptContent.find("^//version: [a-z0-9]*") - if (versionLine != null) { - return versionLine.split(": ").last() - } - return "" -} - -// Parameter Deobfuscation - -tasks.register('deobfParams') { - group = 'GTNH Buildscript' - description = 'Rename all obfuscated parameter names inherited from Minecraft classes' - doLast { // TODO - - String mcpDir = "$project.gradle.gradleUserHomeDir/caches/minecraft/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion" - String mcpZIP = "$mcpDir/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip" - String paramsCSV = "$mcpDir/params.csv" - - download.run { - src "https://maven.minecraftforge.net/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion-$minecraftVersion/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip" - dest mcpZIP - overwrite false - } - - if (!file(paramsCSV).exists()) { - println("Extracting MCP archive ...") - copy { - from(zipTree(mcpZIP)) - into(mcpDir) - } - } - - println("Parsing params.csv ...") - Map params = new HashMap<>() - Files.lines(Paths.get(paramsCSV)).forEach { line -> - String[] cells = line.split(",") - if (cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) { - params.put(cells[0], cells[1]) - } - } - - out.style(Style.Success).println("Modified ${replaceParams(file("$projectDir/src/main/java"), params)} files!") - out.style(Style.Failure).println("Don't forget to verify that the code still works as before!\n It could be broken due to duplicate variables existing now\n or parameters taking priority over other variables.") - } -} - -static int replaceParams(File file, Map params) { - int fileCount = 0 - - if (file.isDirectory()) { - for (File f : file.listFiles()) { - fileCount += replaceParams(f, params) - } - return fileCount - } - println("Visiting ${file.getName()} ...") - try { - String content = new String(Files.readAllBytes(file.toPath())) - int hash = content.hashCode() - params.forEach { key, value -> - content = content.replaceAll(key, value) - } - if (hash != content.hashCode()) { - Files.write(file.toPath(), content.getBytes("UTF-8")) - return 1 - } - } catch (Exception e) { - e.printStackTrace() - } - return 0 -} - -// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle) - -def deobf(String sourceURL) { - try { - URL url = new URL(sourceURL) - String fileName = url.getFile() - - //get rid of directories: - int lastSlash = fileName.lastIndexOf("/") - if (lastSlash > 0) { - fileName = fileName.substring(lastSlash + 1) - } - //get rid of extension: - if (fileName.endsWith(".jar") || fileName.endsWith(".litemod")) { - fileName = fileName.substring(0, fileName.lastIndexOf(".")) - } - - String hostName = url.getHost() - if (hostName.startsWith("www.")) { - hostName = hostName.substring(4) - } - List parts = Arrays.asList(hostName.split("\\.")) - Collections.reverse(parts) - hostName = String.join(".", parts) - - return deobf(sourceURL, "$hostName/$fileName") - } catch (Exception ignored) { - return deobf(sourceURL, "deobf/${sourceURL.hashCode()}") - } -} - -def deobfMaven(String repoURL, String mavenDep) { - if (!repoURL.endsWith("/")) { - repoURL += "/" - } - String[] parts = mavenDep.split(":") - parts[0] = parts[0].replace('.', '/') - def jarURL = repoURL + parts[0] + "/" + parts[1] + "/" + parts[2] + "/" + parts[1] + "-" + parts[2] + ".jar" - return deobf(jarURL) -} - -def deobfCurse(String curseDep) { - return dependencies.rfg.deobf("curse.maven:$curseDep") -} - -// The method above is to be preferred. Use this method if the filename is not at the end of the URL. -def deobf(String sourceURL, String rawFileName) { - String bon2Version = "2.5.1" - String fileName = URLDecoder.decode(rawFileName, "UTF-8") - String cacheDir = "$project.gradle.gradleUserHomeDir/caches" - String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar" - - download.run { - src sourceURL - dest obfFile - quiet true - overwrite false - } - return dependencies.rfg.deobf(files(obfFile)) -} -// Helper methods - -def checkPropertyExists(String propertyName) { - if (!project.hasProperty(propertyName)) { - throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/gradle.properties") - } -} - -def propertyDefaultIfUnset(String propertyName, defaultValue) { - if (!project.hasProperty(propertyName) || project.property(propertyName) == "") { - project.ext.setProperty(propertyName, defaultValue) - } -} - -def getFile(String relativePath) { - return new File(projectDir, relativePath) -} - -def getSecondaryArtifacts() { - // Because noPublishedSources from the beginning of the script is somehow not visible here... - boolean noPublishedSources = project.hasProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false - def secondaryArtifacts = [publishableDevJar] - if (!noPublishedSources) secondaryArtifacts += [sourcesJar] - if (apiPackage) secondaryArtifacts += [apiJar] - return secondaryArtifacts -} - -def getURL(String main, String fallback) { - return pingURL(main, 10000) ? main : fallback -} - -// credit: https://stackoverflow.com/a/3584332 -def pingURL(String url, int timeout) { - url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates. - try { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection() - connection.setConnectTimeout(timeout) - connection.setReadTimeout(timeout) - connection.setRequestMethod("HEAD") - int responseCode = connection.getResponseCode() - return 200 <= responseCode && responseCode <= 399 - } catch (IOException ignored) { - return false - } -} - -// For easier scripting of things that require variables defined earlier in the buildscript -if (file('addon.late.gradle.kts').exists()) { - apply from: 'addon.late.gradle.kts' -} else if (file('addon.late.gradle').exists()) { - apply from: 'addon.late.gradle' -} - -// File for local tweaks not commited to Git -if (file('addon.late.local.gradle.kts').exists()) { - apply from: 'addon.late.local.gradle.kts' -} else if (file('addon.late.local.gradle').exists()) { - apply from: 'addon.late.local.gradle' + id 'com.gtnewhorizons.gtnhconvention' } diff --git a/dependencies.gradle b/dependencies.gradle index aeab2a0..112491d 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -4,5 +4,5 @@ dependencies { // Last version compatible with Java 8 shadowImplementation('com.udojava:EvalEx:2.6') - compile('com.github.GTNewHorizons:AppleCore:3.1.9:dev') + compile('com.github.GTNewHorizons:AppleCore:3.3.0:dev') } diff --git a/gradle.properties b/gradle.properties index 9187c6e..44ab20e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,71 +1,150 @@ +# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable. +# LOCAL to test local config updates. +gtnh.settings.blowdryerTag = 0.2.2 + +# Human-readable mod name, available for mcmod.info population. modName = The Spice of Life - Carrot Edition -# This is a case-sensitive string to identify your mod. Convention is to use lower case. +# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation. +# Conventionally lowercase. modId = SpiceOfLife +# Root package of the mod, used to find various classes in other properties, +# mcmod.info substitution, enabling assertions in run tasks, etc. modGroup = squeek.spiceoflife -# WHY is there no version field? -# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the -# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ +# Whether to use modGroup as the maven publishing group. +# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods. +useModGroupForPublishing = false -# Will update your build.gradle automatically whenever an update is available +# Updates your build.gradle and settings.gradle automatically whenever an update is available. autoUpdateBuildScript = false +# Version of Minecraft to target minecraftVersion = 1.7.10 + +# Version of Minecraft Forge to target forgeVersion = 10.13.4.1614 -# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you -# restart Minecraft in development. Choose this dependent on your mod: -# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name -# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +# Specify an MCP channel for dependency deobfuscation and the deobfParams task. +channel = stable + +# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task. +mappingsVersion = 12 + +# Defines other MCP mappings for dependency deobfuscation. +remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ + +# Select a default username for testing your mod. You can always override this per-run by running +# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. developmentEnvironmentUserName = Developer -# Define a source file of your project with: -# public static final String VERSION = "GRADLETOKEN_VERSION"; -# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's -# version in @Mod([...], version = VERSION, [...]) -# Leave these properties empty to skip individual token replacements -replaceGradleTokenInFile = ModInfo.java +# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8. +# See https://github.com/bsideup/jabel for details on how this works. +enableModernJavaSyntax = false + +# Enables injecting missing generics into the decompiled source code for a better coding experience. +# Turns most publicly visible List, Map, etc. into proper List, Map types. +enableGenericInjection = false + +# Generate a class with a String field for the mod version named as defined below. +# If generateGradleTokenClass is empty or not missing, no such class will be generated. +# If gradleTokenVersion is empty or missing, the field will not be present in the class. +generateGradleTokenClass = + +# Name of the token containing the project's current version to generate/replace. +gradleTokenVersion = GRADLETOKEN_VERSION + +# [DEPRECATED] Mod ID replacement token. gradleTokenModId = + +# [DEPRECATED] Mod name replacement token. gradleTokenModName = -gradleTokenVersion = GRADLETOKEN_VERSION + +# [DEPRECATED] Mod Group replacement token. gradleTokenGroupName = +# [DEPRECATED] +# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java +# public static final String VERSION = "GRADLETOKEN_VERSION"; +# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's +# version in @Mod([...], version = VERSION, [...]). +# Leave these properties empty to skip individual token replacements. +replaceGradleTokenInFile = ModInfo.java + # In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can # leave this property empty. -# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api apiPackage = # Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/ -# Example value: mymodid_at.cfg +# There can be multiple files in a space-separated list. +# Example value: mymodid_at.cfg nei_at.cfg accessTransformersFile = # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! usesMixins = false + +# Adds some debug arguments like verbose output and class export. +usesMixinDebug = false + # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. mixinPlugin = + # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! mixinsPackage = + # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! # This parameter is for legacy compatibility only -# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin coreModClass = + # If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class # that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! containsMixinsAndOrCoreModOnly = false -# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your -# responsibility check the licence and request permission for distribution, if required. +# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins. +forceEnableMixins = false + +# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your +# responsibility to check the license and request permission for distribution if required. usesShadowedDependencies = true -# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older -# projects. New projects should not use this parameter. -#customArchiveBaseName = +# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access +# their own classes, making the minimization unreliable. +minimizeShadowedDependencies = true +# If disabled, won't rename the shadowed classes. +relocateShadowedDependencies = true -# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. +# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories. +includeWellKnownRepositories = true + +# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven. +# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables. +# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle. +usesMavenPublishing = true +# Maven repository to publish the mod to. +# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/ + +# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token. +# +# The project's ID on Modrinth. Can be either the slug or the ID. +# Leave this empty if you don't want to publish to Modrinth. +modrinthProjectId = spice-of-life-carrot-edition-unofficial + +# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. +# Syntax: scope1-type1:name1;scope2-type2:name2;... +# Where scope can be one of [required, optional, incompatible, embedded], +# type can be one of [project, version], +# and the name is the Modrinth project or version slug/id of the other mod. +# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech +# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true +modrinthRelations = required-project\:applecore-unofficial + +# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. +# # The project's numeric ID on CurseForge. You can find this in the About Project box. # Leave this empty if you don't want to publish on CurseForge. curseForgeProjectId = 782155 @@ -73,21 +152,41 @@ curseForgeProjectId = 782155 # The project's relations on CurseForge. You can use this to refer to other projects on CurseForge. # Syntax: type1:name1;type2:name2;... # Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible], -# and the name is the CurseForge project id of the other mod. -curseForgeRelations = requiredDependency:applecore-unofficial +# and the name is the CurseForge project slug of the other mod. +# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft +# Note: UniMixins is automatically set as a required dependency if usesMixins = true. +curseForgeRelations = requiredDependency\:applecore-unofficial +# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older +# projects. New projects should not use this parameter. +# customArchiveBaseName = -# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token. +# Optional parameter to have the build automatically fail if an illegal version is used. +# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. +# The check is ONLY performed if the version is a git tag. +# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+ +# versionPattern = -# The project's ID on Modrinth. Can be either the slug or the ID. -# Leave this empty if you don't want to publish on Modrinth. +# Uncomment to prevent the source code from being published. +# noPublishedSources = true -modrinthProjectId = spice-of-life-carrot-edition-unofficial +# Uncomment this to disable Spotless checks. +# This should only be uncommented to keep it easier to sync with upstream/other forks. +# That is, if there is no other active fork/upstream, NEVER change this. +# disableSpotless = true -# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. -# Syntax: scope1-type1:name1;scope2-type2:name2;... -# Where scope can be one of [required, optional, incompatible, embedded], -# type can be one of [project, version], -# and the name is the Modrinth project or version slug/id of the other mod. +# Uncomment this to disable Checkstyle checks (currently wildcard import check). +# disableCheckstyle = true + +# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle" +# (force use delegated build). +# This is meant to be set in $HOME/.gradle/gradle.properties. +# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build. +# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want! +# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you. +# ideaOverrideBuildType = idea + +# Whether IDEA should run spotless checks when pressing the Build button. +# This is meant to be set in $HOME/.gradle/gradle.properties. +# ideaCheckSpotlessOnBuild = true -modrinthRelations = required-project:applecore-unofficial diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710deaf9f98673a68957ea02138b60d0a..e6441136f3d4ba8a0da8d277868979cfbc8ad796 100644 GIT binary patch literal 43453 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-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zG=J^0pHzSAqv5*5ysQ{Puy^-_|IPrii zKS$mE10Zngf>Sgg@BjpRyJbrHeo zD8Ro0LI*W#+9?^xlOS^c>Z^^n^0I|FH^@^`ZR`{H=$ zjO0_$cnpBM7Zcm?H_RXIu-Lu~qweDSV|tEZBZh!e6hQy->}e;d#osZ1hQj{HhHkC0 zJ|F-HKmeTGgDe979ogBz24;@<|I7;TU!IXb@oWMsMECIETmQy`zPtM`|NP}PjzR_u zKMG1Z{%1kWeMfEf(10U#w!clmQ2)JC8zm(Fv!H4dUHQHCFLikID?hrd{0>kCQt?kP zdqn2ZG0}ytcQJ7t_B3s0ZvH3PYjkjQ`Q%;jV@?MK-+z3etBCGGo4f4`y^|AdCs!DH zThTQ;cL5dM{|tB_1y6K3bVa^hx_<9J(}5`2SDz1^0bT!Vm*JV;9~t&{IC{$DUAVV* z{|E=#yN{wNdTY@$6z{_KNA3&%w|vFu1n9XRcM0Ak>`UW!lQ`ah3D4r%}Z diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3499ded..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d4..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..25da30d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/settings.gradle b/settings.gradle index 01ea5f1..94c2daf 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,10 +4,10 @@ pluginManagement { maven { // RetroFuturaGradle name "GTNH Maven" - url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - allowInsecureProtocol = true + url "https://nexus.gtnewhorizons.com/repository/public/" mavenContent { - includeGroup("com.gtnewhorizons.retrofuturagradle") + includeGroup("com.gtnewhorizons") + includeGroupByRegex("com\\.gtnewhorizons\\..+") } } gradlePluginPortal() @@ -17,12 +17,7 @@ pluginManagement { } plugins { - id 'com.diffplug.blowdryerSetup' version '1.6.0' - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22' } -blowdryerSetup { - repoSubfolder 'gtnhShared' - github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0') - //devLocal '.' // Use this when testing config updates locally -} + diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index d6b0b39..5431d74 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -29,7 +29,7 @@ public class ModConfig implements IPackable, IPacketProcessor { public static final String ITEM_LUNCH_BOX_NAME = "lunchbox"; public static final String ITEM_LUNCH_BAG_NAME = "lunchbag"; private static final String COMMENT_SERVER_SIDE_OPTIONS = "These config settings are server-side only\n" - + "Their values will get synced to all clients on the server"; + + "Their values will get synced to all clients on the server"; /* * MAIN */ @@ -96,72 +96,72 @@ public class ModConfig implements IPackable, IPacketProcessor { private static final String FOOD_HUNGER_ROUNDING_MODE_NAME = "food.hunger.rounding.mode"; private static final String FOOD_HUNGER_ROUNDING_MODE_DEFAULT = "round"; private static final String FOOD_HUNGER_ROUNDING_MODE_COMMENT = "Rounding mode used on the hunger value of foods\n" - + "Valid options: 'round', 'floor', 'ceiling'"; + + "Valid options: 'round', 'floor', 'ceiling'"; private static final String AFFECT_FOOD_HUNGER_VALUES_NAME = "affect.food.hunger.values"; private static final boolean AFFECT_FOOD_HUNGER_VALUES_DEFAULT = true; private static final String AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_NAME = "affect.negative.food.hunger.values"; private static final boolean AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_DEFAULT = false; private static final String AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_COMMENT = "If true, foods with negative hunger values will be made more negative as nutritional value decreases\n" - + "NOTE: " - + AFFECT_FOOD_HUNGER_VALUES_NAME - + " must be true for this to have any affect"; + + "NOTE: " + + AFFECT_FOOD_HUNGER_VALUES_NAME + + " must be true for this to have any affect"; private static final String AFFECT_FOOD_SATURATION_MODIFIERS_NAME = "affect.food.saturation.modifiers"; private static final String AFFECT_FOOD_HUNGER_VALUES_COMMENT = "If true, foods' hunger value will be multiplied by the current nutritional value\n" - + "Setting this to false and " - + ModConfig.AFFECT_FOOD_SATURATION_MODIFIERS_NAME - + " to true will make diminishing returns affect saturation only"; + + "Setting this to false and " + + ModConfig.AFFECT_FOOD_SATURATION_MODIFIERS_NAME + + " to true will make diminishing returns affect saturation only"; private static final boolean AFFECT_FOOD_SATURATION_MODIFIERS_DEFAULT = false; private static final String AFFECT_FOOD_SATURATION_MODIFIERS_COMMENT = "If true, foods' saturation modifier will be multiplied by the current nutritional value\n" - + "NOTE: When " - + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME - + " is true, saturation bonuses of foods will automatically decrease as the hunger value of the food decreases\n" - + "Setting this to true when " - + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME - + " is true will make saturation bonuses decrease disproportionately more than hunger values\n" - + "Setting this to true and " - + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME - + " to false will make diminishing returns affect saturation only"; + + "NOTE: When " + + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME + + " is true, saturation bonuses of foods will automatically decrease as the hunger value of the food decreases\n" + + "Setting this to true when " + + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME + + " is true will make saturation bonuses decrease disproportionately more than hunger values\n" + + "Setting this to true and " + + ModConfig.AFFECT_FOOD_HUNGER_VALUES_NAME + + " to false will make diminishing returns affect saturation only"; private static final String AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_NAME = "affect.negative.food.saturation.modifiers"; private static final boolean AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_DEFAULT = false; private static final String AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_COMMENT = "If true, foods with negative saturation modifiers will be made more negative as nutritional value decreases\n" - + "NOTE: " - + AFFECT_FOOD_SATURATION_MODIFIERS_NAME - + " must be true for this to have any affect"; + + "NOTE: " + + AFFECT_FOOD_SATURATION_MODIFIERS_NAME + + " must be true for this to have any affect"; private static final String FOOD_EATING_SPEED_MODIFIER_NAME = "food.eating.speed.modifier"; private static final float FOOD_EATING_SPEED_MODIFIER_DEFAULT = 1; private static final String FOOD_EATING_SPEED_MODIFIER_COMMENT = "If set to greater than zero, food eating speed will be affected by nutritional value\n" - + "(meaning the lower the nutrtional value, the longer it will take to eat it)\n" - + "Eating duration is calcualted using the formula (eating_duration / (nutritional_value^eating_speed_modifier))"; + + "(meaning the lower the nutrtional value, the longer it will take to eat it)\n" + + "Eating duration is calcualted using the formula (eating_duration / (nutritional_value^eating_speed_modifier))"; private static final String FOOD_EATING_DURATION_MAX_NAME = "food.eating.duration.max"; private static final int FOOD_EATING_DURATION_MAX_DEFAULT = 0; private static final String FOOD_EATING_DURATION_MAX_COMMENT = "The maximum time it takes to eat a food after being modified by " - + ModConfig.FOOD_EATING_SPEED_MODIFIER_NAME - + "\n" - + "The default eating duration is 32. Set this to 0 to remove the limit on eating speed.\n" - + "Note: If this is set to 0 and " - + ModConfig.FOOD_EATING_SPEED_MODIFIER_NAME - + " is > 0, a food with 0% nutrtional value will take nearly infinite time to eat"; + + ModConfig.FOOD_EATING_SPEED_MODIFIER_NAME + + "\n" + + "The default eating duration is 32. Set this to 0 to remove the limit on eating speed.\n" + + "Note: If this is set to 0 and " + + ModConfig.FOOD_EATING_SPEED_MODIFIER_NAME + + " is > 0, a food with 0% nutrtional value will take nearly infinite time to eat"; private static final String FOOD_MODIFIER_FORMULA_STRING_NAME = "food.modifier.formula"; private static final String FOOD_MODIFIER_FORMULA_STRING_DEFAULT = "MAX(0, (1 - count/12))^MIN(8, food_hunger_value)"; private static final String FOOD_MODIFIER_FORMULA_STRING_COMMENT = "Uses the EvalEx expression parser\n" - + "See: https://github.com/uklimaschewski/EvalEx for syntax/function documentation\n\n" - + "Available variables:\n" - + "\tcount : The number of times the food (or its food group) has been eaten within the food history\n" - + "\thunger_count : The total amount of hunger that the food (or its food group) has restored within the food history (1 hunger unit = 1/2 hunger bar)\n" - + "\tsaturation_count : The total amount of saturation that the food (or its food group) has restored within the food history (1 saturation unit = 1/2 saturation bar)\n" - + "\tmax_history_length : The maximum length of the food history (see " - + FOOD_HISTORY_LENGTH_NAME - + ")\n" - + "\tcur_history_length : The current length of the food history (<= max_history_length)\n" - + "\tfood_hunger_value : The default amount of hunger the food would restore in hunger units (1 hunger unit = 1/2 hunger bar)\n" - + "\tfood_saturation_mod : The default saturation modifier of the food\n" - + "\tcur_hunger : The current hunger value of the player in hunger units (20 = full)\n" - + "\tcur_saturation : The current saturation value of the player\n" - + "\ttotal_food_eaten : The all-time total number of times any food has been eaten by the player\n" - + "\tfood_group_count : The number of food groups that the food belongs to\n" - + "\tdistinct_food_groups_eaten : The number of distinct food groups in the player's current food history\n" - + "\ttotal_food_groups : The total number of enabled food groups\n" - + "\texact_count : The number of times the food (ignoring food groups) has been eaten within the food history\n"; + + "See: https://github.com/uklimaschewski/EvalEx for syntax/function documentation\n\n" + + "Available variables:\n" + + "\tcount : The number of times the food (or its food group) has been eaten within the food history\n" + + "\thunger_count : The total amount of hunger that the food (or its food group) has restored within the food history (1 hunger unit = 1/2 hunger bar)\n" + + "\tsaturation_count : The total amount of saturation that the food (or its food group) has restored within the food history (1 saturation unit = 1/2 saturation bar)\n" + + "\tmax_history_length : The maximum length of the food history (see " + + FOOD_HISTORY_LENGTH_NAME + + ")\n" + + "\tcur_history_length : The current length of the food history (<= max_history_length)\n" + + "\tfood_hunger_value : The default amount of hunger the food would restore in hunger units (1 hunger unit = 1/2 hunger bar)\n" + + "\tfood_saturation_mod : The default saturation modifier of the food\n" + + "\tcur_hunger : The current hunger value of the player in hunger units (20 = full)\n" + + "\tcur_saturation : The current saturation value of the player\n" + + "\ttotal_food_eaten : The all-time total number of times any food has been eaten by the player\n" + + "\tfood_group_count : The number of food groups that the food belongs to\n" + + "\tdistinct_food_groups_eaten : The number of distinct food groups in the player's current food history\n" + + "\ttotal_food_groups : The total number of enabled food groups\n" + + "\texact_count : The number of times the food (ignoring food groups) has been eaten within the food history\n"; private static final String GIVE_FOOD_JOURNAL_ON_START_NAME = "give.food.journal.as.starting.item"; private static final boolean GIVE_FOOD_JOURNAL_ON_START_DEFAULT = false; private static final String GIVE_FOOD_JOURNAL_ON_START_COMMENT = "If true, a food journal will be given to each player as a starting item"; @@ -183,7 +183,7 @@ public class ModConfig implements IPackable, IPacketProcessor { private static final String CATEGORY_FOODGROUPS = "foodgroups"; private static final String CATEGORY_FOODGROUPS_COMMENT = "Food groups are defined using .json files in /config/SpiceOfLife/\n" - + "See /config/SpiceOfLife/example-food-group.json"; + + "See /config/SpiceOfLife/example-food-group.json"; // whether or not food modifier is actually enabled (we either are the server or know the server has it enabled) public static boolean FOOD_MODIFIER_ENABLED = false; // the value written in the config file @@ -221,172 +221,192 @@ public static void init(File file) { /* * MAIN */ - config.getCategory(CATEGORY_MAIN).setComment(CATEGORY_MAIN_COMMENT); - FOOD_MODIFIER_ENABLED_CONFIG_VAL = config.get( + config.getCategory(CATEGORY_MAIN) + .setComment(CATEGORY_MAIN_COMMENT); + FOOD_MODIFIER_ENABLED_CONFIG_VAL = config + .get( CATEGORY_MAIN, FOOD_MODIFIER_ENABLED_NAME, FOOD_MODIFIER_ENABLED_DEFAULT, - FOOD_MODIFIER_ENABLED_COMMENT).getBoolean(FOOD_MODIFIER_ENABLED_DEFAULT); + FOOD_MODIFIER_ENABLED_COMMENT) + .getBoolean(FOOD_MODIFIER_ENABLED_DEFAULT); // only use the config value immediately when server-side; the client assumes false until the server syncs the // config - if (FMLCommonHandler.instance().getSide() == Side.SERVER) - FOOD_MODIFIER_ENABLED = FOOD_MODIFIER_ENABLED_CONFIG_VAL; + if (FMLCommonHandler.instance() + .getSide() == Side.SERVER) FOOD_MODIFIER_ENABLED = FOOD_MODIFIER_ENABLED_CONFIG_VAL; /* * CARROT */ - config.getCategory(CATEGORY_CARROT).setComment(CATEGORY_CARROT_COMMENT); + config.getCategory(CATEGORY_CARROT) + .setComment(CATEGORY_CARROT_COMMENT); EXTRA_HEARTS_ENABLE = config.get(CATEGORY_CARROT, EXTRA_HEARTS_NAME, EXTRA_HEARTS_DEFAULT, EXTRA_HEARTS_COMMENT) - .getBoolean(EXTRA_HEARTS_DEFAULT); + .getBoolean(EXTRA_HEARTS_DEFAULT); FOOD_MILESTONE_VALUE = config - .get(CATEGORY_CARROT, FOOD_MILESTONE_NAME, FOOD_MILESTONE_DEFAULT, FOOD_MILESTONE_COMMENT) - .getInt(FOOD_MILESTONE_DEFAULT); + .get(CATEGORY_CARROT, FOOD_MILESTONE_NAME, FOOD_MILESTONE_DEFAULT, FOOD_MILESTONE_COMMENT) + .getInt(FOOD_MILESTONE_DEFAULT); - MILESTONE_INCREMENT_VALUE = config.get( - CATEGORY_CARROT, - MILESTONE_INCREMENT_NAME, - MILESTONE_INCREMENT_DEFAULT, - MILESTONE_INCREMENT_COMMENT).getInt(MILESTONE_INCREMENT_DEFAULT); + MILESTONE_INCREMENT_VALUE = config + .get(CATEGORY_CARROT, MILESTONE_INCREMENT_NAME, MILESTONE_INCREMENT_DEFAULT, MILESTONE_INCREMENT_COMMENT) + .getInt(MILESTONE_INCREMENT_DEFAULT); - HEARTS_PER_MILESTONE_VALUE = config.get( - CATEGORY_CARROT, - HEARTS_PER_MILESTONE_NAME, - HEARTS_PER_MILESTONE_DEFAULT, - HEARTS_PER_MILESTONE_COMMENT).getInt(HEARTS_PER_MILESTONE_DEFAULT); + HEARTS_PER_MILESTONE_VALUE = config + .get(CATEGORY_CARROT, HEARTS_PER_MILESTONE_NAME, HEARTS_PER_MILESTONE_DEFAULT, HEARTS_PER_MILESTONE_COMMENT) + .getInt(HEARTS_PER_MILESTONE_DEFAULT); MAX_MILESTONE_VALUE = config - .get(CATEGORY_CARROT, MAX_MILESTONE_NAME, MAX_MILESTONE_DEFAULT, MAX_MILESTONE_COMMENT) - .getInt(MAX_MILESTONE_DEFAULT); + .get(CATEGORY_CARROT, MAX_MILESTONE_NAME, MAX_MILESTONE_DEFAULT, MAX_MILESTONE_COMMENT) + .getInt(MAX_MILESTONE_DEFAULT); FOOD_MILESTONES_PERSISTS_THROUGH_DEATH = config - .get( - CATEGORY_CARROT, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT, - FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT) - .getBoolean(FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT); + .get( + CATEGORY_CARROT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_NAME, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT, + FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_COMMENT) + .getBoolean(FOOD_MILESTONES_PERSISTS_THROUGH_DEATH_DEFAULT); /* * DEV */ - config.getCategory(CATEGORY_DEV).setComment(CATEGORY_DEV_COMMENT); + config.getCategory(CATEGORY_DEV) + .setComment(CATEGORY_DEV_COMMENT); DEV_LOGGING_ENABLED = config - .get(CATEGORY_DEV, DEV_LOGGING_ENABLED_NAME, DEV_LOGGING_ENABLED_DEFAULT, DEV_LOGGING_ENABLED_COMMENT) - .getBoolean(DEV_LOGGING_ENABLED_DEFAULT); + .get(CATEGORY_DEV, DEV_LOGGING_ENABLED_NAME, DEV_LOGGING_ENABLED_DEFAULT, DEV_LOGGING_ENABLED_COMMENT) + .getBoolean(DEV_LOGGING_ENABLED_DEFAULT); /* * SERVER */ - config.getCategory(CATEGORY_SERVER).setComment(CATEGORY_SERVER_COMMENT); + config.getCategory(CATEGORY_SERVER) + .setComment(CATEGORY_SERVER_COMMENT); Property FOOD_MODIFIER_PROPERTY = config.get( - CATEGORY_SERVER, - FOOD_MODIFIER_FORMULA_STRING_NAME, - FOOD_MODIFIER_FORMULA_STRING_DEFAULT, - FOOD_MODIFIER_FORMULA_STRING_COMMENT); + CATEGORY_SERVER, + FOOD_MODIFIER_FORMULA_STRING_NAME, + FOOD_MODIFIER_FORMULA_STRING_DEFAULT, + FOOD_MODIFIER_FORMULA_STRING_COMMENT); // enforce the new default if the config has the old default if (FOOD_MODIFIER_PROPERTY.getString() - .equals("MAX(0, (1 - count/12))^MAX(0, food_hunger_value-ROUND(MAX(0, 1 - count/12), 0))")) + .equals("MAX(0, (1 - count/12))^MAX(0, food_hunger_value-ROUND(MAX(0, 1 - count/12), 0))")) FOOD_MODIFIER_PROPERTY.set(FOOD_MODIFIER_FORMULA_STRING_DEFAULT); FOOD_MODIFIER_FORMULA = FOOD_MODIFIER_PROPERTY.getString(); - FOOD_HISTORY_LENGTH = config.get( - CATEGORY_SERVER, - FOOD_HISTORY_LENGTH_NAME, - FOOD_HISTORY_LENGTH_DEFAULT, - FOOD_HISTORY_LENGTH_COMMENT).getInt(FOOD_HISTORY_LENGTH_DEFAULT); + FOOD_HISTORY_LENGTH = config + .get(CATEGORY_SERVER, FOOD_HISTORY_LENGTH_NAME, FOOD_HISTORY_LENGTH_DEFAULT, FOOD_HISTORY_LENGTH_COMMENT) + .getInt(FOOD_HISTORY_LENGTH_DEFAULT); FOOD_HISTORY_PERSISTS_THROUGH_DEATH = config - .get( - CATEGORY_SERVER, - FOOD_HISTORY_PERSISTS_THROUGH_DEATH_NAME, - FOOD_HISTORY_PERSISTS_THROUGH_DEATH_DEFAULT, - FOOD_HISTORY_PERSISTS_THROUGH_DEATH_COMMENT) - .getBoolean(FOOD_HISTORY_PERSISTS_THROUGH_DEATH_DEFAULT); - FOOD_EATEN_THRESHOLD = config.get( + .get( CATEGORY_SERVER, - FOOD_EATEN_THRESHOLD_NAME, - FOOD_EATEN_THRESHOLD_DEFAULT, - FOOD_EATEN_THRESHOLD_COMMENT).getInt(FOOD_EATEN_THRESHOLD_DEFAULT); - USE_FOOD_GROUPS_AS_WHITELISTS = config.get( + FOOD_HISTORY_PERSISTS_THROUGH_DEATH_NAME, + FOOD_HISTORY_PERSISTS_THROUGH_DEATH_DEFAULT, + FOOD_HISTORY_PERSISTS_THROUGH_DEATH_COMMENT) + .getBoolean(FOOD_HISTORY_PERSISTS_THROUGH_DEATH_DEFAULT); + FOOD_EATEN_THRESHOLD = config + .get(CATEGORY_SERVER, FOOD_EATEN_THRESHOLD_NAME, FOOD_EATEN_THRESHOLD_DEFAULT, FOOD_EATEN_THRESHOLD_COMMENT) + .getInt(FOOD_EATEN_THRESHOLD_DEFAULT); + USE_FOOD_GROUPS_AS_WHITELISTS = config + .get( CATEGORY_SERVER, USE_FOOD_GROUPS_AS_WHITELISTS_NAME, USE_FOOD_GROUPS_AS_WHITELISTS_DEFAULT, - USE_FOOD_GROUPS_AS_WHITELISTS_COMMENT).getBoolean(USE_FOOD_GROUPS_AS_WHITELISTS_DEFAULT); - AFFECT_FOOD_HUNGER_VALUES = config.get( + USE_FOOD_GROUPS_AS_WHITELISTS_COMMENT) + .getBoolean(USE_FOOD_GROUPS_AS_WHITELISTS_DEFAULT); + AFFECT_FOOD_HUNGER_VALUES = config + .get( CATEGORY_SERVER, AFFECT_FOOD_HUNGER_VALUES_NAME, AFFECT_FOOD_HUNGER_VALUES_DEFAULT, - AFFECT_FOOD_HUNGER_VALUES_COMMENT).getBoolean(AFFECT_FOOD_HUNGER_VALUES_DEFAULT); + AFFECT_FOOD_HUNGER_VALUES_COMMENT) + .getBoolean(AFFECT_FOOD_HUNGER_VALUES_DEFAULT); AFFECT_NEGATIVE_FOOD_HUNGER_VALUES = config - .get( - CATEGORY_SERVER, - AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_NAME, - AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_DEFAULT, - AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_COMMENT) - .getBoolean(AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_DEFAULT); - AFFECT_FOOD_SATURATION_MODIFIERS = config.get( + .get( + CATEGORY_SERVER, + AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_NAME, + AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_DEFAULT, + AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_COMMENT) + .getBoolean(AFFECT_NEGATIVE_FOOD_HUNGER_VALUES_DEFAULT); + AFFECT_FOOD_SATURATION_MODIFIERS = config + .get( CATEGORY_SERVER, AFFECT_FOOD_SATURATION_MODIFIERS_NAME, AFFECT_FOOD_SATURATION_MODIFIERS_DEFAULT, - AFFECT_FOOD_SATURATION_MODIFIERS_COMMENT).getBoolean(AFFECT_FOOD_SATURATION_MODIFIERS_DEFAULT); + AFFECT_FOOD_SATURATION_MODIFIERS_COMMENT) + .getBoolean(AFFECT_FOOD_SATURATION_MODIFIERS_DEFAULT); AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS = config - .get( - CATEGORY_SERVER, - AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_NAME, - AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_DEFAULT, - AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_COMMENT) - .getBoolean(AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_DEFAULT); - FOOD_EATING_SPEED_MODIFIER = (float) config.get( + .get( + CATEGORY_SERVER, + AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_NAME, + AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_DEFAULT, + AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_COMMENT) + .getBoolean(AFFECT_NEGATIVE_FOOD_SATURATION_MODIFIERS_DEFAULT); + FOOD_EATING_SPEED_MODIFIER = (float) config + .get( CATEGORY_SERVER, FOOD_EATING_SPEED_MODIFIER_NAME, FOOD_EATING_SPEED_MODIFIER_DEFAULT, - FOOD_EATING_SPEED_MODIFIER_COMMENT).getDouble(FOOD_EATING_SPEED_MODIFIER_DEFAULT); - FOOD_EATING_DURATION_MAX = config.get( + FOOD_EATING_SPEED_MODIFIER_COMMENT) + .getDouble(FOOD_EATING_SPEED_MODIFIER_DEFAULT); + FOOD_EATING_DURATION_MAX = config + .get( CATEGORY_SERVER, FOOD_EATING_DURATION_MAX_NAME, FOOD_EATING_DURATION_MAX_DEFAULT, - FOOD_EATING_DURATION_MAX_COMMENT).getInt(FOOD_EATING_DURATION_MAX_DEFAULT); - GIVE_FOOD_JOURNAL_ON_START = config.get( + FOOD_EATING_DURATION_MAX_COMMENT) + .getInt(FOOD_EATING_DURATION_MAX_DEFAULT); + GIVE_FOOD_JOURNAL_ON_START = config + .get( CATEGORY_SERVER, GIVE_FOOD_JOURNAL_ON_START_NAME, GIVE_FOOD_JOURNAL_ON_START_DEFAULT, - GIVE_FOOD_JOURNAL_ON_START_COMMENT).getBoolean(GIVE_FOOD_JOURNAL_ON_START_DEFAULT); - FOOD_CONTAINERS_MAX_STACKSIZE = config.get( + GIVE_FOOD_JOURNAL_ON_START_COMMENT) + .getBoolean(GIVE_FOOD_JOURNAL_ON_START_DEFAULT); + FOOD_CONTAINERS_MAX_STACKSIZE = config + .get( CATEGORY_SERVER, FOOD_CONTAINERS_MAX_STACKSIZE_NAME, FOOD_CONTAINERS_MAX_STACKSIZE_DEFAULT, - FOOD_CONTAINERS_MAX_STACKSIZE_COMMENT).getInt(FOOD_CONTAINERS_MAX_STACKSIZE_DEFAULT); + FOOD_CONTAINERS_MAX_STACKSIZE_COMMENT) + .getInt(FOOD_CONTAINERS_MAX_STACKSIZE_DEFAULT); - FOOD_HUNGER_ROUNDING_MODE_STRING = config.get( + FOOD_HUNGER_ROUNDING_MODE_STRING = config + .get( CATEGORY_SERVER, FOOD_HUNGER_ROUNDING_MODE_NAME, FOOD_HUNGER_ROUNDING_MODE_DEFAULT, - FOOD_HUNGER_ROUNDING_MODE_COMMENT).getString(); + FOOD_HUNGER_ROUNDING_MODE_COMMENT) + .getString(); setRoundingMode(); /* * CLIENT */ - config.getCategory(CATEGORY_CLIENT).setComment(CATEGORY_CLIENT_COMMENT); + config.getCategory(CATEGORY_CLIENT) + .setComment(CATEGORY_CLIENT_COMMENT); - LEFT_CLICK_OPENS_FOOD_CONTAINERS = config.get( + LEFT_CLICK_OPENS_FOOD_CONTAINERS = config + .get( CATEGORY_CLIENT, LEFT_CLICK_OPENS_FOOD_CONTAINERS_NAME, LEFT_CLICK_OPENS_FOOD_CONTAINERS_DEFAULT, - LEFT_CLICK_OPENS_FOOD_CONTAINERS_COMMENT).getBoolean(LEFT_CLICK_OPENS_FOOD_CONTAINERS_DEFAULT); + LEFT_CLICK_OPENS_FOOD_CONTAINERS_COMMENT) + .getBoolean(LEFT_CLICK_OPENS_FOOD_CONTAINERS_DEFAULT); /* * FOOD GROUPS */ - config.getCategory(CATEGORY_FOODGROUPS).setComment(CATEGORY_FOODGROUPS_COMMENT); + config.getCategory(CATEGORY_FOODGROUPS) + .setComment(CATEGORY_FOODGROUPS_COMMENT); FoodGroupConfig.setup(file.getParentFile()); // remove obsolete config options - config.getCategory(CATEGORY_SERVER).remove("use.food.groups"); - config.getCategory(CATEGORY_FOODGROUPS).clear(); + config.getCategory(CATEGORY_SERVER) + .remove("use.food.groups"); + config.getCategory(CATEGORY_FOODGROUPS) + .clear(); save(); } @@ -408,8 +428,8 @@ public static void setRoundingMode() { } } if (FOOD_HUNGER_ROUNDING_MODE == null) { - ModSpiceOfLife.Log.warn( - "Rounding mode '" + FOOD_HUNGER_ROUNDING_MODE_STRING + "' not recognized; defaulting to 'round'"); + ModSpiceOfLife.Log + .warn("Rounding mode '" + FOOD_HUNGER_ROUNDING_MODE_STRING + "' not recognized; defaulting to 'round'"); FOOD_HUNGER_ROUNDING_MODE_STRING = "round"; FOOD_HUNGER_ROUNDING_MODE = RoundingMode.ROUND; } @@ -420,7 +440,8 @@ public static void save() { } public static void sync(EntityPlayerMP player) { - PacketDispatcher.get().sendTo(new PacketConfigSync(), player); + PacketDispatcher.get() + .sendTo(new PacketConfigSync(), player); } @SideOnly(Side.CLIENT) @@ -470,7 +491,8 @@ public PacketBase processAndReply(Side side, EntityPlayer player) { if (FOOD_MODIFIER_ENABLED) { setRoundingMode(); FoodModifier.onGlobalFormulaChanged(); - FoodHistory.get(player).onHistoryTypeChanged(); + FoodHistory.get(player) + .onHistoryTypeChanged(); FoodGroupRegistry.clear(); } diff --git a/src/main/java/squeek/spiceoflife/ModContent.java b/src/main/java/squeek/spiceoflife/ModContent.java index 15d916e..037e3a4 100644 --- a/src/main/java/squeek/spiceoflife/ModContent.java +++ b/src/main/java/squeek/spiceoflife/ModContent.java @@ -27,13 +27,13 @@ public static void registerItems() { public static void registerRecipes() { GameRegistry - .addShapelessRecipe(new ItemStack(foodJournal), new ItemStack(Items.wheat), new ItemStack(Items.paper)); + .addShapelessRecipe(new ItemStack(foodJournal), new ItemStack(Items.wheat), new ItemStack(Items.paper)); GameRegistry.addShapedRecipe( - new ItemStack(lunchBox), - "_ _", - " _ ", - '_', - new ItemStack(Blocks.heavy_weighted_pressure_plate)); + new ItemStack(lunchBox), + "_ _", + " _ ", + '_', + new ItemStack(Blocks.heavy_weighted_pressure_plate)); GameRegistry.addShapedRecipe(new ItemStack(lunchBag), "p p", " p ", 'p', new ItemStack(Items.paper)); } } diff --git a/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java b/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java index c1ac11f..1f29134 100644 --- a/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java +++ b/src/main/java/squeek/spiceoflife/ModSpiceOfLife.java @@ -52,7 +52,9 @@ public void preInit(FMLPreInitializationEvent event) { public void init(FMLInitializationEvent event) { GuiHelper.init(); FoodTracker foodTracker = new FoodTracker(); - FMLCommonHandler.instance().bus().register(foodTracker); + FMLCommonHandler.instance() + .bus() + .register(foodTracker); MinecraftForge.EVENT_BUS.register(foodTracker); MinecraftForge.EVENT_BUS.register(new FoodModifier()); diff --git a/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java b/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java index 666839d..d760518 100644 --- a/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java +++ b/src/main/java/squeek/spiceoflife/compat/PacketDispatcherNetty.java @@ -22,11 +22,11 @@ public void sendTo(PacketBase packet, EntityPlayerMP player) { @Override public void sendToAllAround(PacketBase packet, PacketTarget packetTarget) { NetworkRegistry.TargetPoint targetPoint = new NetworkRegistry.TargetPoint( - packetTarget.dimension, - packetTarget.x, - packetTarget.y, - packetTarget.z, - packetTarget.range); + packetTarget.dimension, + packetTarget.x, + packetTarget.y, + packetTarget.z, + packetTarget.range); PacketHandler.channel.sendToAllAround(packet, targetPoint); } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodEaten.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodEaten.java index 87b6d9b..f92200a 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodEaten.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodEaten.java @@ -32,7 +32,8 @@ public String toString() { @Override public int hashCode() { - return itemStack.getItem().hashCode(); + return itemStack.getItem() + .hashCode(); } @Override @@ -41,9 +42,9 @@ public boolean equals(Object obj) { final FoodEaten other = ((FoodEaten) obj); final Item item = itemStack.getItem(); final Item otherItem = other.itemStack.getItem(); - return (Item.itemRegistry.getNameForObject(item).equals(Item.itemRegistry.getNameForObject(otherItem)) - && item.equals(otherItem) - && this.itemStack.getItemDamage() == other.itemStack.getItemDamage()); + return (Item.itemRegistry.getNameForObject(item) + .equals(Item.itemRegistry.getNameForObject(otherItem)) && item.equals(otherItem) + && this.itemStack.getItemDamage() == other.itemStack.getItemDamage()); } public static FoodEaten loadFromNBTData(NBTTagCompound nbtFood) { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java index 2c706ea..6444467 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodHistory.java @@ -81,7 +81,8 @@ public int getFoodCountForFoodGroup(ItemStack food, FoodGroup foodGroup) { for (FoodEaten foodEaten : recentHistory) { if (foodEaten.itemStack == null) continue; - if (food.isItemEqual(foodEaten.itemStack) || foodEaten.getFoodGroups().contains(foodGroup)) { + if (food.isItemEqual(foodEaten.itemStack) || foodEaten.getFoodGroups() + .contains(foodGroup)) { count += 1; } } @@ -106,7 +107,7 @@ public boolean containsFoodOrItsFoodGroups(ItemStack food) { if (foodEaten.itemStack == null) continue; if (food.isItemEqual(foodEaten.itemStack) - || MiscHelper.collectionsOverlap(foodGroups, foodEaten.getFoodGroups())) { + || MiscHelper.collectionsOverlap(foodGroups, foodEaten.getFoodGroups())) { return true; } } @@ -124,7 +125,8 @@ public FoodValues getTotalFoodValuesForFoodGroup(ItemStack food, FoodGroup foodG for (FoodEaten foodEaten : recentHistory) { if (foodEaten.itemStack == null) continue; - if (food.isItemEqual(foodEaten.itemStack) || foodEaten.getFoodGroups().contains(foodGroup)) { + if (food.isItemEqual(foodEaten.itemStack) || foodEaten.getFoodGroups() + .contains(foodGroup)) { totalHunger += foodEaten.foodValues.hunger; totalSaturation += foodEaten.foodValues.getSaturationIncrement(); } @@ -269,21 +271,22 @@ private static void spawnParticles(EntityPlayer player, String type, int count) // this function sends a packet to the client world.func_147487_a( - type, - (float) player.posX, - (float) player.posY + 2, - (float) player.posZ, - count, - 1F, - 1F, - 1F, - 0.20000000298023224D); + type, + (float) player.posX, + (float) player.posY + 2, + (float) player.posZ, + count, + 1F, + 1F, + 1F, + 0.20000000298023224D); } @Override // null compound parameter means save persistent data only public void writeToNBTData(NBTTagCompound data) { - NBTTagCompound rootPersistentCompound = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); + NBTTagCompound rootPersistentCompound = player.getEntityData() + .getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); NBTTagCompound nonPersistentCompound = new NBTTagCompound(); NBTTagCompound persistentCompound = new NBTTagCompound(); @@ -322,8 +325,10 @@ public void writeToNBTData(NBTTagCompound data) { if (!persistentCompound.hasNoTags()) rootPersistentCompound.setTag(TAG_KEY, persistentCompound); - if (!player.getEntityData().hasKey(EntityPlayer.PERSISTED_NBT_TAG)) - player.getEntityData().setTag(EntityPlayer.PERSISTED_NBT_TAG, rootPersistentCompound); + if (!player.getEntityData() + .hasKey(EntityPlayer.PERSISTED_NBT_TAG)) + player.getEntityData() + .setTag(EntityPlayer.PERSISTED_NBT_TAG, rootPersistentCompound); } @Override @@ -337,19 +342,20 @@ public void init(Entity entity, World world) {} @Override // null compound parameter means load persistent data only public void readFromNBTData(NBTTagCompound data) { - NBTTagCompound rootPersistentCompound = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); + NBTTagCompound rootPersistentCompound = player.getEntityData() + .getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); NBTTagCompound persistentCompound = rootPersistentCompound.getCompoundTag(TAG_KEY); if ((data != null && data.hasKey(TAG_KEY)) || rootPersistentCompound.hasKey(TAG_KEY)) { NBTTagCompound nonPersistentCompound = data != null ? data.getCompoundTag(TAG_KEY) : new NBTTagCompound(); NBTTagCompound nbtHistory = ModConfig.FOOD_HISTORY_PERSISTS_THROUGH_DEATH - ? persistentCompound.getCompoundTag("History") - : nonPersistentCompound.getCompoundTag("History"); + ? persistentCompound.getCompoundTag("History") + : nonPersistentCompound.getCompoundTag("History"); NBTTagCompound nbtFullHistory = ModConfig.FOOD_MILESTONES_PERSISTS_THROUGH_DEATH - ? persistentCompound.getCompoundTag("FullHistory") - : nonPersistentCompound.getCompoundTag("FullHistory"); + ? persistentCompound.getCompoundTag("FullHistory") + : nonPersistentCompound.getCompoundTag("FullHistory"); fullHistory.readFromNBTData(nbtHistory); fullHistory.readFromNBTData(nbtFullHistory); diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodLists.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodLists.java index 6a9ad7b..566258e 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodLists.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodLists.java @@ -23,8 +23,10 @@ public final class FoodLists { public static void setUp() { if (ModConfig.DEV_LOGGING_ENABLED) ModSpiceOfLife.Log.info("Starting populating food list."); Stream stream = StreamSupport.stream(Item.itemRegistry.spliterator(), false); - allFoods = stream.map(ItemStack::new).filter(FoodHelper::isFood) - .sorted(Comparator.comparing(ItemStack::getDisplayName)).collect(Collectors.toList()); + allFoods = stream.map(ItemStack::new) + .filter(FoodHelper::isFood) + .sorted(Comparator.comparing(ItemStack::getDisplayName)) + .collect(Collectors.toList()); allFoods.forEach((i -> { FoodValues fv = FoodHelper.getFoodValues(i); diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java index 9741cf3..ec2e49c 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodModifier.java @@ -46,7 +46,7 @@ public void getFoodValues(FoodEvent.GetPlayerFoodValues event) { ItemStack actualFood = event.food; if (FoodHelper.isFoodContainer(event.food)) { actualFood = ((ItemFoodContainer) event.food.getItem()) - .getBestFoodForPlayerToEat(event.food, event.player); + .getBestFoodForPlayerToEat(event.food, event.player); } if (actualFood != null) { @@ -91,7 +91,8 @@ public static float getFoodModifier(FoodHistory foodHistory, ItemStack food) { // if this food has mutliple food groups, calculate the modifier for each individually // and then take the average // for foods with <= 1 food group, this just means dividing the modifier by 1 - FoodGroup[] foodGroups = FoodGroupRegistry.getFoodGroupsForFood(food).toArray(new FoodGroup[0]); + FoodGroup[] foodGroups = FoodGroupRegistry.getFoodGroupsForFood(food) + .toArray(new FoodGroup[0]); int numIterations = Math.max(1, foodGroups.length); float modifierSum = 0f; @@ -112,19 +113,36 @@ public static float getFoodGroupModifier(FoodHistory foodHistory, ItemStack food if (foodValues != null) { BigDecimal result = effectiveFoodModifier.expression.with("count", new BigDecimal(count)) - .and("cur_history_length", new BigDecimal(historySize)) - .and("food_hunger_value", new BigDecimal(foodValues.hunger)) - .and("food_saturation_mod", new BigDecimal(foodValues.saturationModifier)) - .and("cur_hunger", new BigDecimal(foodHistory.player.getFoodStats().getFoodLevel())) - .and("cur_saturation", new BigDecimal(foodHistory.player.getFoodStats().getSaturationLevel())) - .and("total_food_eaten", new BigDecimal(foodHistory.totalFoodsEatenAllTime)) - .and("max_history_length", new BigDecimal(ModConfig.FOOD_HISTORY_LENGTH)) - .and("hunger_count", new BigDecimal(totalFoodValues.hunger)) - .and("saturation_count", new BigDecimal(totalFoodValues.saturationModifier)) - .and("food_group_count", new BigDecimal(FoodGroupRegistry.getFoodGroupsForFood(food).size())) - .and("distinct_food_groups_eaten", new BigDecimal(foodHistory.getDistinctFoodGroups().size())) - .and("total_food_groups", new BigDecimal(FoodGroupRegistry.numFoodGroups())) - .and("exact_count", new BigDecimal(foodHistory.getFoodCountIgnoringFoodGroups(food))).eval(); + .and("cur_history_length", new BigDecimal(historySize)) + .and("food_hunger_value", new BigDecimal(foodValues.hunger)) + .and("food_saturation_mod", new BigDecimal(foodValues.saturationModifier)) + .and( + "cur_hunger", + new BigDecimal( + foodHistory.player.getFoodStats() + .getFoodLevel())) + .and( + "cur_saturation", + new BigDecimal( + foodHistory.player.getFoodStats() + .getSaturationLevel())) + .and("total_food_eaten", new BigDecimal(foodHistory.totalFoodsEatenAllTime)) + .and("max_history_length", new BigDecimal(ModConfig.FOOD_HISTORY_LENGTH)) + .and("hunger_count", new BigDecimal(totalFoodValues.hunger)) + .and("saturation_count", new BigDecimal(totalFoodValues.saturationModifier)) + .and( + "food_group_count", + new BigDecimal( + FoodGroupRegistry.getFoodGroupsForFood(food) + .size())) + .and( + "distinct_food_groups_eaten", + new BigDecimal( + foodHistory.getDistinctFoodGroups() + .size())) + .and("total_food_groups", new BigDecimal(FoodGroupRegistry.numFoodGroups())) + .and("exact_count", new BigDecimal(foodHistory.getFoodCountIgnoringFoodGroups(food))) + .eval(); return result.floatValue(); } @@ -137,7 +155,7 @@ public void getFoodEatingSpeed(PlayerUseItemEvent.Start event) { ItemStack actualFood = event.item; if (FoodHelper.isFoodContainer(event.item)) { actualFood = ((ItemFoodContainer) event.item.getItem()) - .getBestFoodForPlayerToEat(event.item, event.entityPlayer); + .getBestFoodForPlayerToEat(event.item, event.entityPlayer); } if (actualFood != null) { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java b/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java index d660bea..c91f061 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/FoodTracker.java @@ -24,11 +24,13 @@ public class FoodTracker { public static int getFoodHistoryLengthInRelevantUnits(EntityPlayer player) { - return FoodHistory.get(player).getHistoryLength(); + return FoodHistory.get(player) + .getHistoryLength(); } public static ItemStack getFoodLastEatenBy(EntityPlayer player) { - return FoodHistory.get(player).getLastEatenFood().itemStack; + return FoodHistory.get(player) + .getLastEatenFood().itemStack; } /** @@ -46,9 +48,10 @@ public void onFoodEaten(FoodEvent.FoodEaten event) { public static void addFoodEatenByPlayer(FoodEaten foodEaten, EntityPlayer player) { // client needs to be told by the server otherwise the client can get out of sync easily - if (!player.worldObj.isRemote && player instanceof EntityPlayerMP) - PacketDispatcher.get().sendTo(new PacketFoodHistory(foodEaten), (EntityPlayerMP) player); - FoodHistory.get(player).addFood(foodEaten); + if (!player.worldObj.isRemote && player instanceof EntityPlayerMP) PacketDispatcher.get() + .sendTo(new PacketFoodHistory(foodEaten), (EntityPlayerMP) player); + FoodHistory.get(player) + .addFood(foodEaten); } /** @@ -85,10 +88,12 @@ public void onPlayerLogin(PlayerLoggedInEvent event) { } public static void syncFoodHistory(FoodHistory foodHistory) { - PacketDispatcher.get().sendTo( + PacketDispatcher.get() + .sendTo( new PacketFoodEatenAllTime(foodHistory.totalFoodsEatenAllTime), (EntityPlayerMP) foodHistory.player); - PacketDispatcher.get().sendTo(new PacketFoodHistory(foodHistory, true), (EntityPlayerMP) foodHistory.player); + PacketDispatcher.get() + .sendTo(new PacketFoodHistory(foodHistory, true), (EntityPlayerMP) foodHistory.player); MaxHealthHandler.updateFoodHPModifier(foodHistory.player); } @@ -106,8 +111,9 @@ public void onPlayerChangedDimension(PlayerChangedDimensionEvent event) { */ @SubscribeEvent public void onLivingDeathEvent(LivingDeathEvent event) { - if (FMLCommonHandler.instance().getEffectiveSide().isClient() || !(event.entity instanceof EntityPlayer)) - return; + if (FMLCommonHandler.instance() + .getEffectiveSide() + .isClient() || !(event.entity instanceof EntityPlayer)) return; EntityPlayer player = (EntityPlayer) event.entity; @@ -120,7 +126,9 @@ public void onLivingDeathEvent(LivingDeathEvent event) { */ @SubscribeEvent public void onPlayerRespawn(PlayerRespawnEvent event) { - if (FMLCommonHandler.instance().getEffectiveSide().isClient()) return; + if (FMLCommonHandler.instance() + .getEffectiveSide() + .isClient()) return; // load any persistent food history data FoodHistory foodHistory = FoodHistory.get(event.player); @@ -135,6 +143,7 @@ public void onPlayerRespawn(PlayerRespawnEvent event) { */ @SubscribeEvent public void onClientConnectedToServer(ClientConnectedToServerEvent event) { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) ModConfig.assumeClientOnly(); + if (FMLCommonHandler.instance() + .getEffectiveSide() == Side.CLIENT) ModConfig.assumeClientOnly(); } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java b/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java index b7e3098..1899fdb 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/MaxHealthHandler.java @@ -23,7 +23,7 @@ public static boolean updateFoodHPModifier(EntityPlayer player) { } final IAttributeInstance attribute = player.getAttributeMap() - .getAttributeInstance(SharedMonsterAttributes.maxHealth); + .getAttributeInstance(SharedMonsterAttributes.maxHealth); final AttributeModifier prevModifier = attribute.getModifier(SOL_HEALTH_MODIFIER_ID); final FoodHistory foodHistory = FoodHistory.get(player); ProgressInfo progressInfo = foodHistory.getProgressInfo(); @@ -33,10 +33,10 @@ public static boolean updateFoodHPModifier(EntityPlayer player) { boolean hasChanged = prevModifier == null || prevModifier.getAmount() != totalHealthModifier; AttributeModifier modifier = new AttributeModifier( - SOL_HEALTH_MODIFIER_ID, - "Health gained from trying new foods", - totalHealthModifier, - 0); + SOL_HEALTH_MODIFIER_ID, + "Health gained from trying new foods", + totalHealthModifier, + 0); updateHealthModifier(player, modifier); @@ -46,7 +46,8 @@ public static boolean updateFoodHPModifier(EntityPlayer player) { private static void updateHealthModifier(EntityPlayer player, AttributeModifier modifier) { float oldMax = player.getMaxHealth(); - IAttributeInstance attribute = player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth); + IAttributeInstance attribute = player.getAttributeMap() + .getAttributeInstance(SharedMonsterAttributes.maxHealth); attribute.removeModifier(modifier); attribute.applyModifier(modifier); diff --git a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java index a2913f9..95f7803 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/ProgressInfo.java @@ -25,8 +25,11 @@ public final class ProgressInfo { public final int foodsPointsEaten; ProgressInfo(FoodHistory foodList) { - foodsPointsEaten = foodList.getFullHistory().stream().filter(eaten -> shouldCount(eaten.itemStack)) - .mapToInt(eaten -> eaten.foodValues.hunger).sum(); + foodsPointsEaten = foodList.getFullHistory() + .stream() + .filter(eaten -> shouldCount(eaten.itemStack)) + .mapToInt(eaten -> eaten.foodValues.hunger) + .sum(); } public static boolean shouldCount(ItemStack food) { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java index dc44731..74b13aa 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandFoodList.java @@ -32,8 +32,10 @@ public boolean canCommandSenderUseCommand(ICommandSender commandSender) { @Override public List addTabCompletionOptions(ICommandSender commandSender, String[] curArgs) { if (curArgs.length == 1) return Arrays.asList("size", "sync"); - else if (curArgs.length == 2) - return getListOfStringsMatchingLastWord(curArgs, MinecraftServer.getServer().getAllUsernames()); + else if (curArgs.length == 2) return getListOfStringsMatchingLastWord( + curArgs, + MinecraftServer.getServer() + .getAllUsernames()); else return null; } @@ -63,7 +65,7 @@ public void processCommand(ICommandSender commandSender, String[] args) { if (args.length > 0) { final boolean isOp = commandSender.canCommandSenderUseCommand(4, "targetOtherPlayer"); final EntityPlayerMP player = (isOp && args.length > 1) ? getPlayer(commandSender, args[1]) - : getCommandSenderAsPlayer(commandSender); + : getCommandSenderAsPlayer(commandSender); final FoodHistory foodHistory = FoodHistory.get(player); if (args[0].equals("size")) { @@ -73,23 +75,23 @@ public void processCommand(ICommandSender commandSender, String[] args) { final int foodsUntilNextMilestone = progressInfo.foodPointsUntilNextMilestone(); commandSender.addChatMessage( - new ChatComponentText( - "" + EnumChatFormatting.BOLD - + EnumChatFormatting.DARK_AQUA - + player.getDisplayName() - + "'s" - + EnumChatFormatting.RESET - + " food stats:")); + new ChatComponentText( + "" + EnumChatFormatting.BOLD + + EnumChatFormatting.DARK_AQUA + + player.getDisplayName() + + "'s" + + EnumChatFormatting.RESET + + " food stats:")); commandSender.addChatMessage(new ChatComponentText("Half-Shanks worth eaten: " + foodsEaten)); commandSender.addChatMessage( - new ChatComponentText("Bonus Hearts: " + (milestone * ProgressInfo.HEARTS_PER_MILESTONE))); + new ChatComponentText("Bonus Hearts: " + (milestone * ProgressInfo.HEARTS_PER_MILESTONE))); commandSender.addChatMessage( - new ChatComponentText("Half-Shanks until next bonus heart: " + foodsUntilNextMilestone)); + new ChatComponentText("Half-Shanks until next bonus heart: " + foodsUntilNextMilestone)); return; } else if (args[0].equals("sync")) { FoodTracker.syncFoodHistory(foodHistory); commandSender - .addChatMessage(new ChatComponentText("Synced food history for " + player.getDisplayName())); + .addChatMessage(new ChatComponentText("Synced food history for " + player.getDisplayName())); return; } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandResetHistory.java b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandResetHistory.java index 5a2c576..f6f0cf0 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandResetHistory.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/commands/CommandResetHistory.java @@ -19,8 +19,10 @@ public class CommandResetHistory extends CommandBase { @Override public List addTabCompletionOptions(ICommandSender commandSender, String[] curArgs) { if (curArgs.length == 1) return Collections.singletonList("reset"); - else if (curArgs.length == 2) - return getListOfStringsMatchingLastWord(curArgs, MinecraftServer.getServer().getAllUsernames()); + else if (curArgs.length == 2) return getListOfStringsMatchingLastWord( + curArgs, + MinecraftServer.getServer() + .getAllUsernames()); else return null; } @@ -50,15 +52,15 @@ public void processCommand(ICommandSender commandSender, String[] args) { if (args.length > 0) { if (args[0].equals("reset")) { EntityPlayerMP playerToReset = args.length > 1 ? getPlayer(commandSender, args[1]) - : getCommandSenderAsPlayer(commandSender); + : getCommandSenderAsPlayer(commandSender); FoodHistory foodHistoryToReset = FoodHistory.get(playerToReset); foodHistoryToReset.reset(); FoodTracker.syncFoodHistory(foodHistoryToReset); func_152374_a( - commandSender, - this, - 0, - "Reset all 'The Spice of Life' mod data for " + playerToReset.getDisplayName()); + commandSender, + this, + 0, + "Reset all 'The Spice of Life' mod data for " + playerToReset.getDisplayName()); return; } } diff --git a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java index 2b2ee1f..c69f8a1 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroup.java @@ -53,7 +53,7 @@ public FoodGroup(String identifier, String name) { public void initFromConfig() { if (foodStringsByType == null) throw new RuntimeException( - toString() + " food group (" + identifier + ".json) missing required \"food\" property"); + toString() + " food group (" + identifier + ".json) missing required \"food\" property"); formatting = EnumChatFormatting.getValueByName(color); if (formatting == null) formatting = DEFAULT_FORMATTING; @@ -152,12 +152,12 @@ public void init() { public boolean isFoodIncluded(ItemStack food) { return !isFoodExcluded(food) && matchingItemHashes.contains(OreDictionaryHelper.getItemStackHash(food)) - || matchingItemHashes.contains(OreDictionaryHelper.getWildCardItemStackHash(food)); + || matchingItemHashes.contains(OreDictionaryHelper.getWildCardItemStackHash(food)); } public boolean isFoodExcluded(ItemStack food) { return excludedItemHashes.contains(OreDictionaryHelper.getItemStackHash(food)) - || excludedItemHashes.contains(OreDictionaryHelper.getWildCardItemStackHash(food)); + || excludedItemHashes.contains(OreDictionaryHelper.getWildCardItemStackHash(food)); } public Set getMatchingItemStackHashes() { diff --git a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java index ade5d61..7c88f66 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupConfig.java @@ -21,7 +21,9 @@ public class FoodGroupConfig { - private static final Gson gson = new GsonBuilder().enableComplexMapKeySerialization().setPrettyPrinting().create(); + private static final Gson gson = new GsonBuilder().enableComplexMapKeySerialization() + .setPrettyPrinting() + .create(); private static File[] configFiles; public static void setup(File configDirectory) { @@ -44,7 +46,7 @@ public static void writeExampleFoodGroup(File configDirectory) { FileHelper.copyFile(sourceFile, exampleFoodGroupDest, shouldOverwrite); } else { InputStream exampleFoodGroupInputStream = FoodGroupConfig.class.getClassLoader() - .getResourceAsStream(exampleFoodGroupRelativePath); + .getResourceAsStream(exampleFoodGroupRelativePath); FileHelper.copyFile(exampleFoodGroupInputStream, exampleFoodGroupDest, shouldOverwrite); exampleFoodGroupInputStream.close(); } @@ -63,7 +65,7 @@ public static boolean shouldOverwriteExampleFoodGroup(File exampleFoodGroup) thr BufferedReader exampleFoodGroupReader = null; try { exampleFoodGroupReader = new BufferedReader( - new InputStreamReader(exampleFoodGroupStream, StandardCharsets.UTF_8)); + new InputStreamReader(exampleFoodGroupStream, StandardCharsets.UTF_8)); String firstLine = exampleFoodGroupReader.readLine(); return firstLine == null || !firstLine.equals("// Mod Version: " + ModInfo.VERSION); } catch (IOException e) { @@ -75,7 +77,8 @@ public static boolean shouldOverwriteExampleFoodGroup(File exampleFoodGroup) thr public static void load() { for (File configFile : configFiles) { - boolean isJson = FilenameUtils.getExtension(configFile.getName()).equalsIgnoreCase("json"); + boolean isJson = FilenameUtils.getExtension(configFile.getName()) + .equalsIgnoreCase("json"); if (!isJson) continue; InputStreamReader reader = null; diff --git a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupRegistry.java b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupRegistry.java index 6bc5e5f..195d48d 100644 --- a/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupRegistry.java +++ b/src/main/java/squeek/spiceoflife/foodtracker/foodgroups/FoodGroupRegistry.java @@ -58,7 +58,7 @@ public static boolean isFoodBlacklisted(ItemStack food) { public static Set getFoodGroupsForFood(ItemStack food) { Set wildCardFoodGroups = foodToIncludedFoodGroups - .get(OreDictionaryHelper.getWildCardItemStackHash(food)); + .get(OreDictionaryHelper.getWildCardItemStackHash(food)); Set exactFoodGroups = foodToIncludedFoodGroups.get(OreDictionaryHelper.getItemStackHash(food)); Set allFoodGroups = new HashSet<>(); @@ -85,7 +85,8 @@ private static boolean isAnyFoodGroupBlacklist(Collection foodGroups) public static void sync(EntityPlayerMP player) { for (FoodGroup foodGroup : foodGroups.values()) { - PacketDispatcher.get().sendTo(new PacketFoodGroup(foodGroup), player); + PacketDispatcher.get() + .sendTo(new PacketFoodGroup(foodGroup), player); } } @@ -96,7 +97,8 @@ public static void setInStone() { foodGroup.init(); for (Integer itemHash : foodGroup.getMatchingItemStackHashes()) { foodToIncludedFoodGroups.computeIfAbsent(itemHash, k -> new HashSet<>()); - foodToIncludedFoodGroups.get(itemHash).add(foodGroup); + foodToIncludedFoodGroups.get(itemHash) + .add(foodGroup); } } } diff --git a/src/main/java/squeek/spiceoflife/gui/GuiFoodContainer.java b/src/main/java/squeek/spiceoflife/gui/GuiFoodContainer.java index 5c3d452..c5f6be9 100644 --- a/src/main/java/squeek/spiceoflife/gui/GuiFoodContainer.java +++ b/src/main/java/squeek/spiceoflife/gui/GuiFoodContainer.java @@ -18,8 +18,8 @@ public class GuiFoodContainer extends GuiContainer { public static final ResourceLocation guiTexture = new ResourceLocation( - ModInfo.MODID.toLowerCase(Locale.ROOT), - "textures/gui/foodcontainer.png"); + ModInfo.MODID.toLowerCase(Locale.ROOT), + "textures/gui/foodcontainer.png"); public int xStart; public int yStart; protected IInventory playerInventory = null; @@ -43,17 +43,17 @@ public void initGui() { @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { this.fontRendererObj.drawString( - this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() - : I18n.format(this.inventory.getInventoryName()), - 8, - 6, - 4210752); + this.inventory.hasCustomInventoryName() ? this.inventory.getInventoryName() + : I18n.format(this.inventory.getInventoryName()), + 8, + 6, + 4210752); this.fontRendererObj.drawString( - this.playerInventory.hasCustomInventoryName() ? this.playerInventory.getInventoryName() - : I18n.format(this.playerInventory.getInventoryName()), - 8, - this.ySize - 96 + 3, - 4210752); + this.playerInventory.hasCustomInventoryName() ? this.playerInventory.getInventoryName() + : I18n.format(this.playerInventory.getInventoryName()), + 8, + this.ySize - 96 + 3, + 4210752); super.drawGuiContainerForegroundLayer(mouseX, mouseY); } @@ -61,7 +61,8 @@ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { @Override protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(guiTexture); + this.mc.getTextureManager() + .bindTexture(guiTexture); this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); int slotsX = ((ContainerFoodContainer) inventorySlots).slotsX - 1; @@ -69,12 +70,12 @@ protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) for (int slotNum = 0; slotNum < inventory.getSizeInventory(); slotNum++) { int x = slotsX + slotNum * GuiHelper.STANDARD_SLOT_WIDTH; drawTexturedModalRect( - xStart + x, - yStart + slotsY, - GuiHelper.STANDARD_GUI_WIDTH, - 0, - GuiHelper.STANDARD_SLOT_WIDTH, - GuiHelper.STANDARD_SLOT_WIDTH); + xStart + x, + yStart + slotsY, + GuiHelper.STANDARD_GUI_WIDTH, + 0, + GuiHelper.STANDARD_SLOT_WIDTH, + GuiHelper.STANDARD_SLOT_WIDTH); } } } diff --git a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java index 447736a..fbcb801 100644 --- a/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java +++ b/src/main/java/squeek/spiceoflife/gui/GuiScreenFoodJournal.java @@ -50,23 +50,17 @@ public void initGui() { super.initGui(); this.buttonList.add( - buttonPrevPage = new WidgetButtonNextPage( - 1, - (this.width - this.bookImageWidth) / 2 + 38, - 2 + 154, - false)); + buttonPrevPage = new WidgetButtonNextPage(1, (this.width - this.bookImageWidth) / 2 + 38, 2 + 154, false)); this.buttonList.add( - buttonNextPage = new WidgetButtonNextPage( - 2, - (this.width - this.bookImageWidth) / 2 + 120, - 2 + 154, - true)); + buttonNextPage = new WidgetButtonNextPage(2, (this.width - this.bookImageWidth) / 2 + 120, 2 + 154, true)); foodEatenWidgets.clear(); FoodHistory foodHistory = FoodHistory.get(mc.thePlayer); Set recent = new HashSet<>(foodHistory.getRecentHistory()); - foodHistory.getFullHistory().stream().sorted(Comparator.comparing(i -> i.itemStack.getDisplayName())) - .forEach(f -> foodEatenWidgets.add(new WidgetFoodEaten(f, recent.contains(f)))); + foodHistory.getFullHistory() + .stream() + .sorted(Comparator.comparing(i -> i.itemStack.getDisplayName())) + .forEach(f -> foodEatenWidgets.add(new WidgetFoodEaten(f, recent.contains(f)))); numPages = 1 + (int) Math.ceil((float) foodEatenWidgets.size() / numPerPage); @@ -80,7 +74,8 @@ private void updateButtons() { public void drawHalfShank(int x, int y) { GL11.glColor3f(1, 1, 1); - mc.getTextureManager().bindTexture(Gui.icons); + mc.getTextureManager() + .bindTexture(Gui.icons); GuiUtils.drawTexturedModalRect(this, x, y, 16, 27, 9, 9); GuiUtils.drawTexturedModalRect(this, x, y, 61, 27, 9, 9); } @@ -106,7 +101,8 @@ public List splitWithDifWidth(String text, int firstLineWidth, int other @Override public void drawScreen(int mouseX, int mouseY, float f) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(bookGuiTextures); + this.mc.getTextureManager() + .bindTexture(bookGuiTextures); int x = (this.width - this.bookImageWidth) / 2; int y = 2; this.drawTexturedModalRect(x, y, 0, 0, this.bookImageWidth, this.bookImageHeight); @@ -137,11 +133,11 @@ public void drawScreen(int mouseX, int mouseY, float f) { String foodHistoryTitle = I18n.format("spiceoflife.gui.food_history.title"); int foodTitleWidth = fontRendererObj.getStringWidth(foodHistoryTitle); GuiUtils.drawText( - fontRendererObj, - foodHistoryTitle, - localX + drawWidth / 2 - foodTitleWidth / 2, - localY, - Color.BLUE); + fontRendererObj, + foodHistoryTitle, + localX + drawWidth / 2 - foodTitleWidth / 2, + localY, + Color.BLUE); int verticalIndent = 8; @@ -154,23 +150,19 @@ public void drawScreen(int mouseX, int mouseY, float f) { drawHalfShank(localX, localY); String worthEaten = I18n.format("spiceoflife.gui.food_history.worth_eaten"); List list = splitWithDifWidth( - worthEaten + " " + foodsEaten, - widthMinusPadding - hungerOffset, - widthMinusPadding); + worthEaten + " " + foodsEaten, + widthMinusPadding - hungerOffset, + widthMinusPadding); for (int i = 0; i < list.size(); i++) { - GuiUtils.drawText( - fontRendererObj, - list.get(i), - localX + (i == 0 ? hungerOffset : 0), - localY, - blackColor); + GuiUtils + .drawText(fontRendererObj, list.get(i), localX + (i == 0 ? hungerOffset : 0), localY, blackColor); localY += fontRendererObj.FONT_HEIGHT; } localY += verticalIndent; String bonusHearts = I18n.format("spiceoflife.gui.food_history.bonus_hearts"); list = GuiUtils - .listFormattedStringToWidth(fontRendererObj, bonusHearts + " " + extraHearts, widthMinusPadding); + .listFormattedStringToWidth(fontRendererObj, bonusHearts + " " + extraHearts, widthMinusPadding); for (String s : list) { GuiUtils.drawText(fontRendererObj, s, localX, localY, blackColor); localY += fontRendererObj.FONT_HEIGHT; @@ -180,16 +172,12 @@ public void drawScreen(int mouseX, int mouseY, float f) { drawHalfShank(localX, localY); String nextHeart = I18n.format("spiceoflife.gui.food_history.next_heart"); list = splitWithDifWidth( - nextHeart + " " + foodsUntilNextMilestone, - widthMinusPadding - hungerOffset, - widthMinusPadding); + nextHeart + " " + foodsUntilNextMilestone, + widthMinusPadding - hungerOffset, + widthMinusPadding); for (int i = 0; i < list.size(); i++) { - GuiUtils.drawText( - fontRendererObj, - list.get(i), - localX + (i == 0 ? hungerOffset : 0), - localY, - blackColor); + GuiUtils + .drawText(fontRendererObj, list.get(i), localX + (i == 0 ? hungerOffset : 0), localY, blackColor); localY += fontRendererObj.FONT_HEIGHT; } } else { @@ -199,16 +187,13 @@ public void drawScreen(int mouseX, int mouseY, float f) { if (totalNum > 0) { int firstItemNum = startIndex + 1; int lastItemNum = Math.min(totalNum, endIndex); - String pageIndicator = StatCollector.translateToLocalFormatted( - "spiceoflife.gui.items.on.page", - firstItemNum, - lastItemNum, - totalNum); + String pageIndicator = StatCollector + .translateToLocalFormatted("spiceoflife.gui.items.on.page", firstItemNum, lastItemNum, totalNum); fontRendererObj.drawString( - pageIndicator, - x + this.bookImageWidth - this.fontRendererObj.getStringWidth(pageIndicator) - 44, - y + 16, - 0); + pageIndicator, + x + this.bookImageWidth - this.fontRendererObj.getStringWidth(pageIndicator) - 44, + y + 16, + 0); } String numFoodsEatenAllTime = Integer.toString(foodHistory.totalFoodsEatenAllTime); @@ -244,42 +229,42 @@ public void drawScreen(int mouseX, int mouseY, float f) { hoveredStack = foodEatenWidget.foodEaten.itemStack; if (hoveredStack != null) this.renderToolTip(hoveredStack, mouseX, mouseY); } else if (isMouseInsideBox( - mouseX, - mouseY, - localX + WidgetFoodEaten.PADDING_LEFT, - localY, - foodEatenWidget.width(), - 16)) { - List toolTipStrings = new ArrayList<>(); - if (foodEatenWidget.eatenRecently) { - toolTipStrings.add( - EnumChatFormatting.DARK_PURPLE.toString() + EnumChatFormatting.ITALIC - + "Eaten Recently"); - } else { - toolTipStrings.add( - EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC - + "Not Eaten Recently!"); - } - this.drawHoveringText(toolTipStrings, mouseX, mouseY, fontRendererObj); + mouseX, + mouseY, + localX + WidgetFoodEaten.PADDING_LEFT, + localY, + foodEatenWidget.width(), + 16)) { + List toolTipStrings = new ArrayList<>(); + if (foodEatenWidget.eatenRecently) { + toolTipStrings.add( + EnumChatFormatting.DARK_PURPLE.toString() + EnumChatFormatting.ITALIC + + "Eaten Recently"); + } else { + toolTipStrings.add( + EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC + + "Not Eaten Recently!"); } + this.drawHoveringText(toolTipStrings, mouseX, mouseY, fontRendererObj); + } foodEatenIndex++; } } else { this.fontRendererObj.drawSplitString( - StatCollector.translateToLocal("spiceoflife.gui.no.recent.food.eaten"), - x + 36, - y + 16 + 16, - 116, - 0x404040); + StatCollector.translateToLocal("spiceoflife.gui.no.recent.food.eaten"), + x + 36, + y + 16 + 16, + 116, + 0x404040); } if (isMouseInsideBox(mouseX, mouseY, allTimeX, allTimeY, allTimeW, fontRendererObj.FONT_HEIGHT)) { this.drawHoveringText( - Collections.singletonList(StatCollector.translateToLocal("spiceoflife.gui.alltime.food.eaten")), - mouseX, - mouseY, - fontRendererObj); + Collections.singletonList(StatCollector.translateToLocal("spiceoflife.gui.alltime.food.eaten")), + mouseX, + mouseY, + fontRendererObj); } } @@ -291,7 +276,8 @@ protected void drawItemStack(ItemStack par1ItemStack, int par2, int par3) { this.zLevel = 200.0F; itemRender.zLevel = 200.0F; FontRenderer font = null; - if (par1ItemStack != null) font = par1ItemStack.getItem().getFontRenderer(par1ItemStack); + if (par1ItemStack != null) font = par1ItemStack.getItem() + .getFontRenderer(par1ItemStack); if (font == null) font = fontRendererObj; itemRender.renderItemAndEffectIntoGUI(font, this.mc.getTextureManager(), par1ItemStack, par2, par3); this.zLevel = 0.0F; diff --git a/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java b/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java index ee48442..219edc3 100644 --- a/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java +++ b/src/main/java/squeek/spiceoflife/gui/TooltipHandler.java @@ -36,9 +36,8 @@ public class TooltipHandler { @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event) { if (event == null || event.entityPlayer == null - || event.itemStack == null - || !FoodHelper.isValidFood(event.itemStack)) - return; + || event.itemStack == null + || !FoodHelper.isValidFood(event.itemStack)) return; int totalFoodEaten = FoodHistory.get(event.entityPlayer).totalFoodsEatenAllTime; List toolTipStringsToAdd = new ArrayList<>(); @@ -47,33 +46,33 @@ public void onItemTooltip(ItemTooltipEvent event) { if (ModConfig.FOOD_MODIFIER_ENABLED && !visibleFoodGroups.isEmpty()) { String foodGroupString = visibleFoodGroups.size() > 1 - ? StatCollector.translateToLocal("spiceoflife.tooltip.food.groups") - : StatCollector.translateToLocal("spiceoflife.tooltip.food.group"); + ? StatCollector.translateToLocal("spiceoflife.tooltip.food.groups") + : StatCollector.translateToLocal("spiceoflife.tooltip.food.group"); String joinedFoodGroups = joinFoodGroupsForDisplay( - visibleFoodGroups, - ", ", - EnumChatFormatting.GRAY.toString()); + visibleFoodGroups, + ", ", + EnumChatFormatting.GRAY.toString()); toolTipStringsToAdd.add( - EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC - + foodGroupString - + EnumChatFormatting.GRAY - + EnumChatFormatting.ITALIC - + joinedFoodGroups); + EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC + + foodGroupString + + EnumChatFormatting.GRAY + + EnumChatFormatting.ITALIC + + joinedFoodGroups); } if (ModConfig.FOOD_EATEN_THRESHOLD > 0 && totalFoodEaten < ModConfig.FOOD_EATEN_THRESHOLD) { if (ModConfig.FOOD_MODIFIER_ENABLED) { int timesUntilMeetsThreshold = ModConfig.FOOD_EATEN_THRESHOLD - totalFoodEaten; toolTipStringsToAdd.add( - EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC - + StatCollector.translateToLocal("spiceoflife.tooltip.food.until.enabled.1")); + EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC + + StatCollector.translateToLocal("spiceoflife.tooltip.food.until.enabled.1")); toolTipStringsToAdd.add( - EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC - + StatCollector.translateToLocalFormatted( - "spiceoflife.tooltip.food.until.enabled.2", - timesUntilMeetsThreshold, - timesUntilMeetsThreshold == 1 - ? StatCollector.translateToLocal("spiceoflife.tooltip.times.singular") - : StatCollector.translateToLocal("spiceoflife.tooltip.times.plural"))); + EnumChatFormatting.DARK_AQUA.toString() + EnumChatFormatting.ITALIC + + StatCollector.translateToLocalFormatted( + "spiceoflife.tooltip.food.until.enabled.2", + timesUntilMeetsThreshold, + timesUntilMeetsThreshold == 1 + ? StatCollector.translateToLocal("spiceoflife.tooltip.times.singular") + : StatCollector.translateToLocal("spiceoflife.tooltip.times.plural"))); } } else { FoodHistory foodHistory = FoodHistory.get(event.entityPlayer); @@ -83,28 +82,27 @@ public void onItemTooltip(ItemTooltipEvent event) { if (FoodHelper.canFoodDiminish(event.itemStack) && (foodOrItsFoodGroupsEatenRecently || foodModifier != 1)) toolTipStringsToAdd.add( - 0, - EnumChatFormatting.GRAY - + StatCollector.translateToLocal("spiceoflife.tooltip.nutritional.value") - + getNutritionalValueString(foodModifier) - + (foodValues.hunger == 0 && foodModifier != 0f ? EnumChatFormatting.DARK_RED + " (" - + foodValues.hunger - + " " - + StatCollector.translateToLocal("spiceoflife.tooltip.hunger") - + ")" : "")); + 0, + EnumChatFormatting.GRAY + StatCollector.translateToLocal("spiceoflife.tooltip.nutritional.value") + + getNutritionalValueString(foodModifier) + + (foodValues.hunger == 0 && foodModifier != 0f ? EnumChatFormatting.DARK_RED + " (" + + foodValues.hunger + + " " + + StatCollector.translateToLocal("spiceoflife.tooltip.hunger") + + ")" : "")); boolean shouldShowPressShift = visibleFoodGroups.size() > 1 && !KeyHelper.isShiftKeyDown(); boolean shouldShowFoodGroupDetails = visibleFoodGroups.size() <= 1 || KeyHelper.isShiftKeyDown(); String bulletPoint = EnumChatFormatting.DARK_GRAY + "- " + EnumChatFormatting.GRAY; if (shouldShowPressShift) toolTipStringsToAdd.add( - bulletPoint + EnumChatFormatting.DARK_GRAY - + StatCollector.translateToLocalFormatted( - "spiceoflife.tooltip.hold.key.for.details", - EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.ITALIC - + "Shift" - + EnumChatFormatting.RESET - + EnumChatFormatting.DARK_GRAY)); + bulletPoint + EnumChatFormatting.DARK_GRAY + + StatCollector.translateToLocalFormatted( + "spiceoflife.tooltip.hold.key.for.details", + EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.ITALIC + + "Shift" + + EnumChatFormatting.RESET + + EnumChatFormatting.DARK_GRAY)); if (shouldShowFoodGroupDetails) { int foodGroupsToShow = Math.max(1, visibleFoodGroups.size()); @@ -115,11 +113,11 @@ public void onItemTooltip(ItemTooltipEvent event) { boolean shouldShowNutritionalValue = foodGroupsToShow > 1; String prefix = (foodGroupsToShow > 1 ? bulletPoint : ""); toolTipStringsToAdd.add( - prefix + getEatenRecentlyTooltip( - foodHistory, - event.itemStack, - foodGroup, - shouldShowNutritionalValue)); + prefix + getEatenRecentlyTooltip( + foodHistory, + event.itemStack, + foodGroup, + shouldShowNutritionalValue)); toolTipStringsToAdd.add(getFullHistoryToolTip(foodHistory, event.itemStack)); } } @@ -140,7 +138,7 @@ public static String joinFoodGroupsForDisplay(Set foodGroups, String List stringsToJoin = new ArrayList<>(); for (FoodGroup foodGroup : foodGroups) { stringsToJoin - .add(foodGroup.formatString(EnumChatFormatting.ITALIC.toString() + foodGroup) + resetFormatting); + .add(foodGroup.formatString(EnumChatFormatting.ITALIC.toString() + foodGroup) + resetFormatting); } return StringHelper.join(stringsToJoin, delimiter); } @@ -150,34 +148,32 @@ public String getNutritionalValueString(float foodModifier) { } public String getEatenRecentlyTooltip(FoodHistory foodHistory, ItemStack itemStack, FoodGroup foodGroup, - boolean shouldShowNutritionalValue) { + boolean shouldShowNutritionalValue) { final int count = foodHistory.getFoodCountForFoodGroup(itemStack, foodGroup); final String prefix = "Diminishing Returns: " - + (foodGroup != null ? foodGroup.formatString(EnumChatFormatting.ITALIC.toString() + foodGroup) + " " - : "") - + EnumChatFormatting.RESET.toString() - + EnumChatFormatting.DARK_AQUA.toString() - + EnumChatFormatting.ITALIC; + + (foodGroup != null ? foodGroup.formatString(EnumChatFormatting.ITALIC.toString() + foodGroup) + " " : "") + + EnumChatFormatting.RESET.toString() + + EnumChatFormatting.DARK_AQUA.toString() + + EnumChatFormatting.ITALIC; final String eatenRecently; final String nutritionalValue = shouldShowNutritionalValue - ? EnumChatFormatting.DARK_GRAY + " [" - + getNutritionalValueString( - FoodModifier.getFoodGroupModifier(foodHistory, itemStack, foodGroup)) - + EnumChatFormatting.DARK_GRAY - + "]" - : ""; + ? EnumChatFormatting.DARK_GRAY + " [" + + getNutritionalValueString(FoodModifier.getFoodGroupModifier(foodHistory, itemStack, foodGroup)) + + EnumChatFormatting.DARK_GRAY + + "]" + : ""; if (count > 0) eatenRecently = StatCollector.translateToLocalFormatted( - "spiceoflife.tooltip.eaten.recently", - StringHelper.getQuantityDescriptor(count), - ModConfig.FOOD_HISTORY_LENGTH); + "spiceoflife.tooltip.eaten.recently", + StringHelper.getQuantityDescriptor(count), + ModConfig.FOOD_HISTORY_LENGTH); else eatenRecently = StatCollector.translateToLocal("spiceoflife.tooltip.not.eaten.recently"); return prefix + (foodGroup != null ? StringHelper.decapitalize(eatenRecently, StringHelper.getMinecraftLocale()) - : eatenRecently) + nutritionalValue; + : eatenRecently) + nutritionalValue; } public String getFullHistoryToolTip(FoodHistory foodHistory, ItemStack itemStack) { final String prefix = "Extra Hearts: " + EnumChatFormatting.DARK_AQUA.toString() - + EnumChatFormatting.ITALIC.toString(); + + EnumChatFormatting.ITALIC.toString(); if (!foodHistory.hasEverEaten(itemStack)) { return prefix + StatCollector.translateToLocal("spiceoflife.tooltip.not.eaten.ever"); } else { @@ -192,7 +188,8 @@ static class FoodGroupComparator implements Comparator, Serializable @Override public int compare(FoodGroup a, FoodGroup b) { - return a.getLocalizedName().compareToIgnoreCase(b.getLocalizedName()); + return a.getLocalizedName() + .compareToIgnoreCase(b.getLocalizedName()); } } } diff --git a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonNextPage.java b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonNextPage.java index cebfc6b..b58a245 100644 --- a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonNextPage.java +++ b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonNextPage.java @@ -30,10 +30,11 @@ public WidgetButtonNextPage(int par1, int par2, int par3, boolean par4) { public void drawButton(Minecraft par1Minecraft, int par2, int par3) { if (this.visible) { boolean flag = par2 >= this.xPosition && par3 >= this.yPosition - && par2 < this.xPosition + this.width - && par3 < this.yPosition + this.height; + && par2 < this.xPosition + this.width + && par3 < this.yPosition + this.height; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - par1Minecraft.getTextureManager().bindTexture(bookGui); + par1Minecraft.getTextureManager() + .bindTexture(bookGui); int k = 0; int l = 192; diff --git a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java index 90a680f..23cff56 100644 --- a/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java +++ b/src/main/java/squeek/spiceoflife/gui/widget/WidgetButtonSortDirection.java @@ -16,8 +16,8 @@ public class WidgetButtonSortDirection extends GuiButton { private static final ResourceLocation modIcons = new ResourceLocation( - ModInfo.MODID.toLowerCase(Locale.ROOT), - "textures/icons.png"); + ModInfo.MODID.toLowerCase(Locale.ROOT), + "textures/icons.png"); /** * True for sorted descending (newest first), false for sorted ascending (oldest first). @@ -36,10 +36,11 @@ public WidgetButtonSortDirection(int id, int x, int y, boolean sortDesc) { public void drawButton(Minecraft mc, int mouseX, int mouseY) { if (this.visible) { boolean isHovered = mouseX >= this.xPosition && mouseY >= this.yPosition - && mouseX < this.xPosition + this.width - && mouseY < this.yPosition + this.height; + && mouseX < this.xPosition + this.width + && mouseY < this.yPosition + this.height; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(modIcons); + mc.getTextureManager() + .bindTexture(modIcons); int x = 0; int y = 0; diff --git a/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java b/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java index 1572c90..fb50cf3 100644 --- a/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java +++ b/src/main/java/squeek/spiceoflife/gui/widget/WidgetFoodEaten.java @@ -56,7 +56,7 @@ public int hungerBarsNeeded() { if (defaultFoodValues == null) return 0; return (int) Math - .max(1, Math.ceil(Math.abs(Math.max(foodEaten.foodValues.hunger, defaultFoodValues.hunger)) / 2f)); + .max(1, Math.ceil(Math.abs(Math.max(foodEaten.foodValues.hunger, defaultFoodValues.hunger)) / 2f)); } public void draw(int x, int y) { @@ -72,15 +72,16 @@ public void draw(int x, int y) { if (defaultFoodValues == null) return; mc.fontRenderer.drawString( - getDisplayName(), - x, - y, - ColorHelper.getRelativeColorInt(foodEaten.foodValues.hunger, 0, defaultFoodValues.hunger)); + getDisplayName(), + x, + y, + ColorHelper.getRelativeColorInt(foodEaten.foodValues.hunger, 0, defaultFoodValues.hunger)); int barsNeeded = hungerBarsNeeded(); GL11.glColor4f(1, 1, 1, 1); - mc.getTextureManager().bindTexture(Gui.icons); + mc.getTextureManager() + .bindTexture(Gui.icons); y += mc.fontRenderer.FONT_HEIGHT; for (int i = 0; i < barsNeeded * 2; i += 2) { this.drawTexturedModalRect(x, y, 16, 27, 9, 9); diff --git a/src/main/java/squeek/spiceoflife/helpers/ColorHelper.java b/src/main/java/squeek/spiceoflife/helpers/ColorHelper.java index 0b888bc..ceb00d5 100644 --- a/src/main/java/squeek/spiceoflife/helpers/ColorHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/ColorHelper.java @@ -5,11 +5,11 @@ public class ColorHelper { private static final EnumChatFormatting[] colorRange = { EnumChatFormatting.DARK_RED, EnumChatFormatting.RED, - EnumChatFormatting.GOLD, EnumChatFormatting.YELLOW, EnumChatFormatting.DARK_GREEN, EnumChatFormatting.GREEN, - EnumChatFormatting.AQUA }; + EnumChatFormatting.GOLD, EnumChatFormatting.YELLOW, EnumChatFormatting.DARK_GREEN, EnumChatFormatting.GREEN, + EnumChatFormatting.AQUA }; private static final EnumChatFormatting[] booleanColorRange = { EnumChatFormatting.DARK_RED, EnumChatFormatting.RED, - EnumChatFormatting.DARK_GREEN, EnumChatFormatting.GREEN }; + EnumChatFormatting.DARK_GREEN, EnumChatFormatting.GREEN }; public static String getRelativeColor(double val, double min, double max) { if (min == max) return EnumChatFormatting.RESET.toString(); @@ -34,7 +34,7 @@ public static int getRelativeColorInt(double val, double min, double max) { int[] minColor = new int[] { 150, 0, 0 }; int[] maxColor = new int[] { 0, 100, 0 }; int[] color = new int[] { (int) (maxColor[0] * f2 + minColor[0] * f1), - (int) (maxColor[1] * f2 + minColor[1] * f1), (int) (maxColor[2] * f2 + minColor[2] * f1) }; + (int) (maxColor[1] * f2 + minColor[1] * f1), (int) (maxColor[2] * f2 + minColor[2] * f1) }; return fromRGBA(color[0], color[1], color[2], 255); } diff --git a/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java b/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java index 6c1b921..b9fc9dd 100644 --- a/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/GuiHelper.java @@ -28,12 +28,12 @@ public static boolean openGuiOfItemStack(EntityPlayer player, ItemStack itemStac if (!player.worldObj.isRemote) { if (itemStack.getItem() instanceof ItemFoodContainer) { player.openGui( - ModSpiceOfLife.instance, - GuiIds.FOOD_CONTAINER.ordinal(), - player.worldObj, - (int) player.posX, - (int) player.posY, - (int) player.posZ); + ModSpiceOfLife.instance, + GuiIds.FOOD_CONTAINER.ordinal(), + player.worldObj, + (int) player.posX, + (int) player.posY, + (int) player.posZ); return true; } return false; @@ -64,14 +64,14 @@ public Object getClientGuiElement(int guiId, EntityPlayer player, World world, i } public Object getSidedGuiElement(boolean isClientSide, int guiId, EntityPlayer player, World world, int x, int y, - int z) { + int z) { if (GuiIds.values()[guiId] == GuiIds.FOOD_CONTAINER) { ItemStack heldItem = player.getHeldItem(); if (heldItem != null && heldItem.getItem() instanceof ItemFoodContainer) { FoodContainerInventory foodContainerInventory = ((ItemFoodContainer) heldItem.getItem()) - .getInventory(heldItem); + .getInventory(heldItem); return isClientSide ? new GuiFoodContainer(player.inventory, foodContainerInventory) - : new ContainerFoodContainer(player.inventory, foodContainerInventory); + : new ContainerFoodContainer(player.inventory, foodContainerInventory); } } return null; diff --git a/src/main/java/squeek/spiceoflife/helpers/InventoryHelper.java b/src/main/java/squeek/spiceoflife/helpers/InventoryHelper.java index 6c2ea45..e2678d7 100644 --- a/src/main/java/squeek/spiceoflife/helpers/InventoryHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/InventoryHelper.java @@ -16,13 +16,13 @@ public class InventoryHelper { public static final Method hopperInsertIntoInventory = ReflectionHelper.findMethod( - TileEntityHopper.class, - null, - new String[] { "func_145899_c", "c" }, - IInventory.class, - ItemStack.class, - int.class, - int.class); + TileEntityHopper.class, + null, + new String[] { "func_145899_c", "c" }, + IInventory.class, + ItemStack.class, + int.class, + int.class); public static IInventory getInventoryAtLocation(World world, int x, int y, int z) { return TileEntityHopper.func_145893_b(world, x, y, z); @@ -33,7 +33,7 @@ public static ItemStack insertStackIntoInventory(ItemStack itemStack, IInventory } public static ItemStack insertStackIntoInventory(ItemStack itemStack, IInventory inventory, - ForgeDirection direction) { + ForgeDirection direction) { return TileEntityHopper.func_145889_a(inventory, itemStack, direction.ordinal()); } @@ -47,13 +47,13 @@ public static ItemStack insertStackIntoInventoryOnce(ItemStack itemStack, IInven * @return The remainder */ public static ItemStack insertStackIntoInventoryOnce(ItemStack itemStack, IInventory inventory, - ForgeDirection direction) { + ForgeDirection direction) { int originalStackSize = itemStack.stackSize; for (int l = 0; l < inventory.getSizeInventory(); ++l) { try { itemStack = (ItemStack) hopperInsertIntoInventory - .invoke(null, inventory, itemStack, l, direction.ordinal()); + .invoke(null, inventory, itemStack, l, direction.ordinal()); } catch (RuntimeException e) { throw e; } catch (Exception e) { diff --git a/src/main/java/squeek/spiceoflife/helpers/MealPrioritizationHelper.java b/src/main/java/squeek/spiceoflife/helpers/MealPrioritizationHelper.java index ad33b7d..628f010 100644 --- a/src/main/java/squeek/spiceoflife/helpers/MealPrioritizationHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/MealPrioritizationHelper.java @@ -16,16 +16,17 @@ public class MealPrioritizationHelper { public static final Comparator hungerComparator = (a, - b) -> integerCompare(a.modifiedFoodValues.hunger, b.modifiedFoodValues.hunger); + b) -> integerCompare(a.modifiedFoodValues.hunger, b.modifiedFoodValues.hunger); public static final Comparator diminishedComparator = (a, b) -> Float - .compare(b.diminishingReturnsModifier, a.diminishingReturnsModifier); + .compare(b.diminishingReturnsModifier, a.diminishingReturnsModifier); public static int findBestFoodForPlayerToEat(EntityPlayer player, IInventory inventory) { List allFoodInfo = getFoodInfoFromInventoryForPlayer(player, inventory); InventoryFoodInfo bestFoodInfo = null; if (allFoodInfo.size() > 0) { - int hungerMissingFromPlayer = 20 - player.getFoodStats().getFoodLevel(); + int hungerMissingFromPlayer = 20 - player.getFoodStats() + .getFoodLevel(); allFoodInfo.sort(new FoodInfoComparator(hungerMissingFromPlayer)); bestFoodInfo = allFoodInfo.get(0); } @@ -46,14 +47,14 @@ public static List getFoodInfoFromInventoryForPlayer(EntityPl } public static List findBestFoodsForPlayerAccountingForVariety(EntityPlayer player, - IInventory inventory, int limit) { + IInventory inventory, int limit) { List bestFoods = findBestFoodsForPlayerAccountingForVariety(player, inventory); if (bestFoods.size() > limit) bestFoods = bestFoods.subList(0, limit); return bestFoods; } public static List findBestFoodsForPlayerAccountingForVariety(EntityPlayer player, - IInventory inventory) { + IInventory inventory) { List allFoodInfo = getFoodInfoFromInventoryForPlayer(player, inventory); Collections.shuffle(allFoodInfo); allFoodInfo.sort(diminishedComparator); @@ -100,7 +101,7 @@ public InventoryFoodInfo(int slotNum, ItemStack itemStack, EntityPlayer player) if (FoodHelper.canFoodDiminish(this.itemStack)) { this.diminishingReturnsModifier = FoodModifier.getFoodModifier(player, itemStack); this.modifiedFoodValues = FoodModifier - .getModifiedFoodValues(defaultFoodValues, diminishingReturnsModifier); + .getModifiedFoodValues(defaultFoodValues, diminishingReturnsModifier); } else { this.diminishingReturnsModifier = Float.NaN; this.modifiedFoodValues = defaultFoodValues; @@ -138,8 +139,8 @@ public int compare(InventoryFoodInfo a, InventoryFoodInfo b) { } // better food over worse food if (compareResult == 0) compareResult = Float.compare( - b.modifiedFoodValues.saturationModifier * b.modifiedFoodValues.hunger, - a.modifiedFoodValues.saturationModifier * a.modifiedFoodValues.hunger); + b.modifiedFoodValues.saturationModifier * b.modifiedFoodValues.hunger, + a.modifiedFoodValues.saturationModifier * a.modifiedFoodValues.hunger); return compareResult; } diff --git a/src/main/java/squeek/spiceoflife/helpers/MiscHelper.java b/src/main/java/squeek/spiceoflife/helpers/MiscHelper.java index 3ff8226..8727495 100644 --- a/src/main/java/squeek/spiceoflife/helpers/MiscHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/MiscHelper.java @@ -28,7 +28,8 @@ else if (mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.B int y = mc.objectMouseOver.blockY; int z = mc.objectMouseOver.blockZ; - return mc.theWorld.getBlock(x, y, z).getMaterial() == Material.air; + return mc.theWorld.getBlock(x, y, z) + .getMaterial() == Material.air; } return false; } diff --git a/src/main/java/squeek/spiceoflife/helpers/StringHelper.java b/src/main/java/squeek/spiceoflife/helpers/StringHelper.java index 12c647d..ea7f5b5 100644 --- a/src/main/java/squeek/spiceoflife/helpers/StringHelper.java +++ b/src/main/java/squeek/spiceoflife/helpers/StringHelper.java @@ -14,8 +14,8 @@ public class StringHelper { public static String getQuantityDescriptor(int quantity) { return quantity == 1 ? StatCollector.translateToLocal("spiceoflife.quantity.one.time") - : (quantity == 2 ? StatCollector.translateToLocalFormatted("spiceoflife.quantity.two.times", quantity) - : StatCollector.translateToLocalFormatted("spiceoflife.quantity.x.times", quantity)); + : (quantity == 2 ? StatCollector.translateToLocalFormatted("spiceoflife.quantity.two.times", quantity) + : StatCollector.translateToLocalFormatted("spiceoflife.quantity.x.times", quantity)); } public static String join(Collection values, String delimiter) { @@ -34,11 +34,14 @@ public static String join(Collection values, String delimiter) { public static String decapitalize(final String string, final Locale locale) { if (string == null || string.isEmpty()) return string; - else return string.substring(0, 1).toLowerCase(locale) + string.substring(1); + else return string.substring(0, 1) + .toLowerCase(locale) + string.substring(1); } public static Locale getMinecraftLocale() { - String[] parts = FMLCommonHandler.instance().getCurrentLanguage().split("_"); + String[] parts = FMLCommonHandler.instance() + .getCurrentLanguage() + .split("_"); String langCode = parts[0]; String regionCode = parts.length > 1 ? parts[1] : null; return regionCode != null ? new Locale(langCode, regionCode) : new Locale(langCode); diff --git a/src/main/java/squeek/spiceoflife/inventory/ContainerFoodContainer.java b/src/main/java/squeek/spiceoflife/inventory/ContainerFoodContainer.java index e115286..dec6e35 100644 --- a/src/main/java/squeek/spiceoflife/inventory/ContainerFoodContainer.java +++ b/src/main/java/squeek/spiceoflife/inventory/ContainerFoodContainer.java @@ -23,7 +23,7 @@ public ContainerFoodContainer(InventoryPlayer playerInventory, FoodContainerInve this.heldSlotId = playerInventory.currentItem; slotsX = (int) (GuiHelper.STANDARD_GUI_WIDTH / 2f - - (inventory.getSizeInventory() * GuiHelper.STANDARD_SLOT_WIDTH / 2f)); + - (inventory.getSizeInventory() * GuiHelper.STANDARD_SLOT_WIDTH / 2f)); slotsY = 19; this.addSlotsOfType(SlotFiltered.class, inventory, slotsX, slotsY); @@ -69,7 +69,8 @@ public ItemStack getItemStack() { public boolean isFoodContainerWithUUID(ItemStack itemStack, UUID uuid) { return itemStack != null && itemStack.getItem() instanceof ItemFoodContainer - && ((ItemFoodContainer) itemStack.getItem()).getUUID(itemStack).equals(uuid); + && ((ItemFoodContainer) itemStack.getItem()).getUUID(itemStack) + .equals(uuid); } @Override @@ -85,9 +86,9 @@ public ItemStack slotClick(int slotNum, int mouseButton, int modifier, EntityPla if (isFoodContainerWithUUID(pickedUpStack, getUUID())) { setFoodContainerItemStack(pickedUpStack); } else if (slotNum >= 0 && isFoodContainerWithUUID(putDownStack, getUUID()) - && isFoodContainerWithUUID(getSlot(slotNum).getStack(), getUUID())) { - setFoodContainerItemStack(getSlot(slotNum).getStack()); - } + && isFoodContainerWithUUID(getSlot(slotNum).getStack(), getUUID())) { + setFoodContainerItemStack(getSlot(slotNum).getStack()); + } return pickedUpStack; } diff --git a/src/main/java/squeek/spiceoflife/inventory/ContainerGeneric.java b/src/main/java/squeek/spiceoflife/inventory/ContainerGeneric.java index a37813b..be4310b 100644 --- a/src/main/java/squeek/spiceoflife/inventory/ContainerGeneric.java +++ b/src/main/java/squeek/spiceoflife/inventory/ContainerGeneric.java @@ -26,7 +26,7 @@ protected void addSlotOfType(Class slotClass, IInventory invento } protected void addSlotsOfType(Class slotClass, IInventory inventory, int xStart, int yStart, - int numSlots, int rows) { + int numSlots, int rows) { int numSlotsPerRow = numSlots / rows; for (int i = 0, col = 0, row = 0; i < numSlots; ++i, ++col) { if (col >= numSlotsPerRow) { @@ -36,8 +36,8 @@ protected void addSlotsOfType(Class slotClass, IInventory invent try { this.addSlotToContainer( - slotClass.getConstructor(IInventory.class, int.class, int.class, int.class) - .newInstance(inventory, getNextSlotIndex(), xStart + col * 18, yStart + row * 18)); + slotClass.getConstructor(IInventory.class, int.class, int.class, int.class) + .newInstance(inventory, getNextSlotIndex(), xStart + col * 18, yStart + row * 18)); } catch (RuntimeException e) { throw e; } catch (Exception e) { @@ -56,7 +56,7 @@ protected void addSlots(IInventory inventory, int xStart, int yStart) { } protected void addSlotsOfType(Class slotClass, IInventory inventory, int xStart, int yStart, - int rows) { + int rows) { addSlotsOfType(slotClass, inventory, xStart, yStart, inventory.getSizeInventory(), rows); } @@ -81,7 +81,7 @@ protected void addPlayerInventorySlots(InventoryPlayer playerInventory, int xSta for (int row = 0; row < 3; ++row) { for (int col = 0; col < 9; ++col) { this.addSlotToContainer( - new Slot(playerInventory, col + row * 9 + 9, xStart + col * 18, yStart + row * 18)); + new Slot(playerInventory, col + row * 9 + 9, xStart + col * 18, yStart + row * 18)); } } @@ -101,10 +101,10 @@ public ItemStack transferStackInSlot(EntityPlayer player, int slotNum) { // transferring from the container to the player inventory if (slotNum < this.inventory.getSizeInventory()) { if (!this.mergeItemStack( - stackToTransfer, - this.inventory.getSizeInventory(), - this.inventorySlots.size(), - true)) { + stackToTransfer, + this.inventory.getSizeInventory(), + this.inventorySlots.size(), + true)) { return null; } } @@ -167,14 +167,14 @@ protected boolean mergeItemStack(ItemStack itemStack, int startSlotNum, int endS if (itemStack.isStackable()) { while (itemStack.stackSize > 0 - && (!checkBackwards && k < endSlotNum || checkBackwards && k >= startSlotNum)) { + && (!checkBackwards && k < endSlotNum || checkBackwards && k >= startSlotNum)) { slot = (Slot) this.inventorySlots.get(k); itemstack1 = slot.getStack(); if (itemstack1 != null && itemstack1.getItem() == itemStack.getItem() - && (!itemStack.getHasSubtypes() || itemStack.getItemDamage() == itemstack1.getItemDamage()) - && ItemStack.areItemStackTagsEqual(itemStack, itemstack1) - && slot.isItemValid(itemStack)) { + && (!itemStack.getHasSubtypes() || itemStack.getItemDamage() == itemstack1.getItemDamage()) + && ItemStack.areItemStackTagsEqual(itemStack, itemstack1) + && slot.isItemValid(itemStack)) { int l = itemstack1.stackSize + itemStack.stackSize; int effectiveMaxStackSize = getEffectiveMaxStackSizeForSlot(k, itemStack); diff --git a/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java b/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java index c775ef5..cbc6191 100644 --- a/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java +++ b/src/main/java/squeek/spiceoflife/inventory/FoodContainerInventory.java @@ -26,7 +26,8 @@ public FoodContainerInventory(ItemFoodContainer itemFoodContainer, ItemStack ite public void onInventoryChanged() { // the itemstack on the client can change, so make sure we always get the // new itemstack when making changes to the nbt tag - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { + if (FMLCommonHandler.instance() + .getEffectiveSide() == Side.CLIENT) { findMatchingClientItemStack(); } @@ -37,11 +38,12 @@ public void onInventoryChanged() { @SideOnly(Side.CLIENT) public void findMatchingClientItemStack() { - EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer; + EntityPlayer player = FMLClientHandler.instance() + .getClient().thePlayer; if (player.openContainer != null && player.openContainer instanceof ContainerFoodContainer) { ContainerFoodContainer openFoodContainer = (ContainerFoodContainer) player.openContainer; ItemStack matchingFoodContainer = openFoodContainer - .findFoodContainerWithUUID(itemFoodContainer.getUUID(itemStackFoodContainer)); + .findFoodContainerWithUUID(itemFoodContainer.getUUID(itemStackFoodContainer)); if (matchingFoodContainer != null) itemStackFoodContainer = matchingFoodContainer; } } diff --git a/src/main/java/squeek/spiceoflife/inventory/NBTInventory.java b/src/main/java/squeek/spiceoflife/inventory/NBTInventory.java index 32d72d5..f84171a 100644 --- a/src/main/java/squeek/spiceoflife/inventory/NBTInventory.java +++ b/src/main/java/squeek/spiceoflife/inventory/NBTInventory.java @@ -46,8 +46,7 @@ public boolean isInventoryEmpty() { public boolean isInventoryFull() { for (ItemStack itemStack : inventoryItems) { if (itemStack == null - || itemStack.stackSize < Math.min(getInventoryStackLimit(), itemStack.getMaxStackSize())) - return false; + || itemStack.stackSize < Math.min(getInventoryStackLimit(), itemStack.getMaxStackSize())) return false; } return true; } diff --git a/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java b/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java index 335cd93..41d281b 100644 --- a/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java +++ b/src/main/java/squeek/spiceoflife/items/ItemFoodContainer.java @@ -81,7 +81,8 @@ public FoodContainerInventory getInventory(ItemStack itemStack) { // necessary to catch tossing items while still in an inventory @SubscribeEvent public void onItemToss(ItemTossEvent event) { - if (event.entityItem.getEntityItem().getItem() instanceof ItemFoodContainer) { + if (event.entityItem.getEntityItem() + .getItem() instanceof ItemFoodContainer) { onDroppedByPlayer(event.entityItem.getEntityItem(), event.player); } } @@ -100,7 +101,10 @@ public NBTTagCompound getOrInitBaseTag(ItemStack itemStack) { NBTTagCompound baseTag = itemStack.getTagCompound(); - if (!baseTag.hasKey(TAG_KEY_UUID)) baseTag.setString(TAG_KEY_UUID, UUID.randomUUID().toString()); + if (!baseTag.hasKey(TAG_KEY_UUID)) baseTag.setString( + TAG_KEY_UUID, + UUID.randomUUID() + .toString()); return baseTag; } @@ -138,7 +142,8 @@ public void setIsOpen(ItemStack itemStack, boolean isOpen) { */ @Override public FoodValues getFoodValues(ItemStack itemStack) { - if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { + if (FMLCommonHandler.instance() + .getEffectiveSide() == Side.CLIENT) { // the client uses the food values for tooltips/etc, so it should // inherit them from the food that will be eaten return FoodValues.get(getBestFoodForPlayerToEat(itemStack, NetworkHelper.getClientPlayer())); @@ -179,7 +184,7 @@ public void tryDumpFoodInto(ItemStack itemStack, IInventory inventory, EntityPla public void tryPullFoodFrom(ItemStack itemStack, IInventory inventory, EntityPlayer player) { List foodsToPull = MealPrioritizationHelper - .findBestFoodsForPlayerAccountingForVariety(player, inventory); + .findBestFoodsForPlayerAccountingForVariety(player, inventory); if (foodsToPull.size() > 0) { FoodContainerInventory foodContainerInventory = getInventory(itemStack); for (InventoryFoodInfo foodToPull : foodsToPull) { @@ -202,22 +207,25 @@ public boolean canBeEatenFrom(ItemStack stack) { } public boolean isOpen(ItemStack itemStack) { - return itemStack.hasTagCompound() && itemStack.getTagCompound().getBoolean(TAG_KEY_OPEN); + return itemStack.hasTagCompound() && itemStack.getTagCompound() + .getBoolean(TAG_KEY_OPEN); } @Override public boolean onDroppedByPlayer(ItemStack itemStack, EntityPlayer player) { if (!player.worldObj.isRemote && player.openContainer != null - && player.openContainer instanceof ContainerFoodContainer) { + && player.openContainer instanceof ContainerFoodContainer) { ContainerFoodContainer openFoodContainer = (ContainerFoodContainer) player.openContainer; UUID droppedUUID = getUUID(itemStack); - if (openFoodContainer.getUUID().equals(droppedUUID)) { + if (openFoodContainer.getUUID() + .equals(droppedUUID)) { // if the cursor item is the open food container, then it will create an infinite loop // due to the container dropping the cursor item when it is closed ItemStack itemOnTheCursor = player.inventory.getItemStack(); if (itemOnTheCursor != null && itemOnTheCursor.getItem() instanceof ItemFoodContainer) { - if (((ItemFoodContainer) itemOnTheCursor.getItem()).getUUID(itemOnTheCursor).equals(droppedUUID)) { + if (((ItemFoodContainer) itemOnTheCursor.getItem()).getUUID(itemOnTheCursor) + .equals(droppedUUID)) { player.inventory.setItemStack(null); } } @@ -248,12 +256,11 @@ public void addInformation(ItemStack itemStack, EntityPlayer player, List toolTi String openCloseLineColor = EnumChatFormatting.GRAY.toString(); if (isOpen(itemStack)) { toolTip.add( - openCloseLineColor - + StatCollector.translateToLocalFormatted("spiceoflife.tooltip.to.close.food.container")); + openCloseLineColor + + StatCollector.translateToLocalFormatted("spiceoflife.tooltip.to.close.food.container")); } else toolTip.add( - openCloseLineColor - + StatCollector.translateToLocalFormatted("spiceoflife.tooltip.to.open.food.container")); + openCloseLineColor + StatCollector.translateToLocalFormatted("spiceoflife.tooltip.to.open.food.container")); } @Override @@ -271,7 +278,7 @@ public IIcon getIcon(ItemStack itemStack, int renderPass) { @Override public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { + float hitX, float hitY, float hitZ) { if (!world.isRemote && isOpen(itemStack)) { IInventory inventoryHit = InventoryHelper.getInventoryAtLocation(world, x, y, z); if (inventoryHit != null && inventoryHit.isUseableByPlayer(player)) { @@ -306,7 +313,7 @@ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer @Override public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack) { if (entityLiving.worldObj.isRemote && ModConfig.LEFT_CLICK_OPENS_FOOD_CONTAINERS - && MiscHelper.isMouseOverNothing()) { + && MiscHelper.isMouseOverNothing()) { PacketHandler.channel.sendToServer(new PacketToggleFoodContainer()); return true; } diff --git a/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java b/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java index 3c23650..974b971 100644 --- a/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java +++ b/src/main/java/squeek/spiceoflife/items/ItemFoodJournal.java @@ -33,11 +33,11 @@ public static void giveToPlayer(EntityPlayer player) { // try add, otherwise spawn in the world if (!player.inventory.addItemStackToInventory(itemStack)) { EntityItem entityItem = new EntityItem( - player.worldObj, - player.posX + 0.5f, - player.posY + 0.5f, - player.posZ + 0.5f, - itemStack); + player.worldObj, + player.posX + 0.5f, + player.posY + 0.5f, + player.posZ + 0.5f, + itemStack); player.worldObj.spawnEntityInWorld(entityItem); } } @@ -46,7 +46,8 @@ public static void giveToPlayer(EntityPlayer player) { @SideOnly(Side.CLIENT) @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { - if (world.isRemote) Minecraft.getMinecraft().displayGuiScreen(new GuiScreenFoodJournal()); + if (world.isRemote) Minecraft.getMinecraft() + .displayGuiScreen(new GuiScreenFoodJournal()); return super.onItemRightClick(itemStack, world, player); } } diff --git a/src/main/java/squeek/spiceoflife/network/NetworkHelper.java b/src/main/java/squeek/spiceoflife/network/NetworkHelper.java index 331129c..fa04452 100644 --- a/src/main/java/squeek/spiceoflife/network/NetworkHelper.java +++ b/src/main/java/squeek/spiceoflife/network/NetworkHelper.java @@ -15,6 +15,7 @@ public static EntityPlayer getSidedPlayer(MessageContext ctx) { @SideOnly(Side.CLIENT) public static EntityPlayer getClientPlayer() { - return FMLClientHandler.instance().getClientPlayerEntity(); + return FMLClientHandler.instance() + .getClientPlayerEntity(); } } diff --git a/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java b/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java index 50d2023..67252a3 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java +++ b/src/main/java/squeek/spiceoflife/network/PacketFoodGroup.java @@ -41,10 +41,10 @@ public void unpack(IByteIO data) { @Override public PacketBase processAndReply(Side side, EntityPlayer player) { if (++foodGroupsRecieved > totalFoodGroups) throw new RuntimeException( - "Recieved more food groups than should exist (recieved: " + foodGroupsRecieved - + ", total: " - + totalFoodGroups - + ")"); + "Recieved more food groups than should exist (recieved: " + foodGroupsRecieved + + ", total: " + + totalFoodGroups + + ")"); FoodGroupRegistry.addFoodGroup(foodGroup); diff --git a/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java b/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java index 6874b9c..8571e54 100644 --- a/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java +++ b/src/main/java/squeek/spiceoflife/network/PacketFoodHistory.java @@ -48,14 +48,17 @@ public PacketBase processAndReply(Side side, EntityPlayer player) { FoodHistory foodHistory = FoodHistory.get(player); if (shouldOverwrite) { - foodHistory.getRecentHistory().clear(); + foodHistory.getRecentHistory() + .clear(); foodHistory.ticksActive = this.foodHistory.ticksActive; } else { foodHistory.totalFoodsEatenAllTime++; } - this.foodHistory.getRecentHistory().forEach(foodHistory::addFoodRecent); - this.foodHistory.getFullHistory().forEach(foodHistory::addFoodFullHistory); + this.foodHistory.getRecentHistory() + .forEach(foodHistory::addFoodRecent); + this.foodHistory.getFullHistory() + .forEach(foodHistory::addFoodFullHistory); return null; } diff --git a/src/main/java/squeek/spiceoflife/network/simpleimpl/BetterSimpleChannelHandlerWrapper.java b/src/main/java/squeek/spiceoflife/network/simpleimpl/BetterSimpleChannelHandlerWrapper.java index a1320e9..3fd8dea 100644 --- a/src/main/java/squeek/spiceoflife/network/simpleimpl/BetterSimpleChannelHandlerWrapper.java +++ b/src/main/java/squeek/spiceoflife/network/simpleimpl/BetterSimpleChannelHandlerWrapper.java @@ -24,7 +24,7 @@ * multiple message types See FML's SimpleChannelHandlerWrapper for general documentation */ public class BetterSimpleChannelHandlerWrapper - extends SimpleChannelInboundHandler { + extends SimpleChannelInboundHandler { protected static Constructor messageContextConstructor = null; @@ -43,7 +43,7 @@ public class BetterSimpleChannelHandlerWrapper> handler, Side side, - Class messageType) { + Class messageType) { super(messageType); try { messageHandler = handler.newInstance(); @@ -55,12 +55,17 @@ public BetterSimpleChannelHandlerWrapper(Class void registerMessage( - Class> messageHandler, Class messageType, - int discriminator, Side side) { + Class> messageHandler, Class messageType, + int discriminator, Side side) { packetCodec.addDiscriminator(discriminator, messageType); FMLEmbeddedChannel channel = channels.get(side); String type = channel.findChannelHandlerNameForType(SimpleIndexedCodec.class); @@ -54,29 +54,29 @@ public void registerMessage( } private void addServerHandlerAfter( - FMLEmbeddedChannel channel, String type, Class> messageHandler, - Class messageType) { + FMLEmbeddedChannel channel, String type, Class> messageHandler, + Class messageType) { BetterSimpleChannelHandlerWrapper handler = getHandlerWrapper( - messageHandler, - Side.SERVER, - messageType); + messageHandler, + Side.SERVER, + messageType); channel.pipeline() - .addAfter(type, messageHandler.getName() + messageType.getName() + Side.SERVER.name(), handler); + .addAfter(type, messageHandler.getName() + messageType.getName() + Side.SERVER.name(), handler); } private void addClientHandlerAfter( - FMLEmbeddedChannel channel, String type, Class> messageHandler, - Class messageType) { + FMLEmbeddedChannel channel, String type, Class> messageHandler, + Class messageType) { BetterSimpleChannelHandlerWrapper handler = getHandlerWrapper( - messageHandler, - Side.CLIENT, - messageType); + messageHandler, + Side.CLIENT, + messageType); channel.pipeline() - .addAfter(type, messageHandler.getName() + messageType.getName() + Side.CLIENT.name(), handler); + .addAfter(type, messageHandler.getName() + messageType.getName() + Side.CLIENT.name(), handler); } private BetterSimpleChannelHandlerWrapper getHandlerWrapper( - Class> messageHandler, Side side, Class messageType) { + Class> messageHandler, Side side, Class messageType) { return new BetterSimpleChannelHandlerWrapper<>(messageHandler, side, messageType); } @@ -87,7 +87,8 @@ private BetterSimpleChannelHandle * @return A minecraft {@link Packet} suitable for use in minecraft APIs */ public Packet getPacketFrom(IMessage message) { - return channels.get(Side.SERVER).generatePacketFrom(message); + return channels.get(Side.SERVER) + .generatePacketFrom(message); } /** @@ -96,8 +97,12 @@ public Packet getPacketFrom(IMessage message) { * @param message The message to send */ public void sendToAll(IMessage message) { - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); - channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.ALL); + channels.get(Side.SERVER) + .writeAndFlush(message) + .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } /** @@ -108,10 +113,15 @@ public void sendToAll(IMessage message) { * @param player The player to send it to */ public void sendTo(IMessage message, EntityPlayerMP player) { - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.PLAYER); - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player); - channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.PLAYER); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(player); + channels.get(Side.SERVER) + .writeAndFlush(message) + .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } /** @@ -122,10 +132,15 @@ public void sendTo(IMessage message, EntityPlayerMP player) { * @param point The {@link TargetPoint} around which to send */ public void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) { - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point); - channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(point); + channels.get(Side.SERVER) + .writeAndFlush(message) + .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } /** @@ -136,10 +151,15 @@ public void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) * @param dimensionId The dimension id to target */ public void sendToDimension(IMessage message, int dimensionId) { - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.DIMENSION); - channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(dimensionId); - channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.DIMENSION); + channels.get(Side.SERVER) + .attr(FMLOutboundHandler.FML_MESSAGETARGETARGS) + .set(dimensionId); + channels.get(Side.SERVER) + .writeAndFlush(message) + .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } /** @@ -148,8 +168,11 @@ public void sendToDimension(IMessage message, int dimensionId) { * @param message The message to send */ public void sendToServer(IMessage message) { - channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET) - .set(FMLOutboundHandler.OutboundTarget.TOSERVER); - channels.get(Side.CLIENT).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + channels.get(Side.CLIENT) + .attr(FMLOutboundHandler.FML_MESSAGETARGET) + .set(FMLOutboundHandler.OutboundTarget.TOSERVER); + channels.get(Side.CLIENT) + .writeAndFlush(message) + .addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); } } From fa274e1d2a92926dd9e62b0d699cf185965d28b1 Mon Sep 17 00:00:00 2001 From: DrParadox7 Date: Sat, 15 Jun 2024 20:56:57 +0200 Subject: [PATCH 8/8] Set default progression to linear --- src/main/java/squeek/spiceoflife/ModConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/squeek/spiceoflife/ModConfig.java b/src/main/java/squeek/spiceoflife/ModConfig.java index 5431d74..95e2082 100644 --- a/src/main/java/squeek/spiceoflife/ModConfig.java +++ b/src/main/java/squeek/spiceoflife/ModConfig.java @@ -53,7 +53,7 @@ public class ModConfig implements IPackable, IPacketProcessor { public static int FOOD_MILESTONE_VALUE = ModConfig.FOOD_MILESTONE_DEFAULT; private static final String MILESTONE_INCREMENT_NAME = "hearts.milestones.increment"; private static final String MILESTONE_INCREMENT_COMMENT = "The increase per Milestone to the base Food Milestones value (in food points)"; - private static final int MILESTONE_INCREMENT_DEFAULT = 2; + private static final int MILESTONE_INCREMENT_DEFAULT = 0; public static int MILESTONE_INCREMENT_VALUE = ModConfig.MILESTONE_INCREMENT_DEFAULT; private static final String HEARTS_PER_MILESTONE_NAME = "hearts.milestones.reward"; private static final String HEARTS_PER_MILESTONE_COMMENT = "Extra hearts awarded per milestone achieved";