Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple elevator contacts active at once #4888

Closed
anonymoususer901 opened this issue Jun 1, 2023 · 5 comments · Fixed by #5192
Closed

Multiple elevator contacts active at once #4888

anonymoususer901 opened this issue Jun 1, 2023 · 5 comments · Fixed by #5192
Labels
type: bug Issue where something isn't working

Comments

@anonymoususer901
Copy link

Describe the Bug

Multiple elevator contacts lighting up at once.

Reproduction Steps

1.Build elevator
2. Place 5 contacts so that you have 2 sets of elevator contacts adjacent to each other and the last contact 1 block underground
3.Label the highest set of elevator contacts as 2a and 2b (2b being the higher one) and the lower set as 1a and 1b with 1b being the higher of the 2
4. Send elevator to 1a and both 1a and 0 will be lit
(Note: any Redstone dust next to floor 0's contact will power the contact sending the elevator to floor 0)

Expected Result

The only contact that should have lit up was the contact at the top of the screenshot (see screenshot below).

Screenshots and Videos

2023-06-01_08 18 11
2023-06-01_08 37 17

Crash Report or Log

No response

Operating System

Windows 11

Mod Version

0.5.1b

Minecraft Version

1.18.2

Forge Version

40.2.4

Other Mods

No response

Additional Context

No response

@anonymoususer901 anonymoususer901 added the type: bug Issue where something isn't working label Jun 1, 2023
@X66Herobrine66X
Copy link

Can confirm, experiencing this bug as well in my build. Every other contact will activate the one below it along with itself.

@AJ-P22
Copy link

AJ-P22 commented Jul 13, 2023

I'm having the same issue on Fabric 1.19.2 0.5.1b Patch 1 and Patch 2

Fabricators-of-Create#1002 (comment)

@laxadeR
Copy link
Contributor

laxadeR commented Jul 22, 2023

I did some testing with current mc1.18/dev branch, It seems to have to do with the elevator contraption height being more than the distance between the contacts.
It also only affects the sections where that is true, so not the whole elevator column.
image

@AJ-P22
Copy link

AJ-P22 commented Jul 22, 2023

It seems to have to do with the elevator contraption height being more than the distance between the contacts.

That makes sense. I made an elevator that was only a platform, and it worked fine, but when I built the rest of the cab it started powering multiple contacts

@laxadeR
Copy link
Contributor

laxadeR commented Jul 22, 2023

I found the issue, the problem only happens when the distance between contacts is the same as the contactYOffset on the contraption, because the offset is being added twice to the contraption y position, once in ElevatorPulleyBlockEntity tick() and once more in triggerContact. The correct contact is being also lit up because of the lazyTick which calculates the contact position correctly (which explains the delay with the wrong contact being powered earlier).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants