Add project files
This commit is contained in:
commit
101c580e6e
20 changed files with 630 additions and 0 deletions
16
src/main/java/net/chaoticbyte/hardboiled/HardBoiled.java
Normal file
16
src/main/java/net/chaoticbyte/hardboiled/HardBoiled.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
package net.chaoticbyte.hardboiled;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HardBoiled implements ModInitializer {
|
||||
public static final String MOD_ID = "hardboiled";
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
HardBoiledItems.init();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
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.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) {
|
||||
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);
|
||||
}
|
||||
// dummy init method
|
||||
public static void init() {}
|
||||
// items
|
||||
public static final Item HARDBOILED_EGG = register("hardboiled_egg");
|
||||
}
|
BIN
src/main/resources/assets/hardboiled/icon.png
Normal file
BIN
src/main/resources/assets/hardboiled/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
3
src/main/resources/assets/hardboiled/lang/en_us.json
Normal file
3
src/main/resources/assets/hardboiled/lang/en_us.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"item.hardboiled.hardboiled_egg": "Hard-boiled Egg"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "hardboiled:item/hardboiled_egg"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 272 B |
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "minecraft:campfire_cooking",
|
||||
"ingredient": {
|
||||
"item": "minecraft:egg"
|
||||
},
|
||||
"result": {
|
||||
"id": "hardboiled:hardboiled_egg"
|
||||
},
|
||||
"experience": 0.25,
|
||||
"cookingtime": 200
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "minecraft:smelting",
|
||||
"ingredient": {
|
||||
"item": "minecraft:egg"
|
||||
},
|
||||
"result": {
|
||||
"id": "hardboiled:hardboiled_egg"
|
||||
},
|
||||
"experience": 0.25,
|
||||
"cookingtime": 200
|
||||
}
|
31
src/main/resources/fabric.mod.json
Normal file
31
src/main/resources/fabric.mod.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "hardboiled",
|
||||
"version": "${version}",
|
||||
"name": "Hard Boiled",
|
||||
"description": "Do something with your eggs. Boil them.",
|
||||
"authors": [
|
||||
"ChaoticByte"
|
||||
],
|
||||
"contact": {
|
||||
"sources": "https://github.com/ChaoticByte/hardboiled"
|
||||
},
|
||||
"license": "MIT",
|
||||
"icon": "assets/hardboiled/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"net.chaoticbyte.hardboiled.HardBoiled"
|
||||
]
|
||||
},
|
||||
"mixins": [],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.5",
|
||||
"minecraft": "~1.21.1",
|
||||
"java": ">=21",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
"suggests": {
|
||||
"another-mod": "*"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue