From 267d98954b41febf828b2a1bf092abcd7766fb51 Mon Sep 17 00:00:00 2001 From: neoapps-dev Date: Sun, 29 Mar 2026 19:21:04 +0300 Subject: [PATCH] fix: change painting gaps from 16 to 32 --- Minecraft.World/HangingEntity.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Minecraft.World/HangingEntity.cpp b/Minecraft.World/HangingEntity.cpp index 67d53114..be26bd47 100644 --- a/Minecraft.World/HangingEntity.cpp +++ b/Minecraft.World/HangingEntity.cpp @@ -58,8 +58,12 @@ void HangingEntity::setDir(int dir) float x = xTile + 0.5f; float y = yTile + 0.5f; float z = zTile + 0.5f; - + float originalX = x; + float originalZ = z; float fOffs = 0.5f + 1.0f / 16.0f; + if (this->GetType() == eTYPE_PAINTING) { + fOffs = 0.5f + 1.0f / 32.0f; + } if (dir == Direction::NORTH) z -= fOffs; if (dir == Direction::WEST) x -= fOffs; @@ -75,6 +79,19 @@ void HangingEntity::setDir(int dir) setPos(x, y, z); float ss = -(0.5f / 16.0f); + if (this->GetType() == eTYPE_PAINTING) { + fOffs = 0.5f + 1.0f / 16.0f; + if (dir == Direction::NORTH) originalZ -= fOffs; + if (dir == Direction::WEST) originalX -= fOffs; + if (dir == Direction::SOUTH) originalZ += fOffs; + if (dir == Direction::EAST) originalX += fOffs; + if (dir == Direction::NORTH) originalX -= offs(getWidth()); + if (dir == Direction::WEST) originalZ += offs(getWidth()); + if (dir == Direction::SOUTH) originalX += offs(getWidth()); + if (dir == Direction::EAST) originalZ -= offs(getWidth()); + x = originalX; + z = originalZ; + } // 4J Stu - Due to rotations the bb couold be set with a lower bound x/z being higher than the higher bound float x0 = x - w - ss; @@ -291,4 +308,4 @@ void HangingEntity::readAdditionalSaveData(CompoundTag *tag) bool HangingEntity::repositionEntityAfterLoad() { return false; -} \ No newline at end of file +}