3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00

use ViaBackwards logger instead of ViaVersions

Dieser Commit ist enthalten in:
Gerrygames 2019-01-21 14:37:48 +01:00
Ursprung fadebbc17b
Commit 88e83f9aad
4 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -10,8 +10,8 @@
package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.block_entity_handlers; package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.block_entity_handlers;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.providers.BackwardsBlockEntityProvider.BackwardsBlockEntityHandler; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.providers.BackwardsBlockEntityProvider.BackwardsBlockEntityHandler;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag; import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag;
import us.myles.viaversion.libs.opennbt.tag.builtin.IntTag; import us.myles.viaversion.libs.opennbt.tag.builtin.IntTag;
@ -37,7 +37,7 @@ public class BannerHandler implements BackwardsBlockEntityHandler {
int color = (blockId - WALL_BANNER_START) >> 2; int color = (blockId - WALL_BANNER_START) >> 2;
tag.put(new IntTag("Base", (15 - color))); tag.put(new IntTag("Base", (15 - color)));
} else { } else {
Via.getPlatform().getLogger().warning("Why does this block have the banner block entity? :(" + tag); ViaBackwards.getPlatform().getLogger().warning("Why does this block have the banner block entity? :(" + tag);
} }
// Invert colors // Invert colors

Datei anzeigen

@ -31,7 +31,7 @@ public class BackwardsMappings {
us.myles.viaversion.libs.gson.JsonObject mapping1_13 = MappingData.loadData("mapping-1.13.json"); us.myles.viaversion.libs.gson.JsonObject mapping1_13 = MappingData.loadData("mapping-1.13.json");
us.myles.viaversion.libs.gson.JsonObject mapping1_12_2to1_13 = loadData("mapping-1.12.2to1.13.json"); us.myles.viaversion.libs.gson.JsonObject mapping1_12_2to1_13 = loadData("mapping-1.12.2to1.13.json");
Via.getPlatform().getLogger().info("Loading block mapping..."); ViaBackwards.getPlatform().getLogger().info("Loading block mapping...");
blockMappings = new BlockMappingsShortArray(mapping1_13.getAsJsonObject("blocks"), mapping1_12.getAsJsonObject("blocks"), mapping1_12_2to1_13.getAsJsonObject("blockstates")); blockMappings = new BlockMappingsShortArray(mapping1_13.getAsJsonObject("blocks"), mapping1_12.getAsJsonObject("blocks"), mapping1_12_2to1_13.getAsJsonObject("blockstates"));
} }

Datei anzeigen

@ -10,6 +10,7 @@
package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.packets; package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.packets;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.api.rewriters.Rewriter; import nl.matsv.viabackwards.api.rewriters.Rewriter;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data.BackwardsMappings; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data.BackwardsMappings;
@ -42,7 +43,7 @@ public class BlockItemPackets1_13 extends Rewriter<Protocol1_12_2To1_13> {
if (newId != -1) if (newId != -1)
return newId; return newId;
Via.getPlatform().getLogger().warning("Missing block completely " + oldId); ViaBackwards.getPlatform().getLogger().warning("Missing block completely " + oldId);
// Default stone // Default stone
return 1 << 4; return 1 << 4;
} }

Datei anzeigen

@ -10,6 +10,7 @@
package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.providers; package nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.providers;
import nl.matsv.viabackwards.ViaBackwards;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.block_entity_handlers.*; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.block_entity_handlers.*;
import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.storage.BackwardsBlockStorage; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.storage.BackwardsBlockStorage;
import us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.Via;
@ -54,7 +55,7 @@ public class BackwardsBlockEntityProvider implements Provider {
BackwardsBlockEntityHandler handler = handlers.get(id); BackwardsBlockEntityHandler handler = handlers.get(id);
if (handler == null) { if (handler == null) {
if (Via.getManager().isDebug()) { if (Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Unhandled BlockEntity " + id + " full tag: " + tag); ViaBackwards.getPlatform().getLogger().warning("Unhandled BlockEntity " + id + " full tag: " + tag);
} }
return tag; return tag;
} }
@ -63,7 +64,7 @@ public class BackwardsBlockEntityProvider implements Provider {
if (!storage.contains(position)) { if (!storage.contains(position)) {
if (Via.getManager().isDebug()) { if (Via.getManager().isDebug()) {
Via.getPlatform().getLogger().warning("Handled BlockEntity does not have a stored block :( " + id + " full tag: " + tag); ViaBackwards.getPlatform().getLogger().warning("Handled BlockEntity does not have a stored block :( " + id + " full tag: " + tag);
} }
return tag; return tag;
} }