fix contact offset added twice

This commit is contained in:
laxadeR 2023-07-22 18:45:44 +04:00
parent 0bfd98fccd
commit bda6257025

View file

@ -89,7 +89,7 @@ public class ElevatorPulleyBlockEntity extends PulleyBlockEntity {
if (level.isClientSide()) if (level.isClientSide())
targetLevel = ec.clientYTarget; targetLevel = ec.clientYTarget;
if (!wasArrived && !level.isClientSide()) { 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); AllSoundEvents.CONTRAPTION_DISASSEMBLE.play(level, null, worldPosition.below((int) offset), 0.75f, 0.8f);
} }