mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
maven: bump dependencies
This commit is contained in:
parent
9c475ede2a
commit
de95c59fcd
2
pom.xml
2
pom.xml
@ -334,7 +334,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.kotlin-graphics</groupId>
|
||||
<artifactId>glm</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>0.9.9.1-build-3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
|
@ -17,7 +17,6 @@ import de.bixilon.minosoft.data.text.ChatColors
|
||||
import de.bixilon.minosoft.data.text.RGBColor
|
||||
import de.bixilon.minosoft.gui.rendering.textures.Texture
|
||||
import de.bixilon.minosoft.gui.rendering.util.Mesh
|
||||
import glm_.BYTES
|
||||
import glm_.vec2.Vec2
|
||||
import glm_.vec3.Vec3
|
||||
import org.lwjgl.opengl.GL11.GL_FLOAT
|
||||
@ -51,19 +50,19 @@ class SectionArrayMesh : Mesh(initialCacheSize = 100000) {
|
||||
override fun load() {
|
||||
super.initializeBuffers(FLOATS_PER_VERTEX)
|
||||
var index = 0
|
||||
glVertexAttribPointer(index, 3, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, 0L)
|
||||
glVertexAttribPointer(index, 3, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, 0L)
|
||||
glEnableVertexAttribArray(index++)
|
||||
|
||||
glVertexAttribPointer(index, 2, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (3 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 2, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (3 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (5 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (5 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (6 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (6 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (7 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (7 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
|
||||
super.unbind()
|
||||
|
@ -5,6 +5,7 @@ import com.google.gson.JsonElement
|
||||
import com.google.gson.JsonObject
|
||||
import de.bixilon.minosoft.data.Axes
|
||||
import de.bixilon.minosoft.gui.rendering.util.VecUtil
|
||||
import de.bixilon.minosoft.gui.rendering.util.VecUtil.plus
|
||||
import de.bixilon.minosoft.gui.rendering.util.VecUtil.toVec3
|
||||
import glm_.Java.Companion.glm
|
||||
import glm_.vec3.Vec3
|
||||
@ -42,7 +43,7 @@ class AABB {
|
||||
}
|
||||
|
||||
operator fun plus(vec3i: Vec3i): AABB {
|
||||
return AABB(min + vec3i, max + vec3i)
|
||||
return AABB(vec3i plus min, vec3i plus max)
|
||||
}
|
||||
|
||||
operator fun plus(other: AABB): AABB {
|
||||
|
@ -14,7 +14,6 @@
|
||||
package de.bixilon.minosoft.gui.rendering.hud
|
||||
|
||||
import de.bixilon.minosoft.gui.rendering.util.Mesh
|
||||
import glm_.BYTES
|
||||
import org.lwjgl.opengl.GL11.GL_FLOAT
|
||||
import org.lwjgl.opengl.GL20.glEnableVertexAttribArray
|
||||
import org.lwjgl.opengl.GL20.glVertexAttribPointer
|
||||
@ -24,13 +23,13 @@ class HUDMesh : Mesh() {
|
||||
override fun load() {
|
||||
super.initializeBuffers(FLOATS_PER_VERTEX)
|
||||
var index = 0
|
||||
glVertexAttribPointer(index, 3, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, 0L)
|
||||
glVertexAttribPointer(index, 3, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, 0L)
|
||||
glEnableVertexAttribArray(index++)
|
||||
glVertexAttribPointer(index, 2, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (3 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 2, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (3 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (5 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (5 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.BYTES, (6 * Float.BYTES).toLong())
|
||||
glVertexAttribPointer(index, 1, GL_FLOAT, false, FLOATS_PER_VERTEX * Float.SIZE_BYTES, (6 * Float.SIZE_BYTES).toLong())
|
||||
glEnableVertexAttribArray(index++)
|
||||
super.unbind()
|
||||
}
|
||||
|
@ -153,15 +153,15 @@ object VecUtil {
|
||||
return this + direction?.directionVector
|
||||
}
|
||||
|
||||
infix fun Vec3i.plus(input: Vec3): Vec3 {
|
||||
infix operator fun Vec3i.plus(input: Vec3): Vec3 {
|
||||
return Vec3(input.x + x, input.y + y, input.z + z)
|
||||
}
|
||||
|
||||
operator fun Vec2i.plus(vec3: Vec3i): Vec2i {
|
||||
infix operator fun Vec2i.plus(vec3: Vec3i): Vec2i {
|
||||
return Vec2i(x + vec3.x, y + vec3.z)
|
||||
}
|
||||
|
||||
operator fun Vec2i.plus(direction: Directions): Vec2i {
|
||||
infix operator fun Vec2i.plus(direction: Directions): Vec2i {
|
||||
return this + direction.directionVector
|
||||
}
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ public class PacketExplosion extends ClientboundPacket {
|
||||
public void handle(Connection connection) {
|
||||
// remove all blocks set by explosion
|
||||
for (byte[] record : getRecords()) {
|
||||
int x = getPosition().x + record[0];
|
||||
int y = getPosition().y + record[1];
|
||||
int z = getPosition().z + record[2];
|
||||
int x = getPosition().getX() + record[0];
|
||||
int y = getPosition().getY() + record[1];
|
||||
int z = getPosition().getZ() + record[2];
|
||||
Vec3i blockPosition = new Vec3i(x, (short) y, z);
|
||||
connection.getWorld().setBlock(blockPosition, null);
|
||||
}
|
||||
|
@ -64,9 +64,9 @@ public class PacketInteractEntity implements ServerboundPacket {
|
||||
if (buffer.getVersionId() >= V_14W32A) {
|
||||
if (this.click == EntityInteractionClicks.INTERACT_AT) {
|
||||
// position
|
||||
buffer.writeFloat(this.position.x);
|
||||
buffer.writeFloat(this.position.y);
|
||||
buffer.writeFloat(this.position.z);
|
||||
buffer.writeFloat(this.position.getX());
|
||||
buffer.writeFloat(this.position.getY());
|
||||
buffer.writeFloat(this.position.getZ());
|
||||
}
|
||||
|
||||
if (this.click == EntityInteractionClicks.INTERACT_AT || this.click == EntityInteractionClicks.INTERACT) {
|
||||
|
@ -37,12 +37,12 @@ public class PacketPlayerPositionAndRotationSending implements ServerboundPacket
|
||||
@Override
|
||||
public OutPacketBuffer write(Connection connection) {
|
||||
OutPacketBuffer buffer = new OutPacketBuffer(connection, PacketTypes.Serverbound.PLAY_PLAYER_POSITION_AND_ROTATION);
|
||||
buffer.writeDouble(this.position.x);
|
||||
buffer.writeDouble(this.position.y);
|
||||
buffer.writeDouble(this.position.getX());
|
||||
buffer.writeDouble(this.position.getY());
|
||||
if (buffer.getVersionId() < V_14W06B) {
|
||||
buffer.writeDouble(this.position.y - 1.62);
|
||||
buffer.writeDouble(this.position.getY() - 1.62);
|
||||
}
|
||||
buffer.writeDouble(this.position.z);
|
||||
buffer.writeDouble(this.position.getZ());
|
||||
buffer.writeFloat(this.rotation.getYaw());
|
||||
buffer.writeFloat(this.rotation.getPitch());
|
||||
buffer.writeBoolean(this.onGround);
|
||||
|
@ -34,12 +34,12 @@ public class PacketPlayerPositionSending implements ServerboundPacket {
|
||||
@Override
|
||||
public OutPacketBuffer write(Connection connection) {
|
||||
OutPacketBuffer buffer = new OutPacketBuffer(connection, PacketTypes.Serverbound.PLAY_PLAYER_POSITION);
|
||||
buffer.writeDouble(this.position.x);
|
||||
buffer.writeDouble(this.position.y);
|
||||
buffer.writeDouble(this.position.getX());
|
||||
buffer.writeDouble(this.position.getY());
|
||||
if (buffer.getVersionId() < V_14W06B) {
|
||||
buffer.writeDouble(0.0); // ToDo
|
||||
}
|
||||
buffer.writeDouble(this.position.z);
|
||||
buffer.writeDouble(this.position.getZ());
|
||||
buffer.writeBoolean(this.onGround);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -150,10 +150,10 @@ public class OutByteBuffer {
|
||||
return;
|
||||
}
|
||||
if (this.versionId < V_18W43A) {
|
||||
writeLong((((long) position.x & 0x3FFFFFF) << 38) | (((long) position.z & 0x3FFFFFF)) | ((long) position.y & 0xFFF) << 26);
|
||||
writeLong((((long) position.getX() & 0x3FFFFFF) << 38) | (((long) position.getZ() & 0x3FFFFFF)) | ((long) position.getY() & 0xFFF) << 26);
|
||||
return;
|
||||
}
|
||||
writeLong((((long) (position.x & 0x3FFFFFF) << 38) | ((long) (position.z & 0x3FFFFFF) << 12) | (long) (position.y & 0xFFF)));
|
||||
writeLong((((long) (position.getX() & 0x3FFFFFF) << 38) | ((long) (position.getZ() & 0x3FFFFFF) << 12) | (long) (position.getY() & 0xFFF)));
|
||||
}
|
||||
|
||||
public void writeVarInt(int value) {
|
||||
@ -215,9 +215,9 @@ public class OutByteBuffer {
|
||||
}
|
||||
|
||||
public void writeVec3iByte(Vec3i position) {
|
||||
writeInt(position.x);
|
||||
writeByte((byte) (int) position.y);
|
||||
writeInt(position.z);
|
||||
writeInt(position.getX());
|
||||
writeByte((byte) (int) position.getY());
|
||||
writeInt(position.getZ());
|
||||
}
|
||||
|
||||
public byte[] toByteArray() {
|
||||
|
@ -170,9 +170,9 @@ public class CompoundTag extends NBTTag {
|
||||
if (this.isFinal) {
|
||||
throw new IllegalArgumentException("This tag is marked as final!");
|
||||
}
|
||||
this.data.put("x", new IntTag(position.x));
|
||||
this.data.put("y", new IntTag(position.y));
|
||||
this.data.put("z", new IntTag(position.z));
|
||||
this.data.put("x", new IntTag(position.getX()));
|
||||
this.data.put("y", new IntTag(position.getY()));
|
||||
this.data.put("z", new IntTag(position.getZ()));
|
||||
}
|
||||
|
||||
public CompoundTag removeKey(String key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user