-
Notifications
You must be signed in to change notification settings - Fork 175
Entity rideable feature #1119
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
Open
Studgi
wants to merge
28
commits into
df-mc:master
Choose a base branch
from
Studgi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Entity rideable feature #1119
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1d8d26e
Merge pull request #1 from df-mc/master
Studgi d81fdda
Refactor entity riding system and update dependencies
Studgi 8b1a904
Standardize vector types in riding system
Studgi 70ab4cf
Downgrade to go 1.24.7
Studgi d429544
revert go version and modules bump
Studgi 0fe9113
Refactor entity riding system with seat-based approach
Studgi 5c75b15
Merge branch 'master' into master
Studgi 00bb810
Add click position parameter to seat selection
Studgi 52e4e0c
Merge remote-tracking branch 'origin/master'
Studgi cedc175
renamed rideable to riddenEntity
Studgi 3035b8d
Merge branch 'master' into master
Studgi 054406f
Merge pull request #2 from df-mc/master
Studgi 7ec9b94
riding: add methods for managing multiple riders on riddenEntity inte…
Studgi baf8ea6
Merge remote-tracking branch 'origin/master'
Studgi 54f14e2
riding: add comprehensive developer documentation for Rider and Ridea…
Studgi 7329098
sleep: implement sleep functionality and related mechanics
Studgi b47e62b
entity_metadata: add support for baby entities in metadata flags
Studgi 5ed826f
entity_metadata: fix flag setting for baby entities in metadata
Studgi 209ae6d
entity_metadata: rename IsBaby method to Baby for consistency
Studgi 7bff422
player: refactor riding entity handling to use world transactions
Studgi 1091215
refactor interaction handlers to utilize world transactions
Studgi c30ef24
player: update RidingEntity method to return a boolean for entity exi…
Studgi 2b078e5
player: update RidingEntity method to return a boolean for existence …
Studgi be1ec05
player: modify RidingEntity method to return nil for non-existent ent…
Studgi f7d8152
Merge pull request #3 from df-mc/master
Studgi 976171d
remove unused baby interface from entity metadata
Studgi d057bce
Merge pull request #4 from df-mc/master
Studgi 175ac1c
Merge pull request #5 from df-mc/master
Studgi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package entity | ||
|
|
||
| import ( | ||
| "github.com/df-mc/dragonfly/server/world" | ||
| "github.com/go-gl/mathgl/mgl32" | ||
| ) | ||
|
|
||
| // Rider is an interface for entities that can ride other entities. | ||
| type Rider interface { | ||
| world.Entity | ||
| // RidingEntity returns the entity the player is currently riding. | ||
| RidingEntity() Rideable | ||
| // SeatPosition returns the position of where the player is sitting. | ||
| SeatPosition() mgl32.Vec3 | ||
Studgi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // MountEntity mounts the Rider to an entity if the entity is Rideable and if there is a seat available. | ||
| MountEntity(e Rideable, position mgl32.Vec3, driver bool) | ||
| // DismountEntity dismounts the rider from the entity they are currently riding. | ||
| DismountEntity() | ||
| } | ||
|
|
||
| // Rideable is an interface for entities that can be ridden. | ||
| type Rideable interface { | ||
| world.Entity | ||
| Driver() Rider | ||
| Move(vector mgl32.Vec2, yaw, pitch float32) | ||
Studgi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.