Skip to content

Commit

Permalink
Updated codebase to fabric 0.97.1+1.20.4
Browse files Browse the repository at this point in the history
- changes reflect those introduced in fabric 0.97.1+1.20.4
  • Loading branch information
Sephta committed Jun 21, 2024
1 parent 04bc456 commit 296cc62
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 30 deletions.
39 changes: 16 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'

}

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand All @@ -17,29 +20,19 @@ repositories {
}

loom {
runs {
// This adds a new gradle task that runs the datagen API: "gradlew runDatagen"
datagenClient {
inherit client
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.modid=${modid}"

runDir "build/datagen"
}
}
splitEnvironmentSourceSets()

mods {
"template-mod" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}

}

// Add the generated resources to the main source set
sourceSets {
main {
resources {
srcDirs += [
'src/main/generated'
]
}
}
fabricApi {
configureDataGeneration()
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.3
yarn_mappings=1.20.3+build.1
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.11

# Mod Properties
Expand All @@ -15,4 +15,4 @@ archives_base_name=stal-alloys
modid=stal-alloys

# Dependencies
fabric_version=0.91.1+1.20.3
fabric_version=0.97.1+1.20.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.stal.alloys.block.entity;

import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
Expand All @@ -20,7 +19,7 @@ public static void registerModBlockEntities() {
StalAlloys.MOD_ID,
"alloy_smelter"
),
FabricBlockEntityTypeBuilder.create(AlloySmelterEntity::new, StalAlloysBlocks.ALLOY_SMELTER).build(null)
BlockEntityType.Builder.create(AlloySmelterEntity::new, StalAlloysBlocks.ALLOY_SMELTER).build(null)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static class Serializer implements RecipeSerializer<AlloySmelterRecipe> {
public static final String ID = "alloy_smelter"; // name given in the json file

public static final Codec<AlloySmelterRecipe> CODEC = RecordCodecBuilder.create(in -> in.group(
ItemStack.INGREDIENT_ENTRY_CODEC.fieldOf(AlloySmelterRecipeAttributes.RESULT.value).forGetter(r -> r.mOutput),
ItemStack.RECIPE_RESULT_CODEC.fieldOf(AlloySmelterRecipeAttributes.RESULT.value).forGetter(r -> r.mOutput),
validateAmount(Ingredient.DISALLOW_EMPTY_CODEC, mNumberOfInputs).fieldOf(AlloySmelterRecipeAttributes.INGREDIENTS.value).forGetter(AlloySmelterRecipe::getIngredients),
Codecs.NONNEGATIVE_INT.fieldOf(AlloySmelterRecipeAttributes.COOKINGTIME.value).forGetter(AlloySmelterRecipe::getCookingTime),
Codecs.NONNEGATIVE_INT.fieldOf(AlloySmelterRecipeAttributes.EXPERIENCE.value).forGetter(AlloySmelterRecipe::getExperience)
Expand Down

0 comments on commit 296cc62

Please sign in to comment.