Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
java = "25"
junit = "6.0.0-M2"
minestom = "2026.04.13-1.21.11"
minestom = "2026.05.17c-26.1.1"
commons-io = "2.20.0"
zt-zip = "1.17"
javax-json = "1.1.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void sendPacketToViewers(@NotNull SendablePacket packet) {
}

@Override
public void sendPacketsToViewers(@NotNull Collection<SendablePacket> packets) {
public void sendPacketsToViewers(@NotNull Collection<? extends SendablePacket> packets) {
for (Player viewer : this.viewers) {
for (SendablePacket packet : packets) {
viewer.sendPacket(packet);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public BoneEntity(@NotNull EntityType entityType, GenericModel model, String nam
}

@Override
public @NotNull Set<Player> getViewers() {
public @NotNull Set<? extends Player> getViewers() {
return model.getViewers();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public Pos calculatePosition() {
p = applyTransform(p);
p = calculateGlobalRotation(p);

return Pos.fromPoint(p).div(4).mul(scale);
return p.asPos().div(4).mul(scale);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Pos calculatePosition() {
p = applyTransform(p);
p = calculateGlobalRotation(p);

Pos endPos = Pos.fromPoint(p);
Pos endPos = p.asPos();

return endPos
.div(4, 4, 4).mul(scale)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,14 @@ private static UV convertUV(UV uv, int width, int height, boolean inverse) {
double ex = uv.x2 * (16.0 / width);
double ey = uv.y2 * (16.0 / height);

if (inverse)
return new UV(ex + sx, ey + sy, sx, sy, uv.texture, uv.rotation);
return new UV(sx, sy, ex + sx, ey + sy, uv.texture, uv.rotation);
if (inverse) {
return new UV(clampUV(ex + sx), clampUV(ey + sy), clampUV(sx), clampUV(sy), uv.texture, uv.rotation);
}
return new UV(clampUV(sx), clampUV(sy), clampUV(ex + sx), clampUV(ey + sy), uv.texture, uv.rotation);
}

private static double clampUV(double v) {
return Math.clamp(v, 0.0, 16.0);
}

private static JsonObject mappingsToJson() {
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import net.minestom.server.timer.TaskSchedule;
import net.minestom.server.utils.MathUtils;
import net.minestom.server.world.DimensionType;
import net.minestom.server.world.clock.WorldClock;
import net.worldseed.multipart.ModelEngine;
import net.worldseed.resourcepack.PackBuilder;
import org.apache.commons.io.FileUtils;
Expand Down Expand Up @@ -63,7 +64,7 @@ void main() throws Exception {
lobby.setChunkSupplier(LightingChunk::new);
lobby.enableAutoChunkLoad(true);
lobby.setGenerator(unit -> unit.modifier().fillHeight(0, 1, Block.STONE));
lobby.setTimeRate(0);
lobby.clock(WorldClock.OVERWORLD).pause();
instanceManager.registerInstance(lobby);

// Commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"base": "minecraft:custom/entities/player/head",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -20,6 +26,12 @@
"base": "minecraft:custom/entities/player/right_arm",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -30,6 +42,12 @@
"base": "minecraft:custom/entities/player/left_arm",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -40,6 +58,12 @@
"base": "minecraft:custom/entities/player/torso",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -50,6 +74,12 @@
"base": "minecraft:custom/entities/player/right_leg",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -60,6 +90,12 @@
"base": "minecraft:custom/entities/player/left_leg",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -70,6 +106,12 @@
"base": "minecraft:custom/entities/player/slim_right",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
},
Expand All @@ -80,6 +122,12 @@
"base": "minecraft:custom/entities/player/slim_left",
"model": {
"type": "minecraft:player_head"
},
"transformation": {
"left_rotation": [1.0, 0.0, 0.0, -0.0],
"right_rotation": [0.0, 0.0, 0.0, 1.0],
"scale": [1.0, 1.0, 1.0],
"translation": [0.5, 0.0, 0.5]
}
}
}
Expand Down