Skip to content

Implement ender pearls#233

Open
Purdze wants to merge 12 commits into
Steel-Foundation:masterfrom
Purdze:implement-ender-pearls
Open

Implement ender pearls#233
Purdze wants to merge 12 commits into
Steel-Foundation:masterfrom
Purdze:implement-ender-pearls

Conversation

@Purdze

@Purdze Purdze commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Ender pearls with flight, collision, owner teleport, chunk loading and player bound persistence.

@Joniii11 Joniii11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i only found this elkse it LGTM

let world = context.world;

// Vanilla throw pitch: 0.4 / (random * 0.4 + 0.8).
let pitch = 0.4 / (rand::random::<f32>() * 0.4 + 0.8);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not use world.random().lock()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm in https://mcsrc.dev/1/26.2/net/minecraft/world/item/EnderpearlItem#L33 it use world random, so do you consider for perfect parity it's necessary or we can neglect that ? (purdze) I know that it's important for speedrun or very specific mechanics that use world random, or we can use any random ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

obviously i would use it lol and if we already have access to world why not use it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it can be for performance because lock the world can have a cost

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.

4 participants