small fixes

This commit is contained in:
derklaro 2022-07-30 11:11:03 +02:00
parent 8bd473247d
commit 9d912b7337
No known key found for this signature in database
GPG Key ID: FEB0E33393FE6B91
2 changed files with 3 additions and 2 deletions

View File

@ -324,7 +324,7 @@ public class PacketContainer extends AbstractStructure implements Serializable {
// ---- Cloning
private static Object deserializeFromBuffer(PacketType packetType, Object buffer) {
public static Object deserializeFromBuffer(PacketType packetType, Object buffer) {
if (buffer == null) {
return null;
}
@ -370,7 +370,7 @@ public class PacketContainer extends AbstractStructure implements Serializable {
return deserializer.apply(buffer);
}
private Object serializeToBuffer() {
public Object serializeToBuffer() {
Object handle = this.getHandle();
if (handle == null) {
return null;

View File

@ -381,6 +381,7 @@ public class PacketContainerTest {
}
@Test
@Deprecated // TODO: remove when PacketContainer is no longer Serializable
public void testSerialization() {
PacketContainer useItem = new PacketContainer(PacketType.Play.Client.USE_ITEM);
useItem.getMovingBlockPositions().write(0, new MovingObjectPositionBlock(