Skip to content

Commit

Permalink
Adjust gradle.yml
Browse files Browse the repository at this point in the history
Add stonecutting recipes for various blocks: quartz crete, smooth quartz crete, glass.
  • Loading branch information
AluTheCrow committed Jan 10, 2024
1 parent 0832dc9 commit bb31c48
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 137 deletions.
66 changes: 29 additions & 37 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
- '**.md'
- '.gitignore'
- 'LICENSE'
pull_request:
paths-ignore:
- '.github/**'
- '**.md'
- '.gitignore'
- 'LICENSE'

jobs:
build:

runs-on: ubuntu-latest
branches: [ "main" ]

jobs:
gradle:
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: build/libs
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Execute Gradle build
run: ./gradlew build
- name: 'MC Publish'
uses: Kir-Antipov/[email protected]
with:
modrinth-id: McLbj2dz
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: true
curseforge-id: 960132
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
github-generate-changelog: true
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ dependencies {
}

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}+1.20.1"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}+1.20.1"
modApi ("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}") {
exclude(group: 'net.fabricmc.fabric.fabric-api')
}
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/theomenden/prefabricated/ModRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@
import com.theomenden.prefabricated.structures.items.*;
import com.theomenden.prefabricated.structures.messages.StructureTagMessage;
import lombok.Getter;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.Resource;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.LazyLoadedValue;
import net.minecraft.world.item.*;
Expand All @@ -43,8 +36,6 @@
import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Supplier;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ public static class Serializer implements RecipeSerializer<ConditionedSmeltingRe
Ingredient ingredient = Ingredient.fromJson((JsonElement)jsonElement);
String string2 = GsonHelper.getAsString(jsonObject, "result");
ResourceLocation identifier2 = new ResourceLocation(string2);
ItemStack itemStack = new ItemStack(BuiltInRegistries.ITEM.getOptional(identifier2).orElseThrow(() -> {
return new IllegalStateException("Item: " + string2 + " does not exist");
}));
ItemStack itemStack = new ItemStack(BuiltInRegistries.ITEM.getOptional(identifier2).orElseThrow(() -> new IllegalStateException("Item: " + string2 + " does not exist")));

itemStack = this.validateRecipeOutput(itemStack, configName);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "prefabricated:condition_crafting_shaped",
"config": "Glass Recipes",
"group": "Glass Recipes",
"pattern": [
"#",
"#"
],
"key": {
"#": {
"item": "prefabricated:block_glass_slab"
}
},
"result": {
"item": "minecraft:glass",
"count": 1
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:glass"
},
"result": "prefabricated:block_glass_slab",
"count": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:glass"
},
"result": "prefabricated:block_glass_stairs",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "prefabricated:condition_crafting_shaped",
"config": "Glass Recipes",
"group": "Glass Recipes",
"pattern": [
"##",
"##"
],
"key": {
"#": {
"item": "minecraft:glass_pane"
}
},
"result": {
"item": "prefabricated:block_glass_slab",
"count": 1
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_bricks",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_pillar",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_slab",
"count": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_smooth_slab",
"count": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_smooth_stairs",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_smooth",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_smooth_wall",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_stairs",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete"
},
"result": "prefabricated:block_quartz_crete_wall",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete_smooth"
},
"result": "prefabricated:block_quartz_crete_smooth_slab",
"count": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete_smooth"
},
"result": "prefabricated:block_quartz_crete_smooth_stairs",
"count": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "prefabricated:block_quartz_crete_smooth"
},
"result": "prefabricated:block_quartz_crete_smooth_wall",
"count": 1
}

0 comments on commit bb31c48

Please sign in to comment.