Skip to content

Commit

Permalink
Merged 1.10.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz authored Jan 10, 2024
2 parents 8d3eb78 + 351a53c commit 66d8709
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 92 deletions.
6 changes: 2 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- updated Chinese translation (thanks to @UDTakerBean)
- made Misanthropy not obtainable via enchanting table on axes to match other vanilla enchantments
- changed final Fishing Fanatic level text formatting
- optimized Horse Frost Walker enchantment
- added config for enchantability of shields and horse armors
- updated Chinese translation (thanks to @Fiocher)
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package com.majruszsenchantments.data;

import com.majruszlibrary.data.Reader;
import com.majruszlibrary.data.Serializables;

public class Config {
public static boolean IS_SHIELD_ENCHANTABLE = true;
public static boolean IS_HORSE_ARMOR_ENCHANTABLE = true;

static {
Serializables.getStatic( Config.class )
.define( "is_shield_enchantable", Reader.bool(), ()->IS_SHIELD_ENCHANTABLE, v->IS_SHIELD_ENCHANTABLE = v )
.define( "is_horse_armor_enchantable", Reader.bool(), ()->IS_HORSE_ARMOR_ENCHANTABLE, v->IS_HORSE_ARMOR_ENCHANTABLE = v )
.define( "enchantments", Enchantments.class )
.define( "curses", Curses.class );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.majruszsenchantments.mixin;

import com.majruszsenchantments.data.Config;
import net.minecraft.world.item.HorseArmorItem;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -9,7 +10,9 @@
public abstract class MixinHorseArmorItem extends MixinItem {
@Override
protected void getEnchantmentValue( CallbackInfoReturnable< Integer > callback ) {
callback.setReturnValue( 1 );
if( Config.IS_HORSE_ARMOR_ENCHANTABLE ) {
callback.setReturnValue( 1 );
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.majruszsenchantments.mixin;

import com.majruszsenchantments.data.Config;
import net.minecraft.world.item.ShieldItem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
Expand All @@ -8,6 +9,8 @@
public abstract class MixinShieldItem extends MixinItem {
@Override
protected void getEnchantmentValue( CallbackInfoReturnable< Integer > callback ) {
callback.setReturnValue( 1 );
if( Config.IS_SHIELD_ENCHANTABLE ) {
callback.setReturnValue( 1 );
}
}
}
168 changes: 84 additions & 84 deletions common/src/main/resources/assets/majruszsenchantments/lang/zh_cn.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ minecraft_version_range=[1.20.1,)
# Mod
mod_id=majruszsenchantments
mod_archives_name=majruszs-enchantments
mod_version=1.10.5
mod_version=1.10.6
mod_display_name=Majrusz's Enchantments
mod_description=Mod that adds plenty of unique and balanced enchantments to the game.
mod_authors=Majrusz
Expand Down Expand Up @@ -40,7 +40,7 @@ fabric_minecraft_version_range=>=1.20.1
fabric_majruszlibrary_version_range=>=7.0.0

# Majrusz Library
majruszlibrary_version=1.20.1-7.0.0
majruszlibrary_version=1.20.1-7.0.3

# Publishing
modrinth_project_id=jJthQvHv
Expand Down
Binary file not shown.

0 comments on commit 66d8709

Please sign in to comment.