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

Velocity Support #139

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Conversation

GStudiosX2
Copy link

@GStudiosX2 GStudiosX2 commented Dec 10, 2024

features

  • Velocity modern forwarding
    # Velocity configuration
    [velocity]
    enabled = false
    # The key from forwarding.secret
    secret = ""
  • Tablist lists players

changes

  • Send chunk at 0, 0 on join so player doesn't fall through
  • Spawn player at highest air block with MOTION_BLOCKING heightmap
  • Triggering a event returns Result<Self::Data, Self::Error> now (is this considered a breaking change?)
  • New login process event ferrumc_net::connection::PlayerStartLoginEvent
    Used by whitelist.rs and velocity.rs
  • whitelist is now handled in bin/src/packet_handlers/whitelist.rs
  • New EventsError Cancelled
    This can be used to cancel events most events probably won't do much with this
  • New EventsError Other
    Not sure why I added this I don't think I use it but could be for custom event errors I guess?
  • New NetError Kick
    NetError::Kick(TextComponentBuilder::text("Hello, World!").build())
    NetError::kick("Hello, World!".to_string())

breaking changes

  • LengthPrefixedVec now supports all functions from Vec via Deref & DerefMut
  • terminate_connection has been replaced with ferrumc_net::utils::state::TerminateConnectionPlayerExt

Copy link
Member

@Sweattypalms Sweattypalms left a comment

Choose a reason for hiding this comment

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

I found some stuff I would like to be changed. I'll try see if I can find more

src/lib/net/src/connection.rs Outdated Show resolved Hide resolved
@0xnim
Copy link
Contributor

0xnim commented Dec 10, 2024

This should possibly be mostly in lib

@GStudiosX2
Copy link
Author

GStudiosX2 commented Dec 10, 2024

This should possibly be mostly in lib

It's so small that I don't think it deserves a separate lib but possibly could move the key stuff I guess to a different crate but I probably won't do it

@GStudiosX2 GStudiosX2 marked this pull request as ready for review December 10, 2024 16:52
@0xnim
Copy link
Contributor

0xnim commented Dec 14, 2024

This could possibly be merged after authentication is implemented?

@GStudiosX2
Copy link
Author

This could possibly be merged after authentication is implemented?

It really doesn't matter but I want #140 to be merged before this so I might mark this back as a draft not 100% sure

@GStudiosX2 GStudiosX2 marked this pull request as draft December 16, 2024 08:31
@GStudiosX2 GStudiosX2 changed the title feat: Velocity Support Velocity Support + Player Entity Spawning Dec 16, 2024
This reverts commit 13bf0b5.
@GStudiosX2
Copy link
Author

GStudiosX2 commented Dec 16, 2024

That test commit wasn't supposed to be here 😭

edit: I don't think the code test commit pushed even worked and I want to figure out how to have the API and how to parse it right now anyway minimessage stuff I think want to be in a separate pr

@GStudiosX2 GStudiosX2 changed the title Velocity Support + Player Entity Spawning Velocity Support (#152 for player spawning) Dec 31, 2024
@GStudiosX2 GStudiosX2 changed the title Velocity Support (#152 for player spawning) Velocity Support Dec 31, 2024
@0xnim
Copy link
Contributor

0xnim commented Jan 2, 2025

This is on by default?

@GStudiosX2
Copy link
Author

GStudiosX2 commented Jan 2, 2025

This is on by default?

No you have to enable velocity in the config is it being enabled by default?

@GStudiosX2 GStudiosX2 marked this pull request as ready for review January 2, 2025 14:57
@GStudiosX2
Copy link
Author

Pretty much ready

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.

3 participants