-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Predicate Redstone #11
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
sylv256
wants to merge
18
commits into
1.21
Choose a base branch
from
feat/predicate-redstone
base: 1.21
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 all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
88416c5
typo: `condition` field (previously `conditions`) in `PredicateBarrie…
sylv256 efac021
feat: Creative-Only Lever
sylv256 ddf40f7
chore: bump version
sylv256 ffb7520
refactor: Use a self-Mixin to DRY
sylv256 a5c6f25
build(gradle): Enable Mixin hotswapping + Enhanced Class Redefinition…
sylv256 7294e30
fix: Don't cache registry accesses
sylv256 d3f8032
chore: update changelog
sylv256 fdae015
fix: remove duplicate JVM parameter
sylv256 d34da74
docs: Add requirement for DCEVM JDK.
sylv256 664b50f
refactor: Use helper methods in registration
sylv256 90aade6
refactor: Use new system with PredicateBarrierBlock
sylv256 fda2b9f
fix: Don't throw a RuntimeException when condition testing fails
sylv256 27a91cc
feat: `PredicateButtonBlock`
sylv256 132c3bc
fix: Don't let non-op players place `PredicateBlock`
sylv256 2365b56
refactor: `OperatorBlockItem`
sylv256 bfc9224
chore: update changelog
sylv256 7db66a4
fix: fix crashes when hotswapping + disable Mixin hotswapping
sylv256 8b08b95
fix: Fix creative players not being able to pull levers.
MerchantCalico 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| ## Bugfixes | ||
| - Rectify buggy implementation of Advanced Barriers. | ||
| - typo: `condition` field (previously `conditions`) in `PredicateBarrierBlock` | ||
| - fix: Don't cache registry accesses | ||
|
|
||
| ## Changes | ||
| - Operator items can now only be placed in creative mode |
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,6 @@ | ||
| # Contribution Guide | ||
| Hello, contributor! There are a few things you need to know before contributing to Barricade. | ||
|
|
||
| ## JDK | ||
| You will need the [JetBrains Runtime](https://github.com/JetBrains/JetBrainsRuntime) or a JDK with DCEVM support. | ||
| If you use IntelliJ, you can download the JBR through the GUI. You can change the JDK in IntelliJ in File → Project Structure → Project → SDK. |
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
2 changes: 1 addition & 1 deletion
2
buildSrc/src/main/kotlin/net/modgarden/barricade/gradle/Versions.kt
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
118 changes: 118 additions & 0 deletions
118
common/src/generated/resources/assets/barricade/blockstates/creative_only_button.json
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,118 @@ | ||
| { | ||
| "variants": { | ||
| "face=ceiling,facing=east,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "x": 180, | ||
| "y": 270 | ||
| }, | ||
| "face=ceiling,facing=east,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "x": 180, | ||
| "y": 270 | ||
| }, | ||
| "face=ceiling,facing=north,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "x": 180, | ||
| "y": 180 | ||
| }, | ||
| "face=ceiling,facing=north,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "x": 180, | ||
| "y": 180 | ||
| }, | ||
| "face=ceiling,facing=south,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "x": 180 | ||
| }, | ||
| "face=ceiling,facing=south,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "x": 180 | ||
| }, | ||
| "face=ceiling,facing=west,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "x": 180, | ||
| "y": 90 | ||
| }, | ||
| "face=ceiling,facing=west,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "x": 180, | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=east,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=east,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=north,powered=false": { | ||
| "model": "barricade:block/creative_only_button" | ||
| }, | ||
| "face=floor,facing=north,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed" | ||
| }, | ||
| "face=floor,facing=south,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "y": 180 | ||
| }, | ||
| "face=floor,facing=south,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "y": 180 | ||
| }, | ||
| "face=floor,facing=west,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "y": 270 | ||
| }, | ||
| "face=floor,facing=west,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "y": 270 | ||
| }, | ||
| "face=wall,facing=east,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 90 | ||
| }, | ||
| "face=wall,facing=east,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 90 | ||
| }, | ||
| "face=wall,facing=north,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "uvlock": true, | ||
| "x": 90 | ||
| }, | ||
| "face=wall,facing=north,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "uvlock": true, | ||
| "x": 90 | ||
| }, | ||
| "face=wall,facing=south,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 180 | ||
| }, | ||
| "face=wall,facing=south,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 180 | ||
| }, | ||
| "face=wall,facing=west,powered=false": { | ||
| "model": "barricade:block/creative_only_button", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 270 | ||
| }, | ||
| "face=wall,facing=west,powered=true": { | ||
| "model": "barricade:block/creative_only_button_pressed", | ||
| "uvlock": true, | ||
| "x": 90, | ||
| "y": 270 | ||
| } | ||
| } | ||
| } |
110 changes: 110 additions & 0 deletions
110
common/src/generated/resources/assets/barricade/blockstates/creative_only_lever.json
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,110 @@ | ||
| { | ||
| "variants": { | ||
| "face=ceiling,facing=east,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 180, | ||
| "y": 270 | ||
| }, | ||
| "face=ceiling,facing=east,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 180, | ||
| "y": 270 | ||
| }, | ||
| "face=ceiling,facing=north,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 180, | ||
| "y": 180 | ||
| }, | ||
| "face=ceiling,facing=north,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 180, | ||
| "y": 180 | ||
| }, | ||
| "face=ceiling,facing=south,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 180 | ||
| }, | ||
| "face=ceiling,facing=south,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 180 | ||
| }, | ||
| "face=ceiling,facing=west,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 180, | ||
| "y": 90 | ||
| }, | ||
| "face=ceiling,facing=west,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 180, | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=east,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=east,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "y": 90 | ||
| }, | ||
| "face=floor,facing=north,powered=false": { | ||
| "model": "minecraft:block/lever_on" | ||
| }, | ||
| "face=floor,facing=north,powered=true": { | ||
| "model": "minecraft:block/lever" | ||
| }, | ||
| "face=floor,facing=south,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "y": 180 | ||
| }, | ||
| "face=floor,facing=south,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "y": 180 | ||
| }, | ||
| "face=floor,facing=west,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "y": 270 | ||
| }, | ||
| "face=floor,facing=west,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "y": 270 | ||
| }, | ||
| "face=wall,facing=east,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 90, | ||
| "y": 90 | ||
| }, | ||
| "face=wall,facing=east,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 90, | ||
| "y": 90 | ||
| }, | ||
| "face=wall,facing=north,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 90 | ||
| }, | ||
| "face=wall,facing=north,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 90 | ||
| }, | ||
| "face=wall,facing=south,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 90, | ||
| "y": 180 | ||
| }, | ||
| "face=wall,facing=south,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 90, | ||
| "y": 180 | ||
| }, | ||
| "face=wall,facing=west,powered=false": { | ||
| "model": "minecraft:block/lever_on", | ||
| "x": 90, | ||
| "y": 270 | ||
| }, | ||
| "face=wall,facing=west,powered=true": { | ||
| "model": "minecraft:block/lever", | ||
| "x": 90, | ||
| "y": 270 | ||
| } | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
common/src/generated/resources/assets/barricade/models/block/creative_only_button.json
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,6 @@ | ||
| { | ||
| "parent": "minecraft:block/button", | ||
| "textures": { | ||
| "texture": "minecraft:block/stone" | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
...src/generated/resources/assets/barricade/models/block/creative_only_button_inventory.json
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,6 @@ | ||
| { | ||
| "parent": "minecraft:block/button_inventory", | ||
| "textures": { | ||
| "texture": "minecraft:block/stone" | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
...n/src/generated/resources/assets/barricade/models/block/creative_only_button_pressed.json
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,6 @@ | ||
| { | ||
| "parent": "minecraft:block/button_pressed", | ||
| "textures": { | ||
| "texture": "minecraft:block/stone" | ||
| } | ||
| } |
3 changes: 3 additions & 0 deletions
3
common/src/generated/resources/assets/barricade/models/item/creative_only_button.json
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,3 @@ | ||
| { | ||
| "parent": "barricade:block/creative_only_button_inventory" | ||
| } |
6 changes: 6 additions & 0 deletions
6
common/src/generated/resources/assets/barricade/models/item/creative_only_lever.json
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,6 @@ | ||
| { | ||
| "parent": "minecraft:item/generated", | ||
| "textures": { | ||
| "layer0": "minecraft:block/lever" | ||
| } | ||
| } |
12 changes: 6 additions & 6 deletions
12
common/src/generated/resources/data/barricade/tags/block/barriers.json
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 |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "values": [ | ||
| "minecraft:barrier", | ||
| "#barricade:directional_barriers", | ||
| "#barricade:predicate_barriers" | ||
| ] | ||
| } | ||
| "values": [ | ||
| "minecraft:barrier", | ||
| "#barricade:directional_barriers", | ||
| "#barricade:predicate_barriers" | ||
| ] | ||
| } | ||
24 changes: 12 additions & 12 deletions
24
common/src/generated/resources/data/barricade/tags/block/directional_barriers.json
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 |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| { | ||
| "values": [ | ||
| "barricade:advanced_barrier", | ||
| "barricade:down_barrier", | ||
| "barricade:up_barrier", | ||
| "barricade:north_barrier", | ||
| "barricade:south_barrier", | ||
| "barricade:east_barrier", | ||
| "barricade:west_barrier", | ||
| "barricade:horizontal_barrier", | ||
| "barricade:vertical_barrier" | ||
| ] | ||
| } | ||
| "values": [ | ||
| "barricade:advanced_barrier", | ||
| "barricade:down_barrier", | ||
| "barricade:up_barrier", | ||
| "barricade:north_barrier", | ||
| "barricade:south_barrier", | ||
| "barricade:east_barrier", | ||
| "barricade:west_barrier", | ||
| "barricade:horizontal_barrier", | ||
| "barricade:vertical_barrier" | ||
| ] | ||
| } |
16 changes: 8 additions & 8 deletions
16
common/src/generated/resources/data/barricade/tags/block/entity_barriers.json
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 |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| { | ||
| "values": [ | ||
| "barricade:advanced_barrier", | ||
| "barricade:player_barrier", | ||
| "barricade:mob_barrier", | ||
| "barricade:passive_barrier", | ||
| "barricade:hostile_barrier" | ||
| ] | ||
| } | ||
| "values": [ | ||
| "barricade:advanced_barrier", | ||
| "barricade:player_barrier", | ||
| "barricade:mob_barrier", | ||
| "barricade:passive_barrier", | ||
| "barricade:hostile_barrier" | ||
| ] | ||
| } |
10 changes: 5 additions & 5 deletions
10
common/src/generated/resources/data/barricade/tags/block/predicate_barriers.json
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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "values": [ | ||
| "#barricade:entity_barriers", | ||
| "barricade:creative_only_barrier" | ||
| ] | ||
| } | ||
| "values": [ | ||
| "#barricade:entity_barriers", | ||
| "barricade:creative_only_barrier" | ||
| ] | ||
| } |
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.