removed mixin that would crash the game with invalid configs

(there isn’t really a real world scenario for that anyway)
This commit is contained in:
alterNERDtive 2023-06-22 12:57:23 +02:00
parent b3f32d75b2
commit 38518d0103
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -44,26 +44,6 @@ public class MixinEnchantmentCost {
@Shadow(remap = false) @Shadow(remap = false)
private List<ItemStack> items; private List<ItemStack> items;
/**
* Removes the Emerald cost from all Vault Enchanter enchantments when
* creating a new configuration.
*
* @param items
* @param levels
* @param ci
*/
@Inject(
method = "<init>(Ljava/util/List;I)V",
at = @At("RETURN"),
remap = false
)
private void initCallback(List<ItemStack> items, int levels, CallbackInfo ci) {
if (Configuration.ENCHANTS_FORFREE.get()) {
VaultModTweaks.LOGGER.info("the_vault_tweaks.log.inject.enchanter.forfree");
this.items.clear();
}
}
/** /**
* Removes the Emerald cost from all Vault Enchanter enchantments when * Removes the Emerald cost from all Vault Enchanter enchantments when
* reading an existing JSON configuration. * reading an existing JSON configuration.