Removed useless version checks

This commit is contained in:
FlorianMichael 2024-03-04 16:51:48 +01:00
parent 6abdbbce08
commit c20fee5dae
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
3 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public abstract class MixinArmorItem {
@Redirect(method = "getAttributeModifiers", at = @At(value = "FIELD", target = "Lnet/minecraft/item/ArmorItem;attributeModifiers:Lcom/google/common/collect/Multimap;"))
private Multimap<EntityAttribute, EntityAttributeModifier> changeAttributeModifiers(ArmorItem instance) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8) && DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
if (DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
return this.viaFabricPlus$AttributeModifiers_r1_8;
} else {
return this.attributeModifiers;

View File

@ -89,7 +89,7 @@ public abstract class MixinMiningToolItem extends ToolItem {
@Redirect(method = "getAttributeModifiers", at = @At(value = "FIELD", target = "Lnet/minecraft/item/MiningToolItem;attributeModifiers:Lcom/google/common/collect/Multimap;"))
private Multimap<EntityAttribute, EntityAttributeModifier> changeAttributeModifiers(MiningToolItem instance) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8) && DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
if (DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
return this.viaFabricPlus$AttributeModifiers_r1_8;
} else {
return this.attributeModifiers;

View File

@ -118,7 +118,7 @@ public abstract class MixinSwordItem extends ToolItem {
@Redirect(method = "getAttributeModifiers", at = @At(value = "FIELD", target = "Lnet/minecraft/item/SwordItem;attributeModifiers:Lcom/google/common/collect/Multimap;"))
private Multimap<EntityAttribute, EntityAttributeModifier> changeAttributeModifiers(SwordItem instance) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_8) && DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
if (DebugSettings.global().replaceAttributeModifiers.isEnabled()) {
return this.viaFabricPlus$AttributeModifiers_r1_8;
} else {
return this.attributeModifiers;