Skip to content

Commit

Permalink
Add datagenned files and update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Mar 25, 2024
1 parent be0c251 commit 11b9275
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 21 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,19 @@ jobs:
with:
distribution: temurin
java-version: 17
- name: Use Gradle cache for faster builds
uses: actions/cache@v3
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Generate assets
run: ./gradlew runData
- name: Check that datagen ran
run: test -d ./src/generated/resources/.cache
- name: Make sure that datagenned files in the repo are up-to-date
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Generate data
run: ./gradlew runData --max-workers 1
# Print status for easier debugging
git status
if [ -n "$(git status --porcelain)" ]; then exit 1; fi
- name: Build
run: ./gradlew build --max-workers 1
- name: Upload artifacts
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
with:
distribution: temurin
java-version: 17
- name: Generate data
run: ./gradlew runData --max-workers 1
env:
MOD_VERSION: ${{ github.event.release.tag_name }}
- name: Build
run: ./gradlew build --max-workers 1
env:
Expand Down
2 changes: 1 addition & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
generated/
generated/resources/.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variants": {
"facing=down": {
"model": "immeng:block/connector_me"
},
"facing=east": {
"model": "immeng:block/connector_me",
"x": 90,
"y": 270
},
"facing=north": {
"model": "immeng:block/connector_me",
"x": 90,
"y": 180
},
"facing=south": {
"model": "immeng:block/connector_me",
"x": 90
},
"facing=up": {
"model": "immeng:block/connector_me",
"x": 180
},
"facing=west": {
"model": "immeng:block/connector_me",
"x": 90,
"y": 90
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"variants": {
"facing=down": {
"model": "immeng:block/connector_me_relay"
},
"facing=east": {
"model": "immeng:block/connector_me_relay",
"x": 90,
"y": 270
},
"facing=north": {
"model": "immeng:block/connector_me_relay",
"x": 90,
"y": 180
},
"facing=south": {
"model": "immeng:block/connector_me_relay",
"x": 90
},
"facing=up": {
"model": "immeng:block/connector_me_relay",
"x": 180
},
"facing=west": {
"model": "immeng:block/connector_me_relay",
"x": 90,
"y": 90
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "immeng:item/wirecoil_me"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "immeng:item/wirecoil_me_dense"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_fluix": {
"conditions": {
"items": [
{
"items": [
"ae2:fluix_crystal"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "immeng:connector_me"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_fluix"
]
],
"rewards": {
"recipes": [
"immeng:connector_me"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_fluix": {
"conditions": {
"items": [
{
"items": [
"ae2:fluix_crystal"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "immeng:connector_me_relay"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_fluix"
]
],
"rewards": {
"recipes": [
"immeng:connector_me_relay"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_cable": {
"conditions": {
"items": [
{
"items": [
"ae2:fluix_glass_cable"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "immeng:wirecoil_me"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_cable"
]
],
"rewards": {
"recipes": [
"immeng:wirecoil_me"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_cable": {
"conditions": {
"items": [
{
"items": [
"ae2:fluix_covered_dense_cable"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "immeng:wirecoil_me_dense"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_cable"
]
],
"rewards": {
"recipes": [
"immeng:wirecoil_me_dense"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "immeng:connector_me"
}
],
"rolls": 1.0
}
],
"random_sequence": "immeng:blocks/connector_me"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "immeng:connector_me_relay"
}
],
"rolls": 1.0
}
],
"random_sequence": "immeng:blocks/connector_me_relay"
}
21 changes: 21 additions & 0 deletions src/generated/resources/data/immeng/recipes/connector_me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"F": {
"item": "ae2:fluix_block"
},
"f": {
"item": "ae2:fluix_crystal"
}
},
"pattern": [
" f ",
"FfF",
"FfF"
],
"result": {
"count": 4,
"item": "immeng:connector_me"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"F": {
"item": "ae2:fluix_block"
},
"f": {
"item": "ae2:fluix_crystal"
}
},
"pattern": [
" f ",
"FfF"
],
"result": {
"count": 8,
"item": "immeng:connector_me_relay"
}
}
21 changes: 21 additions & 0 deletions src/generated/resources/data/immeng/recipes/wirecoil_me.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"c": {
"item": "ae2:fluix_glass_cable"
},
"s": {
"tag": "forge:rods/wooden"
}
},
"pattern": [
" c ",
"csc",
" c "
],
"result": {
"count": 4,
"item": "immeng:wirecoil_me"
}
}
Loading

0 comments on commit 11b9275

Please sign in to comment.