Skip to content

Commit

Permalink
Updated code and dependencies for minecraft 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoticByte committed Nov 1, 2024
1 parent c97416d commit 5df8395
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 29 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +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.20.1
- 1.21.1
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ org.gradle.parallel=true

# 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.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.9

# Mod Properties
mod_version=1.0.1
mod_version=1.0.3
maven_group=net.chaoticbyte.hardboiled
archives_base_name=hardboiled

# Dependencies
fabric_version=0.104.0+1.21.1
fabric_version=0.107.0+1.21.3
11 changes: 5 additions & 6 deletions src/main/java/net/chaoticbyte/hardboiled/HardBoiledItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@

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() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"type": "minecraft:campfire_cooking",
"ingredient": {
"item": "minecraft:egg"
},
"ingredient": "minecraft:egg",
"result": {
"id": "hardboiled:hardboiled_egg"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"type": "minecraft:smelting",
"ingredient": {
"item": "minecraft:egg"
},
"ingredient": "minecraft:egg",
"result": {
"id": "hardboiled:hardboiled_egg"
},
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
},
"mixins": [],
"depends": {
"fabricloader": ">=0.16.5",
"minecraft": "~1.21.1",
"fabricloader": ">=0.16.9",
"minecraft": "1.21.3",
"java": ">=21",
"fabric-api": "*"
},
Expand Down

0 comments on commit 5df8395

Please sign in to comment.