mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 15:06:42 +01:00
Merge pull request #5192 from laxadeR/fix-elevator-contacts
Fixed wrong elevator contacts powering sometimes
This commit is contained in:
commit
72882f89c0
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue