Skip to content

update to 0.10#5

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

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

Conversation

@Newcoolboys
Copy link

I got no clue if this is right at all 😭

@Newcoolboys
Copy link
Author

Newcoolboys commented Jan 25, 2025

tested 🙌🙌
works as intended

Copy link
Member

@Sandertv Sandertv left a comment

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.

@Newcoolboys Newcoolboys changed the title Updated update to 0.10 Jan 26, 2025
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
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)

@AkmalFairuz
Copy link

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

Comments