Skip to content

update to 0.10#5

Open
Newcoolboys wants to merge 4 commits into
df-mc:mainfrom
Newcoolboys:main
Open

update to 0.10#5
Newcoolboys wants to merge 4 commits into
df-mc:mainfrom
Newcoolboys:main

Conversation

@Newcoolboys

Copy link
Copy Markdown

I got no clue if this is right at all 😭

@Newcoolboys

Newcoolboys commented Jan 25, 2025

Copy link
Copy Markdown
Author

tested 🙌🙌
works as intended

@Sandertv Sandertv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Most of this looks good. Just have another look at Brush.Use(), which doesn't currently work properly with the world transactions.

Comment thread brush/brush.go Outdated
Comment thread brush/brush.go Outdated
@Newcoolboys Newcoolboys changed the title Updated update to 0.10 Jan 26, 2025
Comment thread brush/brush.go Outdated
var bb = cube.Box(-0.125, -0.125, -0.125, 0.125, 0.125, 0.125)

func (b Brush) Use(p *player.Player) {
func (b Brush) Use(p *player.Player, h *world.EntityHandle) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is still not right. Brush.Use() is being called on another goroutine which invalidates *player.Players. Don't pass the player to this function, only pass the handle. You can retrieve the player in the transaction by asserting e: p := e.(*player.Player)

Comment thread brush/handler.go Outdated
Comment thread palette/handler.go Outdated
@AkmalFairuz

Copy link
Copy Markdown

Any updates?

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