Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cfa7110bde | |||
| 99d16627ea | |||
| 2a7532be2b | |||
| b441a39323 |
14 changed files with 59 additions and 56 deletions
11
README.md
11
README.md
|
|
@ -1,6 +1,15 @@
|
|||
# Hard Boiled
|
||||
|
||||
This Minecraft Fabric mod allows cooking egg into hard-boiled egg, using
|
||||
This Minecraft 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.20.1
|
||||
- 1.21.1
|
||||
|
|
|
|||
20
build.gradle
20
build.gradle
|
|
@ -1,5 +1,5 @@
|
|||
plugins {
|
||||
id 'net.fabricmc.fabric-loom-remap' version "${loom_version}"
|
||||
id 'fabric-loom' version '1.7-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
|
@ -25,20 +25,20 @@ 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_api_version}"
|
||||
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": inputs.properties.version
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
java {
|
||||
|
|
@ -47,15 +47,13 @@ java {
|
|||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
jar {
|
||||
inputs.property "archivesName", project.base.archivesName
|
||||
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${inputs.properties.archivesName}"}
|
||||
rename { "${it}_${project.base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -75,4 +73,4 @@ publishing {
|
|||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,20 +2,16 @@
|
|||
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.11
|
||||
yarn_mappings=1.21.11+build.4
|
||||
loader_version=0.18.4
|
||||
loom_version=1.15-SNAPSHOT
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.10
|
||||
loader_version=0.16.5
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.0.5
|
||||
mod_version=1.0.2
|
||||
maven_group=net.chaoticbyte.hardboiled
|
||||
archives_base_name=hardboiled
|
||||
|
||||
# Dependencies
|
||||
fabric_api_version=0.141.3+1.21.11
|
||||
fabric_version=0.92.2+1.20.1
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
12
gradlew
vendored
12
gradlew
vendored
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 the original authors.
|
||||
# Copyright © 2015-2021 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,7 +86,8 @@ 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\n' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
|
@ -114,6 +115,7 @@ 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.
|
||||
|
|
@ -171,6 +173,7 @@ 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" )
|
||||
|
||||
|
|
@ -203,14 +206,15 @@ fi
|
|||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_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" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
|
|
|||
3
gradlew.bat
vendored
3
gradlew.bat
vendored
|
|
@ -70,10 +70,11 @@ 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%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
package net.chaoticbyte.hardboiled;
|
||||
|
||||
import net.minecraft.component.type.FoodComponent;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class HardBoiledItems {
|
||||
// default food component
|
||||
public static final FoodComponent foodComponent = new FoodComponent.Builder()
|
||||
.nutrition(3)
|
||||
.hunger(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);
|
||||
return Items.register(regKey, Item::new, settings);
|
||||
Identifier itemId = Identifier.of(HardBoiled.MOD_ID, id);
|
||||
Item item = new Item(settings);
|
||||
return Registry.register(Registries.ITEM, itemId, item);
|
||||
}
|
||||
// dummy init method
|
||||
public static void init() {}
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "hardboiled:item/hardboiled_egg"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "hardboiled:item/hardboiled_egg"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"type": "minecraft:smelting",
|
||||
"ingredient": "minecraft:egg",
|
||||
"result": {
|
||||
"id": "hardboiled:hardboiled_egg"
|
||||
},
|
||||
"experience": 0.25,
|
||||
"cookingtime": 200
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"type": "minecraft:campfire_cooking",
|
||||
"ingredient": "minecraft:egg",
|
||||
"result": {
|
||||
"id": "hardboiled:hardboiled_egg"
|
||||
"ingredient": {
|
||||
"item": "minecraft:egg"
|
||||
},
|
||||
"result": "hardboiled:hardboiled_egg",
|
||||
"experience": 0.25,
|
||||
"cookingtime": 200
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"type": "minecraft:smelting",
|
||||
"ingredient": {
|
||||
"item": "minecraft:egg"
|
||||
},
|
||||
"result": "hardboiled:hardboiled_egg",
|
||||
"experience": 0.25,
|
||||
"cookingtime": 200
|
||||
}
|
||||
|
|
@ -21,9 +21,9 @@
|
|||
},
|
||||
"mixins": [],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.18.4",
|
||||
"minecraft": "1.21.11",
|
||||
"java": ">=21",
|
||||
"fabricloader": ">=0.16.0",
|
||||
"minecraft": "1.20.1",
|
||||
"java": ">=17",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
"suggests": {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue