Merge remote-tracking branch 'origin/feature/math-2.0'

This commit is contained in:
Camotoy 2023-04-26 13:03:37 -04:00
commit bcf453ca58
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
29 changed files with 41 additions and 36 deletions

View file

@ -4,6 +4,7 @@ on:
push:
branches:
- master
- feature/math-2.0 #TEMPOARY
jobs:
build:

14
pom.xml
View file

@ -5,7 +5,7 @@
<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>1.19.4-1</version>
<version>1.19.4-2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MCProtocolLib</name>
@ -112,9 +112,15 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.nukkitx</groupId>
<artifactId>math</artifactId>
<version>1.1.1</version>
<groupId>org.cloudburstmc.math</groupId>
<artifactId>api</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.cloudburstmc.math</groupId>
<artifactId>immutable</artifactId>
<version>2.0</version>
<scope>compile</scope>
</dependency>
<dependency>

View file

@ -135,7 +135,7 @@ public class MinecraftProtocol extends PacketProtocol {
}
@Override
public PacketCodecHelper createHelper() {
public MinecraftCodecHelper createHelper() {
return this.codec.getHelperFactory().get();
}

View file

@ -55,13 +55,13 @@ import com.github.steveice10.opennbt.NBTIO;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.github.steveice10.opennbt.tag.builtin.Tag;
import com.github.steveice10.packetlib.codec.BasePacketCodecHelper;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.math.vector.Vector3i;
import com.nukkitx.math.vector.Vector4f;
import io.netty.buffer.ByteBuf;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import lombok.RequiredArgsConstructor;
import net.kyori.adventure.text.Component;
import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector4f;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;

View file

@ -1,7 +1,6 @@
package com.github.steveice10.mc.protocol.codec;
import com.github.steveice10.packetlib.codec.PacketCodecHelper;
import com.github.steveice10.packetlib.codec.PacketSerializer;
import com.github.steveice10.packetlib.packet.Packet;
import io.netty.buffer.ByteBuf;

View file

@ -1,6 +1,6 @@
package com.github.steveice10.mc.protocol.data.game.entity.metadata;
import com.nukkitx.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector3i;
public class GlobalPos {
private final String dimension;

View file

@ -11,18 +11,17 @@ import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.data.game.entity.type.PaintingType;
import com.github.steveice10.mc.protocol.data.game.level.particle.Particle;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.math.vector.Vector3i;
import com.nukkitx.math.vector.Vector4f;
import io.netty.buffer.ByteBuf;
import lombok.Getter;
import net.kyori.adventure.text.Component;
import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector4f;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.UUID;
@Getter

View file

@ -1,9 +1,9 @@
package com.github.steveice10.mc.protocol.data.game.level.block;
import com.nukkitx.math.vector.Vector3i;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import org.cloudburstmc.math.vector.Vector3i;
@Data
@AllArgsConstructor

View file

@ -1,7 +1,7 @@
package com.github.steveice10.mc.protocol.data.game.level.particle.positionsource;
import com.nukkitx.math.vector.Vector3i;
import lombok.Value;
import org.cloudburstmc.math.vector.Vector3i;
@Value
public class BlockPositionSource implements PositionSource {

View file

@ -2,10 +2,10 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3d;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.cloudburstmc.math.vector.Vector3d;
import org.jetbrains.annotations.Nullable;
@Data

View file

@ -3,7 +3,7 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.entity.player.BlockBreakStage;
import com.nukkitx.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;

View file

@ -4,12 +4,12 @@ import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.level.block.BlockEntityType;
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;

View file

@ -4,12 +4,12 @@ import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.data.game.level.block.value.*;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
@Data
@With

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;
import java.util.ArrayList;

View file

@ -4,12 +4,12 @@ import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.data.game.level.event.*;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -3,11 +3,11 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.level.block.BlockChangeEntry;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -3,12 +3,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.level.block.CommandBlockMode;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -6,12 +6,12 @@ import com.github.steveice10.mc.protocol.data.game.inventory.UpdateStructureBloc
import com.github.steveice10.mc.protocol.data.game.inventory.UpdateStructureBlockMode;
import com.github.steveice10.mc.protocol.data.game.level.block.StructureMirror;
import com.github.steveice10.mc.protocol.data.game.level.block.StructureRotation;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.serverbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,12 +2,12 @@ package com.github.steveice10.mc.protocol.packet.ingame.serverbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,11 +2,11 @@ package com.github.steveice10.mc.protocol.packet.ingame.serverbound.level;
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;
import java.util.Arrays;

View file

@ -4,12 +4,12 @@ import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.data.game.entity.player.PlayerAction;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -4,12 +4,12 @@ import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.data.game.entity.player.Hand;
import com.nukkitx.math.vector.Vector3i;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.With;
import org.cloudburstmc.math.vector.Vector3i;
import java.io.IOException;

View file

@ -2,7 +2,7 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.data.game.level.block.BlockChangeEntry;
import com.github.steveice10.mc.protocol.packet.PacketTest;
import com.nukkitx.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector3i;
import org.junit.Before;
public class ClientboundBlockUpdatePacketTest extends PacketTest {

View file

@ -2,7 +2,7 @@ package com.github.steveice10.mc.protocol.packet.ingame.clientbound.level;
import com.github.steveice10.mc.protocol.data.game.level.block.BlockChangeEntry;
import com.github.steveice10.mc.protocol.packet.PacketTest;
import com.nukkitx.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector3i;
import org.junit.Before;
public class ClientboundSectionBlocksUpdatePacketTest extends PacketTest {

View file

@ -11,7 +11,7 @@ import com.github.steveice10.mc.protocol.data.game.entity.metadata.type.ObjectEn
import com.github.steveice10.mc.protocol.data.game.entity.object.Direction;
import com.github.steveice10.mc.protocol.packet.PacketTest;
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.entity.ClientboundSetEntityDataPacket;
import com.nukkitx.math.vector.Vector3i;
import org.cloudburstmc.math.vector.Vector3i;
import org.junit.Before;
import java.util.OptionalInt;