mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-26 03:55:28 +01:00
Fix NPE
This commit is contained in:
parent
d36def89e1
commit
a709382d25
@ -104,10 +104,9 @@ public class ComponentRewriter1_13 extends ComponentRewriter {
|
|||||||
protected void handleTranslate(JsonObject object, String translate) {
|
protected void handleTranslate(JsonObject object, String translate) {
|
||||||
super.handleTranslate(object, translate);
|
super.handleTranslate(object, translate);
|
||||||
String newTranslate;
|
String newTranslate;
|
||||||
Protocol1_13To1_12_2 protocol = getProtocol();
|
newTranslate = Protocol1_13To1_12_2.MAPPINGS.getTranslateMapping().get(translate);
|
||||||
newTranslate = protocol.getMappingData().getTranslateMapping().get(translate);
|
|
||||||
if (newTranslate == null) {
|
if (newTranslate == null) {
|
||||||
newTranslate = protocol.getMappingData().getMojangTranslation().get(translate);
|
newTranslate = Protocol1_13To1_12_2.MAPPINGS.getMojangTranslation().get(translate);
|
||||||
}
|
}
|
||||||
if (newTranslate != null) {
|
if (newTranslate != null) {
|
||||||
object.addProperty("translate", newTranslate);
|
object.addProperty("translate", newTranslate);
|
||||||
|
Loading…
Reference in New Issue
Block a user