Skip to content

Commit

Permalink
Buff lapis trim and fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Bawnorton committed Aug 1, 2023
1 parent 71507c1 commit 958a44a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BetterTrims
- Gold: Piglins will not attack you.
- Emerald: +12.5% Discount on trades with villagers per piece.
- Diamond: +5% Damage reduction per piece.
- Lapis: Increases enchantability of the piece to 30. (Diamond is 10, Gold is 25)
- Lapis: Increases enchantability of the piece by 30. (Base enchantability of Diamond is 10, Gold is 25)
- Amethyst: 6.25% chance per piece per second to reduce the duration of a negative potion effect by 1 second, or increase the duration of a positive potion effect by 1 second.
- On average this will cause positive potions effect to last 33% longer and negative potion effects to end 20% sooner.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.20.1+build.1
loader_version=0.14.21

# Mod Properties
mod_version=1.2.1
mod_version=1.2.2
maven_group=com.bawnorton
archives_base_name=bettertrims

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
@Mixin(EnchantmentHelper.class)
public abstract class EnchantmentHelperMixin {
@ModifyExpressionValue(method = "generateEnchantments", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getEnchantability()I"))
private static int getTrimEnchantability(int orignal, Random random, ItemStack stack, int level, boolean treasureAllowed) {
if (ArmorTrimEffects.LAPIS.appliesTo(stack)) return Config.getInstance().lapisEnchantability;
return orignal;
private static int getTrimEnchantability(int original, Random random, ItemStack stack, int level, boolean treasureAllowed) {
if (ArmorTrimEffects.LAPIS.appliesTo(stack)) return original + Config.getInstance().lapisEnchantability;
return original;
}
}

0 comments on commit 958a44a

Please sign in to comment.