Skip to content

Commit

Permalink
Try resolve merge issues with Master and 1.16 branches
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jun 30, 2020
1 parent 3aa7ea6 commit e85aec1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ __ProxyPass requires Java 8 u162 or later to function correctly due to the encr

__[Jenkins](https://ci.nukkitx.com/job/NukkitX/job/ProxyPass/job/master/)__

__[Protocol library](https://github.com/NukkitX/Protocol) used in this project__
__[Protocol library](https://github.com/NukkitX/Protocol) used in this project__
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
Expand All @@ -101,11 +102,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.3</version>
<dependencies>
<dependency>
<groupId>com.github.edwgiz</groupId>
<artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
<version>2.8.1</version>
<version>2.13.1</version>
</dependency>
</dependencies>
<executions>
Expand All @@ -119,7 +121,7 @@
<configuration>
<transformers>
<transformer
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer">
implementation="com.github.edwgiz.maven_shade_plugin.log4j2_cache_transformer.PluginsCacheFileTransformer">
</transformer>
</transformers>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ public void handle(BedrockSession session, ByteBuf compressed, Collection<Bedroc
}

if (packetTesting) {
int packetId = proxy.CODEC.getId(packet.getClass());
int packetId = ProxyPass.CODEC.getId(packet.getClass());
ByteBuf buffer = ByteBufAllocator.DEFAULT.ioBuffer();
try {
ProxyPass.CODEC.tryEncode(buffer, packet);
BedrockPacket packet2 = proxy.CODEC.tryDecode(buffer, packetId);
BedrockPacket packet2 = ProxyPass.CODEC.tryDecode(buffer, packetId);
if (!Objects.equals(packet, packet2)) {
// Something went wrong in serialization.
log.warn("Packets instances not equal:\n Original : {}\nRe-encoded : {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ public boolean handle(ClientToServerHandshakePacket packet) {
public boolean handle(LoginPacket packet) {
int protocolVersion = packet.getProtocolVersion();

if (protocolVersion != proxy.PROTOCOL_VERSION) {
if (protocolVersion != ProxyPass.PROTOCOL_VERSION) {
PlayStatusPacket status = new PlayStatusPacket();
if (protocolVersion > proxy.PROTOCOL_VERSION) {
if (protocolVersion > ProxyPass.PROTOCOL_VERSION) {
status.setStatus(PlayStatusPacket.Status.LOGIN_FAILED_SERVER_OLD);
} else {
status.setStatus(PlayStatusPacket.Status.LOGIN_FAILED_CLIENT_OLD);
}
}
session.setPacketCodec(proxy.CODEC);
session.setPacketCodec(ProxyPass.CODEC);

JsonNode certData;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static void writeRecipes(CraftingDataPacket packet, ProxyPass proxy) {
entries.add(entry);
}

Recipes recipes = new Recipes(proxy.CODEC.getProtocolVersion(), entries, packet.getPotionMixData(), packet.getContainerMixData());
Recipes recipes = new Recipes(ProxyPass.CODEC.getProtocolVersion(), entries, packet.getPotionMixData(), packet.getContainerMixData());

proxy.saveJson("recipes.json", recipes);
}
Expand Down

0 comments on commit e85aec1

Please sign in to comment.