From dc459d6b868a0b1df521ca6e1a796bab136ff5aa Mon Sep 17 00:00:00 2001 From: ichttt Date: Thu, 1 Mar 2018 20:00:48 +0100 Subject: [PATCH] Fix serverside startup failure when checking for vanilla acceptance (#4783) --- .../fml/common/versioning/Restriction.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/common/versioning/Restriction.java b/src/main/java/net/minecraftforge/fml/common/versioning/Restriction.java index d32b46687d..0e19bb8e47 100644 --- a/src/main/java/net/minecraftforge/fml/common/versioning/Restriction.java +++ b/src/main/java/net/minecraftforge/fml/common/versioning/Restriction.java @@ -19,7 +19,7 @@ package net.minecraftforge.fml.common.versioning; -import net.minecraft.client.resources.I18n; +import net.minecraft.util.text.translation.I18n; import javax.annotation.Nullable; @@ -208,31 +208,31 @@ public class Restriction { if ( getLowerBound() == null && getUpperBound() == null ) { - return I18n.format("fml.messages.version.restriction.any"); + return I18n.translateToLocal("fml.messages.version.restriction.any"); } else if ( getLowerBound() != null && getUpperBound() != null ) { if ( getLowerBound().getVersionString().equals(getUpperBound().getVersionString()) ) { return getLowerBound().getVersionString(); - } - else + } + else { - if (isLowerBoundInclusive() && isUpperBoundInclusive()) + if (isLowerBoundInclusive() && isUpperBoundInclusive()) { - return I18n.format("fml.messages.version.restriction.bounded.inclusive", getLowerBound(), getUpperBound()); - } - else if (isLowerBoundInclusive()) + return I18n.translateToLocalFormatted("fml.messages.version.restriction.bounded.inclusive", getLowerBound(), getUpperBound()); + } + else if (isLowerBoundInclusive()) { - return I18n.format("fml.messages.version.restriction.bounded.upperexclusive", getLowerBound(), getUpperBound()); - } - else if (isUpperBoundInclusive()) + return I18n.translateToLocalFormatted("fml.messages.version.restriction.bounded.upperexclusive", getLowerBound(), getUpperBound()); + } + else if (isUpperBoundInclusive()) { - return I18n.format("fml.messages.version.restriction.bounded.lowerexclusive", getLowerBound(), getUpperBound()); - } - else + return I18n.translateToLocalFormatted("fml.messages.version.restriction.bounded.lowerexclusive", getLowerBound(), getUpperBound()); + } + else { - return I18n.format("fml.messages.version.restriction.bounded.exclusive", getLowerBound(), getUpperBound()); + return I18n.translateToLocalFormatted("fml.messages.version.restriction.bounded.exclusive", getLowerBound(), getUpperBound()); } } } @@ -240,22 +240,22 @@ public class Restriction { if ( isLowerBoundInclusive() ) { - return I18n.format("fml.messages.version.restriction.lower.inclusive", getLowerBound()); + return I18n.translateToLocalFormatted("fml.messages.version.restriction.lower.inclusive", getLowerBound()); } else { - return I18n.format("fml.messages.version.restriction.lower.exclusive", getLowerBound()); + return I18n.translateToLocalFormatted("fml.messages.version.restriction.lower.exclusive", getLowerBound()); } } else { if ( isUpperBoundInclusive() ) { - return I18n.format("fml.messages.version.restriction.upper.inclusive", getUpperBound()); + return I18n.translateToLocalFormatted("fml.messages.version.restriction.upper.inclusive", getUpperBound()); } else { - return I18n.format("fml.messages.version.restriction.upper.exclusive", getUpperBound()); + return I18n.translateToLocalFormatted("fml.messages.version.restriction.upper.exclusive", getUpperBound()); } } }