mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 06:24:29 +01:00
Merge pull request #5192 from laxadeR/fix-elevator-contacts
Fixed wrong elevator contacts powering sometimes
This commit is contained in:
commit
72882f89c0
@ -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 New Issue
Block a user