Skip to content

Commit

Permalink
Configurable Limitite glowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyof429 committed Feb 6, 2024
1 parent 919742d commit 9dd3902
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/main/java/net/lyof/sortilege/configs/ConfigEntries.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ public static void reload() {
enchantLimiterDefault = new ConfigEntry<>("enchantments.enchant_limiter.default", 3).get();
enchantLimiterMode = new ConfigEntry<>( "enchantments.enchant_limiter.override_mode", "relative").get();
enchantLimiterOverrides = new ConfigEntry<Map<String, Double>>( "enchantments.enchant_limiter.overrides", new HashMap<>()).get();

alwaysShowEnchantLimit = new ConfigEntry<>("enchantments.enchant_limiter.always_show_limit", true).get();
doLimititeSpawn = new ConfigEntry<>("enchantments.enchant_limiter.limitite.generate_limitite_loot", true).get();

isLimititeFoil = new ConfigEntry<>("enchantments.enchant_limiter.limitite.is_foil", true).get();
doLimititeSpawn = new ConfigEntry<>("enchantments.enchant_limiter.limitite.generate_as_loot", true).get();
maxLimitBreak = new ConfigEntry<>("enchantments.enchant_limiter.limitite.max_limit_break", 3).get();

magicProtCompatibility = new ConfigEntry<>("enchantments.magic_protection_protection_compatibility", false).get();
Expand Down Expand Up @@ -52,6 +53,8 @@ public static void reload() {
public static String enchantLimiterMode;
public static Map<String, Double> enchantLimiterOverrides;
public static boolean alwaysShowEnchantLimit;

public static boolean isLimititeFoil;
public static boolean doLimititeSpawn;
public static int maxLimitBreak;

Expand Down
10 changes: 6 additions & 4 deletions src/main/java/net/lyof/sortilege/configs/ModJsonConfigs.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,12 @@ public static double getVersion() {
// Should an item's maximum enchantments be displayed even when it is not enchanted
"always_show_limit": true,
"limitite": {
// Should Limitite spawn in rare structures' chests
"generate_limitite_loot": true,
// How many Limitites can be applied to a single item
"max_limit_break": 3
// Should Limitite have an enchantment glint
"is_foil": true,
// Should Limitite spawn in rare structures' chests
"generate_as_loot": true,
// How many Limitites can be applied to a single item
"max_limit_break": 3
}
},
// Should the Magic Protection enchantment be compatible with vanilla Protection enchantments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package net.lyof.sortilege.items.custom;

import net.lyof.sortilege.configs.ConfigEntries;
import net.lyof.sortilege.configs.ModJsonConfigs;
import net.lyof.sortilege.utils.ItemHelper;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.screens.Screen;
Expand All @@ -19,7 +21,7 @@ public LimititeItem(Properties properties) {

@Override
public boolean isFoil(ItemStack stack) {
return true;
return ConfigEntries.isLimititeFoil;
}

@Override
Expand Down

0 comments on commit 9dd3902

Please sign in to comment.