-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
New block families by pollend - merge to develop post-GCI #3149
Conversation
- Remove Block Factory/Family pattern - Implemented Dependency Injection pattern for block families - reimplemented basic block families
Hooray Jenkins reported success with all tests good! |
@@ -69,6 +71,17 @@ public void largeBlockUpdateFinished(LargeBlockUpdateFinished event, EntityRef e | |||
} | |||
} | |||
|
|||
@ReceiveEvent(components = {BlockItemComponent.class}) | |||
public void onPlaceBlock(OnBlockItemPlaced event, EntityRef entity) { |
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.
so this was for the placement problems where a block is placed, but the neighboring blocks don't update. This would come with cables is signalling where if you placed a block the neighboring cables won't update to reflect the new connection.
I think there might be a problem with BlockItemComponent.class because I believe this would never call if the block does not have an item tied to it. This was once of the gci submits and I had to remove the BlockItemComponent for this to work correctly. https://gist.github.com/pollend/148d45ae964337358887b2ab1d4cfeaf
So would I do this instead:
@ReceiveEvent()
public void onPlaceBlock(OnBlockItemPlaced event, EntityRef entity) {
...
generalized event handler for OnBlockItemPlaced
@@ -29,13 +32,23 @@ | |||
private BlockUri uri; | |||
private Set<String> categories = Sets.newHashSet(); |
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.
This does not make much sense in the scope of families. these are already provided by the block itself.
Hooray Jenkins reported success with all tests good! |
When you merge this PR, also merge this one into fences so it uses the new block families. |
Definitely a good cleanup of the previous system. Me, @pollend, and @Cervator have discussed these changes as well as future considerations extensively, and I've summarized what I got from it in a gist below. I of course cannot speak for them, but I attempted to accurately portray where we're at right now. https://gist.github.com/PS-Soundwave/799fd55d34b06b092e7277654540299a |
Terasology-Archived/MarcinScIncubator#2 took a try on the first entry on the list, @Cervator :P |
Minor fixes to new block families' docs (merge to newBlockFamilies branch)
Hooray Jenkins reported success with all tests good! |
Hooray Jenkins reported success with all tests good! |
…n refactor. Conflict vs #3221 in direction vs rotation stuff. Still one bit pending.
Hooray Jenkins reported success with all tests good! |
Edit: See #3343 for newer comments - that PR is rebased and easier to test with modules Been working on preparing this better as the base branch is pretty old at this point, making it hard to test some modules. Merged in both #3221 and #3180 including conflict fixes (to the Some todos remain
Related/updated module PRs
PRs exist but need more work
Modules that still need a PR to fix related code
UnknownCan't compile due to broken dependencies. Could be fine after dependencies fixed
Also: potentially any module that uses block families the old school way in prefabs rather than define their own unique block families thus causing compilation errors (I haven't looked for those) |
There is already a pr for this #3343. |
Closing as merged by #3343 |
Update: Newer rebased PR available: #3343
Contains
New block family system by @pollend - see this Gist for some documentation and philosophy on the change as well as original PR #3085
How to test
Will need to experiment some with an existing block family or make a new one. Some directions in the Gist but more details for here would be good. Probably Rails would be the ultimate test case.
Outstanding before merging
This breaks backwards compatibility and is part of the v2.0.0 engine release. Some modules are impacted and should be updated with PRs that make the associated changes required by this PR. A task chain for GCI is based on this PR's branch and should be allowed to finish with additional improvements PRed to the branch before this is merged.
newBlockFamilies
branchAdditional comments in this PR for feedback/improvements would also be appreciated :-)