From d1a26567b65caa5b6312ed4cdf93530217bdb05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Gastinel?= <264859180+gastinelt@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:56:04 +0200 Subject: [PATCH] Premier commit --- .gitignore | 66 +++++ build.gradle | 37 +++ gradle.properties | 9 + gradle/wrapper/gradle-wrapper.properties | 7 + gradlew | 248 ++++++++++++++++++ gradlew.bat | 82 ++++++ settings.gradle | 8 + src/main/java/com/sculkorbs/SculkOrbsMod.java | 35 +++ .../enchant/PerfectEnchantApplier.java | 168 ++++++++++++ .../sculkorbs/event/AnvilEnchantHandler.java | 70 +++++ .../com/sculkorbs/event/SculkDropHandler.java | 92 +++++++ .../sculkorbs/item/PerfectEnchantItem.java | 60 +++++ .../java/com/sculkorbs/item/SculkOrbItem.java | 116 ++++++++ .../java/com/sculkorbs/item/SculkOrbTier.java | 57 ++++ .../recipe/PerfectEnchantCraftingRecipe.java | 91 +++++++ .../sculkorbs/registry/ModCreativeTabs.java | 36 +++ .../java/com/sculkorbs/registry/ModItems.java | 47 ++++ .../registry/ModRecipeSerializers.java | 19 ++ .../resources/META-INF/neoforge.mods.toml | 24 ++ .../assets/sculkorbs/lang/en_us.json | 21 ++ .../assets/sculkorbs/lang/fr_fr.json | 21 ++ .../sculkorbs/models/item/colossal_orb.json | 6 + .../sculkorbs/models/item/giant_orb.json | 6 + .../sculkorbs/models/item/massive_orb.json | 6 + .../sculkorbs/models/item/maximal_orb.json | 6 + .../sculkorbs/models/item/mythic_orb.json | 6 + .../models/item/perfect_enchant_1.json | 6 + .../models/item/perfect_enchant_2.json | 6 + .../models/item/perfect_enchant_3.json | 6 + .../models/item/perfect_enchant_4.json | 6 + .../models/item/perfect_enchant_5.json | 6 + .../sculkorbs/textures/item/colossal_orb.png | Bin 0 -> 177 bytes .../sculkorbs/textures/item/giant_orb.png | Bin 0 -> 175 bytes .../sculkorbs/textures/item/massive_orb.png | Bin 0 -> 177 bytes .../sculkorbs/textures/item/maximal_orb.png | Bin 0 -> 226 bytes .../sculkorbs/textures/item/mythic_orb.png | Bin 0 -> 177 bytes .../textures/item/perfect_enchant_1.png | Bin 0 -> 156 bytes .../textures/item/perfect_enchant_2.png | Bin 0 -> 156 bytes .../textures/item/perfect_enchant_3.png | Bin 0 -> 159 bytes .../textures/item/perfect_enchant_4.png | Bin 0 -> 160 bytes .../textures/item/perfect_enchant_5.png | Bin 0 -> 158 bytes .../recipe/perfect_enchant_crafting.json | 4 + 42 files changed, 1378 insertions(+) create mode 100644 .gitignore create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle create mode 100644 src/main/java/com/sculkorbs/SculkOrbsMod.java create mode 100644 src/main/java/com/sculkorbs/enchant/PerfectEnchantApplier.java create mode 100644 src/main/java/com/sculkorbs/event/AnvilEnchantHandler.java create mode 100644 src/main/java/com/sculkorbs/event/SculkDropHandler.java create mode 100644 src/main/java/com/sculkorbs/item/PerfectEnchantItem.java create mode 100644 src/main/java/com/sculkorbs/item/SculkOrbItem.java create mode 100644 src/main/java/com/sculkorbs/item/SculkOrbTier.java create mode 100644 src/main/java/com/sculkorbs/recipe/PerfectEnchantCraftingRecipe.java create mode 100644 src/main/java/com/sculkorbs/registry/ModCreativeTabs.java create mode 100644 src/main/java/com/sculkorbs/registry/ModItems.java create mode 100644 src/main/java/com/sculkorbs/registry/ModRecipeSerializers.java create mode 100644 src/main/resources/META-INF/neoforge.mods.toml create mode 100644 src/main/resources/assets/sculkorbs/lang/en_us.json create mode 100644 src/main/resources/assets/sculkorbs/lang/fr_fr.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/colossal_orb.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/giant_orb.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/massive_orb.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/maximal_orb.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/mythic_orb.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/perfect_enchant_1.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/perfect_enchant_2.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/perfect_enchant_3.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/perfect_enchant_4.json create mode 100644 src/main/resources/assets/sculkorbs/models/item/perfect_enchant_5.json create mode 100644 src/main/resources/assets/sculkorbs/textures/item/colossal_orb.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/giant_orb.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/massive_orb.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/maximal_orb.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/mythic_orb.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_1.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_2.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_3.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_4.png create mode 100644 src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_5.png create mode 100644 src/main/resources/data/sculkorbs/recipe/perfect_enchant_crafting.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6babfc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ + +# --- double-push : exclusions generiques (secrets, builds, binaires, gros fichiers) --- +target/ +node_modules/ +build/ +build-*/ +dist/ +out/ +.gradle/ +.idea/ +venv/ +.venv/ +env/ +__pycache__/ +*.pyc +.cache/ +.next/ +.env +.env.* +!.env.example +accounts.json +Clee.API/ +*.pem +*.key +*.p12 +*.pfx +*.jks +*.keystore +keystore.properties +id_rsa* +id_ed25519* +*.kdbx +*.odt +*.sqlite +*.sqlite3 +*.db +*.log +*.exe +*.dll +*.msi +*.jar +*.zip +*.7z +*.rar +*.tar +*.tar.gz +*.tgz +*.gguf +*.safetensors +*.onnx +*.pt +*.pth +*.bin +*.iso +*.gws +*.apk +*.aab +*.so +*.o +*.a +*.lib +*.pdb +*.mp4 +*.mkv +*.wav +*.flac diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..8c6d6ee --- /dev/null +++ b/build.gradle @@ -0,0 +1,37 @@ +plugins { + id 'java' + id 'net.neoforged.moddev' version '2.0.142' +} + +version = project.mod_version +group = project.mod_group_id +base { archivesName = "${project.mod_id}-neoforge-1.21.1" } + +java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } + +repositories { + mavenCentral() + maven { name = 'NeoForged'; url = 'https://maven.neoforged.net/releases' } +} + +neoForge { + version = project.neoforge_version + runs { + client { + client() + } + server { + server() + } + } + mods { + "${project.mod_id}" { + sourceSet sourceSets.main + } + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' + options.release = 21 +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..2a607fa --- /dev/null +++ b/gradle.properties @@ -0,0 +1,9 @@ +org.gradle.jvmargs=-Xmx2G +org.gradle.parallel=true + +mod_version=1.0.0 +mod_group_id=com.sculkorbs +mod_id=sculkorbs + +minecraft_version=1.21.1 +neoforge_version=21.1.248 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..5dd3c01 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..b9bb139 --- /dev/null +++ b/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..24c62d5 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,82 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..fdb6759 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,8 @@ +pluginManagement { + repositories { + mavenCentral() + gradlePluginPortal() + maven { name = 'NeoForged'; url = 'https://maven.neoforged.net/releases' } + } +} +rootProject.name = 'sculkorbs-neoforge-1.21.1' diff --git a/src/main/java/com/sculkorbs/SculkOrbsMod.java b/src/main/java/com/sculkorbs/SculkOrbsMod.java new file mode 100644 index 0000000..7d2a33d --- /dev/null +++ b/src/main/java/com/sculkorbs/SculkOrbsMod.java @@ -0,0 +1,35 @@ +package com.sculkorbs; + +import com.sculkorbs.event.AnvilEnchantHandler; +import com.sculkorbs.event.SculkDropHandler; +import com.sculkorbs.registry.ModCreativeTabs; +import com.sculkorbs.registry.ModItems; +import com.sculkorbs.registry.ModRecipeSerializers; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.common.NeoForge; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Mod(SculkOrbsMod.MOD_ID) +public class SculkOrbsMod { + + public static final String MOD_ID = "sculkorbs"; + public static final Logger LOGGER = LoggerFactory.getLogger(SculkOrbsMod.class); + + public SculkOrbsMod(IEventBus modEventBus, ModContainer modContainer) { + LOGGER.info("[SculkOrbs] Initialisation du mod Sculk Orbs & Perfect Enchant 1.21.1..."); + + // Enregistrement des items, onglets et sérialiseurs de recettes + ModItems.ITEMS.register(modEventBus); + ModCreativeTabs.CREATIVE_MODE_TABS.register(modEventBus); + ModRecipeSerializers.RECIPE_SERIALIZERS.register(modEventBus); + + // Enregistrement des gestionnaires d'événements NeoForge + NeoForge.EVENT_BUS.register(SculkDropHandler.class); + NeoForge.EVENT_BUS.register(AnvilEnchantHandler.class); + + LOGGER.info("[SculkOrbs] Sculk Orbs, Perfect Enchant et Enclume universelle prêts !"); + } +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/enchant/PerfectEnchantApplier.java b/src/main/java/com/sculkorbs/enchant/PerfectEnchantApplier.java new file mode 100644 index 0000000..1cdaec3 --- /dev/null +++ b/src/main/java/com/sculkorbs/enchant/PerfectEnchantApplier.java @@ -0,0 +1,168 @@ +package com.sculkorbs.enchant; + +import net.minecraft.core.Holder; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.item.*; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.item.enchantment.ItemEnchantments; + +import java.util.ArrayList; +import java.util.List; + +public class PerfectEnchantApplier { + + private record EnchantTarget(ResourceKey key, int maxLevel) {} + + public static ItemStack applyPerfectEnchantments(ItemStack original, int tier, HolderLookup.Provider registries) { + if (original.isEmpty()) return ItemStack.EMPTY; + + ItemStack result = original.copy(); + Item item = result.getItem(); + + List targets = getEnchantmentsForItem(item); + if (targets.isEmpty()) { + // Si c'est un item endommagé / enchantable générique (ex: moddé, bouclier, briquet, etc.) + if (result.isDamageableItem() || item.isEnchantable(result)) { + targets = List.of( + new EnchantTarget(Enchantments.UNBREAKING, 3), + new EnchantTarget(Enchantments.MENDING, 1) + ); + } else { + return ItemStack.EMPTY; + } + } + + var enchantmentLookup = registries.lookupOrThrow(Registries.ENCHANTMENT); + ItemEnchantments existing = EnchantmentHelper.getEnchantmentsForCrafting(result); + ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(existing); + + boolean modified = false; + + for (EnchantTarget target : targets) { + var holderOpt = enchantmentLookup.get(target.key()); + if (holderOpt.isPresent()) { + Holder holder = holderOpt.get(); + int targetLevel = Math.min(tier, target.maxLevel()); + int currentLevel = mutable.getLevel(holder); + + if (targetLevel > currentLevel) { + mutable.set(holder, targetLevel); + modified = true; + } + } + } + + if (!modified && !existing.isEmpty()) { + // Même si tous les enchants étaient déjà au max, on peut valider l'opération + modified = true; + } + + if (modified) { + EnchantmentHelper.setEnchantments(result, mutable.toImmutable()); + return result; + } + + return ItemStack.EMPTY; + } + + private static List getEnchantmentsForItem(Item item) { + List list = new ArrayList<>(); + + if (item instanceof PickaxeItem) { + // Pioche : Fortune par défaut (le plus polyvalent comme demandé), Efficacité, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.EFFICIENCY, 5)); + list.add(new EnchantTarget(Enchantments.FORTUNE, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof AxeItem) { + // Hache : Efficacité, Tranchant, Fortune, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.EFFICIENCY, 5)); + list.add(new EnchantTarget(Enchantments.SHARPNESS, 5)); + list.add(new EnchantTarget(Enchantments.FORTUNE, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof ShovelItem || item instanceof HoeItem) { + // Pelle & Houe : Efficacité, Fortune, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.EFFICIENCY, 5)); + list.add(new EnchantTarget(Enchantments.FORTUNE, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof SwordItem) { + // Épée : Tranchant, Butin, Balayage, Aura de Feu, Recul, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.SHARPNESS, 5)); + list.add(new EnchantTarget(Enchantments.LOOTING, 3)); + list.add(new EnchantTarget(Enchantments.SWEEPING_EDGE, 3)); + list.add(new EnchantTarget(Enchantments.FIRE_ASPECT, 2)); + list.add(new EnchantTarget(Enchantments.KNOCKBACK, 2)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof MaceItem) { + // Masse (1.21) : Densité, Brèche, Rafale, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.DENSITY, 5)); + list.add(new EnchantTarget(Enchantments.BREACH, 4)); + list.add(new EnchantTarget(Enchantments.WIND_BURST, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof BowItem) { + // Arc : Puissance, Flamme, Frappe, Infinité, Solidité + list.add(new EnchantTarget(Enchantments.POWER, 5)); + list.add(new EnchantTarget(Enchantments.FLAME, 1)); + list.add(new EnchantTarget(Enchantments.PUNCH, 2)); + list.add(new EnchantTarget(Enchantments.INFINITY, 1)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + } else if (item instanceof CrossbowItem) { + // Arbalète : Tir multiple, Charge rapide, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.MULTISHOT, 1)); + list.add(new EnchantTarget(Enchantments.QUICK_CHARGE, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof TridentItem) { + // Trident : Empalement, Loyauté, Canalisation, Solidité, Raccommodage + list.add(new EnchantTarget(Enchantments.IMPALING, 5)); + list.add(new EnchantTarget(Enchantments.LOYALTY, 3)); + list.add(new EnchantTarget(Enchantments.CHANNELING, 1)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof ArmorItem armor) { + // Armures + list.add(new EnchantTarget(Enchantments.PROTECTION, 4)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + list.add(new EnchantTarget(Enchantments.THORNS, 3)); + + switch (armor.getType()) { + case HELMET -> { + list.add(new EnchantTarget(Enchantments.RESPIRATION, 3)); + list.add(new EnchantTarget(Enchantments.AQUA_AFFINITY, 1)); + } + case LEGGINGS -> { + list.add(new EnchantTarget(Enchantments.SWIFT_SNEAK, 3)); + } + case BOOTS -> { + list.add(new EnchantTarget(Enchantments.FEATHER_FALLING, 4)); + list.add(new EnchantTarget(Enchantments.DEPTH_STRIDER, 3)); + list.add(new EnchantTarget(Enchantments.SOUL_SPEED, 3)); + } + default -> {} + } + } else if (item instanceof ElytraItem) { + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof FishingRodItem) { + list.add(new EnchantTarget(Enchantments.LUCK_OF_THE_SEA, 3)); + list.add(new EnchantTarget(Enchantments.LURE, 3)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } else if (item instanceof ShearsItem) { + list.add(new EnchantTarget(Enchantments.EFFICIENCY, 5)); + list.add(new EnchantTarget(Enchantments.UNBREAKING, 3)); + list.add(new EnchantTarget(Enchantments.MENDING, 1)); + } + + return list; + } +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/event/AnvilEnchantHandler.java b/src/main/java/com/sculkorbs/event/AnvilEnchantHandler.java new file mode 100644 index 0000000..5c8879a --- /dev/null +++ b/src/main/java/com/sculkorbs/event/AnvilEnchantHandler.java @@ -0,0 +1,70 @@ +package com.sculkorbs.event; + +import com.sculkorbs.enchant.PerfectEnchantApplier; +import com.sculkorbs.item.PerfectEnchantItem; +import net.minecraft.core.HolderLookup; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Blocks; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.AnvilUpdateEvent; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; + +public class AnvilEnchantHandler { + + @SubscribeEvent + public static void onAnvilUpdate(AnvilUpdateEvent event) { + ItemStack left = event.getLeft(); + ItemStack right = event.getRight(); + + if (left.isEmpty() || right.isEmpty()) return; + + if (right.getItem() instanceof PerfectEnchantItem enchantItem) { + HolderLookup.Provider registries; + if (event.getPlayer() != null) { + registries = event.getPlayer().level().registryAccess(); + } else { + return; + } + + ItemStack output = PerfectEnchantApplier.applyPerfectEnchantments(left, enchantItem.getLevel(), registries); + + if (!output.isEmpty()) { + event.setOutput(output); + event.setCost(1); // 1 niveau d'XP de coût à l'enclume + event.setMaterialCost(1); // Consomme 1 Perfect Enchant + } + } + } + + @SubscribeEvent + public static void onItemCrafted(PlayerEvent.ItemCraftedEvent event) { + ItemStack crafted = event.getCrafting(); + if (crafted.getItem() instanceof PerfectEnchantItem) { + Container container = event.getInventory(); + + // Calcul du nombre de slots contenant du sculk + int sculkSlots = 0; + for (int i = 0; i < container.getContainerSize(); i++) { + ItemStack stack = container.getItem(i); + if (stack.is(Blocks.SCULK.asItem())) { + sculkSlots++; + } + } + + // Minecraft a déjà décrémenté 1 item par slot non vide lors du clic de craft. + // On retire le reste des 64 blocs de sculk nécessaires : + int sculkToConsume = Math.max(0, 64 - sculkSlots); + + for (int i = 0; i < container.getContainerSize(); i++) { + if (sculkToConsume <= 0) break; + ItemStack stack = container.getItem(i); + if (stack.is(Blocks.SCULK.asItem())) { + int toTake = Math.min(stack.getCount(), sculkToConsume); + stack.shrink(toTake); + sculkToConsume -= toTake; + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/event/SculkDropHandler.java b/src/main/java/com/sculkorbs/event/SculkDropHandler.java new file mode 100644 index 0000000..0f651ba --- /dev/null +++ b/src/main/java/com/sculkorbs/event/SculkDropHandler.java @@ -0,0 +1,92 @@ +package com.sculkorbs.event; + +import com.sculkorbs.registry.ModItems; +import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.Registries; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.level.BlockDropsEvent; + +import java.util.Random; + +public class SculkDropHandler { + + private static final Random RANDOM = new Random(); + + @SubscribeEvent + public static void onBlockDrops(BlockDropsEvent event) { + Level level = event.getLevel(); + if (level.isClientSide() || !(level instanceof ServerLevel serverLevel)) { + return; + } + + BlockState state = event.getState(); + if (!state.is(Blocks.SCULK)) { + return; + } + + Entity breaker = event.getBreaker(); + if (breaker instanceof Player player && player.isCreative()) { + return; + } + + ItemStack tool = event.getTool(); + + // Vérification de Silk Touch (Toucher de soie) + boolean hasSilkTouch = false; + if (!tool.isEmpty()) { + var silkTouchHolder = level.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(Enchantments.SILK_TOUCH); + if (silkTouchHolder.isPresent()) { + hasSilkTouch = EnchantmentHelper.getItemEnchantmentLevel(silkTouchHolder.get(), tool) > 0; + } + } + + if (hasSilkTouch) { + return; // Silk Touch conserve le bloc de sculk vanilla + } + + // Vider les drops par défaut + event.getDrops().clear(); + + // Tirage aléatoire : + // 25% Orbe Massif (0.00 à 0.25) + // 25% Orbe Géant (0.25 à 0.50) + // 25% Orbe Colossal (0.50 à 0.75) + // 20% Orbe Mythique (0.75 à 0.95) + // 5% Orbe Maximal (0.95 à 1.00) + double roll = RANDOM.nextDouble(); + ItemStack droppedOrb; + + if (roll < 0.25) { + droppedOrb = new ItemStack(ModItems.MASSIVE_ORB.get()); + } else if (roll < 0.50) { + droppedOrb = new ItemStack(ModItems.GIANT_ORB.get()); + } else if (roll < 0.75) { + droppedOrb = new ItemStack(ModItems.COLOSSAL_ORB.get()); + } else if (roll < 0.95) { + droppedOrb = new ItemStack(ModItems.MYTHIC_ORB.get()); + } else { + droppedOrb = new ItemStack(ModItems.MAXIMAL_ORB.get()); + } + + BlockPos pos = event.getPos(); + ItemEntity orbEntity = new ItemEntity( + serverLevel, + pos.getX() + 0.5, + pos.getY() + 0.5, + pos.getZ() + 0.5, + droppedOrb + ); + orbEntity.setDefaultPickUpDelay(); + event.getDrops().add(orbEntity); + } +} diff --git a/src/main/java/com/sculkorbs/item/PerfectEnchantItem.java b/src/main/java/com/sculkorbs/item/PerfectEnchantItem.java new file mode 100644 index 0000000..b0fef9a --- /dev/null +++ b/src/main/java/com/sculkorbs/item/PerfectEnchantItem.java @@ -0,0 +1,60 @@ +package com.sculkorbs.item; + +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; + +import java.util.List; + +public class PerfectEnchantItem extends Item { + + private final int level; + + public PerfectEnchantItem(int level, Properties properties) { + super(properties); + this.level = level; + } + + public int getLevel() { + return level; + } + + @Override + public boolean isFoil(ItemStack stack) { + return true; + } + + @Override + public void appendHoverText(ItemStack stack, TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); + + String roman = switch (level) { + case 1 -> "I"; + case 2 -> "II"; + case 3 -> "III"; + case 4 -> "IV"; + case 5 -> "V"; + default -> String.valueOf(level); + }; + + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.perfect_enchant_tier", roman).withStyle(ChatFormatting.GOLD)); + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.perfect_enchant_desc").withStyle(ChatFormatting.AQUA)); + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.perfect_enchant_max", level).withStyle(ChatFormatting.YELLOW)); + tooltipComponents.add(Component.empty()); + + if (level == 1) { + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.craft_hint_t1").withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC)); + } else { + String prevRoman = switch (level - 1) { + case 1 -> "I"; + case 2 -> "II"; + case 3 -> "III"; + case 4 -> "IV"; + default -> String.valueOf(level - 1); + }; + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.craft_hint_tn", prevRoman).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC)); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/item/SculkOrbItem.java b/src/main/java/com/sculkorbs/item/SculkOrbItem.java new file mode 100644 index 0000000..f9fbf29 --- /dev/null +++ b/src/main/java/com/sculkorbs/item/SculkOrbItem.java @@ -0,0 +1,116 @@ +package com.sculkorbs.item; + +import net.minecraft.ChatFormatting; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class SculkOrbItem extends Item { + + private final SculkOrbTier tier; + + public SculkOrbItem(SculkOrbTier tier, Properties properties) { + super(properties); + this.tier = tier; + } + + public SculkOrbTier getTier() { + return tier; + } + + @Override + public boolean isFoil(ItemStack stack) { + return tier.isFoil() || super.isFoil(stack); + } + + @Override + public InteractionResultHolder use(Level level, Player player, InteractionHand hand) { + ItemStack itemStack = player.getItemInHand(hand); + + if (!level.isClientSide && level instanceof ServerLevel serverLevel) { + // Donner l'expérience + player.giveExperiencePoints(tier.getXpAmount()); + + // Effets, particules et sons selon le palier de l'orbe + double px = player.getX(); + double py = player.getY(); + double pz = player.getZ(); + + switch (tier) { + case MASSIVE -> { + serverLevel.sendParticles(ParticleTypes.SCULK_CHARGE_POP, px, py + 1.0, pz, 20, 0.4, 0.5, 0.4, 0.05); + level.playSound(null, px, py, pz, SoundEvents.EXPERIENCE_ORB_PICKUP, SoundSource.PLAYERS, 1.0f, 1.2f); + } + case GIANT -> { + player.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 300, 0)); // 15s Vitesse I + serverLevel.sendParticles(ParticleTypes.SCULK_SOUL, px, py + 1.0, pz, 30, 0.5, 0.6, 0.5, 0.08); + level.playSound(null, px, py, pz, SoundEvents.SCULK_CATALYST_BLOOM, SoundSource.PLAYERS, 1.0f, 1.3f); + level.playSound(null, px, py, pz, SoundEvents.EXPERIENCE_ORB_PICKUP, SoundSource.PLAYERS, 1.0f, 1.0f); + } + case COLOSSAL -> { + player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 200, 1)); // 10s Regen II + player.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, 600, 0)); // 30s Vision nocturne + serverLevel.sendParticles(ParticleTypes.SCULK_SOUL, px, py + 1.0, pz, 45, 0.6, 0.8, 0.6, 0.1); + serverLevel.sendParticles(ParticleTypes.END_ROD, px, py + 1.0, pz, 15, 0.4, 0.5, 0.4, 0.05); + level.playSound(null, px, py, pz, SoundEvents.AMETHYST_BLOCK_RESONATE, SoundSource.PLAYERS, 1.5f, 0.8f); + level.playSound(null, px, py, pz, SoundEvents.PLAYER_LEVELUP, SoundSource.PLAYERS, 0.8f, 1.2f); + } + case MYTHIC -> { + player.addEffect(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 600, 1)); // 30s Résistance II + player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 300, 2)); // 15s Regen III + player.addEffect(new MobEffectInstance(MobEffects.ABSORPTION, 1200, 3)); // 60s Absorption IV + serverLevel.sendParticles(ParticleTypes.TOTEM_OF_UNDYING, px, py + 1.0, pz, 50, 0.5, 0.8, 0.5, 0.3); + serverLevel.sendParticles(ParticleTypes.SCULK_SOUL, px, py + 1.0, pz, 50, 0.6, 0.8, 0.6, 0.1); + level.playSound(null, px, py, pz, SoundEvents.TOTEM_USE, SoundSource.PLAYERS, 0.8f, 1.4f); + level.playSound(null, px, py, pz, SoundEvents.SCULK_SHRIEKER_SHRIEK, SoundSource.PLAYERS, 0.5f, 1.3f); + } + case MAXIMAL -> { + player.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, 900, 2)); // 45s Force III + player.addEffect(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 900, 2)); // 45s Résistance III + player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 600, 3)); // 30s Regen IV + player.addEffect(new MobEffectInstance(MobEffects.ABSORPTION, 2400, 4)); // 2m Absorption V + player.addEffect(new MobEffectInstance(MobEffects.DIG_SPEED, 1200, 1)); // 1m Célérité II + serverLevel.sendParticles(ParticleTypes.SONIC_BOOM, px, py + 1.0, pz, 1, 0, 0, 0, 0); + serverLevel.sendParticles(ParticleTypes.FLASH, px, py + 1.0, pz, 3, 0.2, 0.5, 0.2, 0); + serverLevel.sendParticles(ParticleTypes.SCULK_SOUL, px, py + 1.0, pz, 80, 0.8, 1.2, 0.8, 0.2); + serverLevel.sendParticles(ParticleTypes.ENCHANTED_HIT, px, py + 1.0, pz, 60, 0.8, 1.0, 0.8, 0.5); + level.playSound(null, px, py, pz, SoundEvents.WARDEN_SONIC_BOOM, SoundSource.PLAYERS, 1.2f, 1.0f); + level.playSound(null, px, py, pz, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundSource.PLAYERS, 1.0f, 1.0f); + } + } + + // Consommation de l'item en mode survie + if (!player.getAbilities().instabuild) { + itemStack.shrink(1); + } + + player.awardStat(Stats.ITEM_USED.get(this)); + } + + return InteractionResultHolder.sidedSuccess(itemStack, level.isClientSide()); + } + + @Override + public void appendHoverText(ItemStack stack, TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + super.appendHoverText(stack, context, tooltipComponents, tooltipFlag); + + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.drop_rate", tier.getDropRatePercent() + "%").withStyle(ChatFormatting.GRAY)); + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.xp_gain", String.format("%,d", tier.getXpAmount())).withStyle(ChatFormatting.GREEN)); + tooltipComponents.add(Component.empty()); + tooltipComponents.add(Component.translatable("tooltip.sculkorbs.use_hint").withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.ITALIC)); + } +} diff --git a/src/main/java/com/sculkorbs/item/SculkOrbTier.java b/src/main/java/com/sculkorbs/item/SculkOrbTier.java new file mode 100644 index 0000000..fe9c5f7 --- /dev/null +++ b/src/main/java/com/sculkorbs/item/SculkOrbTier.java @@ -0,0 +1,57 @@ +package com.sculkorbs.item; + +import net.minecraft.ChatFormatting; + +public enum SculkOrbTier { + MASSIVE("massive", "Orbe Massif", "Massive Orb", 25.0, 75, ChatFormatting.GREEN, false), + GIANT("giant", "Orbe Géant", "Giant Orb", 25.0, 350, ChatFormatting.AQUA, false), + COLOSSAL("colossal", "Orbe Colossal", "Colossal Orb", 25.0, 1500, ChatFormatting.LIGHT_PURPLE, true), + MYTHIC("mythic", "Orbe Mythique", "Mythic Orb", 20.0, 6000, ChatFormatting.GOLD, true), + MAXIMAL("maximal", "Orbe Maximal", "Maximal Orb", 5.0, 30000, ChatFormatting.DARK_RED, true); + + private final String id; + private final String frenchName; + private final String englishName; + private final double dropRatePercent; + private final int xpAmount; + private final ChatFormatting color; + private final boolean foil; + + SculkOrbTier(String id, String frenchName, String englishName, double dropRatePercent, int xpAmount, ChatFormatting color, boolean foil) { + this.id = id; + this.frenchName = frenchName; + this.englishName = englishName; + this.dropRatePercent = dropRatePercent; + this.xpAmount = xpAmount; + this.color = color; + this.foil = foil; + } + + public String getId() { + return id; + } + + public String getFrenchName() { + return frenchName; + } + + public String getEnglishName() { + return englishName; + } + + public double getDropRatePercent() { + return dropRatePercent; + } + + public int getXpAmount() { + return xpAmount; + } + + public ChatFormatting getColor() { + return color; + } + + public boolean isFoil() { + return foil; + } +} diff --git a/src/main/java/com/sculkorbs/recipe/PerfectEnchantCraftingRecipe.java b/src/main/java/com/sculkorbs/recipe/PerfectEnchantCraftingRecipe.java new file mode 100644 index 0000000..1b6d411 --- /dev/null +++ b/src/main/java/com/sculkorbs/recipe/PerfectEnchantCraftingRecipe.java @@ -0,0 +1,91 @@ +package com.sculkorbs.recipe; + +import com.sculkorbs.item.PerfectEnchantItem; +import com.sculkorbs.registry.ModItems; +import com.sculkorbs.registry.ModRecipeSerializers; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.NonNullList; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingBookCategory; +import net.minecraft.world.item.crafting.CraftingInput; +import net.minecraft.world.item.crafting.CustomRecipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; + +public class PerfectEnchantCraftingRecipe extends CustomRecipe { + + public PerfectEnchantCraftingRecipe(CraftingBookCategory category) { + super(category); + } + + @Override + public boolean matches(CraftingInput input, Level level) { + return getResultTier(input) > 0; + } + + @Override + public ItemStack assemble(CraftingInput input, HolderLookup.Provider registries) { + int targetTier = getResultTier(input); + return switch (targetTier) { + case 1 -> new ItemStack(ModItems.PERFECT_ENCHANT_1.get()); + case 2 -> new ItemStack(ModItems.PERFECT_ENCHANT_2.get()); + case 3 -> new ItemStack(ModItems.PERFECT_ENCHANT_3.get()); + case 4 -> new ItemStack(ModItems.PERFECT_ENCHANT_4.get()); + case 5 -> new ItemStack(ModItems.PERFECT_ENCHANT_5.get()); + default -> ItemStack.EMPTY; + }; + } + + private int getResultTier(CraftingInput input) { + int totalSculk = 0; + int prevEnchantLevel = 0; + int enchantCount = 0; + + for (int i = 0; i < input.size(); i++) { + ItemStack stack = input.getItem(i); + if (stack.isEmpty()) continue; + + if (stack.is(Blocks.SCULK.asItem())) { + totalSculk += stack.getCount(); + } else if (stack.getItem() instanceof PerfectEnchantItem enchantItem) { + enchantCount++; + prevEnchantLevel = enchantItem.getLevel(); + } else { + return 0; // Item non autorisé dans la recette + } + } + + // Il faut au moins 64 blocs de sculk au total dans la grille + if (totalSculk < 64) { + return 0; + } + + // Niveau 1 : 64 sculk et aucun item précédent + if (enchantCount == 0) { + return 1; + } + + // Niveau N+1 : 1 item de niveau N + 64 sculk (jusqu'à 5) + if (enchantCount == 1 && prevEnchantLevel >= 1 && prevEnchantLevel < 5) { + return prevEnchantLevel + 1; + } + + return 0; + } + + @Override + public NonNullList getRemainingItems(CraftingInput input) { + return NonNullList.withSize(input.size(), ItemStack.EMPTY); + } + + @Override + public boolean canCraftInDimensions(int width, int height) { + return width * height >= 1; + } + + @Override + public RecipeSerializer getSerializer() { + return ModRecipeSerializers.PERFECT_ENCHANT_CRAFTING.get(); + } +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/registry/ModCreativeTabs.java b/src/main/java/com/sculkorbs/registry/ModCreativeTabs.java new file mode 100644 index 0000000..ca7b64b --- /dev/null +++ b/src/main/java/com/sculkorbs/registry/ModCreativeTabs.java @@ -0,0 +1,36 @@ +package com.sculkorbs.registry; + +import com.sculkorbs.SculkOrbsMod; +import net.minecraft.core.registries.Registries; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; + +public class ModCreativeTabs { + + public static final DeferredRegister CREATIVE_MODE_TABS = + DeferredRegister.create(Registries.CREATIVE_MODE_TAB, SculkOrbsMod.MOD_ID); + + public static final DeferredHolder SCULK_ORBS_TAB = CREATIVE_MODE_TABS.register("sculk_orbs_tab", + () -> CreativeModeTab.builder() + .title(Component.translatable("itemGroup.sculkorbs")) + .icon(() -> new ItemStack(ModItems.PERFECT_ENCHANT_5.get())) + .displayItems((parameters, output) -> { + // Orbes de Sculk + output.accept(ModItems.MASSIVE_ORB.get()); + output.accept(ModItems.GIANT_ORB.get()); + output.accept(ModItems.COLOSSAL_ORB.get()); + output.accept(ModItems.MYTHIC_ORB.get()); + output.accept(ModItems.MAXIMAL_ORB.get()); + + // Perfect Enchants + output.accept(ModItems.PERFECT_ENCHANT_1.get()); + output.accept(ModItems.PERFECT_ENCHANT_2.get()); + output.accept(ModItems.PERFECT_ENCHANT_3.get()); + output.accept(ModItems.PERFECT_ENCHANT_4.get()); + output.accept(ModItems.PERFECT_ENCHANT_5.get()); + }) + .build()); +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/registry/ModItems.java b/src/main/java/com/sculkorbs/registry/ModItems.java new file mode 100644 index 0000000..8b0d8f3 --- /dev/null +++ b/src/main/java/com/sculkorbs/registry/ModItems.java @@ -0,0 +1,47 @@ +package com.sculkorbs.registry; + +import com.sculkorbs.SculkOrbsMod; +import com.sculkorbs.item.PerfectEnchantItem; +import com.sculkorbs.item.SculkOrbItem; +import com.sculkorbs.item.SculkOrbTier; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Rarity; +import net.neoforged.neoforge.registries.DeferredItem; +import net.neoforged.neoforge.registries.DeferredRegister; + +public class ModItems { + + public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(SculkOrbsMod.MOD_ID); + + // --- Les 5 Orbes de Sculk --- + public static final DeferredItem MASSIVE_ORB = ITEMS.register("massive_orb", + () -> new SculkOrbItem(SculkOrbTier.MASSIVE, new Item.Properties().rarity(Rarity.COMMON).stacksTo(64))); + + public static final DeferredItem GIANT_ORB = ITEMS.register("giant_orb", + () -> new SculkOrbItem(SculkOrbTier.GIANT, new Item.Properties().rarity(Rarity.UNCOMMON).stacksTo(64))); + + public static final DeferredItem COLOSSAL_ORB = ITEMS.register("colossal_orb", + () -> new SculkOrbItem(SculkOrbTier.COLOSSAL, new Item.Properties().rarity(Rarity.RARE).stacksTo(64))); + + public static final DeferredItem MYTHIC_ORB = ITEMS.register("mythic_orb", + () -> new SculkOrbItem(SculkOrbTier.MYTHIC, new Item.Properties().rarity(Rarity.EPIC).stacksTo(64))); + + public static final DeferredItem MAXIMAL_ORB = ITEMS.register("maximal_orb", + () -> new SculkOrbItem(SculkOrbTier.MAXIMAL, new Item.Properties().rarity(Rarity.EPIC).stacksTo(64))); + + // --- Les 5 Niveaux de Perfect Enchant --- + public static final DeferredItem PERFECT_ENCHANT_1 = ITEMS.register("perfect_enchant_1", + () -> new PerfectEnchantItem(1, new Item.Properties().rarity(Rarity.COMMON).stacksTo(16))); + + public static final DeferredItem PERFECT_ENCHANT_2 = ITEMS.register("perfect_enchant_2", + () -> new PerfectEnchantItem(2, new Item.Properties().rarity(Rarity.UNCOMMON).stacksTo(16))); + + public static final DeferredItem PERFECT_ENCHANT_3 = ITEMS.register("perfect_enchant_3", + () -> new PerfectEnchantItem(3, new Item.Properties().rarity(Rarity.RARE).stacksTo(16))); + + public static final DeferredItem PERFECT_ENCHANT_4 = ITEMS.register("perfect_enchant_4", + () -> new PerfectEnchantItem(4, new Item.Properties().rarity(Rarity.EPIC).stacksTo(16))); + + public static final DeferredItem PERFECT_ENCHANT_5 = ITEMS.register("perfect_enchant_5", + () -> new PerfectEnchantItem(5, new Item.Properties().rarity(Rarity.EPIC).stacksTo(16))); +} \ No newline at end of file diff --git a/src/main/java/com/sculkorbs/registry/ModRecipeSerializers.java b/src/main/java/com/sculkorbs/registry/ModRecipeSerializers.java new file mode 100644 index 0000000..f986847 --- /dev/null +++ b/src/main/java/com/sculkorbs/registry/ModRecipeSerializers.java @@ -0,0 +1,19 @@ +package com.sculkorbs.registry; + +import com.sculkorbs.SculkOrbsMod; +import com.sculkorbs.recipe.PerfectEnchantCraftingRecipe; +import net.minecraft.core.registries.Registries; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.SimpleCraftingRecipeSerializer; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; + +public class ModRecipeSerializers { + + public static final DeferredRegister> RECIPE_SERIALIZERS = + DeferredRegister.create(Registries.RECIPE_SERIALIZER, SculkOrbsMod.MOD_ID); + + public static final DeferredHolder, SimpleCraftingRecipeSerializer> PERFECT_ENCHANT_CRAFTING = + RECIPE_SERIALIZERS.register("perfect_enchant_crafting", + () -> new SimpleCraftingRecipeSerializer<>(PerfectEnchantCraftingRecipe::new)); +} \ No newline at end of file diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..4a6ddca --- /dev/null +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,24 @@ +modLoader="javafml" +loaderVersion="[1,)" +license="MIT" + +[[mods]] +modId="sculkorbs" +version="1.0.0" +displayName="Sculk Orbs" +authors="Théo Gastinel" +description='''Mod ajoutant 5 types d'orbes mystiques et d'expérience avec des probabilités configurées en minant des blocs de sculk.''' + +[[dependencies.sculkorbs]] + modId="neoforge" + type="required" + versionRange="[21.1,)" + ordering="NONE" + side="BOTH" + +[[dependencies.sculkorbs]] + modId="minecraft" + type="required" + versionRange="[1.21.1,1.21.2)" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/assets/sculkorbs/lang/en_us.json b/src/main/resources/assets/sculkorbs/lang/en_us.json new file mode 100644 index 0000000..20a332c --- /dev/null +++ b/src/main/resources/assets/sculkorbs/lang/en_us.json @@ -0,0 +1,21 @@ +{ + "itemGroup.sculkorbs": "Sculk Orbs & Perfect Enchant", + "item.sculkorbs.massive_orb": "Massive Orb", + "item.sculkorbs.giant_orb": "Giant Orb", + "item.sculkorbs.colossal_orb": "Colossal Orb", + "item.sculkorbs.mythic_orb": "Mythic Orb", + "item.sculkorbs.maximal_orb": "Maximal Orb", + "item.sculkorbs.perfect_enchant_1": "Perfect Enchant I", + "item.sculkorbs.perfect_enchant_2": "Perfect Enchant II", + "item.sculkorbs.perfect_enchant_3": "Perfect Enchant III", + "item.sculkorbs.perfect_enchant_4": "Perfect Enchant IV", + "item.sculkorbs.perfect_enchant_5": "Perfect Enchant V", + "tooltip.sculkorbs.drop_rate": "§7Drop Rate: §e%s", + "tooltip.sculkorbs.xp_gain": "§7Experience: §a+%s XP", + "tooltip.sculkorbs.use_hint": "Right click to consume", + "tooltip.sculkorbs.perfect_enchant_tier": "§6§lTier : %s", + "tooltip.sculkorbs.perfect_enchant_desc": "Combine with equipment in an anvil", + "tooltip.sculkorbs.perfect_enchant_max": "Applies the best enchantments up to level §e%s", + "tooltip.sculkorbs.craft_hint_t1": "Craft: 64 sculk blocks in crafting grid", + "tooltip.sculkorbs.craft_hint_tn": "Craft: Perfect Enchant %s + 64 sculk blocks" +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/lang/fr_fr.json b/src/main/resources/assets/sculkorbs/lang/fr_fr.json new file mode 100644 index 0000000..5440f38 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/lang/fr_fr.json @@ -0,0 +1,21 @@ +{ + "itemGroup.sculkorbs": "Sculk Orbs & Perfect Enchant", + "item.sculkorbs.massive_orb": "Orbe Massif", + "item.sculkorbs.giant_orb": "Orbe Géant", + "item.sculkorbs.colossal_orb": "Orbe Colossal", + "item.sculkorbs.mythic_orb": "Orbe Mythique", + "item.sculkorbs.maximal_orb": "Orbe Maximal", + "item.sculkorbs.perfect_enchant_1": "Enchantement Parfait I", + "item.sculkorbs.perfect_enchant_2": "Enchantement Parfait II", + "item.sculkorbs.perfect_enchant_3": "Enchantement Parfait III", + "item.sculkorbs.perfect_enchant_4": "Enchantement Parfait IV", + "item.sculkorbs.perfect_enchant_5": "Enchantement Parfait V", + "tooltip.sculkorbs.drop_rate": "§7Taux d'apparition: §e%s", + "tooltip.sculkorbs.xp_gain": "§7Expérience: §a+%s XP", + "tooltip.sculkorbs.use_hint": "Faites un clic droit pour consommer", + "tooltip.sculkorbs.perfect_enchant_tier": "§6§lRang : %s", + "tooltip.sculkorbs.perfect_enchant_desc": "Combinez avec un équipement dans une enclume", + "tooltip.sculkorbs.perfect_enchant_max": "Applique les meilleurs enchantements jusqu'au niveau §e%s", + "tooltip.sculkorbs.craft_hint_t1": "Craft : 64 blocs de sculk dans la grille", + "tooltip.sculkorbs.craft_hint_tn": "Craft : Enchantement Parfait %s + 64 blocs de sculk" +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/models/item/colossal_orb.json b/src/main/resources/assets/sculkorbs/models/item/colossal_orb.json new file mode 100644 index 0000000..8412143 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/colossal_orb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/colossal_orb" + } +} diff --git a/src/main/resources/assets/sculkorbs/models/item/giant_orb.json b/src/main/resources/assets/sculkorbs/models/item/giant_orb.json new file mode 100644 index 0000000..7fbd56f --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/giant_orb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/giant_orb" + } +} diff --git a/src/main/resources/assets/sculkorbs/models/item/massive_orb.json b/src/main/resources/assets/sculkorbs/models/item/massive_orb.json new file mode 100644 index 0000000..4f7ff0b --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/massive_orb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/massive_orb" + } +} diff --git a/src/main/resources/assets/sculkorbs/models/item/maximal_orb.json b/src/main/resources/assets/sculkorbs/models/item/maximal_orb.json new file mode 100644 index 0000000..81cb57b --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/maximal_orb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/maximal_orb" + } +} diff --git a/src/main/resources/assets/sculkorbs/models/item/mythic_orb.json b/src/main/resources/assets/sculkorbs/models/item/mythic_orb.json new file mode 100644 index 0000000..e148c27 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/mythic_orb.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/mythic_orb" + } +} diff --git a/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_1.json b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_1.json new file mode 100644 index 0000000..56a2309 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/perfect_enchant_1" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_2.json b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_2.json new file mode 100644 index 0000000..a0da3c3 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/perfect_enchant_2" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_3.json b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_3.json new file mode 100644 index 0000000..7782115 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/perfect_enchant_3" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_4.json b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_4.json new file mode 100644 index 0000000..cec0cfb --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/perfect_enchant_4" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_5.json b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_5.json new file mode 100644 index 0000000..ccb4b57 --- /dev/null +++ b/src/main/resources/assets/sculkorbs/models/item/perfect_enchant_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "sculkorbs:item/perfect_enchant_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/sculkorbs/textures/item/colossal_orb.png b/src/main/resources/assets/sculkorbs/textures/item/colossal_orb.png new file mode 100644 index 0000000000000000000000000000000000000000..68d53b9d6f102dbd69307eeb4a06958f1f684068 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr*1S2@6;!JT~~<&%1c_ zVFrWNi$SpwhH=dkOwXC_WI1*``+sw04%@=l?a~aFJ9;ki9yDN>o;Jh#0`CC>mf4Iu zOdgpwM4YwYJs@82LSi+efwP8Dg9J}dzp)xe;+k2VrVPu|BpNgiEEQazmeR1MQKk0@ a1A~&OV`lhN?oB{9FnGH9xvXov2hL~B2dXDA{hXr!j9$f0U z&X8pK*n}bez{2D=Y!18&&oC$%c-X$1q0q1~OYIuNoLPws>loVI_RN~dxQT6&$s}fm Y$xobg)uzsm0=j^~)78&qol`;+0Df^gwEzGB literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/massive_orb.png b/src/main/resources/assets/sculkorbs/textures/item/massive_orb.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4e98534c121abff6d40abbdc1286c3ed72f6a9 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr*1S2@6;g0x$gR=Uu$| zFoQws9l^{9!?@-NrdDzPcn=t`%x2tS z^2oFy;;aSl0r7$t5~~>voHdLZBzS`Qjnz03*UaiPWmujj(V%%?so?swl!i5pD!oq_ Z7}%~Tvo)FS$pN~7!PC{xWt~$(69CpxI-vjn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/maximal_orb.png b/src/main/resources/assets/sculkorbs/textures/item/maximal_orb.png new file mode 100644 index 0000000000000000000000000000000000000000..6ab698329eea284e448bbd49dee8247879b844a3 GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`D?MEtLn`8u6Amz@9k=_-|GZ{z zQ-Uya$c&bM$%kLOGGOpY6y0qm(Hz5=+-wlnJi&C{ln=lD-#7pM|3ClygC-sQc>=rY zb}(wpN|ear(9qc+)evrMxUNC6VU1*pwBA__wgx7yJO;Vh8(B5t#2;*uyva}zb&!LZ zY1YPF3}S~AdT*EOe;9|zc Z@b-mA#~I7FJwQh@c)I$ztaD0e0sxCoQLO*~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/mythic_orb.png b/src/main/resources/assets/sculkorbs/textures/item/mythic_orb.png new file mode 100644 index 0000000000000000000000000000000000000000..8e4cb6121d73cbd9ff5460c07b7975a1abb2366c GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`6`n4RAr*1S2@6;^Oi29I&%1c_ zVFrWN*n?{#4C9(7n8v+)#`O6A?=1&S%$hHJJ2mBvTY^M`xA7U(7iq~|Kb3`G%12OhSS$0dbZ48qPHk!lDw<~bnp;8I7pv5~_yhe>Wl a3=B#_x;NSD_P7Jxz~JfX=d#Wzp$P!M|32~n literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_1.png b/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a1852a9aaa03e9fb4ad5ad77065c4eeb933cf547 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`$(}BbAr*1S2@Av?Tr&Rc&*OHT zolT+h|8>cKpO2|LKB{0E!OO_mBr@mUA4Yw)m5Lb+_a^2>7<#fb9C7&4e82uc#T5o4 zo&#;2W(@Le(jUHZtx{BQoD`(Ai_yTjli#;{an^LB{Ts5 DRA4hZ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_3.png b/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_3.png new file mode 100644 index 0000000000000000000000000000000000000000..2d1efd899d371a41b5660e397bdf14f7892c74ef GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`X`U{QAr*1S2@Avm5(|F&^SE7S zXH)3>e_isQyXToh-Hursq?m+QG%Gf|vXA2la=y^8v#xw&(j*>+&f5BK|Lr-Ne<)O4 zVG!ay(AH_jAm1ka;VaiFMFq!6K}x$A4V*g;zWBu^$H371qNv%zYLOSvMg~t;KbLh* G2~7YY+%?7k literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_4.png b/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_4.png new file mode 100644 index 0000000000000000000000000000000000000000..55dc99fb49202e1b46fc27e64de49c0d83ade5cc GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`>7Fi*Ar*1S2@AwFOiljh&*OHT zolT+h|8>cK<*b_@9aS)m;AP}&61~%Xq}wrzL+V4xQk5{DNsI~`|L>P~Fj2bbe1%~~ z+NQ$|I?Njq7x5lwf5=v|w<(LmW5SXt9eE6A1d*1M}S1860Kr>mdK II;Vst0IC)^H~;_u literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_5.png b/src/main/resources/assets/sculkorbs/textures/item/perfect_enchant_5.png new file mode 100644 index 0000000000000000000000000000000000000000..5856d3472637b2223b1f3f9ad8d39eb7a1d30693 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`sh%#5Ar*1S2@Avw(kA@#=W)Bv z&Zf}$|GMNq^AE2dA5}1o;AP}&5}oo5#BSkD;5gXlX~>}R?f>EMmNbFc|JV+g9O99R zVoNycBHh4#nD<8&>s5gX3Z9yRcNu0V9!V&vW#(tlk8vtE=Pj8Iw2;Bm)z4*}Q$iB} D>jg9D literal 0 HcmV?d00001 diff --git a/src/main/resources/data/sculkorbs/recipe/perfect_enchant_crafting.json b/src/main/resources/data/sculkorbs/recipe/perfect_enchant_crafting.json new file mode 100644 index 0000000..264b757 --- /dev/null +++ b/src/main/resources/data/sculkorbs/recipe/perfect_enchant_crafting.json @@ -0,0 +1,4 @@ +{ + "type": "sculkorbs:perfect_enchant_crafting", + "category": "misc" +} \ No newline at end of file