-
Notifications
You must be signed in to change notification settings - Fork 63
Proposal to reintroduce catwalks at the bottom of the block #193
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
base: 1.20-main
Are you sure you want to change the base?
Conversation
…esence of catwalk
… stairs This is useful for implementing the interaction between catwalk blocks and railing blocks, where we want to only allow interactions if their metals match.
Placing a catwalk of the same metal on an existing railing block will add the catwalk to the bottom of the railing block.
…nd presence of railings This is an alternative approach where the catwalk block has properties to indicate whether there are railings in the block, and whether there's a catwalk shape at the top or bottom of the block.
this is taken straight from the CatwalkRailing block code
When wrenching a catwalk block, change the state depending on the current state: - If the catwalk block has any railings, rotate the block using the default iWrenchable implementation - If there are no railing blocks, toggle between the top and bottom surface
…g block" I prefer the approach where the Catwalk block is the main block that contains state for railings, so the changes in this commit are no longer needed.
…esent presence of catwalk" This reverts commit 728c8eefdc5556364a9be6ff22caf89a41d43285 (except for the block andesite_catwalk_down, which we're still using)
…tate (top/bottom)
I've added a second function isCatwalkOrStair that has the old behaviour, but I'm not using it anywhere because I don't yet understand why it permitted both, catwalk blocks and stairs here
I set everything to true for debugging, but realistically, initially we only want a single catwalk.
This tweaks the interaction between catwalks and railing items. A catwalk block that has a top-side catwalk shouldn't allow placing rails inside its block. Those would show up under the catwalk. By preventing this interaction, the railing will simply be placed on the block above.
When placing a catwalk block into an existing railing block, the railing block is replaced by a catwalk block with the appropriate block state set.
…and items The placement helpers still produce ghost states, even if the metals don't match. I haven't been able to figure out why that is.
Before, the item costs in schematics would not accurately represent how many items are actually needed, and you could place a block with 4 railings with only a single railing item. This fixes that by specifying the exact number of items, depending on the block state.
|
ah I see that there were some changes in 1.20-main yesterday. I'll resolve the conflicts and test with the new changes tomorrow! |
|
+1 to this! |
Conflicts: common/src/main/java/com/github/talrey/createdeco/items/CatwalkBlockItem.java common/src/main/java/com/github/talrey/createdeco/items/RailingBlockItem.java
On 1.7, the build failed with the following error message:
* What went wrong:
A problem occurred evaluating root project 'createdeco'.
> Failed to apply plugin 'dev.architectury.loom'.
> Could not create an instance of type net.fabricmc.loom.extension.LoomGradleExtensionImpl.
> Could not create an instance of type net.fabricmc.loom.extension.LoomProblemReporter.
> 'org.gradle.api.problems.ProblemReporter org.gradle.api.problems.Problems.forNamespace(java.lang.String)'
This fix is based on architectury/architectury-api#586
|
I've pulled in the changes from 1.20-main, and tested everything again with Create v6. All seems to work, still. I did have to update architectury loom to 1.9-snapshot (see 3216860). Not sure if there's a way around that... here's the error that I got with 1.7-SNAPSHOT: |
|
Hi, Very late but does this still work and do If I am on a aternos server do i have to type the code into the server. |
This is a proposal to reintroduce the option to have catwalk blocks on the bottom of a block, while keeping catwalk railings as separate items and blocks.
Overview of changes
CATWALK_TOPandCATWALK_BOTTOM.RAILING_[NORTH|EAST|SOUTH|WEST]Placing Catwalks
Placing Railings
Interacting with catwalk blocks
Interacting with railing blocks
The existing railing blocks are mostly unchanged. However, players can now place a catwalk into a railing block. This will replace the railing block with a catwalk block.
Things I’ve tested
The additional block properties introduce some complexity, and I’ve tried my best to test a lot of scenarios. Here’s a list of things I’ve tested:
BOTTOMblock property (i.e. the full-block model for catwalks that are above support blocks) is still working. The full-block model is only visible if the catwalk is at the top of the blockKnown issues
There are a couple of small things that I couldn’t fix yet. They are all related to ghost states in placement helpers. When holding an item of one metal type and looking at a block of another metal type, there’s still a ghost state presented that hints at a possible interaction. However, actually placing the item into the block doesn’t work. So it’s mostly a cosmetic issue.
Specifically, the following interactions produce ghost states that aren’t accurate:
None of the interactions succeed, though.