From bda6257025e200926d757a81caa83484228955e2 Mon Sep 17 00:00:00 2001 From: laxadeR Date: Sat, 22 Jul 2023 18:45:44 +0400 Subject: [PATCH] fix contact offset added twice --- .../contraptions/elevator/ElevatorPulleyBlockEntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyBlockEntity.java b/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyBlockEntity.java index faa722ffd..d3146420e 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/elevator/ElevatorPulleyBlockEntity.java @@ -82,14 +82,14 @@ public class ElevatorPulleyBlockEntity extends PulleyBlockEntity { double y = movedContraption.getY(); int targetLevel = Mth.floor(0.5f + y) + ec.contactYOffset; - + Integer ecCurrentTargetY = ec.getCurrentTargetY(level); if (ecCurrentTargetY != null) targetLevel = ecCurrentTargetY; if (level.isClientSide()) targetLevel = ec.clientYTarget; if (!wasArrived && !level.isClientSide()) { - triggerContact(ec, targetLevel); + triggerContact(ec, targetLevel - ec.contactYOffset); AllSoundEvents.CONTRAPTION_DISASSEMBLE.play(level, null, worldPosition.below((int) offset), 0.75f, 0.8f); }