Skip to content

Commit 11b9275

Browse files
committed
Add datagenned files and update actions
1 parent be0c251 commit 11b9275

File tree

18 files changed

+351
-21
lines changed

18 files changed

+351
-21
lines changed

.github/workflows/build.yml

+11-16
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,19 @@ jobs:
1717
with:
1818
distribution: temurin
1919
java-version: 17
20-
- name: Use Gradle cache for faster builds
21-
uses: actions/cache@v3
20+
- name: Setup Gradle
21+
uses: gradle/gradle-build-action@v2
2222
with:
23-
path: ~/.gradle/caches
24-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
25-
- name: Cleanup Gradle Cache
26-
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
27-
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
23+
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
24+
- name: Generate assets
25+
run: ./gradlew runData
26+
- name: Check that datagen ran
27+
run: test -d ./src/generated/resources/.cache
28+
- name: Make sure that datagenned files in the repo are up-to-date
2829
run: |
29-
rm -f ~/.gradle/caches/modules-2/modules-2.lock
30-
rm -f ~/.gradle/caches/modules-2/gc.properties
31-
- name: Setup Gradle Wrapper Cache
32-
uses: actions/cache@v3
33-
with:
34-
path: ~/.gradle/wrapper
35-
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
36-
- name: Generate data
37-
run: ./gradlew runData --max-workers 1
30+
# Print status for easier debugging
31+
git status
32+
if [ -n "$(git status --porcelain)" ]; then exit 1; fi
3833
- name: Build
3934
run: ./gradlew build --max-workers 1
4035
- name: Upload artifacts

.github/workflows/publish.yml

-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ jobs:
2121
with:
2222
distribution: temurin
2323
java-version: 17
24-
- name: Generate data
25-
run: ./gradlew runData --max-workers 1
26-
env:
27-
MOD_VERSION: ${{ github.event.release.tag_name }}
2824
- name: Build
2925
run: ./gradlew build --max-workers 1
3026
env:

src/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
generated/
1+
generated/resources/.cache
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"variants": {
3+
"facing=down": {
4+
"model": "immeng:block/connector_me"
5+
},
6+
"facing=east": {
7+
"model": "immeng:block/connector_me",
8+
"x": 90,
9+
"y": 270
10+
},
11+
"facing=north": {
12+
"model": "immeng:block/connector_me",
13+
"x": 90,
14+
"y": 180
15+
},
16+
"facing=south": {
17+
"model": "immeng:block/connector_me",
18+
"x": 90
19+
},
20+
"facing=up": {
21+
"model": "immeng:block/connector_me",
22+
"x": 180
23+
},
24+
"facing=west": {
25+
"model": "immeng:block/connector_me",
26+
"x": 90,
27+
"y": 90
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"variants": {
3+
"facing=down": {
4+
"model": "immeng:block/connector_me_relay"
5+
},
6+
"facing=east": {
7+
"model": "immeng:block/connector_me_relay",
8+
"x": 90,
9+
"y": 270
10+
},
11+
"facing=north": {
12+
"model": "immeng:block/connector_me_relay",
13+
"x": 90,
14+
"y": 180
15+
},
16+
"facing=south": {
17+
"model": "immeng:block/connector_me_relay",
18+
"x": 90
19+
},
20+
"facing=up": {
21+
"model": "immeng:block/connector_me_relay",
22+
"x": 180
23+
},
24+
"facing=west": {
25+
"model": "immeng:block/connector_me_relay",
26+
"x": 90,
27+
"y": 90
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/generated",
3+
"textures": {
4+
"layer0": "immeng:item/wirecoil_me"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/generated",
3+
"textures": {
4+
"layer0": "immeng:item/wirecoil_me_dense"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_fluix": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:fluix_crystal"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "immeng:connector_me"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_the_recipe",
26+
"has_fluix"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"immeng:connector_me"
32+
]
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_fluix": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:fluix_crystal"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "immeng:connector_me_relay"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_the_recipe",
26+
"has_fluix"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"immeng:connector_me_relay"
32+
]
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_cable": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:fluix_glass_cable"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "immeng:wirecoil_me"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_the_recipe",
26+
"has_cable"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"immeng:wirecoil_me"
32+
]
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"has_cable": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:fluix_covered_dense_cable"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "immeng:wirecoil_me_dense"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_the_recipe",
26+
"has_cable"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"immeng:wirecoil_me_dense"
32+
]
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "immeng:connector_me"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "immeng:blocks/connector_me"
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "immeng:connector_me_relay"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "immeng:blocks/connector_me_relay"
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:crafting_shaped",
3+
"category": "misc",
4+
"key": {
5+
"F": {
6+
"item": "ae2:fluix_block"
7+
},
8+
"f": {
9+
"item": "ae2:fluix_crystal"
10+
}
11+
},
12+
"pattern": [
13+
" f ",
14+
"FfF",
15+
"FfF"
16+
],
17+
"result": {
18+
"count": 4,
19+
"item": "immeng:connector_me"
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"type": "minecraft:crafting_shaped",
3+
"category": "misc",
4+
"key": {
5+
"F": {
6+
"item": "ae2:fluix_block"
7+
},
8+
"f": {
9+
"item": "ae2:fluix_crystal"
10+
}
11+
},
12+
"pattern": [
13+
" f ",
14+
"FfF"
15+
],
16+
"result": {
17+
"count": 8,
18+
"item": "immeng:connector_me_relay"
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:crafting_shaped",
3+
"category": "misc",
4+
"key": {
5+
"c": {
6+
"item": "ae2:fluix_glass_cable"
7+
},
8+
"s": {
9+
"tag": "forge:rods/wooden"
10+
}
11+
},
12+
"pattern": [
13+
" c ",
14+
"csc",
15+
" c "
16+
],
17+
"result": {
18+
"count": 4,
19+
"item": "immeng:wirecoil_me"
20+
}
21+
}

0 commit comments

Comments
 (0)