fixed multiblock preview horizontal offset

This commit is contained in:
HbmMods 2026-07-24 12:56:55 +02:00
parent f42775cfcf
commit 11d8cc13a6
4 changed files with 6 additions and 5 deletions

View File

@ -631,13 +631,14 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
if(i == 2) facing = ForgeDirection.getOrientation(3);
if(i == 3) facing = ForgeDirection.getOrientation(4);
ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit);
facing = getDirModified(facing);
double originX = mop.blockX + facing.offsetX * o;
double originY = pY + (mop.sideHit == 1 ? 1 : 0);
double originZ = mop.blockZ + facing.offsetZ * o;
double originX = mop.blockX + facing.offsetX * o + sideHit.offsetX;
double originY = pY + sideHit.offsetY;
double originZ = mop.blockZ + facing.offsetZ * o + sideHit.offsetZ;
boolean canPlace = checkRequirement(player.worldObj, mop.blockX, pY + 1, mop.blockZ, facing, o);
boolean canPlace = checkRequirement(player.worldObj, mop.blockX + sideHit.offsetX, pY + sideHit.offsetY, mop.blockZ + sideHit.offsetZ, facing, o);
Tessellator tess = Tessellator.instance;
GL11.glPushMatrix();

View File

@ -29,7 +29,7 @@ public class RenderLPW2 extends TileEntitySpecialRenderer {
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
}
long time = te.getWorldObj().getTotalWorldTime();
long time = te.getWorldObj().getTotalWorldTime() % 1000000;
double swayTimer = ((time + interp) / 3D) % (Math.PI * 4);
double sway = (Math.sin(swayTimer) + Math.sin(swayTimer * 2) + Math.sin(swayTimer * 4) + 2.23255D) * 0.5;

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB