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

Smooth Pistons #1542

Merged
merged 147 commits into from
Sep 10, 2021
Merged

Smooth Pistons #1542

merged 147 commits into from
Sep 10, 2021

Conversation

davchoo
Copy link
Member

@davchoo davchoo commented Nov 15, 2020

Fixes the flickering with pistons moving blocks. Needs GeyserMC/mappings#41
Fixes #2241

Copy link
Member

@Camotoy Camotoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot to go through here - I'll try to run it later and get an IDE analysis of it.

@Camotoy
Copy link
Member

Camotoy commented Nov 15, 2020

@davchoo
Copy link
Member Author

davchoo commented Nov 15, 2020

Ah, totally forgot about normal pistons.

@Camotoy
Copy link
Member

Camotoy commented Nov 15, 2020

Solved on my end.

# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java
#	connector/src/main/resources/mappings
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java
#	connector/src/main/resources/mappings
@Camotoy
Copy link
Member

Camotoy commented Nov 24, 2020

Looks good so far! I love that the slime block works correctly. A couple of critiques:

  • I tested a [sticky] piston with no block attached and the current master behavior still applies where a player moves to the ground.
  • Have you tried applying motion to the player in all cases instead of teleporting them? It might seem a little cleaner, and as of 1.16.20 I believe that is BDS behavior.

@zimzaza4
Copy link

It's great. It solved #1437

@davchoo
Copy link
Member Author

davchoo commented Nov 26, 2020

I've fixed movement with pistons without any blocks attached.

I didn't see any SetEntityMotion packets while using ProxyPass and BDS, but I tried it anyway. It kinda works but tends to push players sideways. You can see the effect when being launched by a slime block.
I'm having trouble with the Java server teleporting players back to their original positions, which I believe causes honey and slime blocks to work intermittently.

# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
TODO deduplicate code
TODO fix empty retracting sticky pistons
davchoo and others added 3 commits September 4, 2021 16:03
May want to reduce it to 64 blocks, since Bedrock does not render
moving blocks outside this range.
Copy link
Member

@Redned235 Redned235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Few nitpicks but generally most everything looks great.

*/
private void removeBlocks() {
for (Vector3i blockPos : attachedBlocks.keySet()) {
ChunkUtils.updateBlock(session, BlockStateValues.JAVA_AIR_ID, blockPos);
Copy link
Member

@Camotoy Camotoy Sep 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this method is only called for visuals, I would rather it just call the update block methods manually so we don't even touch the chunk cache, unless we need the chunk cache to match.

@Camotoy Camotoy merged commit 8461cf7 into GeyserMC:master Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Players don't stick on honey blocks Slime Blocks glitched for bedrock users
10 participants