Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 00:22:53 +01:00
use isSuppressConversionWarnings
Dieser Commit ist enthalten in:
Ursprung
f959a388c0
Commit
f22b6138b9
@ -46,7 +46,7 @@ public class VBMappingDataLoader {
|
||||
diffValue = diffIdentifiers.getAsJsonPrimitive(key.substring(0, key.indexOf('[')));
|
||||
}
|
||||
if (diffValue == null) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No diff key for " + entry.getValue() + " :( ");
|
||||
}
|
||||
continue;
|
||||
@ -54,7 +54,7 @@ public class VBMappingDataLoader {
|
||||
value = MappingDataLoader.findValue(newIdentifiers, diffValue.getAsString());
|
||||
}
|
||||
if (value == null) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No key for " + entry.getValue() + " :( ");
|
||||
}
|
||||
continue;
|
||||
@ -75,7 +75,7 @@ public class VBMappingDataLoader {
|
||||
if (diffIdentifiers != null) {
|
||||
JsonPrimitive diffValue = diffIdentifiers.getAsJsonPrimitive(key);
|
||||
if (diffValue == null) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No diff key for " + key + " :( ");
|
||||
}
|
||||
continue;
|
||||
@ -86,7 +86,7 @@ public class VBMappingDataLoader {
|
||||
index = MappingDataLoader.findIndex(newIdentifiers, mappedName);
|
||||
}
|
||||
if (index == null) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (warnOnMissing && !Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No key for " + key + " :( ");
|
||||
}
|
||||
continue;
|
||||
|
@ -69,7 +69,7 @@ public class BackwardsMappings {
|
||||
}
|
||||
}
|
||||
if (value == null) {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
if (replacement != null) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("No key for " + entry.getValue() + "/" + replacement.getAsString() + " :( ");
|
||||
} else {
|
||||
|
@ -651,7 +651,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
|
||||
}
|
||||
|
||||
if (rawId == null) {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Failed to get 1.12 item for " + item.getIdentifier());
|
||||
}
|
||||
rawId = 0x10000; // Stone
|
||||
@ -975,7 +975,7 @@ public class BlockItemPackets1_13 extends BlockItemRewriter<Protocol1_12_2To1_13
|
||||
} else if (MappingData.oldToNewItems.containsKey(rawId & ~0xF)) {
|
||||
rawId &= ~0xF; // Remove data
|
||||
} else {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Failed to get 1.13 item for " + item.getIdentifier());
|
||||
}
|
||||
rawId = 16; // Stone
|
||||
|
@ -85,7 +85,7 @@ public class PlayerPacket1_13 extends Rewriter<Protocol1_12_2To1_13> {
|
||||
} else {
|
||||
String oldChannel = InventoryPackets.getOldPluginChannelId(channel);
|
||||
if (oldChannel == null) {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Ignoring outgoing plugin message with channel: " + channel);
|
||||
}
|
||||
wrapper.cancel();
|
||||
@ -100,7 +100,7 @@ public class PlayerPacket1_13 extends Rewriter<Protocol1_12_2To1_13> {
|
||||
String rewritten = InventoryPackets.getOldPluginChannelId(channels[i]);
|
||||
if (rewritten != null) {
|
||||
rewrittenChannels.add(rewritten);
|
||||
} else if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
} else if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Ignoring plugin channel in outgoing REGISTER: " + channels[i]);
|
||||
}
|
||||
}
|
||||
@ -449,7 +449,7 @@ public class PlayerPacket1_13 extends Rewriter<Protocol1_12_2To1_13> {
|
||||
} else {
|
||||
String newChannel = InventoryPackets.getNewPluginChannelId(channel);
|
||||
if (newChannel == null) {
|
||||
if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Ignoring incoming plugin message with channel: " + channel);
|
||||
}
|
||||
wrapper.cancel();
|
||||
@ -464,7 +464,7 @@ public class PlayerPacket1_13 extends Rewriter<Protocol1_12_2To1_13> {
|
||||
String rewritten = InventoryPackets.getNewPluginChannelId(channels[i]);
|
||||
if (rewritten != null) {
|
||||
rewrittenChannels.add(rewritten);
|
||||
} else if (!Via.getConfig().isSuppress1_13ConversionErrors() || Via.getManager().isDebug()) {
|
||||
} else if (!Via.getConfig().isSuppressConversionWarnings() || Via.getManager().isDebug()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Ignoring plugin channel in incoming REGISTER: " + channels[i]);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class SoundPackets1_13 extends Rewriter<Protocol1_12_2To1_13> {
|
||||
String oldSound = NamedSoundMapping.getOldId(newSound);
|
||||
if (oldSound != null) {
|
||||
wrapper.set(Type.STRING, 0, oldSound);
|
||||
} else if (!Via.getConfig().isSuppress1_13ConversionErrors()) {
|
||||
} else if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Unknown named sound in 1.13->1.12 protocol: " + newSound);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren