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

update to 0.10 #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

update to 0.10 #5

wants to merge 4 commits into from

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
@@ -39,26 +39,28 @@ func (b Brush) UUID() uuid.UUID {

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)

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.

2 participants