This commit is contained in:
laxadeR 2023-07-22 14:57:12 +00:00 committed by GitHub
commit 16d57a6af6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}