Fix serverside startup failure when checking for vanilla acceptance (#4783)

This commit is contained in:
ichttt authored and LexManos committed 2018-03-01 11:00:48 -08:00
1 parent 29fe38f723
commit dc459d6b86
1 file changed
+19 -19
@@ -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());
}
}
}