Skip to content

Commit ffd8500

Browse files
author
DragonEggBedrockBreaking
committed
Add docstrings to enchantment conflict methods
1 parent bf9f484 commit ffd8500

10 files changed

+70
-0
lines changed

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinArrowInfiniteEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinArrowInfiniteEnchantment extends Enchantment {
1515
public MixinArrowInfiniteEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.BOW, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between infinity and mending
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinArrowPiercingEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinArrowPiercingEnchantment extends Enchantment {
1515
public MixinArrowPiercingEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.CROSSBOW, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between piercing and multishot
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinDamageEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinDamageEnchantment extends Enchantment {
1515
public MixinDamageEnchantment(Enchantment.Rarity rarity, int i, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.WEAPON, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between sharpness, smite, and bane of arthropods
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinFrostWalkerEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinFrostWalkerEnchantment extends Enchantment {
1515
public MixinFrostWalkerEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.ARMOR_FEET, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between frost walker and depth strider
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinLootBonusEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinLootBonusEnchantment extends Enchantment {
1515
public MixinLootBonusEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.DIGGER, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between fortune and silk touch
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinMultiShotEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinMultiShotEnchantment extends Enchantment {
1515
public MixinMultiShotEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.CROSSBOW, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between multishot and piercing
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinProtectionEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinProtectionEnchantment extends Enchantment {
1515
public MixinProtectionEnchantment(Enchantment.Rarity rarity, ProtectionEnchantment.Type type, EquipmentSlot... equipmentSlots) {
1616
super(rarity, type == ProtectionEnchantment.Type.FALL ? EnchantmentCategory.ARMOR_FEET : EnchantmentCategory.ARMOR, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between protection, blast protection, fire protection, and projectile protection
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinTridentRiptideEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinTridentRiptideEnchantment extends Enchantment {
1515
public MixinTridentRiptideEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.TRIDENT, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between riptide and channeling/loyalty
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinUntouchingEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinUntouchingEnchantment extends Enchantment {
1515
public MixinUntouchingEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.DIGGER, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between silk touch and fortune
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

src/main/java/uk/debb/vanilla_disable/mixin/enchantments/enchantment_conflicts/MixinWaterWalkerEnchantment.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public abstract class MixinWaterWalkerEnchantment extends Enchantment {
1515
public MixinWaterWalkerEnchantment(Enchantment.Rarity rarity, EquipmentSlot... equipmentSlots) {
1616
super(rarity, EnchantmentCategory.ARMOR_FEET, equipmentSlots);
1717
}
18+
19+
/**
20+
* @author DragonEggBedrockBreaking
21+
* @reason disable compatibility check between depth strider and frost walker
22+
* @param enchantment the enchantment to check compatibility with
23+
* @param cir the returnable callback info (boolean)
24+
*/
1825
@Inject(method = "checkCompatibility", at = @At("HEAD"), cancellable = true)
1926
private void cancelCompatibility(Enchantment enchantment, CallbackInfoReturnable<Boolean> cir) {
2027
if (RegisterGamerules.getServer() == null) return;

0 commit comments

Comments
 (0)