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