From 88e83f9aade77ea44432653148ae5b217a550486 Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Mon, 21 Jan 2019 14:37:48 +0100 Subject: [PATCH] use ViaBackwards logger instead of ViaVersions --- .../block_entity_handlers/BannerHandler.java | 4 ++-- .../protocol1_12_2to1_13/data/BackwardsMappings.java | 2 +- .../protocol1_12_2to1_13/packets/BlockItemPackets1_13.java | 3 ++- .../providers/BackwardsBlockEntityProvider.java | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/BannerHandler.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/BannerHandler.java index 8f4eb1de..dc51c327 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/BannerHandler.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/block_entity_handlers/BannerHandler.java @@ -10,8 +10,8 @@ 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 us.myles.ViaVersion.api.Via; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.viaversion.libs.opennbt.tag.builtin.CompoundTag; 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; tag.put(new IntTag("Base", (15 - color))); } 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 diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java index 42a8be00..27008c71 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/data/BackwardsMappings.java @@ -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_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")); } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java index 6125aa0b..f153af26 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/packets/BlockItemPackets1_13.java @@ -10,6 +10,7 @@ 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.protocol.protocol1_12_2to1_13.Protocol1_12_2To1_13; import nl.matsv.viabackwards.protocol.protocol1_12_2to1_13.data.BackwardsMappings; @@ -42,7 +43,7 @@ public class BlockItemPackets1_13 extends Rewriter { if (newId != -1) return newId; - Via.getPlatform().getLogger().warning("Missing block completely " + oldId); + ViaBackwards.getPlatform().getLogger().warning("Missing block completely " + oldId); // Default stone return 1 << 4; } diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/providers/BackwardsBlockEntityProvider.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/providers/BackwardsBlockEntityProvider.java index 7b29ab28..3792a978 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/providers/BackwardsBlockEntityProvider.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12_2to1_13/providers/BackwardsBlockEntityProvider.java @@ -10,6 +10,7 @@ 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.storage.BackwardsBlockStorage; import us.myles.ViaVersion.api.Via; @@ -54,7 +55,7 @@ public class BackwardsBlockEntityProvider implements Provider { BackwardsBlockEntityHandler handler = handlers.get(id); if (handler == null) { 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; } @@ -63,7 +64,7 @@ public class BackwardsBlockEntityProvider implements Provider { if (!storage.contains(position)) { 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; }