diff --git a/CHANGELOG/1.18/current.md b/CHANGELOG/1.18/current.md index 121383f..58aada2 100644 --- a/CHANGELOG/1.18/current.md +++ b/CHANGELOG/1.18/current.md @@ -1,2 +1,5 @@ - `[NEW]` Recipe calculation depth is now configurable - `[NEW]` Costs and multipliers are now configurable +- `[FIX]` Cost values fixed for some tags +- `[FIX]` Some tag values fixed +- `[DEV]` Removed some unneeded code diff --git a/build.gradle b/build.gradle index 9edfa2f..a77fe67 100644 --- a/build.gradle +++ b/build.gradle @@ -201,11 +201,6 @@ curseforge { changelogType = 'markdown' releaseType = findProperty("curseforge_release_type") ?: 'beta' addGameVersion project.target_mc_version -// for (String v : project.additional_mc_versions.split(',')) { -// if (v) { -// addGameVersion v -// } -// } relations { optionalDependency 'configured' requiredDependency 'jei' diff --git a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java index 07048d1..f01ae71 100644 --- a/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java +++ b/src/main/java/com/sweetrpg/crafttracker/common/registry/ModKeyBindings.java @@ -23,4 +23,5 @@ public static void init() { ClientRegistry.registerKeyBinding(POPULATE_SHOPPING_LIST_MAPPING); ClientRegistry.registerKeyBinding(CLEAR_SHOPPING_LIST_MAPPING); } + } diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java b/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java index f6f44b9..220a32a 100644 --- a/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java +++ b/src/main/java/com/sweetrpg/crafttracker/common/util/AdvancementUtil.java @@ -16,6 +16,6 @@ public static void trigger(ModAdvancements.Key advancement, ServerPlayer player) if(ModTriggers.ENTRIES.get(ct.getCriterion().getPath()) instanceof SimpleTrigger trigger) { trigger.trigger(player); } - } + } diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java index c132d59..f25988b 100644 --- a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java +++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/IngredientCostCalculator.java @@ -2,10 +2,7 @@ import com.sweetrpg.crafttracker.CraftTracker; import com.sweetrpg.crafttracker.common.config.ConfigHandler; -import com.sweetrpg.crafttracker.common.lib.Constants; import com.sweetrpg.crafttracker.common.util.DebugUtil; -import com.sweetrpg.crafttracker.common.util.RecipeUtil; -import net.minecraft.client.Minecraft; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; @@ -13,11 +10,6 @@ import net.minecraft.world.item.crafting.Ingredient; import org.apache.commons.lang3.ObjectUtils; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - /** * Calculates the cost of an ingredient *

@@ -79,7 +71,7 @@ public int calculate() { CraftTracker.LOGGER.debug("multiplier: {}", multiplier); if(multiplier != null) { - var newCost =(int) (cost * multiplier.get()); + var newCost = (int) (cost * multiplier.get()); CraftTracker.LOGGER.debug("#calculate: increasing cost of tag {} in namespace {} by {}: from {} to {}", tagId, tagNamespace, multiplier.get(), cost, newCost); diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java index 92041c8..cbc4376 100644 --- a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java +++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/ItemCostCalculator.java @@ -3,8 +3,6 @@ import com.sweetrpg.crafttracker.CraftTracker; import com.sweetrpg.crafttracker.common.config.ConfigHandler; import com.sweetrpg.crafttracker.common.util.DebugUtil; -import com.sweetrpg.crafttracker.common.util.RecipeUtil; -import com.sweetrpg.crafttracker.common.util.Util; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; @@ -66,7 +64,7 @@ public int calculate() { CraftTracker.LOGGER.debug("multiplier: {}", multiplier); if(multiplier != null) { - var newCost =(int) (cost * multiplier.get()); + var newCost = (int) (cost * multiplier.get()); CraftTracker.LOGGER.debug("#calculate: increasing cost of tag {} in namespace {} by {}: from {} to {}", tagId, tagNamespace, multiplier.get(), cost, newCost); diff --git a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java index da1eede..bd87629 100644 --- a/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java +++ b/src/main/java/com/sweetrpg/crafttracker/common/util/calc/RecipeCostCalculator.java @@ -4,7 +4,6 @@ import com.sweetrpg.crafttracker.common.config.ConfigHandler; import com.sweetrpg.crafttracker.common.util.DebugUtil; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.crafting.CraftingRecipe; import net.minecraft.world.item.crafting.Recipe; import org.apache.commons.lang3.ObjectUtils; @@ -51,7 +50,7 @@ public int calculate() { CraftTracker.LOGGER.debug("multiplier: {}", multiplier); if(multiplier != null) { - var newCost =(int) (cost * multiplier.get()); + var newCost = (int) (cost * multiplier.get()); CraftTracker.LOGGER.debug("#calculate: increasing cost of recipe {} in namespace {} by {}: from {} to {}", recipe.getId(), recipeNamespace, multiplier.get(), cost, newCost); @@ -63,7 +62,7 @@ public int calculate() { var typeMultiplier = ConfigHandler.COMMON.recipeTypeEntries.get(recipeType.toString()); if(typeMultiplier != null) { - var newCost =(int) (cost * typeMultiplier.get()); + var newCost = (int) (cost * typeMultiplier.get()); CraftTracker.LOGGER.debug("#calculate: increasing cost of recipe type {} by {}: from {} to {}", recipeType, typeMultiplier.get(), cost, newCost);