summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-01-05 22:18:56 +0100
committerGravatar Uko Kokņevičs2024-01-05 22:18:56 +0100
commit9445749ede3c61d3db9324184971b319b4a8bd1d (patch)
tree22b1b6b2c337756fe6d0b97effbca60fb8a8c961 /src
downloadmc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.tar.gz
mc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.tar.xz
mc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.zip
Initial Commit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java167
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/ErisAlchemy.java68
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/mixin/ItemMixin.java21
-rw-r--r--src/main/resources/assets/eris_alchemy/icon.pngbin0 -> 391 bytes
-rw-r--r--src/main/resources/assets/eris_alchemy/lang/en_us.json11
-rw-r--r--src/main/resources/assets/eris_alchemy/models/item/high_covalence_dust.json6
-rw-r--r--src/main/resources/assets/eris_alchemy/models/item/low_covalence_dust.json6
-rw-r--r--src/main/resources/assets/eris_alchemy/models/item/medium_covalence_dust.json6
-rw-r--r--src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/categories/root.json5
-rw-r--r--src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/covalence_dusts.json32
-rw-r--r--src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/guide_book.json15
-rw-r--r--src/main/resources/assets/eris_alchemy/textures/item/high_covalence_dust.pngbin0 -> 302 bytes
-rw-r--r--src/main/resources/assets/eris_alchemy/textures/item/low_covalence_dust.pngbin0 -> 302 bytes
-rw-r--r--src/main/resources/assets/eris_alchemy/textures/item/medium_covalence_dust.pngbin0 -> 321 bytes
-rw-r--r--src/main/resources/data/c/tags/items/leathers.json11
-rw-r--r--src/main/resources/data/eris_alchemy/advancements/grant_guide_on_first_join.json12
-rw-r--r--src/main/resources/data/eris_alchemy/loot_tables/grant_guide_on_first_join.json14
-rw-r--r--src/main/resources/data/eris_alchemy/patchouli_books/guide_book/book.json11
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/guide_book.json9
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/high_covalence_dust.json12
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/high_covalence_repair.json12
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/low_covalence_dust.json26
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/low_covalence_repair.json20
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/medium_covalence_dust.json12
-rw-r--r--src/main/resources/data/eris_alchemy/recipes/medium_covalence_repair.json26
-rw-r--r--src/main/resources/eris_alchemy.mixins.json13
-rw-r--r--src/main/resources/quilt.mod.json36
27 files changed, 551 insertions, 0 deletions
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java b/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java
new file mode 100644
index 0000000..2e9da77
--- /dev/null
+++ b/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java
@@ -0,0 +1,167 @@
1package lv.enes.mc.eris_alchemy;
2
3import com.google.gson.Gson;
4import com.google.gson.JsonElement;
5import com.google.gson.JsonObject;
6import com.google.gson.JsonSyntaxException;
7import net.minecraft.core.RegistryAccess;
8import net.minecraft.network.FriendlyByteBuf;
9import net.minecraft.resources.ResourceLocation;
10import net.minecraft.world.inventory.CraftingContainer;
11import net.minecraft.world.item.ItemStack;
12import net.minecraft.world.item.crafting.CraftingBookCategory;
13import net.minecraft.world.item.crafting.CustomRecipe;
14import net.minecraft.world.item.crafting.Ingredient;
15import net.minecraft.world.item.crafting.RecipeSerializer;
16import net.minecraft.world.level.Level;
17import org.quiltmc.qsl.recipe.api.serializer.QuiltRecipeSerializer;
18
19import java.util.ArrayList;
20import java.util.Arrays;
21
22public class CovalenceRepair extends CustomRecipe {
23 static class Serializer implements QuiltRecipeSerializer<CovalenceRepair> {
24 private static class Json {
25 CraftingBookCategory category = CraftingBookCategory.MISC;
26 JsonElement dust;
27 JsonElement materials = new JsonObject();
28 JsonElement tools = new JsonObject();
29 }
30
31 private Serializer() {}
32
33 public static final Serializer INSTANCE = new Serializer();
34 public static final ResourceLocation ID = new ResourceLocation(ErisAlchemy.ID, "covalence_repair");
35
36 @Override
37 public JsonObject toJson(CovalenceRepair recipe) {
38 var res = new JsonObject();
39 res.addProperty("category", recipe.category().toString());
40 res.add("dust", recipe.dust.toJson());
41 res.add("materials", recipe.materials.toJson());
42 res.add("tools", recipe.tools.toJson());
43 return res;
44 }
45
46 @Override
47 public CovalenceRepair fromJson(ResourceLocation id, JsonObject json) {
48 var recipeJson = new Gson().fromJson(json, Json.class);
49 if (recipeJson.dust == null) {
50 throw new JsonSyntaxException("A required attribute is missing");
51 }
52
53 var dust = Ingredient.fromJson(recipeJson.dust);
54 var materials = Ingredient.fromJson(recipeJson.materials);
55 var tools = Ingredient.fromJson(recipeJson.tools);
56
57 return new CovalenceRepair(id, recipeJson.category, dust, materials, tools);
58 }
59
60 @Override
61 public void toNetwork(FriendlyByteBuf buf, CovalenceRepair recipe) {
62 buf.writeEnum(recipe.category());
63 recipe.dust.toNetwork(buf);
64 recipe.materials.toNetwork(buf);
65 recipe.tools.toNetwork(buf);
66 }
67
68 @Override
69 public CovalenceRepair fromNetwork(ResourceLocation id, FriendlyByteBuf buf) {
70 var category = buf.readEnum(CraftingBookCategory.class);
71 var dust = Ingredient.fromNetwork(buf);
72 var materials = Ingredient.fromNetwork(buf);
73 var tools = Ingredient.fromNetwork(buf);
74 return new CovalenceRepair(id, category, dust, materials, tools);
75 }
76 }
77
78 private record Inputs(ItemStack toolStack, int dustCount) {}
79
80 private final static int DUSTS_TO_FIX = 8;
81
82 /** What dust do we use to repair. */
83 private final Ingredient dust;
84 /** What materials this dust can repair. */
85 private final Ingredient materials;
86 /** What tools can this dust repair. */
87 private final Ingredient tools;
88
89 public CovalenceRepair(ResourceLocation id, CraftingBookCategory category, Ingredient dust, Ingredient materials, Ingredient tools) {
90 super(id, category);
91
92 this.dust = dust;
93 this.materials = materials;
94 this.tools = tools;
95 }
96
97 @Override
98 public boolean canCraftInDimensions(int width, int height) {
99 return width * height > 2;
100 }
101
102 @Override
103 public boolean matches(CraftingContainer inventory, Level world) {
104 return getInputs(inventory) != null;
105 }
106
107 @Override
108 public ItemStack assemble(CraftingContainer inventory, RegistryAccess registryManager) {
109 var inputs = getInputs(inventory);
110 if (inputs == null) {
111 return ItemStack.EMPTY;
112 }
113
114 var newToolStack = inputs.toolStack.copy();
115 var repairedAmount = inputs.toolStack.getItem().getMaxDamage() * inputs.dustCount / DUSTS_TO_FIX;
116 newToolStack.setDamageValue(inputs.toolStack.getDamageValue() - repairedAmount);
117 return newToolStack;
118 }
119
120 @Override
121 public RecipeSerializer<?> getSerializer() {
122 return Serializer.INSTANCE;
123 }
124
125 private boolean isTool(ItemStack stack) {
126 if (!stack.isDamageableItem() || !stack.isDamaged() || stack.getCount() != 1) {
127 return false;
128 }
129
130 if (tools.test(stack)) {
131 return true;
132 }
133
134 var item = stack.getItem();
135 return Arrays.stream(materials.getItems()).anyMatch(material -> item.isValidRepairItem(stack, material));
136 }
137
138 private boolean isDust(ItemStack stack) {
139 return dust.test(stack);
140 }
141
142 /** @return null if recipe isn't correct. */
143 private Inputs getInputs(CraftingContainer inventory) {
144 ItemStack toolStack = null;
145 var dustStacks = new ArrayList<ItemStack>();
146 for (var i = 0; i < inventory.getContainerSize(); i++) {
147 var stack = inventory.getItem(i);
148 if (stack.isEmpty()) {
149 continue;
150 }
151
152 if (isDust(stack) && (dustStacks.isEmpty() || ItemStack.isSameItemSameTags(dustStacks.get(0), stack))) {
153 dustStacks.add(stack);
154 } else if (toolStack == null) {
155 toolStack = stack;
156 } else {
157 return null;
158 }
159 }
160
161 if (toolStack == null || dustStacks.isEmpty() || !isTool(toolStack)) {
162 return null;
163 }
164
165 return new Inputs(toolStack, dustStacks.size());
166 }
167}
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/ErisAlchemy.java b/src/main/java/lv/enes/mc/eris_alchemy/ErisAlchemy.java
new file mode 100644
index 0000000..34e6b09
--- /dev/null
+++ b/src/main/java/lv/enes/mc/eris_alchemy/ErisAlchemy.java
@@ -0,0 +1,68 @@
1package lv.enes.mc.eris_alchemy;
2
3import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
4import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
5import net.minecraft.core.Registry;
6import net.minecraft.core.registries.BuiltInRegistries;
7import net.minecraft.core.registries.Registries;
8import net.minecraft.network.chat.Component;
9import net.minecraft.resources.ResourceLocation;
10import net.minecraft.world.item.CreativeModeTab;
11import net.minecraft.world.item.CreativeModeTabs;
12import net.minecraft.world.item.Item;
13import net.minecraft.world.item.ItemStack;
14import org.quiltmc.loader.api.ModContainer;
15import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
16import org.quiltmc.qsl.item.setting.api.QuiltItemSettings;
17import org.slf4j.Logger;
18import org.slf4j.LoggerFactory;
19
20public class ErisAlchemy implements ModInitializer {
21 public static final String ID = "eris_alchemy";
22 public static final Logger LOGGER = LoggerFactory.getLogger(ID);
23
24 // Aside from crafting recipe inputs, covalence dusts can be used to repair equipment via shapeless crafting
25 // Low covalence dust:
26 // - wooden and stone tools
27 // - leather armour
28 // - fishing rods
29 // - wooden bows
30 // - turtle shells
31 // Medium covalence dust:
32 // - iron, gold, bronze, ruby, sapphire, and green sapphire tools and armour
33 // - flints & steels
34 // - shears
35 // - elytras
36 // High covalence dust:
37 // - diamond and netherite tools and armour
38 // 8 dusts are enough to repair 100% :3
39 public static final Item LOW_COVALENCE_DUST = new Item(new QuiltItemSettings());
40 public static final Item MEDIUM_COVALENCE_DUST = new Item(new QuiltItemSettings());
41 public static final Item HIGH_COVALENCE_DUST = new Item(new QuiltItemSettings());
42
43 public static final CreativeModeTab ITEM_GROUP = FabricItemGroup.builder()
44 .icon(() -> new ItemStack(LOW_COVALENCE_DUST))
45 .title(Component.translatable("itemGroup.eris_alchemy.item_group"))
46 .displayItems((context, entries) -> {
47 entries.accept(LOW_COVALENCE_DUST);
48 entries.accept(MEDIUM_COVALENCE_DUST);
49 entries.accept(HIGH_COVALENCE_DUST);
50 })
51 .build();
52
53 @Override
54 public void onInitialize(ModContainer mod) {
55 LOGGER.info("Hello World from {}!", mod.metadata().name());
56 if (!mod.metadata().id().equals(ID)) {
57 throw new RuntimeException("Hardcoded mod ID doesn't match the configured one!");
58 }
59
60 Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, new ResourceLocation(ID, "item_group"), ITEM_GROUP);
61
62 Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(ID, "low_covalence_dust"), LOW_COVALENCE_DUST);
63 Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(ID, "medium_covalence_dust"), MEDIUM_COVALENCE_DUST);
64 Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(ID, "high_covalence_dust"), HIGH_COVALENCE_DUST);
65
66 Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, CovalenceRepair.Serializer.ID, CovalenceRepair.Serializer.INSTANCE);
67 }
68}
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/mixin/ItemMixin.java b/src/main/java/lv/enes/mc/eris_alchemy/mixin/ItemMixin.java
new file mode 100644
index 0000000..54a2fd0
--- /dev/null
+++ b/src/main/java/lv/enes/mc/eris_alchemy/mixin/ItemMixin.java
@@ -0,0 +1,21 @@
1package lv.enes.mc.eris_alchemy.mixin;
2
3import net.minecraft.network.chat.Component;
4import net.minecraft.world.item.Item;
5import net.minecraft.world.item.ItemStack;
6import net.minecraft.world.item.TooltipFlag;
7import net.minecraft.world.level.Level;
8import org.spongepowered.asm.mixin.Mixin;
9import org.spongepowered.asm.mixin.injection.At;
10import org.spongepowered.asm.mixin.injection.Inject;
11import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12
13import java.util.List;
14
15@Mixin(Item.class)
16public class ItemMixin {
17 @Inject(method = "appendHoverText", at = @At("RETURN"))
18 public void onAppendHoverText(ItemStack stack, Level world, List<Component> tooltip, TooltipFlag context, CallbackInfo ci) {
19 tooltip.add(Component.literal("EMC ???"));
20 }
21}
diff --git a/src/main/resources/assets/eris_alchemy/icon.png b/src/main/resources/assets/eris_alchemy/icon.png
new file mode 100644
index 0000000..09015e4
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/icon.png
Binary files differ
diff --git a/src/main/resources/assets/eris_alchemy/lang/en_us.json b/src/main/resources/assets/eris_alchemy/lang/en_us.json
new file mode 100644
index 0000000..c001018
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/lang/en_us.json
@@ -0,0 +1,11 @@
1{
2 "book.eris_alchemy.title": "Eris Alchemy",
3 "book.eris_alchemy.subtitle": "the Official Guide",
4 "book.eris_alchemy.landing_text": "Welcome to Alchemy!",
5
6 "item.eris_alchemy.low_covalence_dust": "Low Covalence Dust",
7 "item.eris_alchemy.medium_covalence_dust": "Medium Covalence Dust",
8 "item.eris_alchemy.high_covalence_dust": "High Covalence Dust",
9
10 "itemGroup.eris_alchemy.item_group": "Eris Alchemy"
11} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/models/item/high_covalence_dust.json b/src/main/resources/assets/eris_alchemy/models/item/high_covalence_dust.json
new file mode 100644
index 0000000..9eaa71b
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/models/item/high_covalence_dust.json
@@ -0,0 +1,6 @@
1{
2 "parent": "item/generated",
3 "textures": {
4 "layer0": "eris_alchemy:item/high_covalence_dust"
5 }
6} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/models/item/low_covalence_dust.json b/src/main/resources/assets/eris_alchemy/models/item/low_covalence_dust.json
new file mode 100644
index 0000000..2fc6a71
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/models/item/low_covalence_dust.json
@@ -0,0 +1,6 @@
1{
2 "parent": "item/generated",
3 "textures": {
4 "layer0": "eris_alchemy:item/low_covalence_dust"
5 }
6} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/models/item/medium_covalence_dust.json b/src/main/resources/assets/eris_alchemy/models/item/medium_covalence_dust.json
new file mode 100644
index 0000000..aa4823c
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/models/item/medium_covalence_dust.json
@@ -0,0 +1,6 @@
1{
2 "parent": "item/generated",
3 "textures": {
4 "layer0": "eris_alchemy:item/medium_covalence_dust"
5 }
6} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/categories/root.json b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/categories/root.json
new file mode 100644
index 0000000..0320cae
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/categories/root.json
@@ -0,0 +1,5 @@
1{
2 "name": "book.eris_alchemy.title",
3 "description": "book.eris_alchemy.title",
4 "icon": "minecraft:writable_book"
5} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/covalence_dusts.json b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/covalence_dusts.json
new file mode 100644
index 0000000..09c10ca
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/covalence_dusts.json
@@ -0,0 +1,32 @@
1{
2 "name": "Covalence Dusts",
3 "icon": "eris_alchemy:medium_covalence_dust",
4 "category": "eris_alchemy:root",
5 "pages": [{
6 "type": "patchouli:spotlight",
7 "title": "Covalence Dusts",
8 "item": "eris_alchemy:low_covalence_dust,eris_alchemy:medium_covalence_dust,eris_alchemy:high_covalence_dust",
9 "link_recipe": true,
10 "text": "$(thing)Covalence dusts$() are the most basic items you create in Eris Alchemy."
11 }, {
12 "type": "patchouli:crafting",
13 "recipe": "eris_alchemy:low_covalence_dust",
14 "recipe2": "eris_alchemy:medium_covalence_dust"
15 }, {
16 "type": "patchouli:crafting",
17 "recipe": "eris_alchemy:high_covalence_dust"
18 }, {
19 "type": "patchouli:text",
20 "title": "Repairing items",
21 "text": "Aside from being inputs to various other recipes, $(thing)Covalence dusts$() can also be used for repairing tools. Just add your damaged item and at least one corresponding $(thing)covalence dust$() in a crafting grid and it should Just Work(TM)."
22 }, {
23 "type": "patchouli:text",
24 "text": "$(item)Low Covalence Dust$() can be used to repair$(li)$(thing)Wooden tools$(),$(li)$(thing)Stone tools$(),$(li)$(thing)Leather armour$(),$(li)$(thing)Turtle shell armour$(),$(li)$(item)Fishing rods$(), and$(li)$(item)Bows$()."
25 }, {
26 "type": "patchouli:text",
27 "text": "$(item)Medium Covalence Dust$() can be used to repair$(li)$(thing)Iron tools and armour$(),$(li)$(thing)Gold tools and armour$(),$(li)$(thing)Bronze tools and armour$() (if you have any),$(li)$(thing)Ruby tools and armour$() (if you have any),$(li)$(thing)Sapphire tools and armour$() (if you have any),$(li)$(thing)Green sapphire tools and armour$() (if you have any),$(li)$(item)Elytras$(),$(li)$(item)Flint and Steel$(), and$(li)$(item)Shears$()."
28 }, {
29 "type": "patchouli:text",
30 "text": "$(item)High Covalence Dust$() can be used to repair$(li)$(thing)Diamond tools and armour$() and$(li)$(thing)Netherite tools and armour$()."
31 }]
32} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/guide_book.json b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/guide_book.json
new file mode 100644
index 0000000..b501b0b
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/patchouli_books/guide_book/en_us/entries/root/guide_book.json
@@ -0,0 +1,15 @@
1{
2 "name": "Guide Book",
3 "icon": "patchouli:guide_book{'patchouli:book':'eris_alchemy:guide_book'}",
4 "category": "eris_alchemy:root",
5 "pages": [{
6 "type": "patchouli:spotlight",
7 "title": "Guide Book",
8 "item": "patchouli:guide_book{'patchouli:book':'eris_alchemy:guide_book'}",
9 "link_recipe": true,
10 "text": "The Eris Alchemy $(item)Guide Book$() should be already in your inventory for obvious reasons, but if you ever lose it you can recreate it with this crafting recipe."
11 }, {
12 "type": "patchouli:crafting",
13 "recipe": "eris_alchemy:guide_book"
14 }]
15} \ No newline at end of file
diff --git a/src/main/resources/assets/eris_alchemy/textures/item/high_covalence_dust.png b/src/main/resources/assets/eris_alchemy/textures/item/high_covalence_dust.png
new file mode 100644
index 0000000..4949eb8
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/textures/item/high_covalence_dust.png
Binary files differ
diff --git a/src/main/resources/assets/eris_alchemy/textures/item/low_covalence_dust.png b/src/main/resources/assets/eris_alchemy/textures/item/low_covalence_dust.png
new file mode 100644
index 0000000..6a2f670
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/textures/item/low_covalence_dust.png
Binary files differ
diff --git a/src/main/resources/assets/eris_alchemy/textures/item/medium_covalence_dust.png b/src/main/resources/assets/eris_alchemy/textures/item/medium_covalence_dust.png
new file mode 100644
index 0000000..e38d160
--- /dev/null
+++ b/src/main/resources/assets/eris_alchemy/textures/item/medium_covalence_dust.png
Binary files differ
diff --git a/src/main/resources/data/c/tags/items/leathers.json b/src/main/resources/data/c/tags/items/leathers.json
new file mode 100644
index 0000000..3bae083
--- /dev/null
+++ b/src/main/resources/data/c/tags/items/leathers.json
@@ -0,0 +1,11 @@
1{
2 "replace": false,
3 "values": [
4 {
5 "id": "#c:leather",
6 "required": false
7 },
8 "minecraft:leather",
9 "minecraft:rabbit_hide"
10 ]
11} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/advancements/grant_guide_on_first_join.json b/src/main/resources/data/eris_alchemy/advancements/grant_guide_on_first_join.json
new file mode 100644
index 0000000..0b43b60
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/advancements/grant_guide_on_first_join.json
@@ -0,0 +1,12 @@
1{
2 "criteria": {
3 "tick": {
4 "trigger": "minecraft:tick"
5 }
6 },
7 "rewards": {
8 "loot": [
9 "eris_alchemy:grant_guide_on_first_join"
10 ]
11 }
12} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/loot_tables/grant_guide_on_first_join.json b/src/main/resources/data/eris_alchemy/loot_tables/grant_guide_on_first_join.json
new file mode 100644
index 0000000..3566ef1
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/loot_tables/grant_guide_on_first_join.json
@@ -0,0 +1,14 @@
1{
2 "type": "advancement_reward",
3 "pools": [{
4 "rolls": 1,
5 "entries": [{
6 "type": "item",
7 "name": "patchouli:guide_book",
8 "functions": [{
9 "function": "set_nbt",
10 "tag": "{\"patchouli:book\": \"eris_alchemy:guide_book\"}"
11 }]
12 }]
13 }]
14} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/patchouli_books/guide_book/book.json b/src/main/resources/data/eris_alchemy/patchouli_books/guide_book/book.json
new file mode 100644
index 0000000..da4be0b
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/patchouli_books/guide_book/book.json
@@ -0,0 +1,11 @@
1{
2 "name": "book.eris_alchemy.title",
3 "subtitle": "book.eris_alchemy.subtitle",
4 "landing_text": "book.eris_alchemy.landing_text",
5 "use_resource_pack": true,
6 "pamphlet": true,
7 "creative_tab": "eris_alchemy:item_group",
8 "book_texture": "patchouli:textures/gui/book_cyan.png",
9 "model": "patchouli:book_cyan",
10 "show_progress": false
11} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/guide_book.json b/src/main/resources/data/eris_alchemy/recipes/guide_book.json
new file mode 100644
index 0000000..bbc4448
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/guide_book.json
@@ -0,0 +1,9 @@
1{
2 "type": "patchouli:shapeless_book_recipe",
3 "ingredients": [{
4 "item": "eris_alchemy:low_covalence_dust"
5 }, {
6 "item": "minecraft:book"
7 }],
8 "book": "eris_alchemy:guide_book"
9} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/high_covalence_dust.json b/src/main/resources/data/eris_alchemy/recipes/high_covalence_dust.json
new file mode 100644
index 0000000..e4e142d
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/high_covalence_dust.json
@@ -0,0 +1,12 @@
1{
2 "type": "minecraft:crafting_shapeless",
3 "ingredients": [{
4 "item": "minecraft:diamond"
5 }, {
6 "item": "minecraft:coal"
7 }],
8 "result": {
9 "item": "eris_alchemy:high_covalence_dust",
10 "count": 40
11 }
12} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/high_covalence_repair.json b/src/main/resources/data/eris_alchemy/recipes/high_covalence_repair.json
new file mode 100644
index 0000000..7b87b44
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/high_covalence_repair.json
@@ -0,0 +1,12 @@
1{
2 "type": "eris_alchemy:covalence_repair",
3 "dust": {
4 "item": "eris_alchemy:high_covalence_dust"
5 },
6 "materials": [{
7 "tag": "c:diamonds"
8 }, {
9 "tag": "c:netherite_ingots"
10 }],
11 "tools": []
12} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/low_covalence_dust.json b/src/main/resources/data/eris_alchemy/recipes/low_covalence_dust.json
new file mode 100644
index 0000000..572e506
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/low_covalence_dust.json
@@ -0,0 +1,26 @@
1{
2 "type": "minecraft:crafting_shapeless",
3 "ingredients": [{
4 "item": "minecraft:coal"
5 }, {
6 "item": "minecraft:cobblestone"
7 }, {
8 "item": "minecraft:cobblestone"
9 }, {
10 "item": "minecraft:cobblestone"
11 }, {
12 "item": "minecraft:cobblestone"
13 }, {
14 "item": "minecraft:cobblestone"
15 }, {
16 "item": "minecraft:cobblestone"
17 }, {
18 "item": "minecraft:cobblestone"
19 }, {
20 "item": "minecraft:cobblestone"
21 }],
22 "result": {
23 "item": "eris_alchemy:low_covalence_dust",
24 "count": 40
25 }
26} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/low_covalence_repair.json b/src/main/resources/data/eris_alchemy/recipes/low_covalence_repair.json
new file mode 100644
index 0000000..343cd4f
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/low_covalence_repair.json
@@ -0,0 +1,20 @@
1{
2 "type": "eris_alchemy:covalence_repair",
3 "dust": {
4 "item": "eris_alchemy:low_covalence_dust"
5 },
6 "materials": [{
7 "tag": "minecraft:planks"
8 }, {
9 "tag": "minecraft:stone_tool_materials"
10 }, {
11 "tag": "c:leathers"
12 }, {
13 "item": "minecraft:scute"
14 }],
15 "tools": [{
16 "item": "minecraft:fishing_rod"
17 }, {
18 "item": "minecraft:bow"
19 }]
20} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/medium_covalence_dust.json b/src/main/resources/data/eris_alchemy/recipes/medium_covalence_dust.json
new file mode 100644
index 0000000..cf9cbce
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/medium_covalence_dust.json
@@ -0,0 +1,12 @@
1{
2 "type": "minecraft:crafting_shapeless",
3 "ingredients": [{
4 "item": "minecraft:iron_ingot"
5 }, {
6 "item": "minecraft:redstone"
7 }],
8 "result": {
9 "item": "eris_alchemy:medium_covalence_dust",
10 "count": 40
11 }
12} \ No newline at end of file
diff --git a/src/main/resources/data/eris_alchemy/recipes/medium_covalence_repair.json b/src/main/resources/data/eris_alchemy/recipes/medium_covalence_repair.json
new file mode 100644
index 0000000..a75bf89
--- /dev/null
+++ b/src/main/resources/data/eris_alchemy/recipes/medium_covalence_repair.json
@@ -0,0 +1,26 @@
1{
2 "type": "eris_alchemy:covalence_repair",
3 "dust": {
4 "item": "eris_alchemy:medium_covalence_dust"
5 },
6 "materials": [{
7 "tag": "c:iron_ingots"
8 }, {
9 "tag": "c:gold_ingots"
10 }, {
11 "tag": "c:bronze_ingots"
12 }, {
13 "tag": "c:rubies"
14 }, {
15 "tag": "c:sapphires"
16 }, {
17 "tag": "c:green_sapphires"
18 }, {
19 "item": "minecraft:phantom_membrane"
20 }],
21 "tools": [{
22 "item": "minecraft:flint_and_steel"
23 }, {
24 "item": "minecraft:shears"
25 }]
26} \ No newline at end of file
diff --git a/src/main/resources/eris_alchemy.mixins.json b/src/main/resources/eris_alchemy.mixins.json
new file mode 100644
index 0000000..88e1a8c
--- /dev/null
+++ b/src/main/resources/eris_alchemy.mixins.json
@@ -0,0 +1,13 @@
1{
2 "required": true,
3 "minVersion": "0.8",
4 "package": "lv.enes.mc.eris_alchemy.mixin",
5 "compatibilityLevel": "JAVA_17",
6 "mixins": [],
7 "client": [
8 "ItemMixin"
9 ],
10 "injectors": {
11 "defaultRequire": 1
12 }
13} \ No newline at end of file
diff --git a/src/main/resources/quilt.mod.json b/src/main/resources/quilt.mod.json
new file mode 100644
index 0000000..c20037c
--- /dev/null
+++ b/src/main/resources/quilt.mod.json
@@ -0,0 +1,36 @@
1{
2 "schema_version": 1,
3 "quilt_loader": {
4 "group": "lv.enes.mc",
5 "id": "eris_alchemy",
6 "version": "${version}",
7 "metadata": {
8 "name": "Eris Alchemy",
9 "description": "Adds the condensing chest from EE2.",
10 "contributors": {
11 "Eris": "Owner"
12 },
13 "contact": {
14 "homepage": "https://TODO",
15 "issues": "https://TODO",
16 "sources": "https://TODO"
17 },
18 "icon": "assets/eris_alchemy/icon.png"
19 },
20 "intermediate_mappings": "net.fabricmc:intermediary",
21 "entrypoints": {
22 "init": "lv.enes.mc.eris_alchemy.ErisAlchemy"
23 },
24 "depends": [{
25 "id": "quilt_loader",
26 "versions": ">=0.23.0"
27 }, {
28 "id": "quilted_fabric_api",
29 "versions": ">=7.4.0"
30 }, {
31 "id": "minecraft",
32 "versions": "1.20.1"
33 }]
34 },
35 "mixin": "eris_alchemy.mixins.json"
36} \ No newline at end of file