use ViaBackwards logger instead of ViaVersions

This commit is contained in:
Gerrygames 2019-01-21 14:37:48 +01:00
parent fadebbc17b
commit 88e83f9aad
4 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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"));
}

View File

@ -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<Protocol1_12_2To1_13> {
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;
}

View File

@ -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;
}