-
Notifications
You must be signed in to change notification settings - Fork 144
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
Nether portals and mechanics #426
base: master
Are you sure you want to change the base?
Conversation
@T14Raptor @Sandertv Would appreciate your feedback on this! |
…he player leaves the portal.
…arked as incomplete.
…e world is the overworld or nether.
Just realized that this will need to support all entities and not just players |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments, I have yet to actually check the portal logic.
server/block/model/portal.go
Outdated
} | ||
|
||
// AABB ... | ||
func (p Portal) AABB(cube.Pos, *world.World) []physics.AABB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should return a non-empty AABB. Once we implement suffocation I imagine it'll use the AABB of the block to decide if an entity should suffocate, but this wouldn't work properly with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this would cause issues with the logic to check if the player is intersecting with a portal block though, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would. We might need to put the AABB for that somewhere else. Blocks like water have a zero AABB as well at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe models should have a function to tell whether the block is "solid" or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea if/how I should change this? I am a bit stuck here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe models should have a function to tell whether the block is "solid" or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still a big issue, given suffocation is now implemented? Although I do think a function to tell if blocks are solid or not would be helpful, especially for MovementComputer-based entities.
} | ||
|
||
// Traveller represents a world.Entity that can travel between worlds. | ||
type Traveller interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I'm a massive fan of the term Travel
and Traveller
, it really doesn't make it clear that this is about portals. Do you reckon we could name this anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am honestly not sure, I'm pretty awful at naming things lmao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any suggestions?
# Conflicts: # server/block/fire.go # server/block/register.go # server/entity/item.go # server/entity/movement.go # server/player/player.go # server/world/dimension.go # server/world/world.go
Heavily based around the MiNET, GlowstoneMC, and DimensionPortals implementations.
I'm not entirely sure on the API of this still but I believe this should all work functionality wise.
Closes #385.