-
Notifications
You must be signed in to change notification settings - Fork 5
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
[WIP] Feature/expanse 2 #34
Open
Bluexin
wants to merge
58
commits into
develop
Choose a base branch
from
feature/Expanse-2
base: develop
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
Changes from 52 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
e8f7981
Add external launch config for ChunkWorker
Bluexin fbe5e08
Revamp chunk schema
Bluexin 614025d
Use updated reservation api
dd67e1d
Fix gradle fatjar and ChunkWorker executable path
Bluexin ebcd760
Abstract away the connection manager
Bluexin c97adb9
Add worker manager
10353ea
Fix mistake in worker manager
b531e29
Move service definition
1c20f80
Run the WorkerManager trough LaunchWrapper
Bluexin cf47f6f
Connect the Chunk Worker
Bluexin fcad5ca
Add a connection callback to the ConnectionManager
Bluexin d450926
Add support for View Mode in ConnectionManager
Bluexin a1fb38b
Update entity db
Bluexin 0970cac
Add dummy chunk generation ability to the chunk worker
Bluexin 8da1413
Let the client (dis)connect to/from the server
Bluexin b29b96d
Fix ConnectionManager to act as keep-alive again
Bluexin d13a4dd
Fix chunk creation after database upgrade
Bluexin 5c4fde1
Let consumers give their own Dispatcher implementation
Bluexin 68e24c0
Read chunk data from client (almost)
Bluexin 3eca72c
add worker-sdk build.gradle
2f1445f
Package mc & forge in the workers builds
Bluexin 8cb5969
Fix manifests
Bluexin 5c6fd95
Fix worker types and implement base worker + doc
Bluexin 1a0560a
Let chunk workers & clients get entities data
Bluexin f3461b9
Render the world
09cb661
Update branding
739ae33
Wah?
f375cbe
Merge branch 'develop' into feature/Spatial-14
71cb04b
Disable brand mixin
536f6d2
Implement world converter
ba05ffe
Update entity schema
148c7b6
Update chunk provider y level
a85879b
Fix some issues with chunk loading
Bluexin 495f695
Update player id on client worker
926bcc7
Add default snapshot to test with
3434ab8
Work on entity syncing
4bc47bf
Fix chunk loading for real and update snapshot
Bluexin bb8606e
Update spatial launch config
Bluexin 39c4795
Merge remote-tracking branch 'origin/feature/Spatial-14' into feature…
f6b706f
Update spatial launch config (fix derp)
Bluexin 0b8a57a
Merge remote-tracking branch 'origin/feature/Spatial-14' into feature…
da82240
[WIP] World loading and syncing to clients (#14 #15) (#19)
Bluexin 9e742f1
Merge branch 'develop' into feature/Expanse-2
916bd2d
Fix some issue with chunks
adfea00
Improve component requirements
616c340
Fix world converter formatting
109aef7
Fix worker service
d6d4c14
Add attributes to client worker
3c78d8f
Implement entity worker and client disconnection
a341bf5
Prevent player from directly updating position
9eb5f9c
Player syncing
9347eb3
Bootstrapper
9eea4ab
Customize main menu
95d40e9
Reduce timeout time to 5 seconds
aba5c3e
Remove used entities from the requirement callback
e701126
Fix *some* worker issues, update to SpatialOS 13.6.1
Bluexin b2456bf
Do a bit more on player syncing
b218f7e
Send right click with item
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 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 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,18 @@ | ||
package minecraft.boostrap; | ||
|
||
import "components/player.schema"; | ||
|
||
// Reserves 1400-1449 | ||
|
||
type Message { | ||
string message = 1; | ||
} | ||
|
||
/** | ||
* A single chunk holds 16x16x16 states. | ||
*/ | ||
component Bootstrap { | ||
id = 1400; | ||
map<string, minecraft.player.GameProfile> online_players = 1; | ||
command Message on_chat(Message); | ||
TheCodedOne marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains 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 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,36 @@ | ||
package minecraft.player; | ||
|
||
import "improbable/vector3.schema"; | ||
|
||
// Reserves 1450-1499 | ||
|
||
type GameProfile { | ||
string uuid = 1; | ||
string name = 2; | ||
} | ||
|
||
component PlayerInfo { | ||
id = 1450; | ||
GameProfile profile = 1; | ||
} | ||
|
||
component MapRepresentation { | ||
id = 1453; | ||
uint32 colour = 1; | ||
string icon = 2; | ||
} | ||
|
||
component PlayerInput { | ||
id = 1451; | ||
improbable.Vector3f move_position = 1; | ||
bool sprinting = 2; | ||
bool sneaking = 3; | ||
} | ||
|
||
type Heartbeat { | ||
} | ||
|
||
component PlayerConnection { | ||
id = 1452; | ||
event Heartbeat heartbeat; | ||
} |
This file contains 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,54 @@ | ||
{ | ||
"build": { | ||
"tasks_filename": "spatialos.java.build.json" | ||
}, | ||
"bridge": { | ||
"worker_attribute_set": { | ||
"attributes": [ | ||
"bootstrap" | ||
] | ||
}, | ||
"entity_interest": { | ||
"range_entity_interest": { | ||
"radius": 0 | ||
} | ||
}, | ||
"streaming_query": [], | ||
"component_delivery": { | ||
"default": "RELIABLE_ORDERED", | ||
"checkout_all_initially": true | ||
} | ||
}, | ||
"external": { | ||
"default": { | ||
"run_type": "EXECUTABLE_ZIP", | ||
"linux": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"Bootstrapper" | ||
] | ||
}, | ||
"windows": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"Bootstrapper" | ||
] | ||
}, | ||
"macos": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"Bootstrapper" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains 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,54 @@ | ||
{ | ||
"build": { | ||
"tasks_filename": "spatialos.java.build.json" | ||
}, | ||
"bridge": { | ||
"worker_attribute_set": { | ||
"attributes": [ | ||
"entity_worker" | ||
] | ||
}, | ||
"entity_interest": { | ||
"range_entity_interest": { | ||
"radius": 0 | ||
} | ||
}, | ||
"streaming_query": [], | ||
"component_delivery": { | ||
"default": "RELIABLE_ORDERED", | ||
"checkout_all_initially": true | ||
} | ||
}, | ||
"external": { | ||
"default": { | ||
"run_type": "EXECUTABLE_ZIP", | ||
"linux": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"EntityWorker" | ||
] | ||
}, | ||
"windows": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"EntityWorker" | ||
] | ||
}, | ||
"macos": { | ||
"artifact_name": "[email protected]", | ||
"command": "java", | ||
"arguments": [ | ||
"-jar", | ||
"HorizonJavaWorker.jar", | ||
"EntityWorker" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains 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
2 changes: 2 additions & 0 deletions
2
workers/java/worker/src/main/java/com/hrznstudio/spatial/SpatialLaunchWrapper.java
This file contains 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 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 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
7 changes: 0 additions & 7 deletions
7
workers/java/worker/src/main/java/com/hrznstudio/spatial/WorkerService.java
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
workers/java/worker/src/main/java/com/hrznstudio/spatial/api/IDispatcherLoop.java
This file contains 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,5 @@ | ||
package com.hrznstudio.spatial.api; | ||
|
||
public interface IDispatcherLoop { | ||
void onLoop(); | ||
} |
8 changes: 8 additions & 0 deletions
8
workers/java/worker/src/main/java/com/hrznstudio/spatial/api/ISpatialEntity.java
This file contains 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,8 @@ | ||
package com.hrznstudio.spatial.api; | ||
|
||
import improbable.worker.EntityId; | ||
|
||
public interface ISpatialEntity { | ||
EntityId getSpatialId(); | ||
void setSpatialId(EntityId id); | ||
} |
10 changes: 10 additions & 0 deletions
10
workers/java/worker/src/main/java/com/hrznstudio/spatial/api/ISpatialWorld.java
This file contains 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,10 @@ | ||
package com.hrznstudio.spatial.api; | ||
|
||
import improbable.worker.EntityId; | ||
import net.minecraft.entity.Entity; | ||
|
||
public interface ISpatialWorld { | ||
Entity getEntityById(EntityId id); | ||
void addSpatial(Entity entity); | ||
void removeSpatial(Entity entity); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO one shouldn't need documentation in code, but interfaces can use it. |
||
} |
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.
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.
copypasta doc comment should be fixed