summaryrefslogtreecommitdiff
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
downloadmc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.tar.gz
mc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.tar.xz
mc-eris-alchemy-9445749ede3c61d3db9324184971b319b4a8bd1d.zip
Initial Commit
-rw-r--r--.gitignore34
-rw-r--r--LICENSE287
-rw-r--r--README.md5
-rw-r--r--build.gradle78
-rw-r--r--gradle.properties12
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin0 -> 43462 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties7
-rwxr-xr-xgradlew249
-rw-r--r--gradlew.bat92
-rw-r--r--settings.gradle13
-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
37 files changed, 1328 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..32968af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,34 @@
1# Gradle
2.gradle/
3build/
4out/
5classes/
6
7# Quilt Loom
8remappedSrc/
9run/
10
11# Eclipse
12*.launch
13
14# IDEA
15.idea/
16*.iml
17*.ipr
18*.iws
19
20# Fleet
21.fleet/
22
23# VS Code
24.settings/
25.vscode/
26bin/
27.classpath
28.project
29
30# Eclipse JDT LS
31workspace/
32
33# macOS
34*.DS_Store \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..4153cd3
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,287 @@
1 EUROPEAN UNION PUBLIC LICENCE v. 1.2
2 EUPL © the European Union 2007, 2016
3
4This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined
5below) which is provided under the terms of this Licence. Any use of the Work,
6other than as authorised under this Licence is prohibited (to the extent such
7use is covered by a right of the copyright holder of the Work).
8
9The Work is provided under the terms of this Licence when the Licensor (as
10defined below) has placed the following notice immediately following the
11copyright notice for the Work:
12
13 Licensed under the EUPL
14
15or has expressed by any other means his willingness to license under the EUPL.
16
171. Definitions
18
19In this Licence, the following terms have the following meaning:
20
21- ‘The Licence’: this Licence.
22
23- ‘The Original Work’: the work or software distributed or communicated by the
24 Licensor under this Licence, available as Source Code and also as Executable
25 Code as the case may be.
26
27- ‘Derivative Works’: the works or software that could be created by the
28 Licensee, based upon the Original Work or modifications thereof. This Licence
29 does not define the extent of modification or dependence on the Original Work
30 required in order to classify a work as a Derivative Work; this extent is
31 determined by copyright law applicable in the country mentioned in Article 15.
32
33- ‘The Work’: the Original Work or its Derivative Works.
34
35- ‘The Source Code’: the human-readable form of the Work which is the most
36 convenient for people to study and modify.
37
38- ‘The Executable Code’: any code which has generally been compiled and which is
39 meant to be interpreted by a computer as a program.
40
41- ‘The Licensor’: the natural or legal person that distributes or communicates
42 the Work under the Licence.
43
44- ‘Contributor(s)’: any natural or legal person who modifies the Work under the
45 Licence, or otherwise contributes to the creation of a Derivative Work.
46
47- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of
48 the Work under the terms of the Licence.
49
50- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending,
51 renting, distributing, communicating, transmitting, or otherwise making
52 available, online or offline, copies of the Work or providing access to its
53 essential functionalities at the disposal of any other natural or legal
54 person.
55
562. Scope of the rights granted by the Licence
57
58The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
59sublicensable licence to do the following, for the duration of copyright vested
60in the Original Work:
61
62- use the Work in any circumstance and for all usage,
63- reproduce the Work,
64- modify the Work, and make Derivative Works based upon the Work,
65- communicate to the public, including the right to make available or display
66 the Work or copies thereof to the public and perform publicly, as the case may
67 be, the Work,
68- distribute the Work or copies thereof,
69- lend and rent the Work or copies thereof,
70- sublicense rights in the Work or copies thereof.
71
72Those rights can be exercised on any media, supports and formats, whether now
73known or later invented, as far as the applicable law permits so.
74
75In the countries where moral rights apply, the Licensor waives his right to
76exercise his moral right to the extent allowed by law in order to make effective
77the licence of the economic rights here above listed.
78
79The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to
80any patents held by the Licensor, to the extent necessary to make use of the
81rights granted on the Work under this Licence.
82
833. Communication of the Source Code
84
85The Licensor may provide the Work either in its Source Code form, or as
86Executable Code. If the Work is provided as Executable Code, the Licensor
87provides in addition a machine-readable copy of the Source Code of the Work
88along with each copy of the Work that the Licensor distributes or indicates, in
89a notice following the copyright notice attached to the Work, a repository where
90the Source Code is easily and freely accessible for as long as the Licensor
91continues to distribute or communicate the Work.
92
934. Limitations on copyright
94
95Nothing in this Licence is intended to deprive the Licensee of the benefits from
96any exception or limitation to the exclusive rights of the rights owners in the
97Work, of the exhaustion of those rights or of other applicable limitations
98thereto.
99
1005. Obligations of the Licensee
101
102The grant of the rights mentioned above is subject to some restrictions and
103obligations imposed on the Licensee. Those obligations are the following:
104
105Attribution right: The Licensee shall keep intact all copyright, patent or
106trademarks notices and all notices that refer to the Licence and to the
107disclaimer of warranties. The Licensee must include a copy of such notices and a
108copy of the Licence with every copy of the Work he/she distributes or
109communicates. The Licensee must cause any Derivative Work to carry prominent
110notices stating that the Work has been modified and the date of modification.
111
112Copyleft clause: If the Licensee distributes or communicates copies of the
113Original Works or Derivative Works, this Distribution or Communication will be
114done under the terms of this Licence or of a later version of this Licence
115unless the Original Work is expressly distributed only under this version of the
116Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee
117(becoming Licensor) cannot offer or impose any additional terms or conditions on
118the Work or Derivative Work that alter or restrict the terms of the Licence.
119
120Compatibility clause: If the Licensee Distributes or Communicates Derivative
121Works or copies thereof based upon both the Work and another work licensed under
122a Compatible Licence, this Distribution or Communication can be done under the
123terms of this Compatible Licence. For the sake of this clause, ‘Compatible
124Licence’ refers to the licences listed in the appendix attached to this Licence.
125Should the Licensee's obligations under the Compatible Licence conflict with
126his/her obligations under this Licence, the obligations of the Compatible
127Licence shall prevail.
128
129Provision of Source Code: When distributing or communicating copies of the Work,
130the Licensee will provide a machine-readable copy of the Source Code or indicate
131a repository where this Source will be easily and freely available for as long
132as the Licensee continues to distribute or communicate the Work.
133
134Legal Protection: This Licence does not grant permission to use the trade names,
135trademarks, service marks, or names of the Licensor, except as required for
136reasonable and customary use in describing the origin of the Work and
137reproducing the content of the copyright notice.
138
1396. Chain of Authorship
140
141The original Licensor warrants that the copyright in the Original Work granted
142hereunder is owned by him/her or licensed to him/her and that he/she has the
143power and authority to grant the Licence.
144
145Each Contributor warrants that the copyright in the modifications he/she brings
146to the Work are owned by him/her or licensed to him/her and that he/she has the
147power and authority to grant the Licence.
148
149Each time You accept the Licence, the original Licensor and subsequent
150Contributors grant You a licence to their contributions to the Work, under the
151terms of this Licence.
152
1537. Disclaimer of Warranty
154
155The Work is a work in progress, which is continuously improved by numerous
156Contributors. It is not a finished work and may therefore contain defects or
157‘bugs’ inherent to this type of development.
158
159For the above reason, the Work is provided under the Licence on an ‘as is’ basis
160and without warranties of any kind concerning the Work, including without
161limitation merchantability, fitness for a particular purpose, absence of defects
162or errors, accuracy, non-infringement of intellectual property rights other than
163copyright as stated in Article 6 of this Licence.
164
165This disclaimer of warranty is an essential part of the Licence and a condition
166for the grant of any rights to the Work.
167
1688. Disclaimer of Liability
169
170Except in the cases of wilful misconduct or damages directly caused to natural
171persons, the Licensor will in no event be liable for any direct or indirect,
172material or moral, damages of any kind, arising out of the Licence or of the use
173of the Work, including without limitation, damages for loss of goodwill, work
174stoppage, computer failure or malfunction, loss of data or any commercial
175damage, even if the Licensor has been advised of the possibility of such damage.
176However, the Licensor will be liable under statutory product liability laws as
177far such laws apply to the Work.
178
1799. Additional agreements
180
181While distributing the Work, You may choose to conclude an additional agreement,
182defining obligations or services consistent with this Licence. However, if
183accepting obligations, You may act only on your own behalf and on your sole
184responsibility, not on behalf of the original Licensor or any other Contributor,
185and only if You agree to indemnify, defend, and hold each Contributor harmless
186for any liability incurred by, or claims asserted against such Contributor by
187the fact You have accepted any warranty or additional liability.
188
18910. Acceptance of the Licence
190
191The provisions of this Licence can be accepted by clicking on an icon ‘I agree’
192placed under the bottom of a window displaying the text of this Licence or by
193affirming consent in any other similar way, in accordance with the rules of
194applicable law. Clicking on that icon indicates your clear and irrevocable
195acceptance of this Licence and all of its terms and conditions.
196
197Similarly, you irrevocably accept this Licence and all of its terms and
198conditions by exercising any rights granted to You by Article 2 of this Licence,
199such as the use of the Work, the creation by You of a Derivative Work or the
200Distribution or Communication by You of the Work or copies thereof.
201
20211. Information to the public
203
204In case of any Distribution or Communication of the Work by means of electronic
205communication by You (for example, by offering to download the Work from a
206remote location) the distribution channel or media (for example, a website) must
207at least provide to the public the information requested by the applicable law
208regarding the Licensor, the Licence and the way it may be accessible, concluded,
209stored and reproduced by the Licensee.
210
21112. Termination of the Licence
212
213The Licence and the rights granted hereunder will terminate automatically upon
214any breach by the Licensee of the terms of the Licence.
215
216Such a termination will not terminate the licences of any person who has
217received the Work from the Licensee under the Licence, provided such persons
218remain in full compliance with the Licence.
219
22013. Miscellaneous
221
222Without prejudice of Article 9 above, the Licence represents the complete
223agreement between the Parties as to the Work.
224
225If any provision of the Licence is invalid or unenforceable under applicable
226law, this will not affect the validity or enforceability of the Licence as a
227whole. Such provision will be construed or reformed so as necessary to make it
228valid and enforceable.
229
230The European Commission may publish other linguistic versions or new versions of
231this Licence or updated versions of the Appendix, so far this is required and
232reasonable, without reducing the scope of the rights granted by the Licence. New
233versions of the Licence will be published with a unique version number.
234
235All linguistic versions of this Licence, approved by the European Commission,
236have identical value. Parties can take advantage of the linguistic version of
237their choice.
238
23914. Jurisdiction
240
241Without prejudice to specific agreement between parties,
242
243- any litigation resulting from the interpretation of this License, arising
244 between the European Union institutions, bodies, offices or agencies, as a
245 Licensor, and any Licensee, will be subject to the jurisdiction of the Court
246 of Justice of the European Union, as laid down in article 272 of the Treaty on
247 the Functioning of the European Union,
248
249- any litigation arising between other parties and resulting from the
250 interpretation of this License, will be subject to the exclusive jurisdiction
251 of the competent court where the Licensor resides or conducts its primary
252 business.
253
25415. Applicable Law
255
256Without prejudice to specific agreement between parties,
257
258- this Licence shall be governed by the law of the European Union Member State
259 where the Licensor has his seat, resides or has his registered office,
260
261- this licence shall be governed by Belgian law if the Licensor has no seat,
262 residence or registered office inside a European Union Member State.
263
264Appendix
265
266‘Compatible Licences’ according to Article 5 EUPL are:
267
268- GNU General Public License (GPL) v. 2, v. 3
269- GNU Affero General Public License (AGPL) v. 3
270- Open Software License (OSL) v. 2.1, v. 3.0
271- Eclipse Public License (EPL) v. 1.0
272- CeCILL v. 2.0, v. 2.1
273- Mozilla Public Licence (MPL) v. 2
274- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
275- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
276 works other than software
277- European Union Public Licence (EUPL) v. 1.1, v. 1.2
278- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
279 Reciprocity (LiLiQ-R+).
280
281The European Commission may update this Appendix to later versions of the above
282licences without producing a new version of the EUPL, as long as they provide
283the rights granted in Article 2 of this Licence and protect the covered Source
284Code from exclusive appropriation.
285
286All other changes or additions to this Appendix require the production of a new
287EUPL version.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..81bc79c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,5 @@
1# Eris Alchemy
2
3## TODO
4
5- custom model for guide book \ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..29c2585
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,78 @@
1plugins {
2 id "maven-publish"
3 id "org.quiltmc.loom" version "1.4.1"
4}
5
6base {
7 archivesName = modid
8}
9
10version = "0.1+${minecraft_version}"
11group = groupid
12
13repositories {
14 maven {
15 url "https://maven.blamejared.com"
16 content {
17 includeGroup "vazkii.patchouli"
18 }
19 }
20}
21
22loom {
23 mods {
24 "${modid}" {
25 sourceSet("main")
26 }
27 }
28}
29
30dependencies {
31 minecraft "com.mojang:minecraft:${minecraft_version}"
32 mappings loom.layered {
33 mappings "org.quiltmc:quilt-mappings:${minecraft_version}+build.${quilt_mappings}:intermediary-v2"
34 officialMojangMappings()
35 }
36 modImplementation "org.quiltmc:quilt-loader:${loader_version}"
37 modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${quilted_fabric_api_version}-${minecraft_version}"
38
39 modImplementation("vazkii.patchouli:Patchouli:${patchouli_version}") {
40 exclude group: "net.fabricmc", module: "fabric-loader"
41 }
42}
43
44processResources {
45 inputs.property "version", version
46
47 filesMatching("quilt.mod.json") {
48 expand "version": version
49 }
50}
51
52tasks.withType(JavaCompile).configureEach {
53 it.options.encoding = "UTF-8"
54 it.options.release = 17
55}
56
57java {
58 sourceCompatibility = JavaVersion.VERSION_17
59 targetCompatibility = JavaVersion.VERSION_17
60
61 withSourcesJar()
62}
63
64jar {
65 from("LICENSE") {
66 rename { "${it}_${base.archivesName.get()}" }
67 }
68}
69
70publishing {
71 publications {
72 mavenJava(MavenPublication) {
73 from components.java
74 }
75 }
76
77 repositories {}
78} \ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..a78fc4a
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,12 @@
1org.gradle.jvmargs = -Xmx1G
2org.gradle.parallel = true
3
4groupid = lv.enes.mc
5modid = eris_alchemy
6
7minecraft_version = 1.20.1
8quilt_mappings = 23
9loader_version = 0.23.0
10quilted_fabric_api_version = 7.4.0+0.90.0
11
12patchouli_version = 1.20.1-84-FABRIC \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..d64cd49
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e6aba25
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
1distributionBase=GRADLE_USER_HOME
2distributionPath=wrapper/dists
3distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
4networkTimeout=10000
5validateDistributionUrl=true
6zipStoreBase=GRADLE_USER_HOME
7zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..1aa94a4
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,249 @@
1#!/bin/sh
2
3#
4# Copyright © 2015-2021 the original authors.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# https://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19##############################################################################
20#
21# Gradle start up script for POSIX generated by Gradle.
22#
23# Important for running:
24#
25# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26# noncompliant, but you have some other compliant shell such as ksh or
27# bash, then to run this script, type that shell name before the whole
28# command line, like:
29#
30# ksh Gradle
31#
32# Busybox and similar reduced shells will NOT work, because this script
33# requires all of these POSIX shell features:
34# * functions;
35# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37# * compound commands having a testable exit status, especially «case»;
38# * various built-in commands including «command», «set», and «ulimit».
39#
40# Important for patching:
41#
42# (2) This script targets any POSIX shell, so it avoids extensions provided
43# by Bash, Ksh, etc; in particular arrays are avoided.
44#
45# The "traditional" practice of packing multiple parameters into a
46# space-separated string is a well documented source of bugs and security
47# problems, so this is (mostly) avoided, by progressively accumulating
48# options in "$@", and eventually passing that to Java.
49#
50# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52# see the in-line comments for details.
53#
54# There are tweaks for specific operating systems such as AIX, CygWin,
55# Darwin, MinGW, and NonStop.
56#
57# (3) This script is generated from the Groovy template
58# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59# within the Gradle project.
60#
61# You can find Gradle at https://github.com/gradle/gradle/.
62#
63##############################################################################
64
65# Attempt to set APP_HOME
66
67# Resolve links: $0 may be a link
68app_path=$0
69
70# Need this for daisy-chained symlinks.
71while
72 APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 [ -h "$app_path" ]
74do
75 ls=$( ls -ld "$app_path" )
76 link=${ls#*' -> '}
77 case $link in #(
78 /*) app_path=$link ;; #(
79 *) app_path=$APP_HOME$link ;;
80 esac
81done
82
83# This is normally unused
84# shellcheck disable=SC2034
85APP_BASE_NAME=${0##*/}
86# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88
89# Use the maximum available, or set MAX_FD != -1 to use that value.
90MAX_FD=maximum
91
92warn () {
93 echo "$*"
94} >&2
95
96die () {
97 echo
98 echo "$*"
99 echo
100 exit 1
101} >&2
102
103# OS specific support (must be 'true' or 'false').
104cygwin=false
105msys=false
106darwin=false
107nonstop=false
108case "$( uname )" in #(
109 CYGWIN* ) cygwin=true ;; #(
110 Darwin* ) darwin=true ;; #(
111 MSYS* | MINGW* ) msys=true ;; #(
112 NONSTOP* ) nonstop=true ;;
113esac
114
115CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116
117
118# Determine the Java command to use to start the JVM.
119if [ -n "$JAVA_HOME" ] ; then
120 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121 # IBM's JDK on AIX uses strange locations for the executables
122 JAVACMD=$JAVA_HOME/jre/sh/java
123 else
124 JAVACMD=$JAVA_HOME/bin/java
125 fi
126 if [ ! -x "$JAVACMD" ] ; then
127 die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128
129Please set the JAVA_HOME variable in your environment to match the
130location of your Java installation."
131 fi
132else
133 JAVACMD=java
134 if ! command -v java >/dev/null 2>&1
135 then
136 die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
138Please set the JAVA_HOME variable in your environment to match the
139location of your Java installation."
140 fi
141fi
142
143# Increase the maximum file descriptors if we can.
144if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145 case $MAX_FD in #(
146 max*)
147 # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148 # shellcheck disable=SC2039,SC3045
149 MAX_FD=$( ulimit -H -n ) ||
150 warn "Could not query maximum file descriptor limit"
151 esac
152 case $MAX_FD in #(
153 '' | soft) :;; #(
154 *)
155 # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156 # shellcheck disable=SC2039,SC3045
157 ulimit -n "$MAX_FD" ||
158 warn "Could not set maximum file descriptor limit to $MAX_FD"
159 esac
160fi
161
162# Collect all arguments for the java command, stacking in reverse order:
163# * args from the command line
164# * the main class name
165# * -classpath
166# * -D...appname settings
167# * --module-path (only if needed)
168# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169
170# For Cygwin or MSYS, switch paths to Windows format before running java
171if "$cygwin" || "$msys" ; then
172 APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173 CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174
175 JAVACMD=$( cygpath --unix "$JAVACMD" )
176
177 # Now convert the arguments - kludge to limit ourselves to /bin/sh
178 for arg do
179 if
180 case $arg in #(
181 -*) false ;; # don't mess with options #(
182 /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183 [ -e "$t" ] ;; #(
184 *) false ;;
185 esac
186 then
187 arg=$( cygpath --path --ignore --mixed "$arg" )
188 fi
189 # Roll the args list around exactly as many times as the number of
190 # args, so each arg winds up back in the position where it started, but
191 # possibly modified.
192 #
193 # NB: a `for` loop captures its iteration list before it begins, so
194 # changing the positional parameters here affects neither the number of
195 # iterations, nor the values presented in `arg`.
196 shift # remove old arg
197 set -- "$@" "$arg" # push replacement arg
198 done
199fi
200
201
202# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
205# Collect all arguments for the java command:
206# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207# and any embedded shellness will be escaped.
208# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209# treated as '${Hostname}' itself on the command line.
210
211set -- \
212 "-Dorg.gradle.appname=$APP_BASE_NAME" \
213 -classpath "$CLASSPATH" \
214 org.gradle.wrapper.GradleWrapperMain \
215 "$@"
216
217# Stop when "xargs" is not available.
218if ! command -v xargs >/dev/null 2>&1
219then
220 die "xargs is not available"
221fi
222
223# Use "xargs" to parse quoted args.
224#
225# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226#
227# In Bash we could simply go:
228#
229# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230# set -- "${ARGS[@]}" "$@"
231#
232# but POSIX shell has neither arrays nor command substitution, so instead we
233# post-process each arg (as a line of input to sed) to backslash-escape any
234# character that might be a shell metacharacter, then use eval to reverse
235# that process (while maintaining the separation between arguments), and wrap
236# the whole thing up as a single "set" statement.
237#
238# This will of course break if any of these variables contains a newline or
239# an unmatched quote.
240#
241
242eval "set -- $(
243 printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244 xargs -n1 |
245 sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246 tr '\n' ' '
247 )" '"$@"'
248
249exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..6689b85
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,92 @@
1@rem
2@rem Copyright 2015 the original author or authors.
3@rem
4@rem Licensed under the Apache License, Version 2.0 (the "License");
5@rem you may not use this file except in compliance with the License.
6@rem You may obtain a copy of the License at
7@rem
8@rem https://www.apache.org/licenses/LICENSE-2.0
9@rem
10@rem Unless required by applicable law or agreed to in writing, software
11@rem distributed under the License is distributed on an "AS IS" BASIS,
12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13@rem See the License for the specific language governing permissions and
14@rem limitations under the License.
15@rem
16
17@if "%DEBUG%"=="" @echo off
18@rem ##########################################################################
19@rem
20@rem Gradle startup script for Windows
21@rem
22@rem ##########################################################################
23
24@rem Set local scope for the variables with windows NT shell
25if "%OS%"=="Windows_NT" setlocal
26
27set DIRNAME=%~dp0
28if "%DIRNAME%"=="" set DIRNAME=.
29@rem This is normally unused
30set APP_BASE_NAME=%~n0
31set APP_HOME=%DIRNAME%
32
33@rem Resolve any "." and ".." in APP_HOME to make it shorter.
34for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35
36@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38
39@rem Find java.exe
40if defined JAVA_HOME goto findJavaFromJavaHome
41
42set JAVA_EXE=java.exe
43%JAVA_EXE% -version >NUL 2>&1
44if %ERRORLEVEL% equ 0 goto execute
45
46echo.
47echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48echo.
49echo Please set the JAVA_HOME variable in your environment to match the
50echo location of your Java installation.
51
52goto fail
53
54:findJavaFromJavaHome
55set JAVA_HOME=%JAVA_HOME:"=%
56set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57
58if exist "%JAVA_EXE%" goto execute
59
60echo.
61echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62echo.
63echo Please set the JAVA_HOME variable in your environment to match the
64echo location of your Java installation.
65
66goto fail
67
68:execute
69@rem Setup the command line
70
71set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72
73
74@rem Execute Gradle
75"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76
77:end
78@rem End local scope for the variables with windows NT shell
79if %ERRORLEVEL% equ 0 goto mainEnd
80
81:fail
82rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83rem the _cmd.exe /c_ return code!
84set EXIT_CODE=%ERRORLEVEL%
85if %EXIT_CODE% equ 0 set EXIT_CODE=1
86if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87exit /b %EXIT_CODE%
88
89:mainEnd
90if "%OS%"=="Windows_NT" endlocal
91
92:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..1496ea2
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,13 @@
1pluginManagement {
2 repositories {
3 maven {
4 name = "Quilt"
5 url = "https://maven.quiltmc.org/repository/release"
6 }
7 maven {
8 name = "Fabric"
9 url = "https://maven.fabricmc.net/"
10 }
11 gradlePluginPortal()
12 }
13} \ No newline at end of file
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