Compare commits

...
Sign in to create a new pull request.

5 commits

13 changed files with 41 additions and 49 deletions

View file

@ -1,14 +1,6 @@
# Hard Boiled
This Minecraft mod allows cooking egg into hard-boiled egg, using
This Minecraft Fabric mod allows cooking egg into hard-boiled egg, using
- a campfire
- a furnace
## Supported Minecraft Versions / Mod Loaders
This is a Fabric-only mod.
The following Minecraft versions are supported:
- 1.21.1

View file

@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'net.fabricmc.fabric-loom-remap' version "${loom_version}"
id 'maven-publish'
}
@ -25,15 +25,15 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": inputs.properties.version
}
}
@ -52,8 +52,10 @@ java {
}
jar {
inputs.property "archivesName", project.base.archivesName
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
rename { "${it}_${inputs.properties.archivesName}"}
}
}
@ -73,4 +75,4 @@ publishing {
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}

View file

@ -2,16 +2,20 @@
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
org.gradle.configuration-cache=false
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.5
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.4
loader_version=0.18.4
loom_version=1.15-SNAPSHOT
# Mod Properties
mod_version=1.0.0
mod_version=1.0.5
maven_group=net.chaoticbyte.hardboiled
archives_base_name=hardboiled
# Dependencies
fabric_version=0.104.0+1.21.1
fabric_api_version=0.141.3+1.21.11

Binary file not shown.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

12
gradlew vendored
View file

@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -115,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@ -173,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@ -206,15 +203,14 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

3
gradlew.bat vendored
View file

@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell

View file

@ -2,22 +2,21 @@ package net.chaoticbyte.hardboiled;
import net.minecraft.component.type.FoodComponent;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.item.Items;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;
public class HardBoiledItems {
// default food component
public static final FoodComponent foodComponent = new FoodComponent.Builder()
.nutrition(3)
.snack()
.build();
// register item
public static Item register(String id) {
final RegistryKey<Item> regKey = RegistryKey.of(RegistryKeys.ITEM, Identifier.of(HardBoiled.MOD_ID, id));
Item.Settings settings = new Item.Settings().food(foodComponent);
Identifier itemId = Identifier.of(HardBoiled.MOD_ID, id);
Item item = new Item(settings);
return Registry.register(Registries.ITEM, itemId, item);
return Items.register(regKey, Item::new, settings);
}
// dummy init method
public static void init() {}

View file

@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "hardboiled:item/hardboiled_egg"
}
}

View file

@ -1,5 +1,5 @@
{
"parent": "item/generated",
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hardboiled:item/hardboiled_egg"
}

View file

@ -1,8 +1,6 @@
{
"type": "minecraft:campfire_cooking",
"ingredient": {
"item": "minecraft:egg"
},
"ingredient": "minecraft:egg",
"result": {
"id": "hardboiled:hardboiled_egg"
},

View file

@ -1,8 +1,6 @@
{
"type": "minecraft:smelting",
"ingredient": {
"item": "minecraft:egg"
},
"ingredient": "minecraft:egg",
"result": {
"id": "hardboiled:hardboiled_egg"
},

View file

@ -21,12 +21,10 @@
},
"mixins": [],
"depends": {
"fabricloader": ">=0.16.5",
"minecraft": "~1.21.1",
"fabricloader": ">=0.18.4",
"minecraft": "1.21.11",
"java": ">=21",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"
}
"suggests": {}
}