initial commit, 30+ tweaks
This commit is contained in:
commit
98067cbba9
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.c*
|
||||||
|
.v*
|
||||||
|
.idea/
|
||||||
|
.gradle/
|
||||||
|
build/
|
||||||
|
bin/
|
||||||
|
gradle/
|
||||||
|
libs/
|
||||||
|
run/
|
||||||
215
build.gradle
Normal file
215
build.gradle
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
|
||||||
|
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'eclipse'
|
||||||
|
id 'idea'
|
||||||
|
id 'net.minecraftforge.gradle' version '[6.0.16,6.2)'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
|
group = mod_group_id
|
||||||
|
version = mod_version
|
||||||
|
|
||||||
|
base {
|
||||||
|
archivesName = mod_id
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
}
|
||||||
|
|
||||||
|
minecraft {
|
||||||
|
// The mappings can be changed at any time and must be in the following format.
|
||||||
|
// Channel: Version:
|
||||||
|
// official MCVersion Official field/method names from Mojang mapping files
|
||||||
|
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
|
||||||
|
//
|
||||||
|
// You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
|
||||||
|
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
||||||
|
//
|
||||||
|
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
|
||||||
|
// Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started
|
||||||
|
//
|
||||||
|
// Use non-default mappings at your own risk. They may not always work.
|
||||||
|
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||||
|
mappings channel: mapping_channel, version: mapping_version
|
||||||
|
|
||||||
|
// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
|
||||||
|
// In most cases, it is not necessary to enable.
|
||||||
|
// enableEclipsePrepareRuns = true
|
||||||
|
// enableIdeaPrepareRuns = true
|
||||||
|
|
||||||
|
// This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
|
||||||
|
// It is REQUIRED to be set to true for this template to function.
|
||||||
|
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
|
||||||
|
copyIdeResources = true
|
||||||
|
|
||||||
|
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
|
||||||
|
// The folder name can be set on a run configuration using the "folderName" property.
|
||||||
|
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
|
||||||
|
// generateRunFolders = true
|
||||||
|
|
||||||
|
// This property enables access transformers for use in development.
|
||||||
|
// They will be applied to the Minecraft artifact.
|
||||||
|
// The access transformer file can be anywhere in the project.
|
||||||
|
// However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
|
||||||
|
// This default location is a best practice to automatically put the file in the right place in the final jar.
|
||||||
|
// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
|
||||||
|
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
|
|
||||||
|
// Default run configurations.
|
||||||
|
// These can be tweaked, removed, or duplicated as needed.
|
||||||
|
runs {
|
||||||
|
// applies to all the run configs below
|
||||||
|
configureEach {
|
||||||
|
workingDirectory project.file('run')
|
||||||
|
|
||||||
|
// Recommended logging data for a userdev environment
|
||||||
|
// The markers can be added/remove as needed separated by commas.
|
||||||
|
// "SCAN": For mods scan.
|
||||||
|
// "REGISTRIES": For firing of registry events.
|
||||||
|
// "REGISTRYDUMP": For getting the contents of all registries.
|
||||||
|
property 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
|
||||||
|
|
||||||
|
// Recommended logging level for the console
|
||||||
|
// You can set various levels here.
|
||||||
|
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
||||||
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
|
mods {
|
||||||
|
"${mod_id}" {
|
||||||
|
source sourceSets.main
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
client {
|
||||||
|
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
|
||||||
|
property 'forge.enabledGameTestNamespaces', mod_id
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
property 'forge.enabledGameTestNamespaces', mod_id
|
||||||
|
args '--nogui'
|
||||||
|
}
|
||||||
|
|
||||||
|
// This run config launches GameTestServer and runs all registered gametests, then exits.
|
||||||
|
// By default, the server will crash when no gametests are provided.
|
||||||
|
// The gametest system is also enabled by default for other run configs under the /test command.
|
||||||
|
gameTestServer {
|
||||||
|
property 'forge.enabledGameTestNamespaces', mod_id
|
||||||
|
}
|
||||||
|
|
||||||
|
data {
|
||||||
|
// example of overriding the workingDirectory set in configureEach above
|
||||||
|
workingDirectory project.file('run-data')
|
||||||
|
|
||||||
|
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||||
|
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mixin {
|
||||||
|
add sourceSets.main, "${mod_id}.refmap.json"
|
||||||
|
|
||||||
|
config "${mod_id}.mixins.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include resources generated by data generators.
|
||||||
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
// Put repositories for dependencies here
|
||||||
|
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
||||||
|
|
||||||
|
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so.
|
||||||
|
// See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
|
||||||
|
flatDir {
|
||||||
|
dir 'libs'
|
||||||
|
}
|
||||||
|
maven { url = 'https://maven.tterrag.com/' }
|
||||||
|
maven { url 'https://maven.blamejared.com' }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// Specify the version of Minecraft to use.
|
||||||
|
// Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact.
|
||||||
|
// The "userdev" classifier will be requested and setup by ForgeGradle.
|
||||||
|
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
|
||||||
|
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
|
||||||
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||||
|
|
||||||
|
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
|
||||||
|
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
|
||||||
|
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
|
||||||
|
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
|
||||||
|
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")
|
||||||
|
// Optional dependency used only when present at runtime
|
||||||
|
runtimeOnly fg.deobf("blank:respiteful-1.2.1")
|
||||||
|
runtimeOnly fg.deobf("blank:tetracelium-1.20.1-1.3.1")
|
||||||
|
runtimeOnly fg.deobf("blank:supplementaries-1.20-3.1.36")
|
||||||
|
compileOnly fg.deobf("vazkii.botania:Botania:1.20.1-450-FORGE:api")
|
||||||
|
// Compile-only hints for Registrate types used in mixin signatures
|
||||||
|
compileOnly fg.deobf("com.tterrag.registrate:Registrate:MC1.20-1.3.11")
|
||||||
|
// Example mod dependency using a mod jar from ./libs with a flat dir repository
|
||||||
|
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
|
||||||
|
// The group id is ignored when searching -- in this case, it is "blank"
|
||||||
|
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
|
||||||
|
|
||||||
|
// For more info:
|
||||||
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||||
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||||
|
|
||||||
|
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// This block of code expands all declared replace properties in the specified resource targets.
|
||||||
|
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
|
||||||
|
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
|
||||||
|
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
|
||||||
|
tasks.named('processResources', ProcessResources).configure {
|
||||||
|
var replaceProperties = [minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range,
|
||||||
|
forge_version : forge_version, forge_version_range: forge_version_range,
|
||||||
|
loader_version_range: loader_version_range,
|
||||||
|
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
|
||||||
|
mod_authors : mod_authors, mod_description: mod_description,]
|
||||||
|
|
||||||
|
inputs.properties replaceProperties
|
||||||
|
|
||||||
|
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
|
||||||
|
expand replaceProperties + [project: project]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Example for how to get properties into the manifest for reading at runtime.
|
||||||
|
tasks.named('jar', Jar).configure {
|
||||||
|
manifest {
|
||||||
|
attributes(["Specification-Title" : mod_id,
|
||||||
|
"Specification-Vendor" : mod_authors,
|
||||||
|
"Specification-Version" : "1", // We are version 1 of ourselves
|
||||||
|
"Implementation-Title" : project.name,
|
||||||
|
"Implementation-Version" : project.jar.archiveVersion,
|
||||||
|
"Implementation-Vendor" : mod_authors,
|
||||||
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")])
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is the preferred method to reobfuscate your jar file
|
||||||
|
finalizedBy 'reobfJar'
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
|
||||||
|
}
|
||||||
16
gradle.properties
Normal file
16
gradle.properties
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
org.gradle.jvmargs=-Xmx3G
|
||||||
|
org.gradle.daemon=false
|
||||||
|
minecraft_version=1.20.1
|
||||||
|
minecraft_version_range=[1.20.1,1.21)
|
||||||
|
forge_version=47.4.6
|
||||||
|
forge_version_range=[47,)
|
||||||
|
loader_version_range=[47,)
|
||||||
|
mapping_channel=official
|
||||||
|
mapping_version=1.20.1
|
||||||
|
mod_id=ccccc
|
||||||
|
mod_name=Candle's Consistency - Compats, Configs, and Crutches
|
||||||
|
mod_license=MIT
|
||||||
|
mod_version=0.1
|
||||||
|
mod_group_id=io.lampnet
|
||||||
|
mod_authors=candle
|
||||||
|
mod_description='Fixes' to the game, and some mods that are forgotten.
|
||||||
249
gradlew
vendored
Executable file
249
gradlew
vendored
Executable file
@ -0,0 +1,249 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# 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/HEAD/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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || 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
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# 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" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
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, 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" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# 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" "$@"
|
||||||
92
gradlew.bat
vendored
Normal file
92
gradlew.bat
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
@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
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
: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
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
||||||
15
settings.gradle
Normal file
15
settings.gradle
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
gradlePluginPortal()
|
||||||
|
maven {
|
||||||
|
name = 'MinecraftForge'
|
||||||
|
url = 'https://maven.minecraftforge.net/'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.name = 'ccccc'
|
||||||
57
src/main/java/io/lampnet/ccccc/Ccccc.java
Normal file
57
src/main/java/io/lampnet/ccccc/Ccccc.java
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
package io.lampnet.ccccc;
|
||||||
|
|
||||||
|
import com.mojang.logging.LogUtils;
|
||||||
|
import io.lampnet.ccccc.tweaks.CompostHandler;
|
||||||
|
import io.lampnet.ccccc.tweaks.BlockDropHandler;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.ModLoadingContext;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
@Mod(Ccccc.MODID)
|
||||||
|
public class Ccccc {
|
||||||
|
|
||||||
|
public static final String MODID = "ccccc";
|
||||||
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
|
|
||||||
|
public Ccccc() {
|
||||||
|
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||||
|
|
||||||
|
modEventBus.addListener(this::commonSetup);
|
||||||
|
|
||||||
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
|
||||||
|
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.SPEC);
|
||||||
|
|
||||||
|
CompostHandler.init();
|
||||||
|
BlockDropHandler.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||||
|
LOGGER.debug("Common setup complete for {}", MODID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onServerStarting(ServerStartingEvent event) {
|
||||||
|
LOGGER.debug("Server starting for {}", MODID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||||
|
public static class ClientModEvents {
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||||
|
LOGGER.debug("Client setup complete for {} (user: {})", MODID, Minecraft.getInstance().getUser().getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
119
src/main/java/io/lampnet/ccccc/Config.java
Normal file
119
src/main/java/io/lampnet/ccccc/Config.java
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
package io.lampnet.ccccc;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
import io.lampnet.ccccc.config.TweakCategory;
|
||||||
|
import io.lampnet.ccccc.config.TweakGroup;
|
||||||
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.fml.event.config.ModConfigEvent;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumMap;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = Ccccc.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||||
|
public final class Config {
|
||||||
|
private static final String RANGE_KEY = "glow_squid_scan_range";
|
||||||
|
public static final int GLOW_SQUID_RANGE_DISABLE = 0;
|
||||||
|
public static final int DEFAULT_GLOW_SQUID_SCAN_RANGE = 16;
|
||||||
|
private static final int MIN_GLOW_SQUID_SCAN_RANGE = 0;
|
||||||
|
private static final int MAX_GLOW_SQUID_SCAN_RANGE = 256;
|
||||||
|
|
||||||
|
private static final ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
||||||
|
|
||||||
|
private static final Map<Tweak, ForgeConfigSpec.BooleanValue> tweakToSpecValue = new EnumMap<>(Tweak.class);
|
||||||
|
private static final ForgeConfigSpec.IntValue glowSquidScanRange;
|
||||||
|
private static final Map<Tweak, Boolean> cachedEnabled = new EnumMap<>(Tweak.class);
|
||||||
|
|
||||||
|
static final ForgeConfigSpec SPEC;
|
||||||
|
|
||||||
|
static {
|
||||||
|
for (final TweakCategory category : TweakCategory.values()) {
|
||||||
|
builder.push(category.getConfigPath());
|
||||||
|
|
||||||
|
final Map<TweakGroup, List<Tweak>> groupToTweaks = new HashMap<>();
|
||||||
|
final List<Tweak> ungroupedTweaks = new ArrayList<>();
|
||||||
|
|
||||||
|
for (final Tweak tweak : Tweak.values()) {
|
||||||
|
if (tweak.getCategory() != category) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!tweak.isAvailable()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (tweak == Tweak.CHANGE_GLOW_SQUID_SPAWNS) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (tweak.getGroup() == TweakGroup.NONE) {
|
||||||
|
ungroupedTweaks.add(tweak);
|
||||||
|
} else {
|
||||||
|
groupToTweaks.computeIfAbsent(tweak.getGroup(), g -> new ArrayList<>()).add(tweak);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final Tweak tweak : ungroupedTweaks) {
|
||||||
|
final String key = tweak.getConfigKeyId();
|
||||||
|
final ForgeConfigSpec.BooleanValue value = builder
|
||||||
|
.comment(tweak.getDescription())
|
||||||
|
.define(key, tweak.isDefaultEnabled());
|
||||||
|
tweakToSpecValue.put(tweak, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final Map.Entry<TweakGroup, List<Tweak>> entry : groupToTweaks.entrySet()) {
|
||||||
|
final TweakGroup group = entry.getKey();
|
||||||
|
builder.push(group.getConfigPath());
|
||||||
|
for (final Tweak tweak : entry.getValue()) {
|
||||||
|
final String key = tweak.getConfigKeyId();
|
||||||
|
final ForgeConfigSpec.BooleanValue value = builder
|
||||||
|
.comment(tweak.getDescription())
|
||||||
|
.define(key, tweak.isDefaultEnabled());
|
||||||
|
tweakToSpecValue.put(tweak, value);
|
||||||
|
}
|
||||||
|
builder.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
builder.pop();
|
||||||
|
}
|
||||||
|
builder.push(Tweak.CHANGE_GLOW_SQUID_SPAWNS.getCategory().getConfigPath());
|
||||||
|
glowSquidScanRange = builder
|
||||||
|
.comment("Amount of blocks to scan above a glow squid spawn for a stone type; set to 0 to disable stone-check restriction.")
|
||||||
|
.defineInRange(RANGE_KEY, DEFAULT_GLOW_SQUID_SCAN_RANGE, MIN_GLOW_SQUID_SCAN_RANGE, MAX_GLOW_SQUID_SCAN_RANGE);
|
||||||
|
builder.pop();
|
||||||
|
SPEC = builder.build();
|
||||||
|
for (final Tweak tweak : Tweak.values()) {
|
||||||
|
final boolean defaultValueWhenUnavailable = false;
|
||||||
|
final boolean initial = tweak.isAvailable() ? tweak.isDefaultEnabled() : defaultValueWhenUnavailable;
|
||||||
|
cachedEnabled.put(tweak, initial);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Config() {}
|
||||||
|
|
||||||
|
public static boolean isEnabled(final Tweak tweak) {
|
||||||
|
final Boolean value = cachedEnabled.get(tweak);
|
||||||
|
if (value == null) {
|
||||||
|
return tweak.isDefaultEnabled();
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
static void onLoad(final ModConfigEvent event) {
|
||||||
|
for (final Map.Entry<Tweak, ForgeConfigSpec.BooleanValue> entry : tweakToSpecValue.entrySet()) {
|
||||||
|
final Tweak tweak = entry.getKey();
|
||||||
|
final ForgeConfigSpec.BooleanValue specValue = entry.getValue();
|
||||||
|
final boolean enabled = specValue != null && Boolean.TRUE.equals(specValue.get());
|
||||||
|
cachedEnabled.put(tweak, enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getGlowSquidScanRange() {
|
||||||
|
if (glowSquidScanRange == null) {
|
||||||
|
return DEFAULT_GLOW_SQUID_SCAN_RANGE;
|
||||||
|
}
|
||||||
|
return glowSquidScanRange.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
467
src/main/java/io/lampnet/ccccc/config/Tweak.java
Normal file
467
src/main/java/io/lampnet/ccccc/config/Tweak.java
Normal file
@ -0,0 +1,467 @@
|
|||||||
|
package io.lampnet.ccccc.config;
|
||||||
|
|
||||||
|
import net.minecraftforge.fml.ModList;
|
||||||
|
import net.minecraftforge.fml.loading.LoadingModList;
|
||||||
|
|
||||||
|
public enum Tweak {
|
||||||
|
MIXIN_RESPITEFUL_FLUIDS(
|
||||||
|
"fix_respiteful_fluids_registration",
|
||||||
|
TweakCategory.BUGFIX,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Fix Respiteful fluid registration breaking JEI recipes"
|
||||||
|
),
|
||||||
|
CHANGE_GLOW_SQUID_SPAWNS(
|
||||||
|
"change_glow_squid_spawns",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Require stone above glow squids to encourage cave-only spawns"
|
||||||
|
),
|
||||||
|
LANTERN_AS_BELT(
|
||||||
|
"tags_accesories_belt_lantern",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Make Minecraft lanterns wearable on the belt",
|
||||||
|
"accessories"
|
||||||
|
),
|
||||||
|
TAGS_TRAVELERSBACKPACK_TOOLS_CREATE(
|
||||||
|
"tags_acceptable_tools_create",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.TRAVELERS_BACKPACK,
|
||||||
|
true,
|
||||||
|
"Add Create wrench to acceptable tools for Traveler's Backpack",
|
||||||
|
"travelersbackpack", "create"
|
||||||
|
),
|
||||||
|
TAGS_TRAVELERSBACKPACK_TOOLS_BOTANIA(
|
||||||
|
"tags_acceptable_tools_botania",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.TRAVELERS_BACKPACK,
|
||||||
|
true,
|
||||||
|
"Add Botania twig wand to acceptable tools for Traveler's Backpack",
|
||||||
|
"travelersbackpack", "botania"
|
||||||
|
),
|
||||||
|
TAGS_TRAVELERSBACKPACK_TOOLS_EXPOSURE(
|
||||||
|
"tags_acceptable_tools_exposure",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.TRAVELERS_BACKPACK,
|
||||||
|
true,
|
||||||
|
"Add Exposure Camera to acceptable tools for Traveler's Backpack",
|
||||||
|
"travelersbackpack", "exposure"
|
||||||
|
),
|
||||||
|
TAGS_FORGE_METAL_NUGGETS_CREATE_COPPER(
|
||||||
|
"tags_forge_metal_nuggets_create_copper",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Add Create copper nugget to Forge metal nuggets",
|
||||||
|
"create"
|
||||||
|
),
|
||||||
|
TAGS_FORGE_ROPE_BREWERY(
|
||||||
|
"tags_forge_rope_brewery",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Brewery rope to Forge rope",
|
||||||
|
"brewery"
|
||||||
|
),
|
||||||
|
TAGS_SUPPLEMENTARIES_ROPES_BREWERY(
|
||||||
|
"tags_supplementaries_ropes_brewery",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Brewery rope to Supplementaries ropes",
|
||||||
|
"brewery", "supplementaries"
|
||||||
|
),
|
||||||
|
TAGS_FARMERSDELIGHT_ROPES_BREWERY(
|
||||||
|
"tags_farmersdelight_ropes_brewery",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Brewery rope to Farmer's Delight ropes",
|
||||||
|
"brewery", "farmersdelight"
|
||||||
|
),
|
||||||
|
TAGS_FORGE_ROPE_BEAUTIFY(
|
||||||
|
"tags_forge_rope_beautify",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Beautify rope to Forge rope",
|
||||||
|
"beautify"
|
||||||
|
),
|
||||||
|
TAGS_SUPPLEMENTARIES_ROPES_BEAUTIFY(
|
||||||
|
"tags_supplementaries_ropes_beautify",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Beautify rope to Supplementaries ropes",
|
||||||
|
"beautify", "supplementaries"
|
||||||
|
),
|
||||||
|
TAGS_FARMERSDELIGHT_ROPES_BEAUTIFY(
|
||||||
|
"tags_farmersdelight_ropes_beautify",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ROPES,
|
||||||
|
true,
|
||||||
|
"Add Beautify rope to Farmer's Delight ropes",
|
||||||
|
"beautify", "farmersdelight"
|
||||||
|
),
|
||||||
|
TAGS_ACCESSORIES_FACE_CREATE_GOGGLES(
|
||||||
|
"tags_accessories_face_create_goggles",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ACCESSORIES,
|
||||||
|
true,
|
||||||
|
"Add Create goggles to Accessories face slot",
|
||||||
|
"accessories", "create"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_AUTUMNITY(
|
||||||
|
"tags_stripped_logs_wood_autumnity",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Autumnity stripped maple log",
|
||||||
|
"autumnity"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_ATMOSPHERIC(
|
||||||
|
"tags_stripped_logs_wood_atmospheric",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Atmospheric stripped laurel log",
|
||||||
|
"atmospheric"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_HEXALIA(
|
||||||
|
"tags_stripped_logs_wood_hexalia",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Hexalia stripped cottonwood/willow log",
|
||||||
|
"hexalia"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_SPAWN(
|
||||||
|
"tags_stripped_logs_wood_spawn",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Spawn stripped rotten log",
|
||||||
|
"spawn"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_ARTS_AND_CRAFTS(
|
||||||
|
"tags_stripped_logs_wood_arts_and_crafts",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Arts & Crafts stripped cork log",
|
||||||
|
"arts_and_crafts"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_NEWWORLD(
|
||||||
|
"tags_stripped_logs_wood_newworld",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"New World stripped fir log",
|
||||||
|
"newworld"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_AROMATIC(
|
||||||
|
"tags_stripped_logs_wood_aromatic",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Aromatic stripped cinnamon log",
|
||||||
|
"aromatic"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_UPGRADE_AQUATIC(
|
||||||
|
"tags_stripped_logs_wood_upgrade_aquatic",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"Upgrade Aquatic stripped driftwood/river log",
|
||||||
|
"upgrade_aquatic"
|
||||||
|
),
|
||||||
|
TAGS_STRIPPED_LOGS_WOOD_MORESNIFFERFLOWERS(
|
||||||
|
"tags_stripped_logs_wood_moresnifferflowers",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.WOODS,
|
||||||
|
true,
|
||||||
|
"More Sniffer Flowers stripped vivicus/corrupted log",
|
||||||
|
"moresnifferflowers"
|
||||||
|
),
|
||||||
|
ACCESSORIES_SKILLCLOAKS_COMPAT(
|
||||||
|
"compat_accessories_skillcloaks",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ACCESSORIES,
|
||||||
|
true,
|
||||||
|
"Add Skillcloaks cloaks to Accessories cape and hood slots",
|
||||||
|
"accessories", "skillcloaks"
|
||||||
|
),
|
||||||
|
ACCESSORIES_SIMPLEHATS_COMPAT(
|
||||||
|
"compat_accessories_simplehats",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.ACCESSORIES,
|
||||||
|
true,
|
||||||
|
"Add Simple Hats hats to Accessories hat slot",
|
||||||
|
"accessories", "simplehats"
|
||||||
|
),
|
||||||
|
BEAUTIFY_HANGING_POT_FIX(
|
||||||
|
"fix_beautify_hanging_pot",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Craft Beautify Hanging Pots with Forge Ropes",
|
||||||
|
"beautify"
|
||||||
|
),
|
||||||
|
ALEXSMOBS_MACACO_COMPAT(
|
||||||
|
"compat_alexsmobs_macaco",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Fix Sopa de Macaco recipe",
|
||||||
|
"alexsmobs", "neapolitan"
|
||||||
|
),
|
||||||
|
TETRA_TOOLBELT_COMPAT(
|
||||||
|
"compat_tetra_toolbelt",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Craft Tetra Toolbelt with Forge Ropes",
|
||||||
|
"tetra", "tetracelium"
|
||||||
|
),
|
||||||
|
COPPER_NUGGET_FIX(
|
||||||
|
"fix_copper_nugget",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Craft Copper Ingots with Forge Copper Nuggets",
|
||||||
|
"create"
|
||||||
|
),
|
||||||
|
QUARK_CRAFTER_FIX(
|
||||||
|
"fix_quark_crafter",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Craft Quark Crafter with Forge Workbenches",
|
||||||
|
"quark"
|
||||||
|
),
|
||||||
|
CREATE_CRAFTER_FIX(
|
||||||
|
"fix_create_crafter",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Craft Create Mechanical Crafters with Forge Workbenches",
|
||||||
|
"create"
|
||||||
|
),
|
||||||
|
CREATE_TOMS_STORAGE_FIX(
|
||||||
|
"fix_create_toms_storage",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.RECIPES,
|
||||||
|
true,
|
||||||
|
"Fix tags related to crafting Tom's Storage recipes with Create items",
|
||||||
|
"create", "toms_storage", "mr_toms_storage_creatified"
|
||||||
|
),
|
||||||
|
ECOLOGICS_WALNUT_FIX(
|
||||||
|
"fix_ecologics_walnut",
|
||||||
|
TweakCategory.BUGFIX,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Make Ecologics Walnuts compostable",
|
||||||
|
"ecologics"
|
||||||
|
),
|
||||||
|
DAWN_OF_TIME_FIX(
|
||||||
|
"fix_dawn_of_time_compostable",
|
||||||
|
TweakCategory.BUGFIX,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Fix Dawn of Time plants not being compostable",
|
||||||
|
"dawnoftimebuilder"
|
||||||
|
),
|
||||||
|
PROJECT_VIBRANT_JOURNEYS_QUARK_COMPAT(
|
||||||
|
"compat_project_vibrant_journeys_quark",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force PVJ hollow logs to drop as their Quark equivalents",
|
||||||
|
"quark", "projectvibrantjourneys"
|
||||||
|
),
|
||||||
|
PROJECT_VIBRANT_JOURNEYS_TWIGS_COMPAT(
|
||||||
|
"compat_project_vibrant_journeys_twigs",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force PVJ Rock and Twig to drop as their Twigs equivalent",
|
||||||
|
"twigs", "projectvibrantjourneys"
|
||||||
|
),
|
||||||
|
BOTANIA_TWIGS_COMPAT(
|
||||||
|
"compat_botania_twigs",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force Botania Pebbles to drop as their Twigs equivalent",
|
||||||
|
"twigs", "botania"
|
||||||
|
),
|
||||||
|
SWAMPIER_SWAMPS_ENVIRONMENTAL_CATTAIL(
|
||||||
|
"compat_swmapier_swamps_environmental_cattail",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force Swampier Swamps Cattails to drop as their Environmental equivalent",
|
||||||
|
"environmental", "swampier_swamps"
|
||||||
|
),
|
||||||
|
PROJECT_VIBRANT_JOURNEYS_ENVIRONMENTAL_CATTAIL_COMPAT(
|
||||||
|
"compat_project_vibrant_journeys_environmental_cattail",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force PVJ Cattails to drop as their Environmental equivalent",
|
||||||
|
"environmental", "projectvibrantjourneys"
|
||||||
|
),
|
||||||
|
GOODENDING_ENVIRONMENTAL_CATTAIL_COMPAT(
|
||||||
|
"compat_good_ending_environmental_cattail",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force Good Ending Cattails to drop as their Environmental equivalent",
|
||||||
|
"environmental", "goodending"
|
||||||
|
),
|
||||||
|
GOODENDING_ENVIRONMENTAL_DUCKWEED_COMPAT(
|
||||||
|
"compat_good_ending_environmental_duckweed",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force Good Ending Duckweed to drop as their Environmental equivalent",
|
||||||
|
"environmental", "goodending"
|
||||||
|
),
|
||||||
|
HEXALIA_ENVIRONMENTAL_DUCKWEED_COMPAT(
|
||||||
|
"compat_good_ending_environmental_duckweed",
|
||||||
|
TweakCategory.GAMEPLAY,
|
||||||
|
TweakGroup.CONSISTENCY,
|
||||||
|
true,
|
||||||
|
"Force Hexalia Duckweed to drop as their Environmental equivalent",
|
||||||
|
"environmental", "hexalia"
|
||||||
|
),
|
||||||
|
TETRA_WORLDGEN_MOUNTAINS(
|
||||||
|
"tetra_structure_worldgen_mountains",
|
||||||
|
TweakCategory.WORLD,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Tetra Structures generate in mountainous biomes",
|
||||||
|
"tetra"
|
||||||
|
),
|
||||||
|
TETRA_ENSCORCELLATION_COMPAT(
|
||||||
|
"compat_tetra_ensorcellation",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Tetra items can be enchanted with Ensorcellation",
|
||||||
|
"tetra", "ensorcellation"
|
||||||
|
),
|
||||||
|
FIX_TETRA_BOTANIA(
|
||||||
|
"fix_tetra_botania",
|
||||||
|
TweakCategory.BUGFIX,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Tetra mana regen items reach full durability",
|
||||||
|
"tetracelium", "botania"
|
||||||
|
),
|
||||||
|
COMPAT_SUPPLEMENTARIES_HATS(
|
||||||
|
"compat_supplementaries_simple_hats",
|
||||||
|
TweakCategory.COMPATIBILITY,
|
||||||
|
TweakGroup.NONE,
|
||||||
|
true,
|
||||||
|
"Supplementaries Hat Stand can wear Simple Hats",
|
||||||
|
"supplementaries", "simplehats"
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
||||||
|
private final String id;
|
||||||
|
private final TweakCategory category;
|
||||||
|
private final boolean defaultEnabled;
|
||||||
|
private final String description;
|
||||||
|
private final String[] requiredModIds;
|
||||||
|
private final TweakGroup group;
|
||||||
|
|
||||||
|
Tweak(final String id, final TweakCategory category, final boolean defaultEnabled, final String description) {
|
||||||
|
this(id, category, TweakGroup.NONE, defaultEnabled, description, new String[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Tweak(
|
||||||
|
final String id,
|
||||||
|
final TweakCategory category,
|
||||||
|
final TweakGroup group,
|
||||||
|
final boolean defaultEnabled,
|
||||||
|
final String description,
|
||||||
|
final String... requiredModIds
|
||||||
|
) {
|
||||||
|
this.id = id;
|
||||||
|
this.category = category;
|
||||||
|
this.group = group == null ? TweakGroup.NONE : group;
|
||||||
|
this.defaultEnabled = defaultEnabled;
|
||||||
|
this.description = description;
|
||||||
|
this.requiredModIds = requiredModIds == null ? new String[0] : requiredModIds.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigKeyId() {
|
||||||
|
final String prefixTags = "tags_";
|
||||||
|
final String prefixCompat = "compat_";
|
||||||
|
final String prefixFix = "fix_";
|
||||||
|
String key = this.id;
|
||||||
|
if (key.startsWith(prefixTags)) {
|
||||||
|
key = key.substring(prefixTags.length());
|
||||||
|
} else if (key.startsWith(prefixCompat)) {
|
||||||
|
key = key.substring(prefixCompat.length());
|
||||||
|
} else if (key.startsWith(prefixFix)) {
|
||||||
|
key = key.substring(prefixFix.length());
|
||||||
|
}
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TweakCategory getCategory() {
|
||||||
|
return this.category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TweakGroup getGroup() {
|
||||||
|
return this.group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDefaultEnabled() {
|
||||||
|
return this.defaultEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return this.description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAvailable() {
|
||||||
|
for (final String modId : this.requiredModIds) {
|
||||||
|
if (!isModLoadedSafe(modId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isModLoadedSafe(final String modId) {
|
||||||
|
try {
|
||||||
|
final ModList modList = ModList.get();
|
||||||
|
if (modList != null && modId != null && !modId.isEmpty()) {
|
||||||
|
if (modList.isLoaded(modId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (final Throwable ignored) {
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
final LoadingModList loading = LoadingModList.get();
|
||||||
|
if (loading != null && modId != null && !modId.isEmpty()) {
|
||||||
|
return loading.getMods().stream().anyMatch(info -> modId.equals(info.getModId()));
|
||||||
|
}
|
||||||
|
} catch (final Throwable ignored) {
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
29
src/main/java/io/lampnet/ccccc/config/TweakCategory.java
Normal file
29
src/main/java/io/lampnet/ccccc/config/TweakCategory.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package io.lampnet.ccccc.config;
|
||||||
|
|
||||||
|
public enum TweakCategory {
|
||||||
|
GAMEPLAY("gameplay", "Gameplay changes and adjustments"),
|
||||||
|
WORLD("world", "Changes to world"),
|
||||||
|
CLIENT("client", "Client-side only"),
|
||||||
|
SERVER("server", "Server-side only"),
|
||||||
|
BUGFIX("bugfixes", "Behavior corrections and fixes"),
|
||||||
|
PERFORMANCE("performance", "Performance-related options"),
|
||||||
|
COMPATIBILITY("compatibility", "Inter-mod compatibility toggles");
|
||||||
|
|
||||||
|
private final String configPath;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
TweakCategory(final String configPath, final String description) {
|
||||||
|
this.configPath = configPath;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigPath() {
|
||||||
|
return this.configPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return this.description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
29
src/main/java/io/lampnet/ccccc/config/TweakGroup.java
Normal file
29
src/main/java/io/lampnet/ccccc/config/TweakGroup.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package io.lampnet.ccccc.config;
|
||||||
|
|
||||||
|
public enum TweakGroup {
|
||||||
|
NONE("", ""),
|
||||||
|
ACCESSORIES("accessories", "Accessories integrations and tags"),
|
||||||
|
ROPES("ropes", "Rope tags and integrations"),
|
||||||
|
WOODS("woods", "Dealing with wood"),
|
||||||
|
TRAVELERS_BACKPACK("travelers_backpack", "Traveler's Backpack integrations"),
|
||||||
|
CONSISTENCY("consistency", "Changes done for cutting down redundancies within mods"),
|
||||||
|
RECIPES("recipes", "Recipe Integrations");
|
||||||
|
|
||||||
|
private final String configPath;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
TweakGroup(final String configPath, final String description) {
|
||||||
|
this.configPath = configPath;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigPath() {
|
||||||
|
return this.configPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return this.description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
117
src/main/java/io/lampnet/ccccc/datapack/BuiltInPacks.java
Normal file
117
src/main/java/io/lampnet/ccccc/datapack/BuiltInPacks.java
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
package io.lampnet.ccccc.datapack;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Ccccc;
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.server.packs.PackType;
|
||||||
|
import net.minecraft.server.packs.PathPackResources;
|
||||||
|
import net.minecraft.server.packs.repository.Pack;
|
||||||
|
import net.minecraft.server.packs.repository.PackSource;
|
||||||
|
import net.minecraft.server.packs.repository.RepositorySource;
|
||||||
|
import net.minecraftforge.event.AddPackFindersEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.ModList;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = Ccccc.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||||
|
public final class BuiltInPacks {
|
||||||
|
private BuiltInPacks() {}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onAddPackFinders(final AddPackFindersEvent event) {
|
||||||
|
if (event.getPackType() != PackType.SERVER_DATA) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.LANTERN_AS_BELT, "ccccc_lantern_belt", "CCCCC: Accessories - Lantern as belt");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_TRAVELERSBACKPACK_TOOLS_CREATE, "ccccc_acceptable_tools_create", "CCCCC: Travelers Backpack - Create wrench");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_TRAVELERSBACKPACK_TOOLS_BOTANIA, "ccccc_acceptable_tools_botania", "CCCCC: Travelers Backpack - Botania twig wand");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_TRAVELERSBACKPACK_TOOLS_EXPOSURE, "ccccc_acceptable_tools_exposure", "CCCCC: Travelers Backpack - Exposure camera");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TAGS_FORGE_METAL_NUGGETS_CREATE_COPPER, "ccccc_metal_nuggets_create", "CCCCC: Forge - Create copper nugget in metal_nuggets");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TAGS_FORGE_ROPE_BREWERY, "ccccc_rope_brewery_forge", "CCCCC: Rope - Brewery (forge)");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_SUPPLEMENTARIES_ROPES_BREWERY, "ccccc_rope_brewery_supplementaries", "CCCCC: Rope - Brewery (supplementaries)");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_FARMERSDELIGHT_ROPES_BREWERY, "ccccc_rope_brewery_farmersdelight", "CCCCC: Rope - Brewery (farmersdelight)");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TAGS_FORGE_ROPE_BEAUTIFY, "ccccc_rope_beautify_forge", "CCCCC: Rope - Beautify (forge)");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_SUPPLEMENTARIES_ROPES_BEAUTIFY, "ccccc_rope_beautify_supplementaries", "CCCCC: Rope - Beautify (supplementaries)");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_FARMERSDELIGHT_ROPES_BEAUTIFY, "ccccc_rope_beautify_farmersdelight", "CCCCC: Rope - Beautify (farmersdelight)");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TAGS_ACCESSORIES_FACE_CREATE_GOGGLES, "ccccc_accessories_face_create", "CCCCC: Accessories - Create goggles");
|
||||||
|
addDynamicAccessoriesPack(event);
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_AUTUMNITY, "ccccc_stripped_autumnity", "CCCCC: Stripped logs/wood - Autumnity");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_ATMOSPHERIC, "ccccc_stripped_atmospheric", "CCCCC: Stripped logs/wood - Atmospheric");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_HEXALIA, "ccccc_stripped_hexalia", "CCCCC: Stripped logs/wood - Hexalia");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_SPAWN, "ccccc_stripped_spawn", "CCCCC: Stripped logs/wood - Spawn");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_ARTS_AND_CRAFTS, "ccccc_stripped_arts_and_crafts", "CCCCC: Stripped logs/wood - Arts & Crafts");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_NEWWORLD, "ccccc_stripped_newworld", "CCCCC: Stripped logs/wood - New World");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_AROMATIC, "ccccc_stripped_aromatic", "CCCCC: Stripped logs/wood - Aromatic");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_UPGRADE_AQUATIC, "ccccc_stripped_upgrade_aquatic", "CCCCC: Stripped logs/wood - Upgrade Aquatic");
|
||||||
|
addIfEnabled(event, Tweak.TAGS_STRIPPED_LOGS_WOOD_MORESNIFFERFLOWERS, "ccccc_stripped_moresnifferflowers", "CCCCC: Stripped logs/wood - More Sniffer Flowers");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.BEAUTIFY_HANGING_POT_FIX, "ccccc_fix_beautify_hanging_pot", "CCCCC: Beautify hanging pot compatibility recipe");
|
||||||
|
addIfEnabled(event, Tweak.ALEXSMOBS_MACACO_COMPAT, "ccccc_compat_alexsmobs_macaco", "CCCCC: Alex's Mobs Sopa De Macaco compatibility recipe");
|
||||||
|
addIfEnabled(event, Tweak.TETRA_TOOLBELT_COMPAT, "ccccc_compat_tetra_toolbelt", "CCCCC: Tetra toolbelt compatibility recipe");
|
||||||
|
addIfEnabled(event, Tweak.COPPER_NUGGET_FIX, "ccccc_fix_copper_nugget", "CCCCC: Copper nugget compatibility recipe");
|
||||||
|
addIfEnabled(event, Tweak.QUARK_CRAFTER_FIX, "ccccc_fix_quark_crafter", "CCCCC: Quark crafter compatibility recipe");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.CREATE_CRAFTER_FIX, "ccccc_fix_create_crafter", "CCCCC: Create Mechanical Crafter compatibility recipe");
|
||||||
|
addIfEnabled(event, Tweak.CREATE_TOMS_STORAGE_FIX, "ccccc_fix_create_toms_storage", "CCCCC: Create + Tom's Storage compatibility recipe");
|
||||||
|
|
||||||
|
addIfEnabled(event, Tweak.TETRA_WORLDGEN_MOUNTAINS, "ccccc_tetra_worldgen_mountains", "CCCCC: Tetra structures in mountains");
|
||||||
|
addIfEnabled(event, Tweak.TETRA_ENSCORCELLATION_COMPAT, "ccccc_compat_tetra_enscorcellation", "CCCCC: Tetra + Enscorcellation Compat");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addIfEnabled(final AddPackFindersEvent event, final Tweak tweak, final String packId, final String title) {
|
||||||
|
if (!Config.isEnabled(tweak) || !tweak.isAvailable()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final var modFile = ModList.get().getModFileById(Ccccc.MODID);
|
||||||
|
if (modFile == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final Path root = modFile.getFile().findResource("resourcepacks/" + packId);
|
||||||
|
final PathPackResources packResources = new PathPackResources(packId, root, false);
|
||||||
|
final Pack pack = Pack.readMetaAndCreate(
|
||||||
|
packId,
|
||||||
|
Component.literal(title),
|
||||||
|
false,
|
||||||
|
id -> packResources,
|
||||||
|
event.getPackType(),
|
||||||
|
Pack.Position.TOP,
|
||||||
|
PackSource.BUILT_IN
|
||||||
|
);
|
||||||
|
if (pack != null) {
|
||||||
|
event.addRepositorySource((RepositorySource) consumer -> consumer.accept(pack));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addDynamicAccessoriesPack(final AddPackFindersEvent event) {
|
||||||
|
final boolean skillCloaksEnabled = Config.isEnabled(Tweak.ACCESSORIES_SKILLCLOAKS_COMPAT) && Tweak.ACCESSORIES_SKILLCLOAKS_COMPAT.isAvailable();
|
||||||
|
final boolean simpleHatsEnabled = Config.isEnabled(Tweak.ACCESSORIES_SIMPLEHATS_COMPAT) && Tweak.ACCESSORIES_SIMPLEHATS_COMPAT.isAvailable();
|
||||||
|
|
||||||
|
if (!skillCloaksEnabled && !simpleHatsEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final DynamicAccessoriesPack packResources = new DynamicAccessoriesPack();
|
||||||
|
final Pack pack = Pack.readMetaAndCreate(
|
||||||
|
"ccccc_dynamic_accessories",
|
||||||
|
Component.literal("CCCCC: Dynamic Accessories Compatibility"),
|
||||||
|
false,
|
||||||
|
id -> packResources,
|
||||||
|
event.getPackType(),
|
||||||
|
Pack.Position.TOP,
|
||||||
|
PackSource.BUILT_IN
|
||||||
|
);
|
||||||
|
if (pack != null) {
|
||||||
|
event.addRepositorySource((RepositorySource) consumer -> consumer.accept(pack));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
package io.lampnet.ccccc.datapack;
|
||||||
|
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
|
import io.lampnet.ccccc.tweaks.AccessoriesCompat;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.server.packs.AbstractPackResources;
|
||||||
|
import net.minecraft.server.packs.PackType;
|
||||||
|
import net.minecraft.server.packs.metadata.MetadataSectionSerializer;
|
||||||
|
import net.minecraft.server.packs.resources.IoSupplier;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class DynamicAccessoriesPack extends AbstractPackResources {
|
||||||
|
|
||||||
|
public DynamicAccessoriesPack() {
|
||||||
|
super("ccccc_dynamic_accessories", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IoSupplier<InputStream> getRootResource(final String... elements) {
|
||||||
|
if (elements.length == 1 && elements[0].equals("pack.mcmeta")) {
|
||||||
|
final String packMeta = """
|
||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Dynamic Accessories Compatibility"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
return () -> new ByteArrayInputStream(packMeta.getBytes(StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IoSupplier<InputStream> getResource(final PackType packType, final ResourceLocation location) {
|
||||||
|
if (packType != PackType.SERVER_DATA) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.equals(ResourceLocation.fromNamespaceAndPath("accessories", "tags/items/cape.json"))) {
|
||||||
|
return () -> new ByteArrayInputStream(generateSkillCloaksCapeTag().getBytes(StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.equals(ResourceLocation.fromNamespaceAndPath("accessories", "tags/items/hat.json"))) {
|
||||||
|
return () -> new ByteArrayInputStream(generateAccessoriesHatTag().getBytes(StandardCharsets.UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String generateSkillCloaksCapeTag() {
|
||||||
|
final List<String> cloakItems = AccessoriesCompat.getSkillCloaksCloakItems();
|
||||||
|
|
||||||
|
final JsonObject root = new JsonObject();
|
||||||
|
root.addProperty("replace", false);
|
||||||
|
|
||||||
|
final JsonArray values = new JsonArray();
|
||||||
|
for (final String item : cloakItems) {
|
||||||
|
values.add(item);
|
||||||
|
}
|
||||||
|
root.add("values", values);
|
||||||
|
|
||||||
|
return root.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String generateAccessoriesHatTag() {
|
||||||
|
final List<String> hoodItems = AccessoriesCompat.getSkillCloaksHoodItems();
|
||||||
|
final List<String> simpleHatsItems = AccessoriesCompat.getSimpleHatsItems();
|
||||||
|
|
||||||
|
final JsonObject root = new JsonObject();
|
||||||
|
root.addProperty("replace", false);
|
||||||
|
|
||||||
|
final JsonArray values = new JsonArray();
|
||||||
|
|
||||||
|
for (final String item : hoodItems) {
|
||||||
|
values.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final String item : simpleHatsItems) {
|
||||||
|
values.add(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
root.add("values", values);
|
||||||
|
|
||||||
|
return root.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void listResources(final PackType packType, final String namespace, final String path,
|
||||||
|
final ResourceOutput resourceOutput) {
|
||||||
|
if (packType != PackType.SERVER_DATA || !namespace.equals("accessories")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path.equals("tags/items")) {
|
||||||
|
resourceOutput.accept(ResourceLocation.fromNamespaceAndPath("accessories", "tags/items/cape.json"),
|
||||||
|
() -> new ByteArrayInputStream(generateSkillCloaksCapeTag().getBytes(StandardCharsets.UTF_8)));
|
||||||
|
resourceOutput.accept(ResourceLocation.fromNamespaceAndPath("accessories", "tags/items/hat.json"),
|
||||||
|
() -> new ByteArrayInputStream(generateAccessoriesHatTag().getBytes(StandardCharsets.UTF_8)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<String> getNamespaces(final PackType type) {
|
||||||
|
if (type == PackType.SERVER_DATA) {
|
||||||
|
return Set.of("accessories");
|
||||||
|
}
|
||||||
|
return Set.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> T getMetadataSection(final MetadataSectionSerializer<T> deserializer) {
|
||||||
|
if (deserializer.getMetadataSectionName().equals("pack")) {
|
||||||
|
try {
|
||||||
|
final String packMeta = """
|
||||||
|
{
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Dynamic Accessories Compatibility"
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
return deserializer.fromJson(JsonParser.parseString(packMeta).getAsJsonObject());
|
||||||
|
} catch (final Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String packId() {
|
||||||
|
return "ccccc_dynamic_accessories";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
}
|
||||||
|
}
|
||||||
121
src/main/java/io/lampnet/ccccc/mixin/CccccMixinPlugin.java
Normal file
121
src/main/java/io/lampnet/ccccc/mixin/CccccMixinPlugin.java
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
package io.lampnet.ccccc.mixin;
|
||||||
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
|
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
||||||
|
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
|
||||||
|
public final class CccccMixinPlugin implements IMixinConfigPlugin {
|
||||||
|
private static final String RESPITEFUL_FLUIDS_RESOURCE = "plus/dragons/respiteful/entries/RespitefulFluids.class";
|
||||||
|
private static final String TETRACELIUM_RESOURCE = "se/mickelus/tetracelium/TetraceliumMod.class";
|
||||||
|
private static final String BOTANIA_RESOURCE = "vazkii/botania/api/BotaniaAPI.class";
|
||||||
|
private static final String JEI_MARKER_RESOURCE = "mezz/jei/forge/JustEnoughItems.class";
|
||||||
|
private static final String SUPPLEMENTARIES_RESOURCE = "net/mehvahdjukaar/supplementaries/Supplementaries.class";
|
||||||
|
private static final String SIMPLEHATS_RESOURCE = "fonnymunkey/simplehats/SimpleHats.class";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoad(final String mixinPackage) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRefMapperConfig() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldApplyMixin(final String targetClassName, final String mixinClassName) {
|
||||||
|
final String respitefulMixin = "io.lampnet.ccccc.mixin.respiteful.RespitefulFluidsMixin";
|
||||||
|
final String tetraceliumBotaniaMixin = "io.lampnet.ccccc.mixin.tetracelium.TetraceliumBotaniaMixin";
|
||||||
|
final String supplementariesHatsMixin = "io.lampnet.ccccc.mixin.supplementaries.SupplementariesHatsMixin";
|
||||||
|
|
||||||
|
if (respitefulMixin.equals(mixinClassName)) {
|
||||||
|
boolean allowRespitefulByConfig = isRespitefulMixinEnabledSafe();
|
||||||
|
final boolean resourcesPresent = areAllResourcesPresent(RESPITEFUL_FLUIDS_RESOURCE, JEI_MARKER_RESOURCE);
|
||||||
|
return allowRespitefulByConfig && resourcesPresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tetraceliumBotaniaMixin.equals(mixinClassName)) {
|
||||||
|
boolean allowTetraceliumBotaniaByConfig = isTetraceliumBotaniaMixinEnabledSafe();
|
||||||
|
final boolean resourcesPresent = areAllResourcesPresent(TETRACELIUM_RESOURCE, BOTANIA_RESOURCE);
|
||||||
|
return allowTetraceliumBotaniaByConfig && resourcesPresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supplementariesHatsMixin.equals(mixinClassName)) {
|
||||||
|
boolean allowSupplementariesHatsByConfig = isSupplementariesHatsMixinEnabledSafe();
|
||||||
|
final boolean resourcesPresent = areAllResourcesPresent(SUPPLEMENTARIES_RESOURCE, SIMPLEHATS_RESOURCE);
|
||||||
|
return allowSupplementariesHatsByConfig && resourcesPresent;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void acceptTargets(final Set<String> myTargets, final Set<String> otherTargets) {
|
||||||
|
// No dynamic targets.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getMixins() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void preApply(final String targetClassName, final ClassNode targetClass, final String mixinClassName, final IMixinInfo mixinInfo) {
|
||||||
|
// No-op
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void postApply(final String targetClassName, final ClassNode targetClass, final String mixinClassName, final IMixinInfo mixinInfo) {
|
||||||
|
// No-op
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean areAllResourcesPresent(final String... resourceNames) {
|
||||||
|
if (resourceNames == null || resourceNames.length == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
final ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||||
|
for (final String resourceName : resourceNames) {
|
||||||
|
if (!isResourcePresent(resourceName, loader)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isResourcePresent(final String resourceName, final ClassLoader loader) {
|
||||||
|
if (resourceName == null || resourceName.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return loader != null && loader.getResource(resourceName) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isRespitefulMixinEnabledSafe() {
|
||||||
|
try {
|
||||||
|
return Config.isEnabled(Tweak.MIXIN_RESPITEFUL_FLUIDS);
|
||||||
|
} catch (final Throwable throwable) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isTetraceliumBotaniaMixinEnabledSafe() {
|
||||||
|
try {
|
||||||
|
return Config.isEnabled(Tweak.FIX_TETRA_BOTANIA);
|
||||||
|
} catch (final Throwable throwable) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isSupplementariesHatsMixinEnabledSafe() {
|
||||||
|
try {
|
||||||
|
return Config.isEnabled(Tweak.COMPAT_SUPPLEMENTARIES_HATS);
|
||||||
|
} catch (final Throwable throwable) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package io.lampnet.ccccc.mixin.respiteful;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import net.minecraftforge.fluids.ForgeFlowingFluid;
|
||||||
|
import com.tterrag.registrate.builders.FluidBuilder;
|
||||||
|
import com.tterrag.registrate.builders.Builder;
|
||||||
|
import com.tterrag.registrate.providers.ProviderType;
|
||||||
|
import com.tterrag.registrate.util.nullness.NonNullBiConsumer;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Pseudo
|
||||||
|
@Mixin(targets = "plus.dragons.respiteful.entries.RespitefulFluids", remap = false)
|
||||||
|
public abstract class RespitefulFluidsMixin {
|
||||||
|
private static final int REQUIRED_INJECTIONS = 1;
|
||||||
|
|
||||||
|
@Inject(method = "<clinit>", at = @At("TAIL"), require = REQUIRED_INJECTIONS)
|
||||||
|
private static void ccccc$afterClassInit(final CallbackInfo ci) {}
|
||||||
|
|
||||||
|
@Redirect(
|
||||||
|
method = "<clinit>",
|
||||||
|
at = @At(
|
||||||
|
value = "INVOKE",
|
||||||
|
target = "Lcom/tterrag/registrate/builders/FluidBuilder;setData(Lcom/tterrag/registrate/providers/ProviderType;Lcom/tterrag/registrate/util/nullness/NonNullBiConsumer;)Lcom/tterrag/registrate/builders/Builder;",
|
||||||
|
remap = false
|
||||||
|
),
|
||||||
|
require = REQUIRED_INJECTIONS,
|
||||||
|
remap = false
|
||||||
|
)
|
||||||
|
private static Builder ccccc$skipAllSetData(final FluidBuilder<?, ?> fluidBuilder, final ProviderType providerType, final NonNullBiConsumer<?, ?> consumer) {
|
||||||
|
return fluidBuilder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Redirect(
|
||||||
|
method = "tea(Ljava/lang/String;I)Lcom/tterrag/registrate/builders/FluidBuilder;",
|
||||||
|
at = @At(
|
||||||
|
value = "INVOKE",
|
||||||
|
target = "Lcom/tterrag/registrate/builders/FluidBuilder;noBlock()Lcom/tterrag/registrate/builders/FluidBuilder;",
|
||||||
|
remap = false
|
||||||
|
),
|
||||||
|
require = REQUIRED_INJECTIONS,
|
||||||
|
remap = false
|
||||||
|
)
|
||||||
|
private static FluidBuilder<?, ?> ccccc$replaceNoBlockWithSource(final FluidBuilder<?, ?> fluidBuilder) {
|
||||||
|
final Function<Object, Object> sourceFactory = (properties) -> new ForgeFlowingFluid.Source((ForgeFlowingFluid.Properties) properties);
|
||||||
|
try {
|
||||||
|
final Method sourceMethod = fluidBuilder.getClass().getMethod("source", Function.class);
|
||||||
|
final Object result = sourceMethod.invoke(fluidBuilder, sourceFactory);
|
||||||
|
return result instanceof FluidBuilder<?, ?> fb ? fb : fluidBuilder;
|
||||||
|
} catch (final Throwable throwable) {
|
||||||
|
return fluidBuilder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Redirect(
|
||||||
|
method = "tea(Ljava/lang/String;I)Lcom/tterrag/registrate/builders/FluidBuilder;",
|
||||||
|
at = @At(
|
||||||
|
value = "INVOKE",
|
||||||
|
target = "Lcom/tterrag/registrate/builders/FluidBuilder;noBucket()Lcom/tterrag/registrate/builders/FluidBuilder;",
|
||||||
|
remap = false
|
||||||
|
),
|
||||||
|
require = REQUIRED_INJECTIONS,
|
||||||
|
remap = false
|
||||||
|
)
|
||||||
|
private static FluidBuilder<?, ?> ccccc$skipNoBucket(final FluidBuilder<?, ?> fluidBuilder) { return fluidBuilder; }
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package io.lampnet.ccccc.mixin.supplementaries;
|
||||||
|
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
|
|
||||||
|
@Pseudo
|
||||||
|
@Mixin(targets = "net.mehvahdjukaar.supplementaries.common.entities.HatStandEntity")
|
||||||
|
public class SupplementariesHatsMixin {
|
||||||
|
|
||||||
|
@ModifyVariable(method = "m_7111_", at = @At("STORE"), ordinal = 0)
|
||||||
|
private EquipmentSlot modifyEquipmentSlot(EquipmentSlot equipmentSlot, Player player, Vec3 vec, InteractionHand hand) {
|
||||||
|
ItemStack itemStack = player.getItemInHand(hand);
|
||||||
|
|
||||||
|
if (ccccc$isHatItem(itemStack)) {
|
||||||
|
return EquipmentSlot.HEAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
return equipmentSlot;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private boolean ccccc$isHatItem(ItemStack stack) {
|
||||||
|
if (stack.isEmpty()) return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String className = stack.getItem().getClass().getName();
|
||||||
|
|
||||||
|
return "fonnymunkey.simplehats.common.item.HatItem".equals(className) ||
|
||||||
|
className.startsWith("fonnymunkey.simplehats.common.item.") ||
|
||||||
|
(className.contains("simplehats") && className.contains("HatItem"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package io.lampnet.ccccc.mixin.tetracelium;
|
||||||
|
|
||||||
|
import net.minecraft.util.Mth;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Overwrite;
|
||||||
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import vazkii.botania.api.mana.ManaItemHandler;
|
||||||
|
|
||||||
|
@Pseudo
|
||||||
|
@Mixin(targets = "se.mickelus.tetracelium.compat.botania.ManaRepair", remap = false)
|
||||||
|
public class TetraceliumBotaniaMixin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author candle
|
||||||
|
* @reason Fix off-by-one bug preventing items from reaching full durability
|
||||||
|
*/
|
||||||
|
@Overwrite
|
||||||
|
private static int requestManaForDurability(Player player, ItemStack itemStack, int damage, float durabilityPerMana) {
|
||||||
|
int grantedMana = ManaItemHandler.instance().requestManaForTool(itemStack, player, Mth.ceil(damage / durabilityPerMana), true);
|
||||||
|
return Math.min(Math.round(durabilityPerMana * grantedMana), damage);
|
||||||
|
}
|
||||||
|
}
|
||||||
123
src/main/java/io/lampnet/ccccc/tweaks/AccessoriesCompat.java
Normal file
123
src/main/java/io/lampnet/ccccc/tweaks/AccessoriesCompat.java
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
package io.lampnet.ccccc.tweaks;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraftforge.event.TagsUpdatedEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
import com.mojang.logging.LogUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = io.lampnet.ccccc.Ccccc.MODID)
|
||||||
|
public final class AccessoriesCompat {
|
||||||
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
|
|
||||||
|
private static final Pattern SKILLCLOAKS_CLOAK_PATTERN = Pattern.compile("^skillcloaks:.*_cloak$");
|
||||||
|
private static final Pattern SKILLCLOAKS_HOOD_PATTERN = Pattern.compile("^skillcloaks:.*_hood$");
|
||||||
|
private static final Pattern SIMPLEHATS_ALL_PATTERN = Pattern.compile("^simplehats:.+$");
|
||||||
|
private static final Pattern SIMPLEHATS_HATBAG_PATTERN = Pattern.compile("^simplehats:hatbag_.*$");
|
||||||
|
private static final Pattern SIMPLEHATS_SCRAPS_PATTERN = Pattern.compile("^simplehats:.*_scraps$");
|
||||||
|
|
||||||
|
private static final List<String> SIMPLEHATS_EXCLUDED_ITEMS = List.of(
|
||||||
|
"simplehats:questbook",
|
||||||
|
"simplehats:hatdisplay"
|
||||||
|
);
|
||||||
|
|
||||||
|
private AccessoriesCompat() {}
|
||||||
|
public static List<String> getSkillCloaksCloakItems() {
|
||||||
|
final List<String> cloakItems = new ArrayList<>();
|
||||||
|
|
||||||
|
for (final Item item : ForgeRegistries.ITEMS.getValues()) {
|
||||||
|
final ResourceLocation itemId = ForgeRegistries.ITEMS.getKey(item);
|
||||||
|
if (itemId == null || !itemId.getNamespace().equals("skillcloaks")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String itemIdString = itemId.toString();
|
||||||
|
if (SKILLCLOAKS_CLOAK_PATTERN.matcher(itemIdString).matches()) {
|
||||||
|
cloakItems.add(itemIdString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return cloakItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getSkillCloaksHoodItems() {
|
||||||
|
final List<String> hoodItems = new ArrayList<>();
|
||||||
|
|
||||||
|
for (final Item item : ForgeRegistries.ITEMS.getValues()) {
|
||||||
|
final ResourceLocation itemId = ForgeRegistries.ITEMS.getKey(item);
|
||||||
|
if (itemId == null || !itemId.getNamespace().equals("skillcloaks")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String itemIdString = itemId.toString();
|
||||||
|
if (SKILLCLOAKS_HOOD_PATTERN.matcher(itemIdString).matches()) {
|
||||||
|
hoodItems.add(itemIdString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hoodItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getSimpleHatsItems() {
|
||||||
|
final List<String> hatItems = new ArrayList<>();
|
||||||
|
|
||||||
|
for (final Item item : ForgeRegistries.ITEMS.getValues()) {
|
||||||
|
final ResourceLocation itemId = ForgeRegistries.ITEMS.getKey(item);
|
||||||
|
if (itemId == null || !itemId.getNamespace().equals("simplehats")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
final String itemIdString = itemId.toString();
|
||||||
|
|
||||||
|
if (SIMPLEHATS_ALL_PATTERN.matcher(itemIdString).matches()) {
|
||||||
|
if (SIMPLEHATS_HATBAG_PATTERN.matcher(itemIdString).matches()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SIMPLEHATS_SCRAPS_PATTERN.matcher(itemIdString).matches()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SIMPLEHATS_EXCLUDED_ITEMS.contains(itemIdString)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
hatItems.add(itemIdString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hatItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onTagsUpdated(final TagsUpdatedEvent event) {
|
||||||
|
if (!event.getUpdateCause().equals(TagsUpdatedEvent.UpdateCause.SERVER_DATA_LOAD)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
logDiscoveredItems();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void logDiscoveredItems() {
|
||||||
|
if (Config.isEnabled(Tweak.ACCESSORIES_SKILLCLOAKS_COMPAT) && Tweak.ACCESSORIES_SKILLCLOAKS_COMPAT.isAvailable()) {
|
||||||
|
final List<String> cloaks = getSkillCloaksCloakItems();
|
||||||
|
final List<String> hoods = getSkillCloaksHoodItems();
|
||||||
|
LOGGER.info("Discovered {} SkillCloaks cloak items and {} hood items for Accessories compatibility",
|
||||||
|
cloaks.size(), hoods.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config.isEnabled(Tweak.ACCESSORIES_SIMPLEHATS_COMPAT) && Tweak.ACCESSORIES_SIMPLEHATS_COMPAT.isAvailable()) {
|
||||||
|
final List<String> hats = getSimpleHatsItems();
|
||||||
|
LOGGER.info("Discovered {} Simple Hats items for Accessories compatibility", hats.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
115
src/main/java/io/lampnet/ccccc/tweaks/BlockDropHandler.java
Normal file
115
src/main/java/io/lampnet/ccccc/tweaks/BlockDropHandler.java
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
package io.lampnet.ccccc.tweaks;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootPool;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootTable;
|
||||||
|
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||||
|
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||||
|
import net.minecraftforge.event.LootTableLoadEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
import com.mojang.logging.LogUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = io.lampnet.ccccc.Ccccc.MODID)
|
||||||
|
public final class BlockDropHandler {
|
||||||
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
|
private static final Map<ResourceLocation, ResourceLocation> blockLootToItemMapping = new HashMap<>();
|
||||||
|
|
||||||
|
private BlockDropHandler() {}
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
FMLJavaModLoadingContext.get().getModEventBus().addListener(BlockDropHandler::onCommonSetup);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void onCommonSetup(final FMLCommonSetupEvent event) {
|
||||||
|
event.enqueueWork(() -> {
|
||||||
|
registerBlockDropMappings();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerBlockDropMappings() {
|
||||||
|
if (Config.isEnabled(Tweak.PROJECT_VIBRANT_JOURNEYS_QUARK_COMPAT)) {
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:oak_hollow_log", "quark:hollow_oak_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:birch_hollow_log", "quark:hollow_birch_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:spruce_hollow_log", "quark:hollow_spruce_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:jungle_hollow_log", "quark:hollow_jungle_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:acacia_hollow_log", "quark:hollow_acacia_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:dark_oak_hollow_log", "quark:hollow_dark_oak_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:mangrove_hollow_log", "quark:hollow_mangrove_log");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:cherry_hollow_log", "quark:hollow_cherry_log");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.PROJECT_VIBRANT_JOURNEYS_TWIGS_COMPAT)) {
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:rock", "twigs:pebble");
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:twig", "twigs:twig");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.BOTANIA_TWIGS_COMPAT)) {
|
||||||
|
addBlockLootMapping("botania:pebble", "twigs:pebble");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.SWAMPIER_SWAMPS_ENVIRONMENTAL_CATTAIL)) {
|
||||||
|
addBlockLootMapping("swampier_swamps:cattail", "environmental:cattail");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.PROJECT_VIBRANT_JOURNEYS_ENVIRONMENTAL_CATTAIL_COMPAT)) {
|
||||||
|
addBlockLootMapping("projectvibrantjourneys:cattail", "environmental:cattail");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.GOODENDING_ENVIRONMENTAL_CATTAIL_COMPAT)) {
|
||||||
|
addBlockLootMapping("goodending:cattail", "environmental:cattail");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.GOODENDING_ENVIRONMENTAL_DUCKWEED_COMPAT)) {
|
||||||
|
addBlockLootMapping("goodending:duckweed", "environmental:duckweed");
|
||||||
|
}
|
||||||
|
if (Config.isEnabled(Tweak.HEXALIA_ENVIRONMENTAL_DUCKWEED_COMPAT)) {
|
||||||
|
addBlockLootMapping("hexalia:cattail", "environmental:cattail");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addBlockLootMapping(final String sourceBlockId, final String targetItemId) {
|
||||||
|
try {
|
||||||
|
final ResourceLocation sourceLocation = ResourceLocation.parse(sourceBlockId);
|
||||||
|
final ResourceLocation targetLocation = ResourceLocation.parse(targetItemId);
|
||||||
|
|
||||||
|
final ResourceLocation lootTableId = ResourceLocation.fromNamespaceAndPath(sourceLocation.getNamespace(), "blocks/" + sourceLocation.getPath());
|
||||||
|
final Item targetItem = ForgeRegistries.ITEMS.getValue(targetLocation);
|
||||||
|
|
||||||
|
if (targetItem != null) {
|
||||||
|
blockLootToItemMapping.put(lootTableId, targetLocation);
|
||||||
|
LOGGER.debug("Registered block loot mapping: {} -> {}", lootTableId, targetItemId);
|
||||||
|
} else {
|
||||||
|
LOGGER.warn("Failed to register block loot mapping: {} -> {} (target item not found)",
|
||||||
|
sourceBlockId, targetItemId);
|
||||||
|
}
|
||||||
|
} catch (final Exception e) {
|
||||||
|
LOGGER.error("Error adding block loot mapping {} -> {}: {}", sourceBlockId, targetItemId, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onLootTableLoad(final LootTableLoadEvent event) {
|
||||||
|
final ResourceLocation lootTableId = event.getName();
|
||||||
|
final ResourceLocation replacementItemId = blockLootToItemMapping.get(lootTableId);
|
||||||
|
|
||||||
|
if (replacementItemId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Item replacementItem = ForgeRegistries.ITEMS.getValue(replacementItemId);
|
||||||
|
if (replacementItem == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final LootPool.Builder poolBuilder = LootPool.lootPool()
|
||||||
|
.setRolls(ConstantValue.exactly(1.0F))
|
||||||
|
.add(LootItem.lootTableItem(replacementItem));
|
||||||
|
|
||||||
|
final LootTable.Builder tableBuilder = LootTable.lootTable().withPool(poolBuilder);
|
||||||
|
event.setTable(tableBuilder.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
51
src/main/java/io/lampnet/ccccc/tweaks/CompostHandler.java
Normal file
51
src/main/java/io/lampnet/ccccc/tweaks/CompostHandler.java
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
package io.lampnet.ccccc.tweaks;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import io.lampnet.ccccc.config.Tweak;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.level.block.ComposterBlock;
|
||||||
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
|
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import com.mojang.logging.LogUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
public final class CompostHandler {
|
||||||
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
|
|
||||||
|
private CompostHandler() {}
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
FMLJavaModLoadingContext.get().getModEventBus().addListener(CompostHandler::onCommonSetup);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void onCommonSetup(final FMLCommonSetupEvent event) {
|
||||||
|
event.enqueueWork(CompostHandler::registerCompostables);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerCompostables() {
|
||||||
|
if (Config.isEnabled(Tweak.ECOLOGICS_WALNUT_FIX)) {
|
||||||
|
addCompostable("ecologics:walnut", 0.2f);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config.isEnabled(Tweak.DAWN_OF_TIME_FIX)) {
|
||||||
|
addCompostable("dawnoftimebuilder:camellia_leaves", 0.3f);
|
||||||
|
addCompostable("dawnoftimebuilder:camellia_seeds", 0.3f);
|
||||||
|
addCompostable("dawnoftimebuilder:commelina", 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addCompostable(final String itemId, final float chance) {
|
||||||
|
try {
|
||||||
|
final ResourceLocation location = ResourceLocation.parse(itemId);
|
||||||
|
final Item item = ForgeRegistries.ITEMS.getValue(location);
|
||||||
|
|
||||||
|
if (item != null) {
|
||||||
|
ComposterBlock.COMPOSTABLES.put(item, chance);
|
||||||
|
}
|
||||||
|
} catch (final Exception e) {
|
||||||
|
LOGGER.error("Error adding compostable item {}: {}", itemId, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package io.lampnet.ccccc.tweaks;
|
||||||
|
|
||||||
|
import io.lampnet.ccccc.Config;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraftforge.event.entity.EntityJoinLevelEvent;
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = io.lampnet.ccccc.Ccccc.MODID)
|
||||||
|
public final class GlowSquidSpawnHandler {
|
||||||
|
private GlowSquidSpawnHandler() {}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onEntityJoin(final EntityJoinLevelEvent event) {
|
||||||
|
if (!(event.getEntity() instanceof LivingEntity)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final LivingEntity entity = (LivingEntity) event.getEntity();
|
||||||
|
if (entity.getType() != EntityType.GLOW_SQUID) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final LevelAccessor level = event.getLevel();
|
||||||
|
final BlockPos spawnPos = entity.blockPosition();
|
||||||
|
|
||||||
|
final int scanRange = Math.max(Config.GLOW_SQUID_RANGE_DISABLE, Config.getGlowSquidScanRange());
|
||||||
|
if (scanRange == Config.GLOW_SQUID_RANGE_DISABLE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean hasStoneAbove = false;
|
||||||
|
for (int dy = 1; dy <= scanRange; dy++) {
|
||||||
|
final BlockPos pos = spawnPos.above(dy);
|
||||||
|
final BlockState state = level.getBlockState(pos);
|
||||||
|
if (state.is(BlockTags.create(new net.minecraft.resources.ResourceLocation("forge", "stone")))) {
|
||||||
|
hasStoneAbove = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasStoneAbove) {
|
||||||
|
event.setCanceled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
77
src/main/resources/META-INF/mods.toml
Normal file
77
src/main/resources/META-INF/mods.toml
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
||||||
|
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||||
|
# The overall format is standard TOML format, v0.5.0.
|
||||||
|
# Note that there are a couple of TOML lists in this file.
|
||||||
|
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||||
|
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||||
|
modLoader = "javafml" #mandatory
|
||||||
|
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||||
|
loaderVersion = "${loader_version_range}" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
|
||||||
|
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
|
||||||
|
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
|
||||||
|
license = "${mod_license}"
|
||||||
|
# A URL to refer people to when problems occur with this mod
|
||||||
|
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
|
||||||
|
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||||
|
[[mods]] #mandatory
|
||||||
|
# The modid of the mod
|
||||||
|
modId = "${mod_id}" #mandatory
|
||||||
|
# The version number of the mod
|
||||||
|
version = "${mod_version}" #mandatory
|
||||||
|
# A display name for the mod
|
||||||
|
displayName = "${mod_name}" #mandatory
|
||||||
|
# A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
|
||||||
|
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||||
|
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||||
|
displayURL = "https://lampnet.io" #optional
|
||||||
|
# A file name (in the root of the mod JAR) containing a logo for display
|
||||||
|
#logoFile="ccccc.png" #optional
|
||||||
|
# A text field displayed in the mod UI
|
||||||
|
#credits="Thanks for this example mod goes to Java" #optional
|
||||||
|
# A text field displayed in the mod UI
|
||||||
|
authors = "${mod_authors}" #optional
|
||||||
|
# Display Test controls the display for your mod in the server connection screen
|
||||||
|
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
|
||||||
|
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
|
||||||
|
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
|
||||||
|
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
|
||||||
|
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
|
||||||
|
#displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional)
|
||||||
|
|
||||||
|
# The description text for the mod (multi line!) (#mandatory)
|
||||||
|
description = '''${mod_description}'''
|
||||||
|
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||||
|
[[dependencies."${mod_id}"]] #optional
|
||||||
|
# the modid of the dependency
|
||||||
|
modId = "forge" #mandatory
|
||||||
|
# Does this dependency have to exist - if not, ordering below must be specified
|
||||||
|
mandatory = true #mandatory
|
||||||
|
# The version range of the dependency
|
||||||
|
versionRange = "${forge_version_range}" #mandatory
|
||||||
|
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
|
||||||
|
# BEFORE - This mod is loaded BEFORE the dependency
|
||||||
|
# AFTER - This mod is loaded AFTER the dependency
|
||||||
|
ordering = "NONE"
|
||||||
|
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
|
||||||
|
side = "BOTH"# Here's another dependency
|
||||||
|
[[dependencies."${mod_id}"]]
|
||||||
|
modId = "minecraft"
|
||||||
|
mandatory = true
|
||||||
|
# This version range declares a minimum of the current minecraft version up to but not including the next major version
|
||||||
|
versionRange = "${minecraft_version_range}"
|
||||||
|
ordering = "NONE"
|
||||||
|
side = "BOTH"
|
||||||
|
|
||||||
|
[[dependencies."${mod_id}"]]
|
||||||
|
modId = "respiteful"
|
||||||
|
mandatory = false
|
||||||
|
versionRange = "[0,)"
|
||||||
|
ordering = "AFTER"
|
||||||
|
side = "BOTH"
|
||||||
|
|
||||||
|
[[dependencies."${mod_id}"]]
|
||||||
|
modId = "jei"
|
||||||
|
mandatory = false
|
||||||
|
versionRange = "[0,)"
|
||||||
|
ordering = "AFTER"
|
||||||
|
side = "BOTH"
|
||||||
21
src/main/resources/ccccc.mixins.json
Normal file
21
src/main/resources/ccccc.mixins.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"required": false,
|
||||||
|
"minVersion": "0.8",
|
||||||
|
"package": "io.lampnet.ccccc.mixin",
|
||||||
|
"compatibilityLevel": "JAVA_17",
|
||||||
|
"refmap": "ccccc.refmap.json",
|
||||||
|
"plugin": "io.lampnet.ccccc.mixin.CccccMixinPlugin",
|
||||||
|
"mixins": [
|
||||||
|
"respiteful.RespitefulFluidsMixin",
|
||||||
|
"tetracelium.TetraceliumBotaniaMixin",
|
||||||
|
"supplementaries.SupplementariesHatsMixin"
|
||||||
|
],
|
||||||
|
"client": [
|
||||||
|
],
|
||||||
|
"injectors": {
|
||||||
|
"defaultRequire": 1
|
||||||
|
},
|
||||||
|
"overwrites": {
|
||||||
|
"requireAnnotations": true
|
||||||
|
}
|
||||||
|
}
|
||||||
6
src/main/resources/pack.mcmeta
Normal file
6
src/main/resources/pack.mcmeta
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"description": "ccccc resources",
|
||||||
|
"pack_format": 15
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"botania:twig_wand",
|
||||||
|
"botania:dreamwood_wand"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Travelers Backpack + Botania (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"create:wrench"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Travelers Backpack + Create (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"exposure:camera"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Travelers Backpack + Exposure (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"create:goggles"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Accessories - Create goggles (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"OP",
|
||||||
|
"MB"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"O": {
|
||||||
|
"item": "minecraft:bowl"
|
||||||
|
},
|
||||||
|
"P": {
|
||||||
|
"item": "neapolitan:banana"
|
||||||
|
},
|
||||||
|
"M": {
|
||||||
|
"item": "minecraft:brown_mushroom"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "minecraft:bone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "alexsmobs:sopa_de_macaco"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Alex's Mobs macaco compatibility recipe"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Tetra + Enscorcellation Compat (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" R ",
|
||||||
|
"R R",
|
||||||
|
" R "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"R": {
|
||||||
|
"tag": "forge:rope"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "tetra:modular_toolbelt",
|
||||||
|
"nbt": "{\"toolbelt/belt_material\": \"belt/rope\", \"toolbelt/strap_slot1_material\": \"strap1/rope\", \"toolbelt/slot1\": \"toolbelt/strap_slot1\", \"toolbelt/strap_slot3_material\": \"strap1/rope\", \"toolbelt/slot3\": \"toolbelt/strap_slot3\", \"toolbelt/belt\": \"toolbelt/belt\"}"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"A"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"A": {
|
||||||
|
"item": "minecraft:air"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "minecraft:air"
|
||||||
|
},
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"type": "forge:mod_loaded",
|
||||||
|
"modid": "this_mod_does_not_exist_ccccc_removal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Tetra toolbelt compatibility recipe"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"R",
|
||||||
|
"P"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"R": {
|
||||||
|
"tag": "forge:rope"
|
||||||
|
},
|
||||||
|
"P": {
|
||||||
|
"item": "minecraft:flower_pot"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "beautify:hanging_pot"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Beautify hanging pot compatibility recipe"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"CCC",
|
||||||
|
"CCC",
|
||||||
|
"CCC"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"C": {
|
||||||
|
"item": "create:copper_nugget"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "minecraft:copper_ingot"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Craft Copper ingot from nuggets"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"T",
|
||||||
|
"B",
|
||||||
|
"C"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"T": {
|
||||||
|
"item": "create:electron_tube"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"tag": "forge:workbench"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "create:brass_casing"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "create:mechanical_crafter",
|
||||||
|
"count": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Create Mechanical Crafter compatibility recipes"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" T ",
|
||||||
|
"CBS",
|
||||||
|
" R "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"T": {
|
||||||
|
"item": "create:electron_tube"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"tag": "forge:workbench"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"item": "toms_storage:ts.storage_terminal"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "create:brass_casing"
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"item": "create:linked_controller"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "toms_storage:ts.crafting_terminal"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" T ",
|
||||||
|
"CBC",
|
||||||
|
" H "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"T": {
|
||||||
|
"item": "create:electron_tube"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"tag": "forge:chests"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "create:brass_casing"
|
||||||
|
},
|
||||||
|
"H": {
|
||||||
|
"item": "create:brass_hand"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "toms_storage:ts.inventory_connector"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Create + Tom's Storage compatibility recipes"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"III",
|
||||||
|
"ICI",
|
||||||
|
"RDR"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"I": {
|
||||||
|
"tag": "forge:ingots/iron"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"tag": "forge:workbench"
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"tag": "forge:dusts/redstone"
|
||||||
|
},
|
||||||
|
"D": {
|
||||||
|
"item": "minecraft:dispenser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "quark:crafter"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Quark crafter compatibility recipe"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"minecraft:lantern",
|
||||||
|
"minecraft:soul_lantern"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Accessories - Minecraft Lantern as belt (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"create:copper_nugget"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Forge metal_nuggets + Create copper (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Ropes - Beautify (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Beautify (farmersdelight tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Beautify (forge tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"beautify:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Beautify (supplementaries tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"brewery:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Brewery (farmersdelight tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"brewery:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Brewery (forge tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"brewery:rope"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Rope - Brewery (supplementaries tag)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"aromatic:stripped_cinnamon_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"aromatic:stripped_cinnamon_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Aromatic (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"arts_and_crafts:stripped_cork_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"arts_and_crafts:stripped_cork_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Arts & Crafts (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"atmospheric:stripped_laurel_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"atmospheric:stripped_laurel_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Atmospheric (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"autumnity:stripped_maple_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"autumnity:stripped_maple_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Autumnity (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"hexalia:stripped_cottonwood_log",
|
||||||
|
"hexalia:stripped_willow_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"hexalia:stripped_cottonwood_wood",
|
||||||
|
"hexalia:stripped_willow_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Hexalia (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"moresnifferflowers:stripped_vivicus_log",
|
||||||
|
"moresnifferflowers:stripped_corrupted_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"moresnifferflowers:stripped_vivicus_wood",
|
||||||
|
"moresnifferflowers:stripped_corrupted_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - More Sniffer Flowers (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"newworld:stripped_fir_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"newworld:stripped_fir_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - New World (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"spawn:stripped_rotten_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"spawn:stripped_rotten_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Spawn (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"upgrade_aquatic:stripped_driftwood_log",
|
||||||
|
"upgrade_aquatic:stripped_river_log"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"replace": false,
|
||||||
|
"values": [
|
||||||
|
"upgrade_aquatic:stripped_driftwood",
|
||||||
|
"upgrade_aquatic:stripped_river_wood"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Stripped logs/wood - Upgrade Aquatic (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"replace": true,
|
||||||
|
"values": [
|
||||||
|
"#minecraft:is_mountain",
|
||||||
|
"#minecraft:is_taiga",
|
||||||
|
"#forge:is_mountain"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 18,
|
||||||
|
"description": "CCCCC: Tetra structures in mountains (tweak)"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user