added vaultar requiremnts tagging

This commit is contained in:
alterNERDtive 2023-07-26 16:10:25 +02:00
parent d70cd09b42
commit 2ce1c63111
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1
40 changed files with 685 additions and 7 deletions

View file

@ -2,6 +2,7 @@
* Balance changes are now disabled by default, bug fixes enabled. Will not affect exsting worlds/configs. * Balance changes are now disabled by default, bug fixes enabled. Will not affect exsting worlds/configs.
* Modularized Portal block configuration; you can now define your own blocks to build Vault Portals out of. * Modularized Portal block configuration; you can now define your own blocks to build Vault Portals out of.
* Altar requirement tags! Generated from the actual config file.
# 3.11.1.0 (2023-07-25) # 3.11.1.0 (2023-07-25)

View file

@ -2,9 +2,9 @@
This little companion mod for the Vault mod of the Vault Hunters mod pack fixes a few bugs and brings a couple QoL and balance changes. This little companion mod for the Vault mod of the Vault Hunters mod pack fixes a few bugs and brings a couple QoL and balance changes.
All of these can be individually disabled in client & server config files. All of these can be individually toggled and configured in a server config file. Bug fixes are enabled, balance changes disabled by default.
If you do not disable the changes that affect expertises, I recommend a full expertise reset after installing this mod. If you enable the changes that affect expertises, I recommend a full expertise reset after installing this mod.
## Configuration ## Configuration
@ -22,6 +22,15 @@ The mod is configured via a server configuration file. To change settings, do th
* Relic fragments \#5 are now equally as likely to drop as the others. * Relic fragments \#5 are now equally as likely to drop as the others.
* AE2 auto crafting no longer requires manually giving its fake player all research. * AE2 auto crafting no longer requires manually giving its fake player all research.
## Miscellaneous
* Added support for making Vault Portals out of arbitrary blocks.
* Added tags to all Vault Altar requirements:
* `the_vault:altar_requirements`
* `the_vault:altar_requirements/<level>`
* `the_vault:altar_requirements/<pool>`
* `the_vault:altar_requirements/<pool>/<level>`
## Balance Changes ## Balance Changes
* Removed enchanting cost from Vault Enchanter. * Removed enchanting cost from Vault Enchanter.

View file

@ -199,6 +199,7 @@ dependencies {
implementation fg.deobf("curse.maven:curios-309927:4418032") implementation fg.deobf("curse.maven:curios-309927:4418032")
implementation fg.deobf("curse.maven:quark-243121:3840125") implementation fg.deobf("curse.maven:quark-243121:3840125")
implementation fg.deobf("curse.maven:autoreglib-250363:3642382") implementation fg.deobf("curse.maven:autoreglib-250363:3642382")
implementation fg.deobf("curse.maven:ecologics-570463:4171283")
// util // util
implementation fg.deobf("curse.maven:lazydfu-433518:3209972") implementation fg.deobf("curse.maven:lazydfu-433518:3209972")

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob",
"#the_vault:altar_requirements/resource",
"#the_vault:altar_requirements/farmable",
"#the_vault:altar_requirements/misc"
]
}

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/0",
"#the_vault:altar_requirements/resource/0",
"#the_vault:altar_requirements/farmable/0",
"#the_vault:altar_requirements/misc/0"
]
}

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/10",
"#the_vault:altar_requirements/resource/10",
"#the_vault:altar_requirements/farmable/10",
"#the_vault:altar_requirements/misc/10"
]
}

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/20",
"#the_vault:altar_requirements/resource/20",
"#the_vault:altar_requirements/farmable/20",
"#the_vault:altar_requirements/misc/20"
]
}

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/40",
"#the_vault:altar_requirements/resource/40",
"#the_vault:altar_requirements/farmable/40",
"#the_vault:altar_requirements/misc/40"
]
}

View file

@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/75",
"#the_vault:altar_requirements/resource/75",
"#the_vault:altar_requirements/farmable/75",
"#the_vault:altar_requirements/misc/75"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/misc/90"
]
}

View file

@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/farmable/0",
"#the_vault:altar_requirements/farmable/10",
"#the_vault:altar_requirements/farmable/20",
"#the_vault:altar_requirements/farmable/40",
"#the_vault:altar_requirements/farmable/75"
]
}

View file

@ -0,0 +1,20 @@
{
"replace": false,
"values": [
"minecraft:sugar_cane",
"minecraft:carrot",
"minecraft:potato",
"minecraft:wheat_seeds",
"minecraft:wheat",
"minecraft:oak_leaves",
"minecraft:spruce_leaves",
"minecraft:birch_leaves",
"minecraft:jungle_leaves",
"minecraft:acacia_leaves",
"minecraft:dark_oak_leaves",
"minecraft:azalea_leaves",
"minecraft:flowering_azalea_leaves",
"ecologics:coconut_leaves",
"ecologics:walnut_leaves"
]
}

View file

@ -0,0 +1,28 @@
{
"replace": false,
"values": [
"minecraft:kelp",
"minecraft:cactus",
"minecraft:bamboo",
"minecraft:vine",
"minecraft:beetroot",
"minecraft:snowball",
"minecraft:pumpkin",
"minecraft:melon",
"minecraft:azalea",
"minecraft:flowering_azalea",
"minecraft:sea_pickle",
"minecraft:dandelion",
"minecraft:poppy",
"minecraft:blue_orchid",
"minecraft:allium",
"minecraft:azure_bluet",
"minecraft:oxeye_daisy",
"minecraft:cornflower",
"minecraft:lily_of_the_valley",
"minecraft:beetroot_seeds",
"minecraft:sweet_berries",
"minecraft:apple",
"minecraft:seagrass"
]
}

View file

@ -0,0 +1,20 @@
{
"replace": false,
"values": [
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
"minecraft:red_tulip",
"minecraft:orange_tulip",
"minecraft:white_tulip",
"minecraft:pink_tulip",
"minecraft:sunflower",
"minecraft:rose_bush",
"minecraft:peony",
"minecraft:lilac",
"minecraft:glow_lichen",
"minecraft:clay_ball",
"minecraft:brick",
"minecraft:glow_berries",
"minecraft:nether_wart"
]
}

View file

@ -0,0 +1,12 @@
{
"replace": false,
"values": [
"minecraft:twisting_vines",
"minecraft:weeping_vines",
"minecraft:big_dripleaf",
"minecraft:crimson_fungus",
"minecraft:warped_fungus",
"minecraft:chorus_fruit",
"minecraft:lily_pad"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:wither_rose"
]
}

View file

@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/misc/0",
"#the_vault:altar_requirements/misc/10",
"#the_vault:altar_requirements/misc/20",
"#the_vault:altar_requirements/misc/40",
"#the_vault:altar_requirements/misc/75",
"#the_vault:altar_requirements/misc/90"
]
}

View file

@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"minecraft:pointed_dripstone",
"minecraft:gold_ingot",
"minecraft:iron_ingot",
"minecraft:redstone",
"minecraft:emerald",
"minecraft:lapis_lazuli",
"minecraft:copper_ingot",
"minecraft:coal",
"minecraft:charcoal"
]
}

View file

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"minecraft:amethyst_shard",
"minecraft:diamond",
"minecraft:spore_blossom"
]
}

View file

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"minecraft:glowstone_dust",
"minecraft:quartz",
"minecraft:name_tag"
]
}

View file

@ -0,0 +1,31 @@
{
"replace": false,
"values": [
"minecraft:prismarine_shard",
"minecraft:prismarine_crystals",
"minecraft:chorus_flower",
"minecraft:dead_brain_coral",
"minecraft:dead_bubble_coral",
"minecraft:dead_fire_coral",
"minecraft:dead_horn_coral",
"minecraft:dead_tube_coral",
"minecraft:dead_tube_coral_fan",
"minecraft:dead_brain_coral_fan",
"minecraft:dead_bubble_coral_fan",
"minecraft:dead_fire_coral_fan",
"minecraft:dead_horn_coral_fan",
"minecraft:brain_coral",
"minecraft:bubble_coral",
"minecraft:fire_coral",
"minecraft:horn_coral",
"minecraft:tube_coral",
"minecraft:tube_coral_fan",
"minecraft:brain_coral_fan",
"minecraft:bubble_coral_fan",
"minecraft:fire_coral_fan",
"minecraft:horn_coral_fan",
"minecraft:totem_of_undying",
"minecraft:saddle",
"minecraft:cobweb"
]
}

View file

@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"minecraft:sponge",
"minecraft:nether_star",
"minecraft:trident"
]
}

View file

@ -0,0 +1,19 @@
{
"replace": false,
"values": [
"minecraft:music_disc_13",
"minecraft:music_disc_cat",
"minecraft:music_disc_blocks",
"minecraft:music_disc_chirp",
"minecraft:music_disc_far",
"minecraft:music_disc_mall",
"minecraft:music_disc_mellohi",
"minecraft:music_disc_stal",
"minecraft:music_disc_strad",
"minecraft:music_disc_ward",
"minecraft:music_disc_11",
"minecraft:music_disc_wait",
"minecraft:music_disc_otherside",
"minecraft:music_disc_pigstep"
]
}

View file

@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/mob/0",
"#the_vault:altar_requirements/mob/10",
"#the_vault:altar_requirements/mob/20",
"#the_vault:altar_requirements/mob/40",
"#the_vault:altar_requirements/mob/75"
]
}

View file

@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"minecraft:string",
"minecraft:rotten_flesh",
"minecraft:bone",
"minecraft:spider_eye",
"minecraft:arrow"
]
}

View file

@ -0,0 +1,36 @@
{
"replace": false,
"values": [
"minecraft:feather",
"minecraft:porkchop",
"minecraft:beef",
"minecraft:chicken",
"minecraft:rabbit",
"minecraft:slime_ball",
"minecraft:egg",
"minecraft:leather",
"minecraft:rabbit_hide",
"minecraft:white_dye",
"minecraft:orange_dye",
"minecraft:magenta_dye",
"minecraft:light_blue_dye",
"minecraft:yellow_dye",
"minecraft:lime_dye",
"minecraft:pink_dye",
"minecraft:gray_dye",
"minecraft:light_gray_dye",
"minecraft:cyan_dye",
"minecraft:purple_dye",
"minecraft:blue_dye",
"minecraft:brown_dye",
"minecraft:green_dye",
"minecraft:red_dye",
"minecraft:black_dye",
"minecraft:poisonous_potato",
"minecraft:mutton",
"minecraft:salmon",
"minecraft:cod",
"minecraft:cocoa_beans",
"minecraft:gunpowder"
]
}

View file

@ -0,0 +1,13 @@
{
"replace": false,
"values": [
"minecraft:honey_bottle",
"minecraft:blaze_rod",
"minecraft:ender_pearl",
"minecraft:rabbit_foot",
"minecraft:honeycomb",
"minecraft:ink_sac",
"minecraft:glow_ink_sac",
"minecraft:pufferfish"
]
}

View file

@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"minecraft:tropical_fish",
"minecraft:ghast_tear",
"minecraft:magma_cream",
"minecraft:nautilus_shell",
"minecraft:turtle_egg",
"minecraft:wither_skeleton_skull"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"minecraft:phantom_membrane"
]
}

View file

@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"#the_vault:altar_requirements/resource/0",
"#the_vault:altar_requirements/resource/10",
"#the_vault:altar_requirements/resource/20",
"#the_vault:altar_requirements/resource/40",
"#the_vault:altar_requirements/resource/75"
]
}

View file

@ -0,0 +1,20 @@
{
"replace": false,
"values": [
"minecraft:cobblestone",
"minecraft:diorite",
"minecraft:andesite",
"minecraft:granite",
"minecraft:stone",
"minecraft:gravel",
"minecraft:sand",
"minecraft:red_sand",
"minecraft:dirt",
"minecraft:oak_log",
"minecraft:spruce_log",
"minecraft:birch_log",
"minecraft:jungle_log",
"minecraft:acacia_log",
"minecraft:dark_oak_log"
]
}

View file

@ -0,0 +1,64 @@
{
"replace": false,
"values": [
"minecraft:moss_block",
"minecraft:white_wool",
"minecraft:orange_wool",
"minecraft:magenta_wool",
"minecraft:light_blue_wool",
"minecraft:yellow_wool",
"minecraft:lime_wool",
"minecraft:pink_wool",
"minecraft:gray_wool",
"minecraft:light_gray_wool",
"minecraft:cyan_wool",
"minecraft:purple_wool",
"minecraft:blue_wool",
"minecraft:brown_wool",
"minecraft:green_wool",
"minecraft:red_wool",
"minecraft:black_wool",
"minecraft:glass",
"minecraft:white_stained_glass",
"minecraft:orange_stained_glass",
"minecraft:magenta_stained_glass",
"minecraft:light_blue_stained_glass",
"minecraft:yellow_stained_glass",
"minecraft:lime_stained_glass",
"minecraft:pink_stained_glass",
"minecraft:gray_stained_glass",
"minecraft:light_gray_stained_glass",
"minecraft:cyan_stained_glass",
"minecraft:purple_stained_glass",
"minecraft:blue_stained_glass",
"minecraft:brown_stained_glass",
"minecraft:green_stained_glass",
"minecraft:red_stained_glass",
"minecraft:black_stained_glass",
"minecraft:smooth_stone",
"minecraft:bricks",
"minecraft:netherrack",
"minecraft:soul_sand",
"minecraft:basalt",
"minecraft:white_terracotta",
"minecraft:orange_terracotta",
"minecraft:magenta_terracotta",
"minecraft:light_blue_terracotta",
"minecraft:yellow_terracotta",
"minecraft:lime_terracotta",
"minecraft:pink_terracotta",
"minecraft:gray_terracotta",
"minecraft:light_gray_terracotta",
"minecraft:cyan_terracotta",
"minecraft:purple_terracotta",
"minecraft:blue_terracotta",
"minecraft:brown_terracotta",
"minecraft:green_terracotta",
"minecraft:red_terracotta",
"minecraft:black_terracotta",
"minecraft:terracotta",
"minecraft:deepslate",
"minecraft:cobbled_deepslate",
"minecraft:tuff"
]
}

View file

@ -0,0 +1,43 @@
{
"replace": false,
"values": [
"minecraft:mossy_cobblestone",
"minecraft:obsidian",
"minecraft:ice",
"minecraft:white_concrete",
"minecraft:orange_concrete",
"minecraft:magenta_concrete",
"minecraft:light_blue_concrete",
"minecraft:yellow_concrete",
"minecraft:lime_concrete",
"minecraft:pink_concrete",
"minecraft:gray_concrete",
"minecraft:light_gray_concrete",
"minecraft:cyan_concrete",
"minecraft:purple_concrete",
"minecraft:blue_concrete",
"minecraft:brown_concrete",
"minecraft:green_concrete",
"minecraft:red_concrete",
"minecraft:black_concrete",
"minecraft:white_concrete_powder",
"minecraft:orange_concrete_powder",
"minecraft:magenta_concrete_powder",
"minecraft:light_blue_concrete_powder",
"minecraft:yellow_concrete_powder",
"minecraft:lime_concrete_powder",
"minecraft:pink_concrete_powder",
"minecraft:gray_concrete_powder",
"minecraft:light_gray_concrete_powder",
"minecraft:cyan_concrete_powder",
"minecraft:purple_concrete_powder",
"minecraft:blue_concrete_powder",
"minecraft:brown_concrete_powder",
"minecraft:green_concrete_powder",
"minecraft:red_concrete_powder",
"minecraft:black_concrete_powder",
"minecraft:blackstone",
"minecraft:dripstone_block",
"minecraft:prismarine"
]
}

View file

@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"minecraft:soul_soil",
"minecraft:purpur_block",
"minecraft:mycelium",
"minecraft:end_stone",
"minecraft:magma_block",
"minecraft:nether_wart_block",
"minecraft:warped_wart_block",
"minecraft:shroomlight",
"minecraft:podzol"
]
}

View file

@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"minecraft:blue_ice",
"minecraft:crimson_stem",
"minecraft:warped_stem",
"minecraft:crying_obsidian",
"minecraft:calcite",
"minecraft:rooted_dirt"
]
}

View file

@ -21,26 +21,42 @@ import org.slf4j.Logger;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
import net.minecraft.data.DataProvider;
import net.minecraft.data.tags.BlockTagsProvider;
import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.forge.event.lifecycle.GatherDataEvent;
import tv.alterNERD.VaultModTweaks.integration.TagManager;
@Mod("the_vault_tweaks") @Mod("the_vault_tweaks")
public class VaultModTweaks public class VaultModTweaks
{ {
public static final Logger LOGGER = LogUtils.getLogger(); public static final Logger LOGGER = LogUtils.getLogger();
public static final String MOD_ID = "the_vault_tweaks";
public VaultModTweaks() public VaultModTweaks() {
{
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::gatherData);
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Configuration.CONFIG); ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, Configuration.CONFIG);
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, Configuration.CLIENTCONFIG); ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, Configuration.CLIENTCONFIG);
} }
private void setup(final FMLCommonSetupEvent event) private void setup(final FMLCommonSetupEvent event) {
{
LOGGER.info("Vault Mod Tweaks by alterNERDtive"); LOGGER.info("Vault Mod Tweaks by alterNERDtive");
} }
private void gatherData(final GatherDataEvent event) {
BlockTagsProvider blockTagsProvider = new BlockTagsProvider(event.getGenerator(), MOD_ID, event.getExistingFileHelper());
event.getGenerator().addProvider(blockTagsProvider);
event.getGenerator().addProvider(
(DataProvider) new TagManager(
event.getGenerator(),
blockTagsProvider,
MOD_ID,
event.getExistingFileHelper())
);
}
} }

View file

@ -0,0 +1,105 @@
/**
* Copyright 2023 alterNERDtive.
*
* This file is part of Vault Mod Tweaks.
*
* Vault Mod Tweaks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Vault Mod Tweaks is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Vault Mod Tweaks. If not, see <https://www.gnu.org/licenses/>.
*/
package tv.alterNERD.VaultModTweaks.integration;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import org.jetbrains.annotations.Nullable;
import iskallia.vault.config.altar.VaultAltarIngredientsConfig;
import iskallia.vault.config.altar.entry.AltarIngredientEntry;
import iskallia.vault.config.entry.LevelEntryMap;
import iskallia.vault.util.data.WeightedList;
import net.minecraft.core.Registry;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.tags.BlockTagsProvider;
import net.minecraft.data.tags.ItemTagsProvider;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraftforge.common.data.ExistingFileHelper;
import tv.alterNERD.VaultModTweaks.integration.mixin.IMixinVaultAltarIngredientsConfig;
/**
* Adds custom Tags.
*/
public class TagManager
extends ItemTagsProvider
{
public TagManager(DataGenerator generator, BlockTagsProvider blockTagsProvider, String modId,
@Nullable ExistingFileHelper existingFileHelper) {
super(generator, blockTagsProvider, modId, existingFileHelper);
}
@Override
protected void addTags() {
LevelEntryMap<Map<String, WeightedList<AltarIngredientEntry>>> levelIngredientsMap = ((IMixinVaultAltarIngredientsConfig) (VaultAltarIngredientsConfig) new VaultAltarIngredientsConfig().readConfig()).getLEVELS();
Map<String, SortedMap<Integer, List<Item>>> poolMap = new HashMap<String, SortedMap<Integer, List<Item>>>();
// Convert the level -> pool list<ingrediententry> format to what we need:
// pool -> level -> list<item>
levelIngredientsMap.forEach((level, ingredients) -> {
ingredients.forEach((pool, ingredientEntryList) -> {
SortedMap<Integer, List<Item>> poolItems = poolMap.getOrDefault(pool, new TreeMap<Integer, List<Item>>());
List<Item> itemList = poolItems.getOrDefault(level, new ArrayList<Item>());
ingredientEntryList.forEach((ingredientEntry, weight) -> {
ingredientEntry.getItems().forEach(itemStack -> {
itemList.add(itemStack.getItem());
});
});
poolItems.putIfAbsent(level, itemList);
poolMap.putIfAbsent(pool, poolItems);
});
});
// Create (and populate) the actual tags
TagKey<Item> altarTag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("the_vault:altar_requirements"));
poolMap.forEach((pool, levelItemMap) -> {
TagKey<Item> poolTag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("the_vault:altar_requirements/%s".formatted(pool)));
List<Item> itemsToRemove = new ArrayList<Item>();
levelItemMap.forEach((level, items) -> {
// Lets make sure to _only_ tag items with the current level that are _not_ included in previous levels
items.removeAll(itemsToRemove);
if (!items.isEmpty()) {
TagKey<Item> levelTag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("the_vault:altar_requirements/%s".formatted(level)));
TagKey<Item> poolLevelTag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("the_vault:altar_requirements/%s/%s".formatted(pool, level)));
items.forEach(item -> {
tag(poolLevelTag).add(item);
});
itemsToRemove.addAll(items);
tag(levelTag).addTag(poolLevelTag);
tag(poolTag).addTag(poolLevelTag);
}
});
tag(altarTag).addTag(poolTag);
});
}
}

View file

@ -0,0 +1,42 @@
/**
* Copyright 2023 alterNERDtive.
*
* This file is part of Vault Mod Tweaks.
*
* Vault Mod Tweaks is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Vault Mod Tweaks is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Vault Mod Tweaks. If not, see <https://www.gnu.org/licenses/>.
*/
package tv.alterNERD.VaultModTweaks.integration.mixin;
import java.util.Map;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import iskallia.vault.config.altar.VaultAltarIngredientsConfig;
import iskallia.vault.config.altar.entry.AltarIngredientEntry;
import iskallia.vault.config.entry.LevelEntryMap;
import iskallia.vault.util.data.WeightedList;
/**
* Changes the {@link iskallia.vault.config.altar.VaultAltarIngredientsConfig}
* class for managing altar recipes.
*/
@Mixin(VaultAltarIngredientsConfig.class)
public interface IMixinVaultAltarIngredientsConfig {
/**
* Makes the private level/entry Map available.
* @return The level/entry Map
*/
@Accessor(remap = false)
LevelEntryMap<Map<String, WeightedList<AltarIngredientEntry>>> getLEVELS();
}

View file

@ -39,7 +39,7 @@ import tv.alterNERD.VaultModTweaks.util.I18n;
*/ */
@Mixin(EnchantmentEntry.class) @Mixin(EnchantmentEntry.class)
public abstract class MixinEnchantmentEntry public abstract class MixinEnchantmentEntry
{ {
@Shadow(remap = false) @Shadow(remap = false)
private int level; private int level;
@Shadow(remap = false) @Shadow(remap = false)

View file

@ -5,6 +5,7 @@
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_17",
"refmap": "mixins.the_vault_tweaks.refmap.json", "refmap": "mixins.the_vault_tweaks.refmap.json",
"mixins": [ "mixins": [
"IMixinVaultAltarIngredientsConfig",
"MixinCrystalBuddingConfig", "MixinCrystalBuddingConfig",
"MixinEnchantmentEntry", "MixinEnchantmentEntry",
"MixinExpertisesGuiConfig", "MixinExpertisesGuiConfig",