mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
Merge remote-tracking branch 'origin/feature/math-2.0'
This commit is contained in:
commit
bcf453ca58
29 changed files with 41 additions and 36 deletions
1
.github/workflows/deploy.yml
vendored
1
.github/workflows/deploy.yml
vendored
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
- feature/math-2.0 #TEMPOARY
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
14
pom.xml
14
pom.xml
|
@ -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>
|
||||
|
|
|
@ -135,7 +135,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
}
|
||||
|
||||
@Override
|
||||
public PacketCodecHelper createHelper() {
|
||||
public MinecraftCodecHelper createHelper() {
|
||||
return this.codec.getHelperFactory().get();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue