Skip to content

Painting positioning #2088

Answered by mesoscopic
mesoscopic asked this question in Help
Discussion options

You must be logged in to vote

It turns out, my previous answer was entirely wrong (I only tested thoroughly with paintings facing a certain direction). It's as simple as this: in Minestom a painting's position is stored as the bottom left corner, and in Minecraft it is stored as the center. So, this is what worked for me (also updated to 1.20.6):

private static void initPainting(CompoundBinaryTag data, Instance world){
    Entity painting = new Entity(EntityType.PAINTING);
    Vec pos = vecFromDoubles(data.getList("Pos"));
    ListBinaryTag rot = data.getList("Rotation");
    PaintingMeta meta = (PaintingMeta) painting.getEntityMeta();
    net.minestom.server.entity.metadata.other.PaintingMeta.Orientation orientation = 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mesoscopic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant