WIP 1.20.1 port

1.0.3 update
2 new squirrel anims
This commit is contained in:
craisinlord committed 2026-07-27 23:18:45 -05:00
1 parent a1ca3138dd
commit 94c3676dea
189 files changed
+26514

No files matched your search

+166
View File
@@ -0,0 +1,166 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
}
group = mod_group_id
version = mod_version
java {
toolchain { languageVersion = JavaLanguageVersion.of(17) }
withSourcesJar()
}
repositories {
mavenCentral()
maven { url = 'https://maven.minecraftforge.net' }
maven { url = 'https://maven.parchmentmc.org' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
maven { url = 'https://www.cursemaven.com' }
maven { url = 'https://maven.blamejared.com' }
maven { url = 'https://jitpack.io' }
exclusiveContent {
forRepository {
maven {
name = "GeckoLib"
url = "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/"
}
}
filter {
includeGroup("software.bernie.geckolib")
includeGroup("com.eliotlash.mclib")
}
}
}
base {
archivesName = "${mod_id}-forge-1.20.1"
}
// Handle duplicates from common-1.20.1 in all copy tasks
tasks.withType(AbstractCopyTask).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
minecraft {
mappings channel: 'parchment', version: parchment_version
copyIdeResources = true
runs {
configureEach {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
"${mod_id}" {
source sourceSets.main
}
}
}
client {
jvmArgs(
"-Dmixin.env.remapRefMap=true",
"-Dmixin.env.refMapRemappingFile=${projectDir}/build/createSrgToMcp/output.srg"
)
}
server {
args '--nogui'
}
}
}
// Add common-1.20.1's sources directly. Path is relative because forge-1.20.1 is its
// own Gradle build (ForgeGradle 6 can't run on the root's Gradle 9) — there is no
// `:common-1.20.1` project here.
sourceSets {
main {
java {
srcDirs += file('../common-1.20.1/src/main/java')
}
resources {
srcDirs += file('../common-1.20.1/src/main/resources')
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
implementation "software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}"
compileOnly("curse.maven:sizeable_foliage-${sizeable_foliage_curseforge_id}:${sizeable_foliage_curseforge_file_id_forge}")
runtimeOnly("curse.maven:sizeable_foliage-${sizeable_foliage_curseforge_id}:${sizeable_foliage_curseforge_file_id_forge}")
compileOnly("curse.maven:intapi-${intapi_curseforge_id}:${intapi_curseforge_file_id_forge}")
runtimeOnly("curse.maven:intapi-${intapi_curseforge_id}:${intapi_curseforge_file_id_forge}")
compileOnly("curse.maven:pehkui-${pehkui_curseforge_id}:${pehkui_curseforge_file_id_forge}")
runtimeOnly("curse.maven:pehkui-${pehkui_curseforge_id}:${pehkui_curseforge_file_id_forge}")
compileOnly(files("$rootDir/../infinite_dimensions_jars/infinity-2.7.2+1.20.1-forge.jar"))
runtimeOnly(files("$rootDir/../infinite_dimensions_jars/infinity-2.7.2+1.20.1-forge.jar"))
compileOnly "mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"
compileOnly "mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"
runtimeOnly "mezz.jei:jei-${minecraft_version}-forge:${jei_version}"
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras}"))
}
mixin {
add sourceSets.main, "${mod_id}-forge.mixins.refmap.json"
config "${mod_id}-common.mixins.json"
config "${mod_id}-forge.mixins.json"
}
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
version : project.version,
minecraft_version : minecraft_version,
minecraft_version_range: "[${minecraft_version}]",
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_authors : mod_authors,
mod_description : mod_description
]
inputs.properties replaceProperties
filesMatching('META-INF/mods.toml') {
expand replaceProperties
}
}
tasks.named('jar', Jar).configure {
finalizedBy 'reobfJar'
}
publishing {
publications {
register('mavenJava', MavenPublication) {
groupId = project.group
artifactId = project.base.archivesName.get()
version = project.version
artifact jar
artifact sourcesJar
pom {
name = "${mod_name} (Forge 1.20.1)"
description = mod_description
}
}
}
}
+29
View File
@@ -0,0 +1,29 @@
org.gradle.jvmargs=-Xmx4G
org.gradle.java.home=C:/Program Files/Java/jdk-21.0.10
mod_id=antarchy
mod_name=Antarchy
mod_description=ANTS! ANTS! ANTS! ANTS!
mod_authors=CraisinLord
mod_group_id=com.craisinlord
mod_version=1.0.3
mod_license=All Rights Reserved
minecraft_version=1.20.1
forge_version=47.4.0
forge_version_range=[47,)
loader_version_range=[47,)
parchment_version=2023.09.03-1.20.1
jei_version=15.20.0.104
geckolib_version=4.8.4
mixin_extras=0.5.0
sizeable_foliage_curseforge_id=1601832
sizeable_foliage_curseforge_file_id_forge=8468688
intapi_curseforge_id=817709
intapi_curseforge_file_id_forge=7921671
pehkui_curseforge_id=319596
pehkui_curseforge_file_id_forge=5393101
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+234
View File
@@ -0,0 +1,234 @@
#!/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/master/subprojects/plugins/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
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# 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"'
# 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
which java >/dev/null 2>&1 || 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
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
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
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# 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" "$@"
+89
View File
@@ -0,0 +1,89 @@
@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=.
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%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
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%"=="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!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+10
View File
@@ -0,0 +1,10 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://maven.parchmentmc.org' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
}
}
rootProject.name = 'forge-1.20.1'
@@ -0,0 +1,426 @@
package com.craisinlord.antarchy.forge;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.network.ImpactShakeSync;
import com.craisinlord.antarchy.config.ConfigResetGuard;
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakePayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakeSync;
import com.craisinlord.antarchy.content.network.HordeIntensitySync;
import java.nio.file.Path;
import net.minecraftforge.fml.loading.FMLPaths;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.config.ModConfigEvent;
public final class AntarchyConfigModuleForge {
private AntarchyConfigModuleForge() {}
public static void init() {
Path configDir = FMLPaths.CONFIGDIR.get().resolve("antarchy");
ConfigResetGuard.wipeIfNeeded(
configDir,
configDir.resolve("antarchy_mobs.toml"),
configDir.resolve("antarchy_tools.toml"),
configDir.resolve("antarchy_misc.toml")
);
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, AntarchyMobsConfig.SPEC, "antarchy/antarchy_mobs.toml");
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, AntarchyToolsConfig.SPEC, "antarchy/antarchy_tools.toml");
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, AntarchyMiscConfig.SPEC, "antarchy/antarchy_misc.toml");
HerculesBeetleImpactShakeSync.setSink((player, ticks) -> AntarchyForgeNetworkCore.sendToPlayer(player, new HerculesBeetleImpactShakePayload(ticks)));
ImpactShakeSync.setSink(AntarchyForgeNetworkCore::sendToPlayer);
HordeIntensitySync.setSink(AntarchyForgeNetworkCore::sendToPlayer);
AntarchyForge.modEventBusTempHolder.addListener(AntarchyConfigModuleForge::onConfigChange);
}
private static void onConfigChange(ModConfigEvent event) {
if (event instanceof ModConfigEvent.Reloading) {
return;
}
var spec = event.getConfig().getSpec();
if (spec == AntarchyMobsConfig.SPEC) {
bakeMobsConfig();
return;
}
if (spec == AntarchyToolsConfig.SPEC) {
bakeToolsConfig();
return;
}
if (spec == AntarchyMiscConfig.SPEC) {
bakeMiscConfig();
}
}
private static void bakeMobsConfig() {
AntarchySettings.setAntsStealFromChests(AntarchyMobsConfig.antsStealFromChests());
AntarchySettings.setBrownAntRequiresReagent(AntarchyMobsConfig.brownAntRequiresReagent());
AntarchySettings.setBrownAntHealth(AntarchyMobsConfig.brownAntHealth());
AntarchySettings.setBrownAntMovementSpeed(AntarchyMobsConfig.brownAntMovementSpeed());
AntarchySettings.setBrownAntAttackDamage(AntarchyMobsConfig.brownAntAttackDamage());
AntarchySettings.setBrownAntDestinationDimension(AntarchyMobsConfig.brownAntDestinationDimension());
AntarchySettings.setRedAntRequiresReagent(AntarchyMobsConfig.redAntRequiresReagent());
AntarchySettings.setRedAntHealth(AntarchyMobsConfig.redAntHealth());
AntarchySettings.setRedAntMovementSpeed(AntarchyMobsConfig.redAntMovementSpeed());
AntarchySettings.setRedAntAttackDamage(AntarchyMobsConfig.redAntAttackDamage());
AntarchySettings.setRedAntDestinationDimension(AntarchyMobsConfig.redAntDestinationDimension());
AntarchySettings.setRainbowAntRequiresReagent(AntarchyMobsConfig.rainbowAntRequiresReagent());
AntarchySettings.setRainbowAntHealth(AntarchyMobsConfig.rainbowAntHealth());
AntarchySettings.setRainbowAntMovementSpeed(AntarchyMobsConfig.rainbowAntMovementSpeed());
AntarchySettings.setRainbowAntAttackDamage(AntarchyMobsConfig.rainbowAntAttackDamage());
AntarchySettings.setRainbowAntNonInfinityFallbackDimension(AntarchyMobsConfig.rainbowAntNonInfinityFallbackDimension());
AntarchySettings.setTermiteRequiresReagent(AntarchyMobsConfig.termiteRequiresReagent());
AntarchySettings.setTermiteHealth(AntarchyMobsConfig.termiteHealth());
AntarchySettings.setTermiteMovementSpeed(AntarchyMobsConfig.termiteMovementSpeed());
AntarchySettings.setTermiteAttackDamage(AntarchyMobsConfig.termiteAttackDamage());
AntarchySettings.setTermiteDestinationDimension(AntarchyMobsConfig.termiteDestinationDimension());
AntarchySettings.setEasterBunnyEnabled(AntarchyMobsConfig.easterBunnyEnabled());
AntarchySettings.setEasterBunnyNaturalSpawnChancePercent(AntarchyMobsConfig.easterBunnyNaturalSpawnChancePercent());
AntarchySettings.setWaspHealth(AntarchyMobsConfig.waspHealth());
AntarchySettings.setWaspAttackDamage(AntarchyMobsConfig.waspAttackDamage());
AntarchySettings.setWaspMovementSpeed(AntarchyMobsConfig.waspMovementSpeed());
AntarchySettings.setBomberHealth(AntarchyMobsConfig.bomberHealth());
AntarchySettings.setBomberAttackDamage(AntarchyMobsConfig.bomberAttackDamage());
AntarchySettings.setBomberExplosionDamage(AntarchyMobsConfig.bomberExplosionDamage());
AntarchySettings.setBomberExplosionRadius(AntarchyMobsConfig.bomberExplosionRadius());
AntarchySettings.setJumpyBugHealth(AntarchyMobsConfig.jumpyBugHealth());
AntarchySettings.setJumpyBugPounceDamage(AntarchyMobsConfig.jumpyBugPounceDamage());
AntarchySettings.setJumpyBugLatchDamage(AntarchyMobsConfig.jumpyBugLatchDamage());
AntarchySettings.setJumpyBugCamouflageAlpha(AntarchyMobsConfig.jumpyBugCamouflageAlpha());
AntarchySettings.setKrakenHealth(AntarchyMobsConfig.krakenHealth());
AntarchySettings.setKrakenAttackDamage(AntarchyMobsConfig.krakenAttackDamage());
AntarchySettings.setKrakenProjectileDamageTakenMultiplier(AntarchyMobsConfig.krakenProjectileDamageTakenMultiplier());
AntarchySettings.setKrakenSquidSpawnEnabled(AntarchyMobsConfig.krakenSquidSpawnEnabled());
AntarchySettings.setKrakenMassSpawnEnabled(AntarchyMobsConfig.krakenMassSpawnEnabled());
AntarchySettings.setKrakenRequireBadOmenToSummon(AntarchyMobsConfig.krakenRequireBadOmenToSummon());
AntarchySettings.setBrutalflyHealth(AntarchyMobsConfig.brutalflyHealth());
AntarchySettings.setBrutalflySwipeDamage(AntarchyMobsConfig.brutalflySwipeDamage());
AntarchySettings.setBrutalflySpitDamage(AntarchyMobsConfig.brutalflySpitDamage());
AntarchySettings.setMantisHealth(AntarchyMobsConfig.mantisHealth());
AntarchySettings.setMantisAttackDamage(AntarchyMobsConfig.mantisAttackDamage());
AntarchySettings.setMantisMovementSpeed(AntarchyMobsConfig.mantisMovementSpeed());
AntarchySettings.setMantisFlyingSpeed(AntarchyMobsConfig.mantisFlyingSpeed());
AntarchySettings.setMantisIgnoreLightLevel(AntarchyMobsConfig.mantisIgnoreLightLevel());
AntarchySettings.setAlphaMantisHealth(AntarchyMobsConfig.alphaMantisHealth());
AntarchySettings.setAlphaMantisAttackDamage(AntarchyMobsConfig.alphaMantisAttackDamage());
AntarchySettings.setAlphaMantisMovementSpeed(AntarchyMobsConfig.alphaMantisMovementSpeed());
AntarchySettings.setAlphaMantisFlyingSpeed(AntarchyMobsConfig.alphaMantisFlyingSpeed());
AntarchySettings.setAlphaMantisSummonIntervalTicks(AntarchyMobsConfig.alphaMantisSummonIntervalTicks());
AntarchySettings.setAlphaMantisMaxMinions(AntarchyMobsConfig.alphaMantisMaxMinions());
AntarchySettings.setRollyPollyHealth(AntarchyMobsConfig.rollyPollyHealth());
AntarchySettings.setRollyPollyMovementSpeed(AntarchyMobsConfig.rollyPollyMovementSpeed());
AntarchySettings.setRollyPollyRollSpeedMultiplier(AntarchyMobsConfig.rollyPollyRollSpeedMultiplier());
AntarchySettings.setRollyPollyTumbleDamage(AntarchyMobsConfig.rollyPollyTumbleDamage());
AntarchySettings.setRollyPollyTameChance(AntarchyMobsConfig.rollyPollyTameChance());
AntarchySettings.setRollyPollyBowlingDamage(AntarchyMobsConfig.rollyPollyBowlingDamage());
AntarchySettings.setRollyPollyBowlingKnockback(AntarchyMobsConfig.rollyPollyBowlingKnockback());
AntarchySettings.setRollyPollyArmor(AntarchyMobsConfig.rollyPollyArmor());
AntarchySettings.setRollyPollyRolledArmorBonus(AntarchyMobsConfig.rollyPollyRolledArmorBonus());
AntarchySettings.setTriffidHealth(AntarchyMobsConfig.triffidHealth());
AntarchySettings.setTriffidAttackDamage(AntarchyMobsConfig.triffidAttackDamage());
AntarchySettings.setTriffidGrabDamage(AntarchyMobsConfig.triffidGrabDamage());
AntarchySettings.setCaterpillarPupationTimeSeconds(AntarchyMobsConfig.caterpillarPupationTimeSeconds());
AntarchySettings.setReverieHealth(AntarchyMobsConfig.reverieHealth());
AntarchySettings.setReverieInterestRadius(AntarchyMobsConfig.reverieInterestRadius());
AntarchySettings.setReverieAbandonPlayerDistance(AntarchyMobsConfig.reverieAbandonPlayerDistance());
AntarchySettings.setReverieNoticeDurationTicks(AntarchyMobsConfig.reverieNoticeDurationTicks());
AntarchySettings.setReverieInterestDurationTicks(AntarchyMobsConfig.reverieInterestDurationTicks());
AntarchySettings.setReverieRebindCooldownTicks(AntarchyMobsConfig.reverieRebindCooldownTicks());
AntarchySettings.setReverieDamageReactionDurationTicks(AntarchyMobsConfig.reverieDamageReactionDurationTicks());
AntarchySettings.setReverieDangerousFallDistance(AntarchyMobsConfig.reverieDangerousFallDistance());
AntarchySettings.setReverieDangerousFallSpeed(AntarchyMobsConfig.reverieDangerousFallSpeed());
AntarchySettings.setReverieWarningThreatRadius(AntarchyMobsConfig.reverieWarningThreatRadius());
AntarchySettings.setReverieWarningThreatVerticalRange(AntarchyMobsConfig.reverieWarningThreatVerticalRange());
AntarchySettings.setReverieDuplicationCooldownTicks(AntarchyMobsConfig.reverieDuplicationCooldownTicks());
AntarchySettings.setNightmareHealth(AntarchyMobsConfig.nightmareHealth());
AntarchySettings.setNightmareAttackDamage(AntarchyMobsConfig.nightmareAttackDamage());
AntarchySettings.setBasiliskPetrifyingGazeEnabled(AntarchyMobsConfig.basiliskPetrifyingGazeEnabled());
AntarchySettings.setBasiliskSpawnMaxLightLevel(AntarchyMobsConfig.basiliskSpawnMaxLightLevel());
AntarchySettings.setBasiliskHealth(AntarchyMobsConfig.basiliskHealth());
AntarchySettings.setBasiliskAttackDamage(AntarchyMobsConfig.basiliskAttackDamage());
AntarchySettings.setBasiliskMovementSpeed(AntarchyMobsConfig.basiliskMovementSpeed());
AntarchySettings.setBasiliskArmor(AntarchyMobsConfig.basiliskArmor());
AntarchySettings.setBasiliskKnockbackResistance(AntarchyMobsConfig.basiliskKnockbackResistance());
AntarchySettings.setBasiliskFollowRange(AntarchyMobsConfig.basiliskFollowRange());
AntarchySettings.setBasiliskXpReward(AntarchyMobsConfig.basiliskXpReward());
AntarchySettings.setBasiliskAttackAnimTicks(AntarchyMobsConfig.basiliskAttackAnimTicks());
AntarchySettings.setBasiliskAttackDamageTick(AntarchyMobsConfig.basiliskAttackDamageTick());
AntarchySettings.setBasiliskHissCooldownTicks(AntarchyMobsConfig.basiliskHissCooldownTicks());
AntarchySettings.setBasiliskAttackReach(AntarchyMobsConfig.basiliskAttackReach());
AntarchySettings.setBasiliskGazeRange(AntarchyMobsConfig.basiliskGazeRange());
AntarchySettings.setBasiliskGazeDotThreshold(AntarchyMobsConfig.basiliskGazeDotThreshold());
AntarchySettings.setBasiliskGazeFacingThreshold(AntarchyMobsConfig.basiliskGazeFacingThreshold());
AntarchySettings.setBasiliskHissChargeTicks(AntarchyMobsConfig.basiliskHissChargeTicks());
AntarchySettings.setBasiliskPlayerParalyzeTicks(AntarchyMobsConfig.basiliskPlayerParalyzeTicks());
AntarchySettings.setBasiliskPreyPetrifyCooldownTicks(AntarchyMobsConfig.basiliskPreyPetrifyCooldownTicks());
AntarchySettings.setBasiliskPreyPetrifyRange(AntarchyMobsConfig.basiliskPreyPetrifyRange());
AntarchySettings.setBasiliskPreyPetrifyTicks(AntarchyMobsConfig.basiliskPreyPetrifyTicks());
AntarchySettings.setLucidAttackRange(AntarchyMobsConfig.lucidAttackRange());
AntarchySettings.setLucidPearlInvertedDurationSeconds(AntarchyMobsConfig.lucidPearlInvertedDurationSeconds());
AntarchySettings.setDreadHallucinationSoundsEnabled(AntarchyMobsConfig.dreadHallucinationSoundsEnabled());
AntarchySettings.setDreadHallucinationSoundMinInterval(AntarchyMobsConfig.dreadHallucinationSoundMinInterval());
AntarchySettings.setDreadHallucinationSoundMaxInterval(AntarchyMobsConfig.dreadHallucinationSoundMaxInterval());
AntarchySettings.setDreadHallucinationMobsEnabled(AntarchyMobsConfig.dreadHallucinationMobsEnabled());
AntarchySettings.setDreadHallucinationMobMinInterval(AntarchyMobsConfig.dreadHallucinationMobMinInterval());
AntarchySettings.setDreadHallucinationMobMaxInterval(AntarchyMobsConfig.dreadHallucinationMobMaxInterval());
AntarchySettings.setToreterrorHealth(AntarchyMobsConfig.toreterrorHealth());
AntarchySettings.setToreterrorJumpAttackDamage(AntarchyMobsConfig.toreterrorJumpAttackDamage());
AntarchySettings.setToreterrorJumpAttackKnockback(AntarchyMobsConfig.toreterrorJumpAttackKnockback());
AntarchySettings.setToreterrorSpinDamage(AntarchyMobsConfig.toreterrorSpinDamage());
AntarchySettings.setToreterrorSpinKnockback(AntarchyMobsConfig.toreterrorSpinKnockback());
AntarchySettings.setToreterrorRangedWaterBombChance(AntarchyMobsConfig.toreterrorRangedWaterBombChance());
AntarchySettings.setToreterrorProjectileDamageMultiplier(AntarchyMobsConfig.toreterrorProjectileDamageMultiplier());
AntarchySettings.setWaterBombDamage(AntarchyMobsConfig.waterBombDamage());
AntarchySettings.setWaterBombLifetimeTicks(AntarchyMobsConfig.waterBombLifetimeTicks());
AntarchySettings.setWaterBombGravity(AntarchyMobsConfig.waterBombGravity());
AntarchySettings.setWaterBombKnockback(AntarchyMobsConfig.waterBombKnockback());
AntarchySettings.setWaterCannonCooldownSeconds(AntarchyMobsConfig.waterCannonCooldownSeconds());
AntarchySettings.setCreepingHorrorHealth(AntarchyMobsConfig.creepingHorrorHealth());
AntarchySettings.setCreepingHorrorAttackDamage(AntarchyMobsConfig.creepingHorrorAttackDamage());
AntarchySettings.setLurkingTerrorHealth(AntarchyMobsConfig.lurkingTerrorHealth());
AntarchySettings.setLurkingTerrorAttackDamage(AntarchyMobsConfig.lurkingTerrorAttackDamage());
AntarchySettings.setJerryInfantHealth(AntarchyMobsConfig.jerryInfantHealth());
AntarchySettings.setJerryInfantAttackDamage(AntarchyMobsConfig.jerryInfantAttackDamage());
AntarchySettings.setJerryMatureHealth(AntarchyMobsConfig.jerryMatureHealth());
AntarchySettings.setJerryMatureAttackDamage(AntarchyMobsConfig.jerryMatureAttackDamage());
AntarchySettings.setJerryAlphaHealth(AntarchyMobsConfig.jerryAlphaHealth());
AntarchySettings.setJerryAlphaAttackDamage(AntarchyMobsConfig.jerryAlphaAttackDamage());
AntarchySettings.setJerryGammaHealth(AntarchyMobsConfig.jerryGammaHealth());
AntarchySettings.setJerryGammaAttackDamage(AntarchyMobsConfig.jerryGammaAttackDamage());
AntarchySettings.setCheepHealth(AntarchyMobsConfig.cheepHealth());
AntarchySettings.setCheepAttackDamage(AntarchyMobsConfig.cheepAttackDamage());
AntarchySettings.setDorrieHealth(AntarchyMobsConfig.dorrieHealth());
AntarchySettings.setHerculesBeetleHealth(AntarchyMobsConfig.herculesBeetleHealth());
AntarchySettings.setHerculesBeetleAttackDamage(AntarchyMobsConfig.herculesBeetleAttackDamage());
AntarchySettings.setHerculesBeetleChargeDamage(AntarchyMobsConfig.herculesBeetleChargeDamage());
AntarchySettings.setOuranwoodDeerHealth(AntarchyMobsConfig.ouranwoodDeerHealth());
AntarchySettings.setGlimmerHealth(AntarchyMobsConfig.glimmerHealth());
}
private static void bakeToolsConfig() {
AntarchySettings.setBasiliskDaggerAttackDamage(AntarchyToolsConfig.basiliskDaggerAttackDamage());
AntarchySettings.setBasiliskDaggerAttackSpeed(AntarchyToolsConfig.basiliskDaggerAttackSpeed());
AntarchySettings.setBasiliskDaggerPoisonDurationTicks(AntarchyToolsConfig.basiliskDaggerPoisonDurationTicks());
AntarchySettings.setBasiliskDaggerPoisonAmplifier(AntarchyToolsConfig.basiliskDaggerPoisonAmplifier());
AntarchySettings.setUltimateSwordAttackDamage(AntarchyToolsConfig.ultimateSwordAttackDamage());
AntarchySettings.setUltimateSwordAttackSpeed(AntarchyToolsConfig.ultimateSwordAttackSpeed());
AntarchySettings.setUltimatePickaxeAttackDamage(AntarchyToolsConfig.ultimatePickaxeAttackDamage());
AntarchySettings.setUltimatePickaxeAttackSpeed(AntarchyToolsConfig.ultimatePickaxeAttackSpeed());
AntarchySettings.setUltimateAxeAttackDamage(AntarchyToolsConfig.ultimateAxeAttackDamage());
AntarchySettings.setUltimateAxeAttackSpeed(AntarchyToolsConfig.ultimateAxeAttackSpeed());
AntarchySettings.setUltimateShovelAttackDamage(AntarchyToolsConfig.ultimateShovelAttackDamage());
AntarchySettings.setUltimateShovelAttackSpeed(AntarchyToolsConfig.ultimateShovelAttackSpeed());
AntarchySettings.setUltimateHoeAttackDamage(AntarchyToolsConfig.ultimateHoeAttackDamage());
AntarchySettings.setUltimateHoeAttackSpeed(AntarchyToolsConfig.ultimateHoeAttackSpeed());
AntarchySettings.setUltimateToolEnchantability(AntarchyToolsConfig.ultimateToolEnchantability());
AntarchySettings.setUltimateToolsThreeByThreeEnabled(AntarchyToolsConfig.ultimateToolsThreeByThreeEnabled());
AntarchySettings.setUltimateBowAttackDamage(AntarchyToolsConfig.ultimateBowAttackDamage());
AntarchySettings.setUltimateBowPlayerHeal(AntarchyToolsConfig.ultimateBowPlayerHeal());
AntarchySettings.setUltimateBowDrawSpeedMultiplier(AntarchyToolsConfig.ultimateBowDrawSpeedMultiplier());
AntarchySettings.setUltimateBowComesEnchantedWithFlame(AntarchyToolsConfig.ultimateBowComesEnchantedWithFlame());
AntarchySettings.setUltimateBowEnchantability(AntarchyToolsConfig.ultimateBowEnchantability());
AntarchySettings.setUltimateCrossbowAttackDamage(AntarchyToolsConfig.ultimateCrossbowAttackDamage());
AntarchySettings.setUltimateCrossbowChargeSpeedMultiplier(AntarchyToolsConfig.ultimateCrossbowChargeSpeedMultiplier());
AntarchySettings.setUltimateCrossbowEnchantability(AntarchyToolsConfig.ultimateCrossbowEnchantability());
AntarchySettings.setUltimateMaceDamageMultiplier(AntarchyToolsConfig.ultimateMaceDamageMultiplier());
AntarchySettings.setUltimateMaceAttackSpeed(AntarchyToolsConfig.ultimateMaceAttackSpeed());
AntarchySettings.setUltimateMaceEnchantability(AntarchyToolsConfig.ultimateMaceEnchantability());
AntarchySettings.setUltimateArmorComesEnchanted(AntarchyToolsConfig.ultimateArmorComesEnchanted());
AntarchySettings.setUltimateArmorEnchantability(AntarchyToolsConfig.ultimateArmorEnchantability());
AntarchySettings.setUltimateHelmetArmorValue(AntarchyToolsConfig.ultimateHelmetArmorValue());
AntarchySettings.setUltimateChestplateArmorValue(AntarchyToolsConfig.ultimateChestplateArmorValue());
AntarchySettings.setUltimateLeggingsArmorValue(AntarchyToolsConfig.ultimateLeggingsArmorValue());
AntarchySettings.setUltimateBootsArmorValue(AntarchyToolsConfig.ultimateBootsArmorValue());
AntarchySettings.setUltimateHelmetArmorToughness(AntarchyToolsConfig.ultimateHelmetArmorToughness());
AntarchySettings.setUltimateChestplateArmorToughness(AntarchyToolsConfig.ultimateChestplateArmorToughness());
AntarchySettings.setUltimateLeggingsArmorToughness(AntarchyToolsConfig.ultimateLeggingsArmorToughness());
AntarchySettings.setUltimateBootsArmorToughness(AntarchyToolsConfig.ultimateBootsArmorToughness());
AntarchySettings.setUltimateArmorKnockbackResistance(AntarchyToolsConfig.ultimateArmorKnockbackResistance());
AntarchySettings.setBattleAxeAttackDamage(AntarchyToolsConfig.battleAxeAttackDamage());
AntarchySettings.setBattleAxeAttackSpeed(AntarchyToolsConfig.battleAxeAttackSpeed());
AntarchySettings.setBigBerthaAttackDamage(AntarchyToolsConfig.bigBerthaAttackDamage());
AntarchySettings.setBigBerthaReachBonus(AntarchyToolsConfig.bigBerthaReachBonus());
AntarchySettings.setBigBerthaAttackSpeed(AntarchyToolsConfig.bigBerthaAttackSpeed());
AntarchySettings.setAttitudeAdjusterBaseDamage(AntarchyToolsConfig.attitudeAdjusterBaseDamage());
AntarchySettings.setAttitudeAdjusterBreaksBlocks(AntarchyToolsConfig.attitudeAdjusterBreaksBlocks());
AntarchySettings.setBigBerthaBasiliskParalyzeDurationTicks(AntarchyToolsConfig.bigBerthaBasiliskParalyzeDurationTicks());
AntarchySettings.setBigBerthaKrakenSlowTicks(AntarchyToolsConfig.bigBerthaKrakenSlowTicks());
AntarchySettings.setBigBerthaBasiliskCooldownSeconds(AntarchyToolsConfig.bigBerthaBasiliskCooldownSeconds());
AntarchySettings.setBigBerthaLucidInvertedDurationSeconds(AntarchyToolsConfig.bigBerthaLucidInvertedDurationSeconds());
AntarchySettings.setBigBerthaLucidInvertedDamageBonusPercent(AntarchyToolsConfig.bigBerthaLucidInvertedDamageBonusPercent());
AntarchySettings.setKrakensGraspAttackDamage(AntarchyToolsConfig.krakensGraspAttackDamage());
AntarchySettings.setKrakensGraspAttackSpeed(AntarchyToolsConfig.krakensGraspAttackSpeed());
AntarchySettings.setKrakensGraspThrownDamage(AntarchyToolsConfig.krakensGraspThrownDamage());
AntarchySettings.setKrakensGraspLightningDamage(AntarchyToolsConfig.krakensGraspLightningDamage());
AntarchySettings.setKrakensGraspInnateLoyalty(AntarchyToolsConfig.krakensGraspInnateLoyalty());
AntarchySettings.setKrakensGraspInnateLoyaltyLevel(AntarchyToolsConfig.krakensGraspInnateLoyaltyLevel());
AntarchySettings.setKrakensGraspTentacleDurationTicks(AntarchyToolsConfig.krakensGraspTentacleDurationTicks());
AntarchySettings.setKrakensGraspTentacleDamage(AntarchyToolsConfig.krakensGraspTentacleDamage());
AntarchySettings.setKrakensGraspTentacleRadius(AntarchyToolsConfig.krakensGraspTentacleRadius());
AntarchySettings.setKrakensGraspTentacleDamageIntervalTicks(AntarchyToolsConfig.krakensGraspTentacleDamageIntervalTicks());
AntarchySettings.setScorpionWhipBaseDamage(AntarchyToolsConfig.scorpionWhipBaseDamage());
AntarchySettings.setScorpionWhipReachBonus(AntarchyToolsConfig.scorpionWhipReachBonus());
AntarchySettings.setScorpionWhipPoisonDurationTicks(AntarchyToolsConfig.scorpionWhipPoisonDurationTicks());
AntarchySettings.setScorpionWhipTetherMaxRange(AntarchyToolsConfig.scorpionWhipTetherMaxRange());
AntarchySettings.setScorpionWhipReelCooldownTicks(AntarchyToolsConfig.scorpionWhipReelCooldownTicks());
AntarchySettings.setScorpionWhipSnapBonusDamage(AntarchyToolsConfig.scorpionWhipSnapBonusDamage());
AntarchySettings.setScorpionWhipSnapCooldownTicks(AntarchyToolsConfig.scorpionWhipSnapCooldownTicks());
AntarchySettings.setScorpionWhipPullStrength(AntarchyToolsConfig.scorpionWhipPullStrength());
AntarchySettings.setScorpionWhipHeavyPullMultiplier(AntarchyToolsConfig.scorpionWhipHeavyPullMultiplier());
AntarchySettings.setScorpionWhipSelfPullMultiplier(AntarchyToolsConfig.scorpionWhipSelfPullMultiplier());
AntarchySettings.setBloodCrystalKatanaAttackDamage(AntarchyToolsConfig.bloodCrystalKatanaAttackDamage());
AntarchySettings.setBloodCrystalKatanaLaunchStrength(AntarchyToolsConfig.bloodCrystalKatanaLaunchStrength());
AntarchySettings.setBloodCrystalKatanaTrailDurationTicks(AntarchyToolsConfig.bloodCrystalKatanaTrailDurationTicks());
AntarchySettings.setNightmareHelmetArmorValue(AntarchyToolsConfig.nightmareHelmetArmorValue());
AntarchySettings.setNightmareChestplateArmorValue(AntarchyToolsConfig.nightmareChestplateArmorValue());
AntarchySettings.setNightmareLeggingsArmorValue(AntarchyToolsConfig.nightmareLeggingsArmorValue());
AntarchySettings.setNightmareBootsArmorValue(AntarchyToolsConfig.nightmareBootsArmorValue());
AntarchySettings.setNightmareHelmetArmorToughness(AntarchyToolsConfig.nightmareHelmetArmorToughness());
AntarchySettings.setNightmareChestplateArmorToughness(AntarchyToolsConfig.nightmareChestplateArmorToughness());
AntarchySettings.setNightmareLeggingsArmorToughness(AntarchyToolsConfig.nightmareLeggingsArmorToughness());
AntarchySettings.setNightmareBootsArmorToughness(AntarchyToolsConfig.nightmareBootsArmorToughness());
AntarchySettings.setNightmareArmorKnockbackResistance(AntarchyToolsConfig.nightmareArmorKnockbackResistance());
AntarchySettings.setNightmareArmorDreadAuraRangePerPiece(AntarchyToolsConfig.nightmareArmorDreadAuraRangePerPiece());
AntarchySettings.setPrimordialArmorKnockbackPerPiece(AntarchyToolsConfig.primordialArmorKnockbackPerPiece());
AntarchySettings.setNightmareSwordBaseDamage(AntarchyToolsConfig.nightmareSwordBaseDamage());
AntarchySettings.setNightmareSwordAttackSpeed(AntarchyToolsConfig.nightmareSwordAttackSpeed());
AntarchySettings.setNightmareSwordScalingFactor(AntarchyToolsConfig.nightmareSwordScalingFactor());
AntarchySettings.setFallenKingCrownArmorValue(AntarchyToolsConfig.fallenKingCrownArmorValue());
AntarchySettings.setFallenKingCrownArmorToughness(AntarchyToolsConfig.fallenKingCrownArmorToughness());
AntarchySettings.setSquidzookaCooldownSeconds(AntarchyToolsConfig.squidzookaCooldownSeconds());
AntarchySettings.setSquidzookaLaunchVelocity(AntarchyToolsConfig.squidzookaLaunchVelocity());
AntarchySettings.setRpoLauncherCooldownSeconds(AntarchyToolsConfig.rpoLauncherCooldownSeconds());
AntarchySettings.setRpoLauncherLaunchVelocity(AntarchyToolsConfig.rpoLauncherLaunchVelocity());
AntarchySettings.setRpoLauncherExplosionDamage(AntarchyToolsConfig.rpoLauncherExplosionDamage());
AntarchySettings.setRpoLauncherExplosionRadius(AntarchyToolsConfig.rpoLauncherExplosionRadius());
AntarchySettings.setSizeChangingRaysEnabled(AntarchyToolsConfig.sizeChangingRaysEnabled());
AntarchySettings.setSizeRayCooldownSeconds(AntarchyToolsConfig.sizeRayCooldownSeconds());
AntarchySettings.setSizeRayMinScale(AntarchyToolsConfig.sizeRayMinScale());
AntarchySettings.setSizeRayMaxScale(AntarchyToolsConfig.sizeRayMaxScale());
AntarchySettings.setSizeRayDeltaPerHit(AntarchyToolsConfig.sizeRayDeltaPerHit());
AntarchySettings.setShrinkingPotionDelta(AntarchyToolsConfig.shrinkingPotionDelta());
AntarchySettings.setGrowthPotionDelta(AntarchyToolsConfig.growthPotionDelta());
AntarchySettings.setInvertProjectilesFromInvertedPlayers(AntarchyToolsConfig.invertProjectilesFromInvertedPlayers());
AntarchySettings.setGravityGunEnabled(AntarchyToolsConfig.gravityGunEnabled());
AntarchySettings.setGravityGunBlocksEnabled(AntarchyToolsConfig.gravityGunBlocksEnabled());
AntarchySettings.setGravityGunEntitiesEnabled(AntarchyToolsConfig.gravityGunEntitiesEnabled());
AntarchySettings.setGravityGunRange(AntarchyToolsConfig.gravityGunRange());
AntarchySettings.setGravityGunThrowStrength(AntarchyToolsConfig.gravityGunThrowStrength());
AntarchySettings.setGravityGunBlastStrength(AntarchyToolsConfig.gravityGunBlastStrength());
AntarchySettings.setGravityGunCooldownSeconds(AntarchyToolsConfig.gravityGunCooldownSeconds());
AntarchySettings.setGravityGunMaxHoldDistance(AntarchyToolsConfig.gravityGunMaxHoldDistance());
AntarchySettings.setCritterCageMaxCapturableWidth(AntarchyToolsConfig.critterCageMaxCapturableWidth());
AntarchySettings.setCritterCageMaxCapturableHeight(AntarchyToolsConfig.critterCageMaxCapturableHeight());
AntarchySettings.setMinersDreamEnabled(AntarchyToolsConfig.minersDreamEnabled());
AntarchySettings.setMinersDreamMinimumRange(AntarchyToolsConfig.minersDreamMinimumRange());
AntarchySettings.setMinersDreamMaximumRange(AntarchyToolsConfig.minersDreamMaximumRange());
AntarchySettings.setMinersDreamTorchSpacing(AntarchyToolsConfig.minersDreamTorchSpacing());
AntarchySettings.setMinersDreamBlocksPerTick(AntarchyToolsConfig.minersDreamBlocksPerTick());
AntarchySettings.setDuctTapeRepairPercentPerUse(AntarchyToolsConfig.ductTapeRepairPercentPerUse());
AntarchySettings.setPotentNyxiteInvertedDurationSeconds(AntarchyToolsConfig.potentNyxiteInvertedDurationSeconds());
AntarchySettings.setCorneaEarNightVisionSeconds(AntarchyToolsConfig.corneaEarNightVisionSeconds());
AntarchySettings.setAmericanizingEnabled(AntarchyToolsConfig.americanizingEnabled());
AntarchySettings.setAmericanBonusNutrition(AntarchyToolsConfig.americanBonusNutrition());
AntarchySettings.setAmericanBonusSaturation(AntarchyToolsConfig.americanBonusSaturation());
AntarchySettings.setAmericanRegenerationDurationTicks(AntarchyToolsConfig.americanRegenerationDurationTicks());
AntarchySettings.setAmericanRegenerationAmplifier(AntarchyToolsConfig.americanRegenerationAmplifier());
AntarchySettings.setAntDanceRadius(AntarchyMobsConfig.antDanceRadius());
AntarchySettings.setMogglesVisionRadius(AntarchyToolsConfig.mogglesVisionRadius());
AntarchySettings.setMogglesVisionMaxLight(AntarchyToolsConfig.mogglesVisionMaxLight());
AntarchySettings.setMogglesVisionAlpha(AntarchyToolsConfig.mogglesVisionAlpha());
}
private static void bakeMiscConfig() {
AntarchySettings.setRainbowAntsLeadToInfinityDimensions(AntarchyMiscConfig.rainbowAntsLeadToInfinityDimensions());
AntarchySettings.setDisableInfinityBookPortalCreation(AntarchyMiscConfig.disableInfinityBookPortalCreation());
AntarchySettings.setHushweedSporeLifetimeSeconds(AntarchyMiscConfig.hushweedSporeLifetimeSeconds());
AntarchySettings.setDiamondMinecartEnabled(AntarchyMiscConfig.diamondMinecartEnabled());
AntarchySettings.setDiamondMinecartPlacesRails(AntarchyMiscConfig.diamondMinecartPlacesRails());
AntarchySettings.setDiamondMinecartCruiseSpeed(AntarchyMiscConfig.diamondMinecartCruiseSpeed());
AntarchySettings.setDiamondMinecartMaxSpeed(AntarchyMiscConfig.diamondMinecartMaxSpeed());
AntarchySettings.setDiamondMinecartAcceleration(AntarchyMiscConfig.diamondMinecartAcceleration());
AntarchySettings.setDiamondMinecartDeceleration(AntarchyMiscConfig.diamondMinecartDeceleration());
AntarchySettings.setDiamondMinecartCoastDeceleration(AntarchyMiscConfig.diamondMinecartCoastDeceleration());
AntarchySettings.setDiamondMinecartMobDamageEnabled(AntarchyMiscConfig.diamondMinecartMobDamageEnabled());
AntarchySettings.setDiamondMinecartMaxMobDamage(AntarchyMiscConfig.diamondMinecartMaxMobDamage());
AntarchySettings.setPermanentPortalsEnabled(AntarchyMiscConfig.permanentPortalsEnabled());
AntarchySettings.setPermanentPortalsFlintAndSteelEnabled(AntarchyMiscConfig.permanentPortalsFlintAndSteelEnabled());
AntarchySettings.setElythiaPortalEnabled(AntarchyMiscConfig.elythiaPortalEnabled());
AntarchySettings.setThoraxisPortalEnabled(AntarchyMiscConfig.thoraxisPortalEnabled());
AntarchySettings.setCavarynPortalEnabled(AntarchyMiscConfig.cavarynPortalEnabled());
// Misc
AntarchySettings.setElythiaFireflyParticlesEnabled(AntarchyMiscConfig.elythiaFireflyParticlesEnabled());
AntarchySettings.setDreamSandEnabled(AntarchyMiscConfig.dreamSandEnabled());
AntarchySettings.setDreamSandJumpVelocityMultiplier(AntarchyMiscConfig.dreamSandJumpVelocityMultiplier());
AntarchySettings.setDreamSandGravityMultiplier(AntarchyMiscConfig.dreamSandGravityMultiplier());
AntarchySettings.setDreamSandFallDamageMultiplier(AntarchyMiscConfig.dreamSandFallDamageMultiplier());
AntarchySettings.setDreamSandEffectDurationSeconds(AntarchyMiscConfig.dreamSandEffectDurationSeconds());
AntarchySettings.setIchorWitherEnabled(AntarchyMiscConfig.ichorWitherEnabled());
AntarchySettings.setDuplicatorTreeEnabled(AntarchyMiscConfig.duplicatorTreeEnabled());
AntarchySettings.setGlowingTorchflowers(AntarchyMiscConfig.glowingTorchflowers());
AntarchySettings.setGlowVinesUnderLeaves(AntarchyMiscConfig.glowVinesUnderLeaves());
AntarchySettings.setSwingThroughGrassEnabled(AntarchyMiscConfig.swingThroughGrassEnabled());
AntarchySettings.setFabricKeybindingConflictFixEnabled(AntarchyMiscConfig.fabricKeybindingConflictFixEnabled());
AntarchySettings.setExperimentalSettingsPopupDisabled(AntarchyMiscConfig.experimentalSettingsPopupDisabled());
AntarchySettings.setEntitySpecificFireOverlayEnabled(AntarchyMiscConfig.entitySpecificFireOverlayEnabled());
AntarchySettings.setBloodCrystalArmorShieldRechargeTicks(AntarchyToolsConfig.bloodCrystalArmorShieldRechargeTicks());
AntarchySettings.setBloodCrystalAppleShieldCount(AntarchyToolsConfig.bloodCrystalAppleShieldCount());
AntarchySettings.setBloodCrystalAppleDurationTicks(AntarchyToolsConfig.bloodCrystalAppleDurationTicks());
AntarchySettings.setBloodCrystalAppleShieldRechargeTicks(AntarchyToolsConfig.bloodCrystalAppleShieldRechargeTicks());
AntarchySettings.setBloodCrystalHardMaxShields(AntarchyToolsConfig.bloodCrystalHardMaxShields());
AntarchySettings.setBloodCrystalHelmetDefense(AntarchyToolsConfig.bloodCrystalHelmetDefense());
AntarchySettings.setBloodCrystalChestplateDefense(AntarchyToolsConfig.bloodCrystalChestplateDefense());
AntarchySettings.setBloodCrystalLeggingsDefense(AntarchyToolsConfig.bloodCrystalLeggingsDefense());
AntarchySettings.setBloodCrystalBootsDefense(AntarchyToolsConfig.bloodCrystalBootsDefense());
AntarchySettings.setBloodCrystalArmorToughness(AntarchyToolsConfig.bloodCrystalArmorToughness());
AntarchySettings.setBloodCrystalHelmetDurability(AntarchyToolsConfig.bloodCrystalHelmetDurability());
AntarchySettings.setBloodCrystalChestplateDurability(AntarchyToolsConfig.bloodCrystalChestplateDurability());
AntarchySettings.setBloodCrystalLeggingsDurability(AntarchyToolsConfig.bloodCrystalLeggingsDurability());
AntarchySettings.setBloodCrystalBootsDurability(AntarchyToolsConfig.bloodCrystalBootsDurability());
}
}
@@ -0,0 +1,408 @@
package com.craisinlord.antarchy.forge;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.compat.infinity.InfinityCompat;
import com.craisinlord.antarchy.compat.infinity.InfinityCompatVersion;
import com.craisinlord.antarchy.content.AntarchyGameRules;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.item.BloodCrystalKatanaItem;
import com.craisinlord.antarchy.content.item.ScorpionWhipTetherSync;
import com.craisinlord.antarchy.content.network.BloodCrystalKatanaTrailPayload;
import com.craisinlord.antarchy.content.portal.PermanentPortalType;
import com.craisinlord.antarchy.forge.registry.*;
import com.craisinlord.antarchy.forge.network.AntarchyGravityNetworking;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@Mod(Antarchy.MODID)
public class AntarchyForge {
public static IEventBus modEventBusTempHolder = null;
public AntarchyForge() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBusTempHolder = modEventBus;
bootstrapGameRules();
AntarchyConfigModuleForge.init();
AntarchySoundEvents.bind(
AntarchyForgeSounds.SQUIDZOOKA_FIRE,
AntarchyForgeSounds.SHRINK_RAY_SOUND,
AntarchyForgeSounds.GROWTH_RAY_SOUND,
AntarchyForgeSounds.SIZE_RAY_CHARGE,
AntarchyForgeSounds.ANT_AMBIENT,
AntarchyForgeSounds.ANT_IDLE,
AntarchyForgeSounds.ANT_HURT,
AntarchyForgeSounds.ANT_BITE,
AntarchyForgeSounds.ANT_GATHER,
AntarchyForgeSounds.ANT_NEST,
AntarchyForgeSounds.CLOUD_SHARK_BITE,
AntarchyForgeSounds.CLOUD_SHARK_IDLE,
AntarchyForgeSounds.CLOUD_SHARK_HURT,
AntarchyForgeSounds.CLOUD_SHARK_DEATH,
AntarchyForgeSounds.CLOUD_SHARK_FLY,
AntarchyForgeSounds.CATERPILLAR_IDLE,
AntarchyForgeSounds.CATERPILLAR_HURT,
AntarchyForgeSounds.CATERPILLAR_CRAWL,
AntarchyForgeSounds.BUTTERFLY_HURT,
AntarchyForgeSounds.BRUTALFLY_IDLE,
AntarchyForgeSounds.BRUTALFLY_DEATH,
AntarchyForgeSounds.ELYTHIA_FIREFLY_AMBIENT,
AntarchyForgeSounds.MISSILE_SQUID_AMBIENT,
AntarchyForgeSounds.MISSILE_SQUID_HURT,
AntarchyForgeSounds.MISSILE_SQUID_DEATH,
AntarchyForgeSounds.MISSILE_SQUID_ATTACK,
AntarchyForgeSounds.KRAKEN_FLYING_LOOP,
AntarchyForgeSounds.KRAKEN_FLYING_SIDEWAYS_LOOP,
AntarchyForgeSounds.KRAKEN_ATTACK,
AntarchyForgeSounds.KRAKEN_SPIN,
AntarchyForgeSounds.KRAKEN_ROAR,
AntarchyForgeSounds.KRAKEN_SUMMON,
AntarchyForgeSounds.KRAKEN_HURT,
AntarchyForgeSounds.KRAKEN_DEATH,
AntarchyForgeSounds.BASILISK_IDLE_LOOP,
AntarchyForgeSounds.BASILISK_SLITHER_LOOP,
AntarchyForgeSounds.BASILISK_BITE,
AntarchyForgeSounds.BASILISK_HISS,
AntarchyForgeSounds.BASILISK_HURT,
AntarchyForgeSounds.BASILISK_DEATH,
AntarchyForgeSounds.THORAXIS_NIGHTMARE_WASTES_AMBIENT,
AntarchyForgeSounds.THORAXIS_NIGHTMARE_WASTES_ADDITIONS,
AntarchyForgeSounds.THORAXIS_NIGHTMARE_WASTES_MOOD,
AntarchyForgeSounds.THORAXIS_DREAM_DUNES_AMBIENT,
AntarchyForgeSounds.THORAXIS_DREAM_DUNES_ADDITIONS,
AntarchyForgeSounds.THORAXIS_DREAM_DUNES_MOOD,
AntarchyForgeSounds.THORAXIS_LUCID_POOLS_AMBIENT,
AntarchyForgeSounds.THORAXIS_LUCID_POOLS_ADDITIONS,
AntarchyForgeSounds.THORAXIS_LUCID_POOLS_MOOD,
AntarchyForgeSounds.LUCID_AMBIENT,
AntarchyForgeSounds.LUCID_FLYING,
AntarchyForgeSounds.LUCID_ATTACK,
AntarchyForgeSounds.LUCID_BOLT_SOUND,
AntarchyForgeSounds.LUCID_HURT,
AntarchyForgeSounds.LUCID_DEATH,
AntarchyForgeSounds.REVERIE_IDLE,
AntarchyForgeSounds.REVERIE_HURT,
AntarchyForgeSounds.REVERIE_WORRY,
AntarchyForgeSounds.REVERIE_SAVE,
AntarchyForgeSounds.REVERIE_JOIN_PLAYER,
AntarchyForgeSounds.REVERIE_ALERT,
AntarchyForgeSounds.FLYING_SQUIRREL_IDLE,
AntarchyForgeSounds.FLYING_SQUIRREL_BEG,
AntarchyForgeSounds.FLYING_SQUIRREL_NUT,
AntarchyForgeSounds.FLYING_SQUIRREL_GLIDE_LOOP,
AntarchyForgeSounds.FLYING_SQUIRREL_HURT,
AntarchyForgeSounds.FLYING_SQUIRREL_DEATH,
AntarchyForgeSounds.NIGHTMARE_IDLE,
AntarchyForgeSounds.NIGHTMARE_HURT,
AntarchyForgeSounds.NIGHTMARE_ROAR,
AntarchyForgeSounds.NIGHTMARE_DEATH,
AntarchyForgeSounds.NIGHTMARE_BITE,
AntarchyForgeSounds.NIGHTMARE_FLAP,
AntarchyForgeSounds.TRIFFID_ATTACK,
AntarchyForgeSounds.TRIFFID_GRAB,
AntarchyForgeSounds.TRIFFID_HURT,
AntarchyForgeSounds.TRIFFID_DEATH,
AntarchyForgeSounds.TRIFFID_HISS,
AntarchyForgeSounds.TRIFFID_GROWL,
AntarchyForgeSounds.MANTIS_AMBIENT,
AntarchyForgeSounds.MANTIS_HURT,
AntarchyForgeSounds.MANTIS_ATTACK,
AntarchyForgeSounds.MANTIS_FLY_LOOP,
AntarchyForgeSounds.GRAVITY_GUN_PICKUP,
AntarchyForgeSounds.GRAVITY_GUN_DROP,
AntarchyForgeSounds.GRAVITY_GUN_HOLD_LOOP,
AntarchyForgeSounds.GRAVITY_GUN_LAUNCH,
AntarchyForgeSounds.GRAVITY_GUN_DRYFIRE,
AntarchyForgeSounds.BED_BUG_AMBIENT,
AntarchyForgeSounds.BED_BUG_HURT,
AntarchyForgeSounds.BED_BUG_ATTACK,
AntarchyForgeSounds.WASP_IDLE,
AntarchyForgeSounds.WASP_HURT,
AntarchyForgeSounds.WASP_ATTACK,
AntarchyForgeSounds.WASP_DEATH,
AntarchyForgeSounds.SCORPION_AMBIENT,
AntarchyForgeSounds.SCORPION_HURT,
AntarchyForgeSounds.SCORPION_ATTACK,
AntarchyForgeSounds.EMPEROR_SCORPION_AMBIENT,
AntarchyForgeSounds.EMPEROR_SCORPION_HURT,
AntarchyForgeSounds.EMPEROR_SCORPION_ATTACK,
AntarchyForgeSounds.EMPEROR_SCORPION_ROAR,
AntarchyForgeSounds.MOLEWORM_AMBIENT,
AntarchyForgeSounds.MOLEWORM_HURT,
AntarchyForgeSounds.MOLEWORM_ATTACK,
AntarchyForgeSounds.MOLEWORM_DIG,
AntarchyForgeSounds.MOLEVORE_AMBIENT,
AntarchyForgeSounds.MOLEVORE_HURT,
AntarchyForgeSounds.MOLEVORE_ATTACK,
AntarchyForgeSounds.MOLEVORE_DIG,
AntarchyForgeSounds.BOMBER_WALK,
AntarchyForgeSounds.BOMBER_KNOCK,
AntarchyForgeSounds.BOMBER_EXPLODE,
AntarchyForgeSounds.TORETERROR_IDLE,
AntarchyForgeSounds.TORETERROR_HURT,
AntarchyForgeSounds.TORETERROR_DEATH,
AntarchyForgeSounds.TORETERROR_BOMBER_FIRE,
AntarchyForgeSounds.TORETERROR_SPIN,
AntarchyForgeSounds.TORETERROR_RICOCHET,
AntarchyForgeSounds.WATER_CANNON_FIRE,
AntarchyForgeSounds.TORETERROR_JUMP_UP,
AntarchyForgeSounds.TORETERROR_JUMP_LAND,
AntarchyForgeSounds.STINKY_FLY,
AntarchyForgeSounds.STINK_BUG_FART,
AntarchyForgeSounds.STINK_BUG_IDLE,
AntarchyForgeSounds.CAVARYN_HEARTBEAT,
AntarchyForgeSounds.ROLLY_POLLY_IDLE,
AntarchyForgeSounds.CREEPING_HORROR_GROWL,
AntarchyForgeSounds.CREEPING_HORROR_HURT,
AntarchyForgeSounds.CREEPING_HORROR_BITE,
AntarchyForgeSounds.LURKING_TERROR_SNARL,
AntarchyForgeSounds.LURKING_TERROR_HURT,
AntarchyForgeSounds.LURKING_TERROR_BITE,
AntarchyForgeSounds.LURKING_TERROR_FLY_LOOP,
AntarchyForgeSounds.DUCT_TAPE_USE,
AntarchyForgeSounds.HERCULES_BEETLE_IDLE,
AntarchyForgeSounds.HERCULES_BEETLE_HURT,
AntarchyForgeSounds.HERCULES_BEETLE_ATTACK,
AntarchyForgeSounds.HERCULES_BEETLE_CRY,
AntarchyForgeSounds.HERCULES_BEETLE_CHARGE_START,
AntarchyForgeSounds.HERCULES_BEETLE_KNOCKED_DOWN,
AntarchyForgeSounds.JUMPY_BUG_IDLE,
AntarchyForgeSounds.SPIT_BUG_IDLE,
AntarchyForgeSounds.JUMPY_BUG_HURT,
AntarchyForgeSounds.JUMPY_BUG_JUMP,
AntarchyForgeSounds.SPIT_BUG_HURT,
AntarchyForgeSounds.SPIT_BUG_SPIT,
AntarchyForgeSounds.BRUTALFLY_SPIT,
AntarchyForgeSounds.ROLLY_POLLY_WHEEL_MODE,
AntarchyForgeSounds.ROLLY_POLLY_NORMAL_MODE,
AntarchyForgeSounds.ROLLY_POLLY_ROLL,
AntarchyForgeSounds.JERRY_YOUNG_IDLE,
AntarchyForgeSounds.JERRY_YOUNG_HURT,
AntarchyForgeSounds.JERRY_YOUNG_DEATH,
AntarchyForgeSounds.JERRY_YOUNG_ATTACK,
AntarchyForgeSounds.JERRY_ADULT_IDLE,
AntarchyForgeSounds.JERRY_ADULT_HURT,
AntarchyForgeSounds.JERRY_ADULT_DEATH,
AntarchyForgeSounds.JERRY_ADULT_ATTACK
);
bindCommonObjects();
ScorpionWhipTetherSync.setSink((player, targetId) -> com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore.sendToTrackingEntity(
player,
new com.craisinlord.antarchy.content.network.ScorpionWhipTetherPayload(player.getId(), targetId)
));
BloodCrystalKatanaItem.setTrailCallback((player, durationTicks) -> com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore.sendToTrackingEntity(
player,
new BloodCrystalKatanaTrailPayload(player.getId(), durationTicks)
));
com.craisinlord.antarchy.content.gravity.AntarchyGravityApi.setSyncDispatcher(AntarchyGravityNetworking::syncEntity);
com.craisinlord.antarchy.content.effect.AntarchySizeScaling.register(
com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc.SHRINKING_EFFECT,
com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc.GROWTH_EFFECT
);
if (isSupportedInfinityLoaded()) {
InfinityCompat.bind(new ForgeInfinityCompat());
}
AntarchyForgeEvents.register(modEventBus);
AntarchyForgeSounds.register(modEventBus);
AntarchyForgeEntites.register(modEventBus);
AntarchyForgeBlocks.register(modEventBus);
AntarchyForgeItems.register(modEventBus);
AntarchyForgeFluidTypes.register(modEventBus);
AntarchyForgeMisc.register(modEventBus);
AntarchyForgeSpawnPlacements.register(modEventBus);
AntarchyForgeCreativeModeTabs.register(modEventBus);
AntarchyForgeEntityAttributes.register(modEventBus);
AntarchyForgePayloadHandlers.register();
Antarchy.init();
}
private static void bootstrapGameRules() {
AntarchyGameRules.bootstrap((name, category, defaultValue) -> {
net.minecraft.world.level.GameRules.Type<net.minecraft.world.level.GameRules.BooleanValue> type =
net.minecraft.world.level.GameRules.BooleanValue.create(defaultValue);
return net.minecraft.world.level.GameRules.register(name, category, type);
});
}
private static void bindCommonObjects() {
com.craisinlord.antarchy.content.entity.UpwardFallingBlockEntity.TYPE = AntarchyForgeEntites.UPWARD_FALLING_BLOCK;
PermanentPortalType.bindBlocks(
() -> AntarchyForgeBlocks.MOSSY_OURANWOOD_WOOD.get(),
() -> AntarchyForgeBlocks.ELYTHIA_PORTAL.get(),
() -> AntarchyForgeBlocks.NYXITE.get(),
() -> AntarchyForgeBlocks.THORAXIS_PORTAL.get(),
() -> AntarchyForgeBlocks.MYRMITE.get(),
() -> AntarchyForgeBlocks.CAVARYN_PORTAL.get()
);
AntarchyObjects.bind(
AntarchyForgeEntites.EASTER_BUNNY,
AntarchyForgeEntites.FLYING_SQUIRREL,
AntarchyForgeEntites.KRAKEN,
AntarchyForgeEntites.MISSILE_SQUID,
AntarchyForgeEntites.MOLEWORM,
AntarchyForgeEntites.MANTIS,
AntarchyForgeEntites.BED_BUG,
AntarchyForgeEntites.WASP,
AntarchyForgeEntites.BOMBER,
AntarchyForgeEntites.SCORPION,
AntarchyForgeEntites.CATERPILLAR,
AntarchyForgeEntites.BUTTERFLY,
AntarchyForgeEntites.REVERIE,
AntarchyForgeEntites.TRIFFID,
AntarchyForgeEntites.BRUTALFLY,
AntarchyForgeEntites.BRUTALFLY_ORB,
AntarchyForgeEntites.HUSH_PROJECTILE,
AntarchyForgeEntites.TORETERROR,
AntarchyForgeEntites.WATER_BOMB,
AntarchyForgeEntites.CREEPING_HORROR,
AntarchyForgeEntites.LURKING_TERROR,
AntarchyForgeEntites.STINK_BUG,
AntarchyForgeEntites.CHEEP,
AntarchyForgeEntites.DORRIE,
() -> AntarchyForgeBlocks.DUPLICATOR_LOG.get(),
() -> AntarchyForgeBlocks.DUPLICATOR_SAPLING.get(),
() -> AntarchyForgeBlocks.DUCT_TAPE.get(),
() -> AntarchyForgeBlocks.INFESTED_ROOTED_DIRT.get(),
() -> AntarchyForgeBlocks.INFESTED_COARSE_DIRT.get(),
() -> AntarchyForgeBlocks.NYXITE.get(),
() -> AntarchyForgeBlocks.SHELLSTONE.get(),
() -> AntarchyForgeBlocks.POLISHED_SHELLSTONE.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_BRICKS.get(),
() -> AntarchyForgeBlocks.CHISELED_SHELLSTONE.get(),
() -> AntarchyForgeBlocks.MOSSY_SHELLSTONE_BRICKS.get(),
() -> AntarchyForgeBlocks.CRACKED_SHELLSTONE_BRICKS.get(),
() -> AntarchyForgeBlocks.MOSSY_SHELLSTONE_BRICK_STAIRS.get(),
() -> AntarchyForgeBlocks.MOSSY_SHELLSTONE_BRICK_SLAB.get(),
() -> AntarchyForgeBlocks.MOSSY_SHELLSTONE_BRICK_WALL.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_STAIRS.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_SLAB.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_WALL.get(),
() -> AntarchyForgeBlocks.POLISHED_SHELLSTONE_STAIRS.get(),
() -> AntarchyForgeBlocks.POLISHED_SHELLSTONE_SLAB.get(),
() -> AntarchyForgeBlocks.POLISHED_SHELLSTONE_WALL.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_BRICK_STAIRS.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_BRICK_SLAB.get(),
() -> AntarchyForgeBlocks.SHELLSTONE_BRICK_WALL.get(),
() -> AntarchyForgeBlocks.CLOUD_BLOCK.get(),
() -> AntarchyForgeBlocks.TRIFFID_GOO_BLOCK.get(),
() -> AntarchyForgeBlocks.PALE_NYXITE.get(),
() -> AntarchyForgeBlocks.NYXITE_SPIKE.get(),
() -> AntarchyForgeBlocks.CHITEN_BLOCK.get(),
() -> AntarchyForgeBlocks.CHITEN_SPIKE.get(),
() -> AntarchyForgeBlocks.POTENT_NYXITE.get(),
() -> AntarchyForgeBlocks.ANTIMETAL.get(),
() -> AntarchyForgeBlocks.POLISHED_ANTIMETAL.get(),
() -> AntarchyForgeBlocks.BUDDING_BLOOD_CRYSTAL.get(),
() -> AntarchyForgeBlocks.SMALL_BLOOD_CRYSTAL_BUD.get(),
() -> AntarchyForgeBlocks.MEDIUM_BLOOD_CRYSTAL_BUD.get(),
() -> AntarchyForgeBlocks.LARGE_BLOOD_CRYSTAL_BUD.get(),
() -> AntarchyForgeBlocks.BLOOD_CRYSTAL_CRYSTAL.get(),
() -> AntarchyForgeItems.OURANWOOD_ACORN.get(),
AntarchyForgeItems.KRAKEN_TOOTH,
() -> AntarchyForgeItems.MOGGLES.get(),
() -> AntarchyForgeItems.REVERIE_BOTTLE.get(),
() -> AntarchyForgeItems.STINK_BUG.get(),
() -> AntarchyForgeMisc.mobEffectHolder(AntarchyForgeMisc.DREAD),
() -> AntarchyForgeMisc.mobEffectHolder(AntarchyForgeMisc.PARALYZED),
() -> AntarchyForgeMisc.mobEffectHolder(AntarchyForgeMisc.INVERTED),
() -> AntarchyForgeMisc.mobEffectHolder(AntarchyForgeMisc.STINKY),
() -> AntarchyForgeBlocks.OURANWOOD_ACORN_BLOCK.get(),
() -> AntarchyForgeBlocks.MOSSY_OURANWOOD_LOG.get(),
() -> AntarchyForgeBlocks.MOSSY_OURANWOOD_WOOD.get(),
() -> AntarchyForgeBlocks.UMBRAL_MOSS_BLOCK.get(),
() -> AntarchyForgeBlocks.UMBRAL_MOSS_CARPET.get(),
() -> AntarchyForgeBlocks.BLUSH_MOSS_BLOCK.get(),
() -> AntarchyForgeBlocks.BLUSH_MOSS_CARPET.get(),
() -> AntarchyForgeBlocks.ORANGE_MILKWEED.get(),
() -> AntarchyForgeBlocks.PINK_MILKWEED.get(),
() -> AntarchyForgeBlocks.BED_BUG_EGG.get(),
() -> AntarchyForgeBlocks.CREEPING_HORROR_EGG.get(),
() -> AntarchyForgeBlocks.LURKING_TERROR_EGG.get(),
() -> AntarchyForgeBlocks.WASP_NEST.get(),
() -> AntarchyForgeBlocks.HUSHWEED.get(),
() -> AntarchyForgeBlocks.OURANWOOD_SQUIRREL_NEST.get(),
() -> AntarchyForgeBlocks.BRUTALFLY_COCOON_SPAWNER.get(),
() -> AntarchyForgeBlocks.GIANT_LILY_PAD.get(),
() -> AntarchyForgeBlocks.SEASHELL.get(),
() -> AntarchyForgeBlocks.ANT_NEST_BLOCK_ENTITY.get(),
() -> AntarchyForgeBlocks.DREAM_CAMPFIRE_BLOCK_ENTITY.get(),
() -> AntarchyForgeBlocks.WASP_NEST_BLOCK_ENTITY.get(),
() -> AntarchyForgeBlocks.HUSHWEED_BLOCK_ENTITY.get(),
() -> AntarchyForgeBlocks.SEASHELL_BLOCK_ENTITY.get(),
() -> AntarchyForgeMisc.STINKY_GAS.get(),
() -> AntarchyForgeMisc.STINKY_FLY.get(),
() -> AntarchyForgeMisc.PEACH_LEAVES_PARTICLE.get(),
() -> AntarchyForgeMisc.attributeHolder(AntarchyForgeMisc.SCALE),
() -> AntarchyForgeMisc.attributeHolder(AntarchyForgeMisc.DOUBLE_DAMAGE_CHANCE),
() -> AntarchyForgeMisc.attributeHolder(AntarchyForgeMisc.BLOODGLASS_MAX_HEARTS),
() -> AntarchyForgeMisc.mobEffectHolder(AntarchyForgeMisc.BLOODGLASS_WARD)
);
AntarchyObjects.setOctopusBomb(AntarchyForgeEntites.OCTOPUS_BOMB);
AntarchyObjects.setTentacle(AntarchyForgeEntites.TENTACLE);
AntarchyObjects.setKrakensGraspTrident(AntarchyForgeEntites.KRAKENS_GRASP_TRIDENT);
AntarchyObjects.setLotus(() -> AntarchyForgeBlocks.LOTUS.get());
AntarchyObjects.setKrakenTentacle(() -> AntarchyForgeItems.KRAKEN_TENTACLE.get());
AntarchyObjects.setKrakensGrasp(() -> AntarchyForgeItems.KRAKENS_GRASP.get());
AntarchyObjects.setOuranwoodDeer(AntarchyForgeEntites.OURANWOOD_DEER);
AntarchyObjects.setGlimmer(AntarchyForgeEntites.GLIMMER);
AntarchyObjects.setSpiritApple(() -> AntarchyForgeItems.SPIRIT_APPLE.get());
AntarchyObjects.setElka(AntarchyForgeEntites.ELKA);
AntarchyObjects.setPeach(() -> AntarchyForgeItems.PEACH.get());
AntarchyObjects.setCorn(() -> AntarchyForgeItems.CORN.get());
AntarchyObjects.setCornSeeds(() -> AntarchyForgeItems.CORN_SEEDS.get());
AntarchyObjects.setStarCoralBlock(() -> AntarchyForgeBlocks.STAR_CORAL_BLOCK.get());
AntarchyObjects.setStarCoral(() -> AntarchyForgeBlocks.STAR_CORAL.get());
AntarchyObjects.setStarCoralFan(() -> AntarchyForgeBlocks.STAR_CORAL_FAN.get());
AntarchyObjects.setCookedCorndog(() -> AntarchyForgeItems.COOKED_CORNDOG.get());
AntarchyObjects.setGlimmerBottle(() -> AntarchyForgeItems.GLIMMER_BOTTLE.get());
AntarchyObjects.setLumen(() -> AntarchyForgeMisc.LUMEN.get());
AntarchyObjects.setFlowingLumen(() -> AntarchyForgeMisc.FLOWING_LUMEN.get());
AntarchyObjects.setLumenBucket(() -> AntarchyForgeItems.LUMEN_BUCKET.get());
AntarchyObjects.setLumenBlock(() -> AntarchyForgeBlocks.LUMEN_BLOCK.get());
AntarchyObjects.setLumenFroglight(() -> AntarchyForgeBlocks.LUMEN_FROGLIGHT.get());
AntarchyObjects.setPeachLeavesParticle(() -> AntarchyForgeMisc.PEACH_LEAVES_PARTICLE.get());
AntarchyObjects.setLotusPollen(() -> AntarchyForgeMisc.LOTUS_POLLEN.get());
AntarchyObjects.setDorrieInventoryMenu(AntarchyForgeMisc.DORRIE_INVENTORY_MENU);
AntarchyObjects.setCritterCage(() -> AntarchyForgeItems.CRITTER_CAGE.get());
AntarchyObjects.setCritterCageBlock(() -> AntarchyForgeBlocks.CRITTER_CAGE_BLOCK.get());
AntarchyObjects.setCritterCageBlockEntity(() -> AntarchyForgeBlocks.CRITTER_CAGE_BLOCK_ENTITY.get());
AntarchyObjects.setCritterCageProjectile(() -> AntarchyForgeEntites.CRITTER_CAGE_PROJECTILE.get());
}
private static boolean isModLoaded(String modId) {
try {
return ModList.get().isLoaded(modId);
} catch (Throwable ignored) {
return false;
}
}
private static boolean isSupportedInfinityLoaded() {
if (!isModLoaded("infinity")) {
return false;
}
try {
String version = ModList.get()
.getModContainerById("infinity")
.map(container -> container.getModInfo().getVersion().toString())
.orElse(null);
if (InfinityCompatVersion.isSupported(version)) {
return true;
}
Antarchy.LOGGER.warn(
"Skipping Infinity integration because version {} is below the supported minimum {}",
version,
InfinityCompatVersion.requiredVersion()
);
} catch (Throwable throwable) {
Antarchy.LOGGER.warn("Skipping Infinity integration because the installed Infinity version could not be verified", throwable);
}
return false;
}
}
@@ -0,0 +1,277 @@
package com.craisinlord.antarchy.forge;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.renderer.AntiwaterFluidRenderer;
import com.craisinlord.antarchy.forge.content.fluid.AntiwaterFluidType;
import com.mojang.blaze3d.shaders.FogShape;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.material.FluidState;
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
import net.minecraftforge.common.SoundActions;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fluids.FluidType;
import net.minecraftforge.registries.RegistryObject;
import com.craisinlord.antarchy.forge.registry.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import org.joml.Vector3f;
import java.util.function.Consumer;
public final class AntarchyForgeFluidTypes {
private static final ResourceLocation WATER_STILL = ResourceLocation.withDefaultNamespace("block/water_still");
private static final ResourceLocation WATER_FLOW = ResourceLocation.withDefaultNamespace("block/water_flow");
private static final ResourceLocation WATER_OVERLAY = ResourceLocation.withDefaultNamespace("block/water_overlay");
private static final ResourceLocation UNDERWATER_OVERLAY = ResourceLocation.withDefaultNamespace("textures/misc/underwater.png");
private static final ResourceLocation ANTIWATER_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_still");
private static final ResourceLocation ANTIWATER_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_flow");
private static final ResourceLocation BILE_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_still");
private static final ResourceLocation BILE_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_flowing");
private static final DeferredRegister<FluidType> FLUID_TYPES =
DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, Antarchy.MODID);
public static final RegistryObject<FluidType> ANTIWATER_TYPE = FLUID_TYPES.register("antiwater",
() -> new AntiwaterFluidType(FluidType.Properties.create()
.descriptionId("block.antarchy.antiwater")
.fallDistanceModifier(0.0F)
.canSwim(true)
.supportsBoating(true)
.sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL)
.sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY)
.density(1000)
.viscosity(1000)) {
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return WATER_STILL;
}
@Override
public ResourceLocation getFlowingTexture() {
return WATER_FLOW;
}
@Override
public ResourceLocation getOverlayTexture() {
return WATER_OVERLAY;
}
@Override
public ResourceLocation getRenderOverlayTexture(Minecraft mc) {
return UNDERWATER_OVERLAY;
}
@Override
public int getTintColor() {
return 0xFFFF1A1A;
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return 0xFFFF1A1A;
}
@Override
public Vector3f modifyFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, Vector3f fluidFogColor) {
return new Vector3f(0.52F, 0.06F, 0.06F);
}
@Override
public void modifyFogRender(Camera camera, net.minecraft.client.renderer.FogRenderer.FogMode mode, float renderDistance, float partialTick, float nearDistance, float farDistance, FogShape shape) {
RenderSystem.setShaderFogStart(0.5F);
RenderSystem.setShaderFogEnd(Math.min(farDistance, 12.0F));
RenderSystem.setShaderFogShape(FogShape.CYLINDER);
}
});
}
});
public static final RegistryObject<FluidType> BILE_TYPE = FLUID_TYPES.register("bile",
() -> new FluidType(FluidType.Properties.create()
.descriptionId("block.antarchy.bile")
.fallDistanceModifier(0.0F)
.supportsBoating(true)
.sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL)
.sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY)
.density(1100)
.viscosity(1200)) {
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return BILE_STILL;
}
@Override
public ResourceLocation getFlowingTexture() {
return BILE_FLOW;
}
@Override
public ResourceLocation getOverlayTexture() {
return WATER_OVERLAY;
}
@Override
public ResourceLocation getRenderOverlayTexture(Minecraft mc) {
return UNDERWATER_OVERLAY;
}
@Override
public int getTintColor() {
return 0xFFFFFFFF;
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return 0xFFFFFFFF;
}
@Override
public Vector3f modifyFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, Vector3f fluidFogColor) {
return new Vector3f(0.38F, 0.42F, 0.10F);
}
@Override
public void modifyFogRender(Camera camera, net.minecraft.client.renderer.FogRenderer.FogMode mode, float renderDistance, float partialTick, float nearDistance, float farDistance, FogShape shape) {
RenderSystem.setShaderFogStart(0.25F);
RenderSystem.setShaderFogEnd(Math.min(farDistance, 4.0F));
RenderSystem.setShaderFogShape(FogShape.CYLINDER);
}
});
}
});
public static final RegistryObject<FluidType> ICHOR_TYPE = FLUID_TYPES.register("ichor",
() -> new FluidType(FluidType.Properties.create()
.descriptionId("block.antarchy.ichor")
.fallDistanceModifier(0.0F)
.supportsBoating(true)
.sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL)
.sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY)
.density(1200)
.viscosity(1400)) {
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return ANTIWATER_STILL;
}
@Override
public ResourceLocation getFlowingTexture() {
return ANTIWATER_FLOW;
}
@Override
public ResourceLocation getOverlayTexture() {
return WATER_OVERLAY;
}
@Override
public ResourceLocation getRenderOverlayTexture(Minecraft mc) {
return UNDERWATER_OVERLAY;
}
@Override
public int getTintColor() {
return 0xFF2A0306;
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return 0xFF2A0306;
}
@Override
public Vector3f modifyFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, Vector3f fluidFogColor) {
return new Vector3f(0.16F, 0.02F, 0.03F);
}
@Override
public void modifyFogRender(Camera camera, net.minecraft.client.renderer.FogRenderer.FogMode mode, float renderDistance, float partialTick, float nearDistance, float farDistance, FogShape shape) {
RenderSystem.setShaderFogStart(0.5F);
RenderSystem.setShaderFogEnd(Math.min(farDistance, 10.0F));
RenderSystem.setShaderFogShape(FogShape.CYLINDER);
}
});
}
});
public static final RegistryObject<FluidType> LUMEN_TYPE = FLUID_TYPES.register("lumen",
() -> new FluidType(FluidType.Properties.create()
.descriptionId("block.antarchy.lumen")
.fallDistanceModifier(0.0F)
.canSwim(true)
.supportsBoating(true)
.sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL)
.sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY)
.density(1000)
.viscosity(1000)) {
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/lumen_still");
}
@Override
public ResourceLocation getFlowingTexture() {
return ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/lumen_flow");
}
@Override
public ResourceLocation getOverlayTexture() {
return WATER_OVERLAY;
}
@Override
public ResourceLocation getRenderOverlayTexture(Minecraft mc) {
return UNDERWATER_OVERLAY;
}
@Override
public int getTintColor() {
return 0xFFFFFFFF;
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return 0xFFFFFFFF;
}
@Override
public Vector3f modifyFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, Vector3f fluidFogColor) {
return new Vector3f(0.58F, 0.84F, 0.88F);
}
@Override
public void modifyFogRender(Camera camera, net.minecraft.client.renderer.FogRenderer.FogMode mode, float renderDistance, float partialTick, float nearDistance, float farDistance, FogShape shape) {
RenderSystem.setShaderFogStart(0.4F);
RenderSystem.setShaderFogEnd(Math.min(farDistance, 12.0F));
RenderSystem.setShaderFogShape(FogShape.CYLINDER);
}
});
}
});
private AntarchyForgeFluidTypes() {
}
public static void register(IEventBus modEventBus) {
FLUID_TYPES.register(modEventBus);
}
}
@@ -0,0 +1,192 @@
package com.craisinlord.antarchy.forge;
import net.minecraftforge.common.ForgeConfigSpec;
public final class AntarchyMiscConfig {
public static final ForgeConfigSpec SPEC;
// Elythia
private static final ForgeConfigSpec.BooleanValue ELYTHIA_FIREFLY_PARTICLES_ENABLED;
// Dream Sand
private static final ForgeConfigSpec.BooleanValue DREAM_SAND_ENABLED;
private static final ForgeConfigSpec.DoubleValue DREAM_SAND_JUMP_VELOCITY_MULTIPLIER;
private static final ForgeConfigSpec.DoubleValue DREAM_SAND_GRAVITY_MULTIPLIER;
private static final ForgeConfigSpec.DoubleValue DREAM_SAND_EFFECT_DURATION_SECONDS;
private static final ForgeConfigSpec.DoubleValue DREAM_SAND_FALL_DAMAGE_MULTIPLIER;
// Ichor
private static final ForgeConfigSpec.BooleanValue ICHOR_WITHER_ENABLED;
// Hushweed
private static final ForgeConfigSpec.DoubleValue HUSHWEED_SPORE_LIFETIME_SECONDS;
// Infinite Dimensions
private static final ForgeConfigSpec.BooleanValue DISABLE_INFINITY_BOOK_PORTAL_CREATION;
private static final ForgeConfigSpec.BooleanValue RAINBOW_ANTS_LEAD_TO_INFINITY_DIMENSIONS;
// Permanent portals
private static final ForgeConfigSpec.BooleanValue PERMANENT_PORTALS_ENABLED;
private static final ForgeConfigSpec.BooleanValue PERMANENT_PORTALS_FLINT_AND_STEEL_ENABLED;
private static final ForgeConfigSpec.BooleanValue ELYTHIA_PORTAL_ENABLED;
private static final ForgeConfigSpec.BooleanValue THORAXIS_PORTAL_ENABLED;
private static final ForgeConfigSpec.BooleanValue CAVARYN_PORTAL_ENABLED;
// Diamond Minecart
private static final ForgeConfigSpec.BooleanValue DIAMOND_MINECART_ENABLED;
private static final ForgeConfigSpec.BooleanValue DIAMOND_MINECART_PLACES_RAILS;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_CRUISE_SPEED;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_MAX_SPEED;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_ACCELERATION;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_DECELERATION;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_COAST_DECELERATION;
private static final ForgeConfigSpec.BooleanValue DIAMOND_MINECART_MOB_DAMAGE_ENABLED;
private static final ForgeConfigSpec.DoubleValue DIAMOND_MINECART_MAX_MOB_DAMAGE;
// World / misc toggles
private static final ForgeConfigSpec.BooleanValue DUPLICATOR_TREE_ENABLED;
private static final ForgeConfigSpec.BooleanValue GLOW_VINES_UNDER_LEAVES;
private static final ForgeConfigSpec.BooleanValue GLOWING_TORCHFLOWERS;
private static final ForgeConfigSpec.BooleanValue SWING_THROUGH_GRASS_ENABLED;
private static final ForgeConfigSpec.BooleanValue FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED;
private static final ForgeConfigSpec.BooleanValue EXPERIMENTAL_SETTINGS_POPUP_DISABLED;
private static final ForgeConfigSpec.BooleanValue ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED;
static {
ForgeConfigSpec.Builder b = new ForgeConfigSpec.Builder();
// Elythia
b.push("elythia");
ELYTHIA_FIREFLY_PARTICLES_ENABLED = b
.comment("Whether firefly ambient particles appear at night in the Elythia dimension.")
.define("fireflyParticlesEnabled", true);
b.pop();
// Dream Sand
b.push("dreamSand");
DREAM_SAND_ENABLED = b.comment("If true, jumping from dream sand applies temporary low gravity until solid ground is touched.").define("enabled", true);
DREAM_SAND_JUMP_VELOCITY_MULTIPLIER = b.comment("Multiplier applied to upward jump velocity when leaving dream sand.") .defineInRange("jumpVelocityMultiplier", 1.3D, 0.0D, 16.0D);
DREAM_SAND_GRAVITY_MULTIPLIER = b.comment("Multiplier applied to downward velocity while low gravity is active.") .defineInRange("gravityMultiplier", 0.45D, 0.0D, 1.0D);
DREAM_SAND_EFFECT_DURATION_SECONDS = b.comment("Seconds the low-gravity effect remains active after leaving dream sand.") .defineInRange("effectDurationSeconds", 7.0D, 0.0D, 60.0D);
DREAM_SAND_FALL_DAMAGE_MULTIPLIER = b.comment("Multiplier applied to fall damage after dream sand low gravity.").defineInRange("fallDamageMultiplier", 0.4D, 0.0D, 16.0D);
b.pop();
// Ichor
b.push("ichor");
ICHOR_WITHER_ENABLED = b
.comment("If true, players submerged in ichor receive a Wither effect.")
.define("witherEnabled", true);
b.pop();
// Hushweed
b.push("hushweed");
HUSHWEED_SPORE_LIFETIME_SECONDS = b
.comment("How long (in seconds) a Hushweed spore projectile stays alive before disappearing.")
.defineInRange("sporeLifetimeSeconds", 5.0D, 0.1D, 120.0D);
b.pop();
// Infinity Dimensions
b.push("infinityDimensions");
DISABLE_INFINITY_BOOK_PORTAL_CREATION = b
.comment("If true, book and quills cannot be thrown into nether portals to create random dimensions.")
.define("disableInfinityBookPortalCreation", true);
RAINBOW_ANTS_LEAD_TO_INFINITY_DIMENSIONS = b
.comment(
"Whether rainbow ants open randomly generated Infinity dimensions.",
"Only works if the Infinite Dimensions mod is installed."
)
.define("rainbowAntsLeadToInfinityDimensions", net.minecraftforge.fml.ModList.get().isLoaded("infinity"));
b.pop();
// Permanent Portals
b.push("permanentPortals");
PERMANENT_PORTALS_ENABLED = b.comment("Master toggle for sacrifice-activated permanent portals.").define("permanentPortalsEnabled", true);
PERMANENT_PORTALS_FLINT_AND_STEEL_ENABLED = b.comment("Whether flint and steel can ignite permanent portal frames.").define("permanentPortalsFlintAndSteelEnabled", false);
ELYTHIA_PORTAL_ENABLED = b.comment("Whether mossy ouranwood wood portals to Elythia can activate and function.").define("elythiaPortalEnabled", true);
THORAXIS_PORTAL_ENABLED = b.comment("Whether Nyxite portals to Thoraxis can activate and function.").define("thoraxisPortalEnabled", true);
CAVARYN_PORTAL_ENABLED = b.comment("Whether Myrmite portals to Cavaryn can activate and function.").define("cavarynPortalEnabled", true);
b.pop();
// Diamond Minecart
b.push("diamondMinecart");
DIAMOND_MINECART_ENABLED = b.comment("Master toggle. If false, acts like a regular minecart.") .define("enabled", true);
DIAMOND_MINECART_PLACES_RAILS = b.comment("Whether the cart automatically places rails from the rider's inventory.") .define("placesRails", true);
DIAMOND_MINECART_CRUISE_SPEED = b.comment("Cruise speed in blocks/tick while ridden (even without holding W).") .defineInRange("cruiseSpeed", 0.6D, 0.05D, 2.0D);
DIAMOND_MINECART_MAX_SPEED = b.comment("Maximum boosted speed in blocks/tick when W is held. Vanilla cap is 0.4.") .defineInRange("maxSpeed", 1.0D, 0.05D, 2.0D);
DIAMOND_MINECART_ACCELERATION = b.comment("Speed gained per tick while accelerating.") .defineInRange("acceleration", 0.03D, 0.001D, 0.5D);
DIAMOND_MINECART_DECELERATION = b.comment("Speed lost per tick while S is held (active braking).") .defineInRange("deceleration", 0.04D, 0.001D, 0.5D);
DIAMOND_MINECART_COAST_DECELERATION = b.comment("Speed lost per tick when neither W nor S is held (coasting friction).") .defineInRange("coastDeceleration", 0.01D, 0.001D, 0.5D);
DIAMOND_MINECART_MOB_DAMAGE_ENABLED = b.comment("Whether the cart deals damage to mobs it collides with at speed.") .define("mobDamageEnabled", true);
DIAMOND_MINECART_MAX_MOB_DAMAGE = b.comment("Maximum damage dealt at full speed. Scales linearly with current speed.") .defineInRange("maxMobDamage", 8.0D, 0.0D, 200.0D);
b.pop();
// World / visual toggles
b.push("world");
DUPLICATOR_TREE_ENABLED = b.comment("If false, duplicator trees do not generate and duplicator saplings produce nothing.").define("duplicatorTreeEnabled", true);
GLOW_VINES_UNDER_LEAVES = b.comment("Whether glow vines can be placed and survive when attached under leaf blocks.") .define("glowVinesUnderLeaves", true);
GLOWING_TORCHFLOWERS = b.comment("If true, torchflowers use the glowing behavior.").define("glowingTorchflowers", true);
SWING_THROUGH_GRASS_ENABLED = b.comment("If true, empty collision plants like grass do not block melee target picking.") .define("swingThroughGrassEnabled", true);
FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED = b.define("fabricKeybindingConflictFixEnabled", true);
EXPERIMENTAL_SETTINGS_POPUP_DISABLED = b.define("experimentalSettingsPopupDisabled", true);
ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED = b.comment("If true, burning entities use soul fire / dream fire overlays where appropriate.") .define("entitySpecificFireOverlayEnabled", true);
b.pop();
SPEC = b.build();
}
private AntarchyMiscConfig() {}
static boolean elythiaFireflyParticlesEnabled() { return ELYTHIA_FIREFLY_PARTICLES_ENABLED.get(); }
static boolean dreamSandEnabled() { return DREAM_SAND_ENABLED.get(); }
static double dreamSandJumpVelocityMultiplier() { return DREAM_SAND_JUMP_VELOCITY_MULTIPLIER.get(); }
static double dreamSandGravityMultiplier() { return DREAM_SAND_GRAVITY_MULTIPLIER.get(); }
static double dreamSandEffectDurationSeconds() { return DREAM_SAND_EFFECT_DURATION_SECONDS.get(); }
static double dreamSandFallDamageMultiplier() { return DREAM_SAND_FALL_DAMAGE_MULTIPLIER.get(); }
static boolean ichorWitherEnabled() { return ICHOR_WITHER_ENABLED.get(); }
static boolean duplicatorTreeEnabled() { return DUPLICATOR_TREE_ENABLED.get(); }
static boolean glowVinesUnderLeaves() { return GLOW_VINES_UNDER_LEAVES.get(); }
static boolean glowingTorchflowers() { return GLOWING_TORCHFLOWERS.get(); }
static boolean swingThroughGrassEnabled() { return SWING_THROUGH_GRASS_ENABLED.get(); }
static boolean fabricKeybindingConflictFixEnabled() { return FABRIC_KEYBINDING_CONFLICT_FIX_ENABLED.get(); }
static boolean experimentalSettingsPopupDisabled() { return EXPERIMENTAL_SETTINGS_POPUP_DISABLED.get(); }
static boolean entitySpecificFireOverlayEnabled() { return ENTITY_SPECIFIC_FIRE_OVERLAY_ENABLED.get(); }
static double hushweedSporeLifetimeSeconds() { return HUSHWEED_SPORE_LIFETIME_SECONDS.get(); }
static boolean disableInfinityBookPortalCreation() { return DISABLE_INFINITY_BOOK_PORTAL_CREATION.get(); }
static boolean rainbowAntsLeadToInfinityDimensions() { return RAINBOW_ANTS_LEAD_TO_INFINITY_DIMENSIONS.get(); }
public static boolean permanentPortalsEnabled() { return PERMANENT_PORTALS_ENABLED.get(); }
public static boolean permanentPortalsFlintAndSteelEnabled() { return PERMANENT_PORTALS_FLINT_AND_STEEL_ENABLED.get(); }
public static boolean elythiaPortalEnabled() { return ELYTHIA_PORTAL_ENABLED.get(); }
public static boolean thoraxisPortalEnabled() { return THORAXIS_PORTAL_ENABLED.get(); }
public static boolean cavarynPortalEnabled() { return CAVARYN_PORTAL_ENABLED.get(); }
static boolean diamondMinecartEnabled() { return DIAMOND_MINECART_ENABLED.get(); }
static boolean diamondMinecartPlacesRails() { return DIAMOND_MINECART_PLACES_RAILS.get(); }
static double diamondMinecartCruiseSpeed() { return DIAMOND_MINECART_CRUISE_SPEED.get(); }
static double diamondMinecartMaxSpeed() { return DIAMOND_MINECART_MAX_SPEED.get(); }
static double diamondMinecartAcceleration() { return DIAMOND_MINECART_ACCELERATION.get(); }
static double diamondMinecartDeceleration() { return DIAMOND_MINECART_DECELERATION.get(); }
static double diamondMinecartCoastDeceleration() { return DIAMOND_MINECART_COAST_DECELERATION.get(); }
static boolean diamondMinecartMobDamageEnabled() { return DIAMOND_MINECART_MOB_DAMAGE_ENABLED.get(); }
static double diamondMinecartMaxMobDamage() { return DIAMOND_MINECART_MAX_MOB_DAMAGE.get(); }
}
@@ -0,0 +1,789 @@
package com.craisinlord.antarchy.forge;
import net.minecraftforge.common.ForgeConfigSpec;
public final class AntarchyMobsConfig {
public static final ForgeConfigSpec SPEC;
// Ants
private static final ForgeConfigSpec.BooleanValue ANTS_STEAL_FROM_CHESTS;
private static final ForgeConfigSpec.BooleanValue BROWN_ANT_REQUIRES_REAGENT;
private static final ForgeConfigSpec.DoubleValue BROWN_ANT_HEALTH;
private static final ForgeConfigSpec.DoubleValue BROWN_ANT_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue BROWN_ANT_ATTACK_DAMAGE;
private static final ForgeConfigSpec.ConfigValue<String> BROWN_ANT_DESTINATION_DIMENSION;
private static final ForgeConfigSpec.BooleanValue RED_ANT_REQUIRES_REAGENT;
private static final ForgeConfigSpec.DoubleValue RED_ANT_HEALTH;
private static final ForgeConfigSpec.DoubleValue RED_ANT_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue RED_ANT_ATTACK_DAMAGE;
private static final ForgeConfigSpec.ConfigValue<String> RED_ANT_DESTINATION_DIMENSION;
private static final ForgeConfigSpec.BooleanValue RAINBOW_ANT_REQUIRES_REAGENT;
private static final ForgeConfigSpec.DoubleValue RAINBOW_ANT_HEALTH;
private static final ForgeConfigSpec.DoubleValue RAINBOW_ANT_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue RAINBOW_ANT_ATTACK_DAMAGE;
private static final ForgeConfigSpec.ConfigValue<String> RAINBOW_ANT_NON_INFINITY_FALLBACK_DIMENSION;
private static final ForgeConfigSpec.BooleanValue TERMITE_REQUIRES_REAGENT;
private static final ForgeConfigSpec.DoubleValue TERMITE_HEALTH;
private static final ForgeConfigSpec.DoubleValue TERMITE_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue TERMITE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.ConfigValue<String> TERMITE_DESTINATION_DIMENSION;
// Easter Bunny
private static final ForgeConfigSpec.BooleanValue EASTER_BUNNY_ENABLED;
private static final ForgeConfigSpec.IntValue EASTER_BUNNY_NATURAL_SPAWN_CHANCE_PERCENT;
// Wasp
private static final ForgeConfigSpec.DoubleValue WASP_HEALTH;
private static final ForgeConfigSpec.DoubleValue WASP_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue WASP_MOVEMENT_SPEED;
// Bomber
private static final ForgeConfigSpec.DoubleValue BOMBER_HEALTH;
private static final ForgeConfigSpec.DoubleValue BOMBER_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BOMBER_EXPLOSION_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BOMBER_EXPLOSION_RADIUS;
// Jumpy Bug
private static final ForgeConfigSpec.DoubleValue JUMPY_BUG_HEALTH;
private static final ForgeConfigSpec.DoubleValue JUMPY_BUG_POUNCE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue JUMPY_BUG_LATCH_DAMAGE;
private static final ForgeConfigSpec.DoubleValue JUMPY_BUG_CAMOUFLAGE_ALPHA;
// Kraken
private static final ForgeConfigSpec.DoubleValue KRAKEN_HEALTH;
private static final ForgeConfigSpec.DoubleValue KRAKEN_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue KRAKEN_PROJECTILE_DAMAGE_TAKEN_MULTIPLIER;
private static final ForgeConfigSpec.BooleanValue KRAKEN_SQUID_SPAWN_ENABLED;
private static final ForgeConfigSpec.BooleanValue KRAKEN_MASS_SPAWN_ENABLED;
private static final ForgeConfigSpec.BooleanValue KRAKEN_REQUIRE_BAD_OMEN_TO_SUMMON;
// Brutalfly
private static final ForgeConfigSpec.DoubleValue BRUTALFLY_HEALTH;
private static final ForgeConfigSpec.DoubleValue BRUTALFLY_SWIPE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BRUTALFLY_SPIT_DAMAGE;
// Mantis
private static final ForgeConfigSpec.DoubleValue MANTIS_HEALTH;
private static final ForgeConfigSpec.DoubleValue MANTIS_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue MANTIS_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue MANTIS_FLYING_SPEED;
private static final ForgeConfigSpec.BooleanValue MANTIS_IGNORE_LIGHT_LEVEL;
// Alpha Mantis
private static final ForgeConfigSpec.DoubleValue ALPHA_MANTIS_HEALTH;
private static final ForgeConfigSpec.DoubleValue ALPHA_MANTIS_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ALPHA_MANTIS_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue ALPHA_MANTIS_FLYING_SPEED;
private static final ForgeConfigSpec.IntValue ALPHA_MANTIS_SUMMON_INTERVAL_TICKS;
private static final ForgeConfigSpec.IntValue ALPHA_MANTIS_MAX_MINIONS;
// Rolly Polly
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_HEALTH;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_ROLL_SPEED_MULTIPLIER;
private static final ForgeConfigSpec.IntValue ROLLY_POLLY_TAME_CHANCE;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_BOWLING_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_TUMBLE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_BOWLING_KNOCKBACK;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_ARMOR;
private static final ForgeConfigSpec.DoubleValue ROLLY_POLLY_ROLLED_ARMOR_BONUS;
// Triffid
private static final ForgeConfigSpec.DoubleValue TRIFFID_HEALTH;
private static final ForgeConfigSpec.DoubleValue TRIFFID_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue TRIFFID_GRAB_DAMAGE;
// Caterpillar
private static final ForgeConfigSpec.DoubleValue CATERPILLAR_PUPATION_TIME_SECONDS;
// Ant Dance
private static final ForgeConfigSpec.DoubleValue ANT_DANCE_RADIUS;
// Reverie
private static final ForgeConfigSpec.DoubleValue REVERIE_HEALTH;
private static final ForgeConfigSpec.DoubleValue REVERIE_INTEREST_RADIUS;
private static final ForgeConfigSpec.DoubleValue REVERIE_ABANDON_PLAYER_DISTANCE;
private static final ForgeConfigSpec.IntValue REVERIE_NOTICE_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue REVERIE_INTEREST_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue REVERIE_REBIND_COOLDOWN_TICKS;
private static final ForgeConfigSpec.IntValue REVERIE_DAMAGE_REACTION_DURATION_TICKS;
private static final ForgeConfigSpec.DoubleValue REVERIE_DANGEROUS_FALL_DISTANCE;
private static final ForgeConfigSpec.DoubleValue REVERIE_DANGEROUS_FALL_SPEED;
private static final ForgeConfigSpec.DoubleValue REVERIE_WARNING_THREAT_RADIUS;
private static final ForgeConfigSpec.DoubleValue REVERIE_WARNING_THREAT_VERTICAL_RANGE;
private static final ForgeConfigSpec.IntValue REVERIE_DUPLICATION_COOLDOWN_TICKS;
// Nightmare
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_HEALTH;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_ATTACK_DAMAGE;
// Basilisk
private static final ForgeConfigSpec.BooleanValue BASILISK_PETRIFYING_GAZE_ENABLED;
private static final ForgeConfigSpec.IntValue BASILISK_SPAWN_MAX_LIGHT_LEVEL;
private static final ForgeConfigSpec.DoubleValue BASILISK_HEALTH;
private static final ForgeConfigSpec.DoubleValue BASILISK_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BASILISK_MOVEMENT_SPEED;
private static final ForgeConfigSpec.DoubleValue BASILISK_ARMOR;
private static final ForgeConfigSpec.DoubleValue BASILISK_KNOCKBACK_RESISTANCE;
private static final ForgeConfigSpec.DoubleValue BASILISK_FOLLOW_RANGE;
private static final ForgeConfigSpec.IntValue BASILISK_XP_REWARD;
private static final ForgeConfigSpec.IntValue BASILISK_ATTACK_ANIM_TICKS;
private static final ForgeConfigSpec.IntValue BASILISK_ATTACK_DAMAGE_TICK;
private static final ForgeConfigSpec.IntValue BASILISK_HISS_COOLDOWN_TICKS;
private static final ForgeConfigSpec.DoubleValue BASILISK_ATTACK_REACH;
private static final ForgeConfigSpec.DoubleValue BASILISK_GAZE_RANGE;
private static final ForgeConfigSpec.DoubleValue BASILISK_GAZE_DOT_THRESHOLD;
private static final ForgeConfigSpec.DoubleValue BASILISK_GAZE_FACING_THRESHOLD;
private static final ForgeConfigSpec.IntValue BASILISK_HISS_CHARGE_TICKS;
private static final ForgeConfigSpec.IntValue BASILISK_PLAYER_PARALYZE_TICKS;
private static final ForgeConfigSpec.IntValue BASILISK_PREY_PETRIFY_COOLDOWN_TICKS;
private static final ForgeConfigSpec.DoubleValue BASILISK_PREY_PETRIFY_RANGE;
private static final ForgeConfigSpec.IntValue BASILISK_PREY_PETRIFY_TICKS;
// Toreterror
private static final ForgeConfigSpec.DoubleValue TORETERROR_HEALTH;
private static final ForgeConfigSpec.DoubleValue TORETERROR_JUMP_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue TORETERROR_JUMP_ATTACK_KNOCKBACK;
private static final ForgeConfigSpec.DoubleValue TORETERROR_SPIN_DAMAGE;
private static final ForgeConfigSpec.DoubleValue TORETERROR_SPIN_KNOCKBACK;
private static final ForgeConfigSpec.DoubleValue TORETERROR_PROJECTILE_DAMAGE_MULTIPLIER;
private static final ForgeConfigSpec.DoubleValue TORETERROR_RANGED_WATER_BOMB_CHANCE;
private static final ForgeConfigSpec.DoubleValue WATER_CANNON_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue WATER_BOMB_DAMAGE;
private static final ForgeConfigSpec.IntValue WATER_BOMB_LIFETIME_TICKS;
private static final ForgeConfigSpec.DoubleValue WATER_BOMB_GRAVITY;
private static final ForgeConfigSpec.DoubleValue WATER_BOMB_KNOCKBACK;
// Creeping Horror
private static final ForgeConfigSpec.DoubleValue CREEPING_HORROR_HEALTH;
private static final ForgeConfigSpec.DoubleValue CREEPING_HORROR_ATTACK_DAMAGE;
// Lurking Terror
private static final ForgeConfigSpec.DoubleValue LURKING_TERROR_HEALTH;
private static final ForgeConfigSpec.DoubleValue LURKING_TERROR_ATTACK_DAMAGE;
// Jerry
private static final ForgeConfigSpec.DoubleValue JERRY_INFANT_HEALTH;
private static final ForgeConfigSpec.DoubleValue JERRY_INFANT_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue JERRY_MATURE_HEALTH;
private static final ForgeConfigSpec.DoubleValue JERRY_MATURE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue JERRY_ALPHA_HEALTH;
private static final ForgeConfigSpec.DoubleValue JERRY_ALPHA_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue JERRY_GAMMA_HEALTH;
private static final ForgeConfigSpec.DoubleValue JERRY_GAMMA_ATTACK_DAMAGE;
// Cheep
private static final ForgeConfigSpec.DoubleValue CHEEP_HEALTH;
private static final ForgeConfigSpec.DoubleValue CHEEP_ATTACK_DAMAGE;
// Dorrie
private static final ForgeConfigSpec.DoubleValue DORRIE_HEALTH;
// Ouranwood Deer
private static final ForgeConfigSpec.DoubleValue OURANWOOD_DEER_HEALTH;
// Glimmer
private static final ForgeConfigSpec.DoubleValue GLIMMER_HEALTH;
// Hercules Beetle
private static final ForgeConfigSpec.DoubleValue HERCULES_BEETLE_HEALTH;
private static final ForgeConfigSpec.DoubleValue HERCULES_BEETLE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue HERCULES_BEETLE_CHARGE_DAMAGE;
// Lucid
private static final ForgeConfigSpec.DoubleValue LUCID_ATTACK_RANGE;
private static final ForgeConfigSpec.DoubleValue LUCID_PEARL_INVERTED_DURATION_SECONDS;
// Dread effect
private static final ForgeConfigSpec.BooleanValue DREAD_HALLUCINATION_SOUNDS_ENABLED;
private static final ForgeConfigSpec.DoubleValue DREAD_HALLUCINATION_SOUND_MIN_INTERVAL;
private static final ForgeConfigSpec.DoubleValue DREAD_HALLUCINATION_SOUND_MAX_INTERVAL;
private static final ForgeConfigSpec.BooleanValue DREAD_HALLUCINATION_MOBS_ENABLED;
private static final ForgeConfigSpec.DoubleValue DREAD_HALLUCINATION_MOB_MIN_INTERVAL;
private static final ForgeConfigSpec.DoubleValue DREAD_HALLUCINATION_MOB_MAX_INTERVAL;
static {
ForgeConfigSpec.Builder b = new ForgeConfigSpec.Builder();
// Ants (shared)
ANTS_STEAL_FROM_CHESTS = b
.comment("Whether ants will steal edible items from nearby chest inventories.")
.define("antsStealFromChests", true);
b.push("brownAnt");
BROWN_ANT_REQUIRES_REAGENT = b
.comment(
"If true, brown ants must be activated once with a reagent before they teleport.",
"Reagent tag: data/antarchy/tags/item/brown_ant_activation_items.json",
"Breeding foods tag: data/antarchy/tags/item/brown_ant_breeding_foods.json"
)
.define("requiresReagent", false);
BROWN_ANT_HEALTH = b.comment("Base max health.") .defineInRange("health", 5.0D, 0.1D, 1024.0D);
BROWN_ANT_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.28D, 0.0D, 10.0D);
BROWN_ANT_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 1.0D, 0.0D, 1024.0D);
BROWN_ANT_DESTINATION_DIMENSION = b
.comment("Dimension id brown ants teleport players to.")
.define("destinationDimension", "antarchy:elythia", AntarchyMobsConfig::isValidDimensionId);
b.pop();
b.push("redAnt");
RED_ANT_REQUIRES_REAGENT = b
.comment(
"If true, red ants must be activated once with a reagent before they teleport.",
"Reagent tag: data/antarchy/tags/item/red_ant_activation_items.json",
"Breeding foods tag: data/antarchy/tags/item/red_ant_breeding_foods.json"
)
.define("requiresReagent", false);
RED_ANT_HEALTH = b.comment("Base max health.") .defineInRange("health", 5.0D, 0.1D, 1024.0D);
RED_ANT_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.30D, 0.0D, 10.0D);
RED_ANT_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 3.0D, 0.0D, 1024.0D);
RED_ANT_DESTINATION_DIMENSION = b
.comment("Dimension id red ants teleport players to.")
.define("destinationDimension", "antarchy:thoraxis", AntarchyMobsConfig::isValidDimensionId);
b.pop();
b.push("rainbowAnt");
RAINBOW_ANT_REQUIRES_REAGENT = b
.comment(
"If true, rainbow ants must be activated with a reagent before opening an Infinity destination.",
"Reagent tag: data/antarchy/tags/item/rainbow_ant_activation_items.json",
"Breeding foods tag: data/antarchy/tags/item/rainbow_ant_breeding_foods.json"
)
.define("requiresReagent", true);
RAINBOW_ANT_HEALTH = b.comment("Base max health.") .defineInRange("health", 5.0D, 0.1D, 1024.0D);
RAINBOW_ANT_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.28D, 0.0D, 10.0D);
RAINBOW_ANT_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 1.0D, 0.0D, 1024.0D);
RAINBOW_ANT_NON_INFINITY_FALLBACK_DIMENSION = b
.comment("Dimension used by rainbow ants when Infinity behavior is disabled.")
.define("nonInfinityFallbackDimension", "antarchy:elythia", AntarchyMobsConfig::isValidDimensionId);
b.pop();
b.push("termite");
TERMITE_REQUIRES_REAGENT = b
.comment(
"If true, termites must be activated once with a reagent before they teleport.",
"Reagent tag: data/antarchy/tags/item/termite_activation_items.json",
"Breeding foods tag: data/antarchy/tags/item/termite_breeding_foods.json"
)
.define("requiresReagent", false);
TERMITE_HEALTH = b.comment("Base max health.") .defineInRange("health", 5.0D, 0.1D, 1024.0D);
TERMITE_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.28D, 0.0D, 10.0D);
TERMITE_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 1.0D, 0.0D, 1024.0D);
TERMITE_DESTINATION_DIMENSION = b
.comment("Dimension id termites teleport players to.")
.define("destinationDimension", "antarchy:cavaryn", AntarchyMobsConfig::isValidDimensionId);
b.pop();
// Easter Bunny
b.push("easterBunny");
EASTER_BUNNY_ENABLED = b
.comment(
"If false, Easter Bunnies stop laying spawn eggs.",
"Blacklist tag: data/antarchy/tags/item/easter_bunny_spawn_egg_blacklist.json"
)
.define("enabled", true);
EASTER_BUNNY_NATURAL_SPAWN_CHANCE_PERCENT = b
.comment(
"Percent chance a naturally spawned rabbit is replaced by an Easter Bunny.",
"Only applies to natural and chunk-generation spawns, not breeding."
)
.defineInRange("naturalSpawnChancePercent", 1, 0, 100);
b.pop();
// Wasp
b.push("wasp");
WASP_HEALTH = b.comment("Base max health.") .defineInRange("health", 16.0D, 1.0D, 32768.0D);
WASP_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 4.0D, 0.0D, 1024.0D);
WASP_MOVEMENT_SPEED = b.comment("Base wasp speed used for both flying and movement. Vanilla bee default is 0.3, so 0.39 is 30% faster.").defineInRange("movementSpeed", 0.39D, 0.0D, 10.0D);
b.pop();
// Bomber
b.push("bomber");
BOMBER_HEALTH = b.comment("Base max health.") .defineInRange("health", 10.0D, 1.0D, 32768.0D);
BOMBER_ATTACK_DAMAGE = b.comment("Direct damage dealt on contact before detonation.") .defineInRange("attackDamage", 4.0D, 0.0D, 1024.0D);
BOMBER_EXPLOSION_DAMAGE = b.comment("Extra damage dealt at the center of the explosion.") .defineInRange("explosionDamage", 8.0D, 0.0D, 1024.0D);
BOMBER_EXPLOSION_RADIUS = b.comment("Explosion radius when a bomber detonates. TNT uses 4.0.").defineInRange("explosionRadius", 4.0D, 0.0D, 128.0D);
b.pop();
// Jumpy Bug
b.push("jumpyBug");
JUMPY_BUG_HEALTH = b.comment("Base max health.").defineInRange("health", 100.0D, 1.0D, 32768.0D);
JUMPY_BUG_POUNCE_DAMAGE = b.comment("Damage dealt on a successful pounce latch.").defineInRange("pounceDamage", 2.0D, 0.0D, 1024.0D);
JUMPY_BUG_LATCH_DAMAGE = b.comment("Damage dealt while latched onto a target.").defineInRange("latchDamage", 2.0D, 0.0D, 1024.0D);
JUMPY_BUG_CAMOUFLAGE_ALPHA = b.comment("Renderer alpha while camouflaged.").defineInRange("camouflageAlpha", 0.18D, 0.01D, 1.0D);
b.pop();
// Kraken
b.push("kraken");
KRAKEN_HEALTH = b.comment("Base max health.") .defineInRange("health", 1500.0D, 1.0D, 32768.0D);
KRAKEN_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 45.0D, 0.0D, 1024.0D);
KRAKEN_PROJECTILE_DAMAGE_TAKEN_MULTIPLIER = b.comment("Multiplier applied to projectile damage taken by the Kraken.").defineInRange("projectileDamageTakenMultiplier", 0.5D, 0.0D, 16.0D);
KRAKEN_SQUID_SPAWN_ENABLED = b.comment("If true, a player killing a Missile Squid has a 1/100 chance to spawn a single Kraken nearby.") .define("squidSpawnEnabled", true);
KRAKEN_MASS_SPAWN_ENABLED = b.comment("If true, a player killing a Missile Squid has a 1/500 chance to spawn 10 Krakens. Independent from the single spawn.").define("massSpawnEnabled", true);
KRAKEN_REQUIRE_BAD_OMEN_TO_SUMMON = b.comment("If true, the killer must have Bad Omen to summon a single Kraken; chance scales with Bad Omen level. Mass spawn is unaffected by level but still requires Bad Omen when this is on.").define("requireBadOmenToSummon", true);
b.pop();
// Brutalfly
b.push("brutalfly");
BRUTALFLY_HEALTH = b.comment("Base max health.") .defineInRange("health", 200.0D, 1.0D, 32768.0D);
BRUTALFLY_SWIPE_DAMAGE = b.comment("Damage dealt by a claw swipe.") .defineInRange("swipeDamage", 15.0D, 0.0D, 1024.0D);
BRUTALFLY_SPIT_DAMAGE = b.comment("Direct hit damage from a spit orb before lingering effect.").defineInRange("spitDamage", 5.0D, 0.0D, 1024.0D);
b.pop();
// Mantis
b.push("mantis");
MANTIS_HEALTH = b.comment("Base max health.") .defineInRange("health", 50.0D, 1.0D, 32768.0D);
MANTIS_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 9.0D, 0.0D, 1024.0D);
MANTIS_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.42D, 0.0D, 10.0D);
MANTIS_FLYING_SPEED = b.comment("Base flying speed.") .defineInRange("flyingSpeed", 0.77D, 0.0D, 10.0D);
MANTIS_IGNORE_LIGHT_LEVEL = b.comment("If false, mantises only spawn naturally in darkness (standard monster rules). If true, light level is ignored.").define("ignoreLightLevel", false);
b.pop();
// Alpha Mantis
b.push("alphaMantis");
ALPHA_MANTIS_HEALTH = b.comment("Base max health.") .defineInRange("health", 250.0D, 1.0D, 32768.0D);
ALPHA_MANTIS_ATTACK_DAMAGE = b.comment("Base attack damage.") .defineInRange("attackDamage", 18.0D, 0.0D, 1024.0D);
ALPHA_MANTIS_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.546D, 0.0D, 10.0D);
ALPHA_MANTIS_FLYING_SPEED = b.comment("Base flying speed.") .defineInRange("flyingSpeed", 0.77D, 0.0D, 10.0D);
ALPHA_MANTIS_SUMMON_INTERVAL_TICKS = b.comment("Ticks between mantis minion summons while in combat.") .defineInRange("summonIntervalTicks", 300, 20, 72000);
ALPHA_MANTIS_MAX_MINIONS = b.comment("Maximum summoned mantises alive near the alpha at once.") .defineInRange("maxMinions", 4, 0, 32);
b.pop();
// Rolly Polly
b.push("rollyPolly");
ROLLY_POLLY_HEALTH = b.comment("Base max health.") .defineInRange("health", 25.0D, 1.0D, 32768.0D);
ROLLY_POLLY_MOVEMENT_SPEED = b.comment("Base movement speed.") .defineInRange("movementSpeed", 0.3D, 0.0D, 10.0D);
ROLLY_POLLY_ROLL_SPEED_MULTIPLIER = b.comment("Speed multiplier while rolled up.") .defineInRange("rollSpeedMultiplier", 2.2D, 0.1D, 20.0D);
ROLLY_POLLY_TAME_CHANCE = b.comment("Taming succeeds with a 1-in-N chance per food item.") .defineInRange("tameChance", 3, 1, 100);
ROLLY_POLLY_BOWLING_DAMAGE = b.comment("Damage dealt by a tamed rolly polly's rolling bowling attack.") .defineInRange("bowlingDamage", 3.0D, 0.0D, 1024.0D);
ROLLY_POLLY_TUMBLE_DAMAGE = b.comment("Damage dealt by a tumbling rolly polly impact.").defineInRange("tumbleDamage", 3.0D, 0.0D, 1024.0D);
ROLLY_POLLY_BOWLING_KNOCKBACK = b.comment("Knockback strength of a tamed rolly polly's rolling bowling attack.") .defineInRange("bowlingKnockback", 0.8D, 0.0D, 20.0D);
ROLLY_POLLY_ARMOR = b.comment("Base armor value.") .defineInRange("armor", 2.0D, 0.0D, 100.0D);
ROLLY_POLLY_ROLLED_ARMOR_BONUS = b.comment("Additional armor gained while rolled up.") .defineInRange("rolledArmorBonus", 16.0D, 0.0D, 100.0D);
b.pop();
// Triffid
b.push("triffid");
TRIFFID_HEALTH = b.comment("Base max health.") .defineInRange("health", 80.0D, 1.0D, 32768.0D);
TRIFFID_ATTACK_DAMAGE = b.comment("Damage dealt by the sweep attack.") .defineInRange("attackDamage", 10.0D, 0.0D, 1024.0D);
TRIFFID_GRAB_DAMAGE = b.comment("Damage dealt by the grab attack.") .defineInRange("grabDamage", 15.0D, 0.0D, 1024.0D);
b.pop();
// Caterpillar
b.push("caterpillar");
CATERPILLAR_PUPATION_TIME_SECONDS = b
.comment("Time in seconds before a caterpillar emerges from its chrysalis.")
.defineInRange("pupationTimeSeconds", 600.0D, 1.0D, 3600.0D);
b.pop();
// Ant Dance
b.push("antDance");
ANT_DANCE_RADIUS = b
.comment("Radius in blocks where ants will dance around a playing jukebox.")
.defineInRange("radius", 5.0D, 1.0D, 32.0D);
b.pop();
// Reverie
b.push("reverie");
REVERIE_HEALTH = b.comment("Base max health.") .defineInRange("health", 20.0D, 1.0D, 1024.0D);
REVERIE_INTEREST_RADIUS = b.comment("How far the Reverie notices and starts following a player.") .defineInRange("interestRadius", 16.0D, 1.0D, 64.0D);
REVERIE_ABANDON_PLAYER_DISTANCE = b.comment("Distance where the Reverie gives up and returns to ambient wandering.") .defineInRange("abandonPlayerDistance", 24.0D, 1.0D, 96.0D);
REVERIE_NOTICE_DURATION_TICKS = b.comment("Ticks the Reverie watches a player before becoming bound.") .defineInRange("noticeDurationTicks", 20, 1, 200);
REVERIE_INTEREST_DURATION_TICKS = b.comment("Ticks the Reverie stays interested after a color/state change.") .defineInRange("interestDurationTicks", 360, 20, 7200);
REVERIE_REBIND_COOLDOWN_TICKS = b.comment("Ticks the Reverie waits after unbinding before it can bind again.") .defineInRange("rebindCooldownTicks", 100, 0, 24000);
REVERIE_DAMAGE_REACTION_DURATION_TICKS = b.comment("Ticks the Reverie remains in its damage reaction state.").defineInRange("damageReactionDurationTicks", 60, 0, 24000);
REVERIE_DANGEROUS_FALL_DISTANCE = b.comment("Minimum fall distance before the Reverie considers its player in danger. Vanilla fall damage starts at 3.").defineInRange("dangerousFallDistance", 3.0D, 0.0D, 64.0D);
REVERIE_DANGEROUS_FALL_SPEED = b.comment("Minimum vertical speed before a dangerous fall triggers purple protection.") .defineInRange("dangerousFallSpeed", 0.18D, 0.0D, 4.0D);
REVERIE_WARNING_THREAT_RADIUS = b.comment("Horizontal scan radius for hostiles that trigger red warning mode.") .defineInRange("warningThreatRadius", 10.0D, 1.0D, 64.0D);
REVERIE_WARNING_THREAT_VERTICAL_RANGE = b.comment("Vertical scan range for hostiles that trigger red warning mode.") .defineInRange("warningThreatVerticalRange", 5.0D, 1.0D, 32.0D);
REVERIE_DUPLICATION_COOLDOWN_TICKS = b.comment("Cooldown in ticks before Blood Crystal can duplicate the Reverie again.") .defineInRange("duplicationCooldownTicks", 6000, 20, 24000);
b.pop();
// Nightmare
b.push("nightmare");
NIGHTMARE_HEALTH = b.comment("Base max health.").defineInRange("health", 180.0D, 1.0D, 32768.0D);
NIGHTMARE_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 16.0D, 0.0D, 1024.0D);
b.pop();
// Basilisk
b.push("basilisk");
BASILISK_PETRIFYING_GAZE_ENABLED = b
.comment("If false, the Basilisk will not use its petrifying gaze and will never apply the Paralyzed effect.")
.define("petrifyingGazeEnabled", true);
BASILISK_SPAWN_MAX_LIGHT_LEVEL = b
.comment("Maximum local raw light level where basilisk natural spawning is allowed.")
.defineInRange("spawnMaxLightLevel", 5, 0, 15);
BASILISK_HEALTH = b.comment("Base max health.").defineInRange("health", 150.0D, 1.0D, 32768.0D);
BASILISK_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 36.0D, 0.0D, 1024.0D);
BASILISK_MOVEMENT_SPEED = b.comment("Base movement speed.").defineInRange("movementSpeed", 0.28D, 0.0D, 10.0D);
BASILISK_ARMOR = b.comment("Base armor value.").defineInRange("armor", 6.0D, 0.0D, 1024.0D);
BASILISK_KNOCKBACK_RESISTANCE = b.comment("Base knockback resistance.").defineInRange("knockbackResistance", 0.5D, 0.0D, 1.0D);
BASILISK_FOLLOW_RANGE = b.comment("Base follow range.").defineInRange("followRange", 28.0D, 1.0D, 128.0D);
BASILISK_XP_REWARD = b.comment("Base experience reward.").defineInRange("xpReward", 50, 0, 100000);
BASILISK_ATTACK_ANIM_TICKS = b.comment("Ticks for the attack animation window.").defineInRange("attackAnimTicks", 18, 1, 400);
BASILISK_ATTACK_DAMAGE_TICK = b.comment("Tick during the attack animation when damage is applied.").defineInRange("attackDamageTick", 9, 0, 400);
BASILISK_HISS_COOLDOWN_TICKS = b.comment("Ticks between petrifying gaze attempts.").defineInRange("hissCooldownTicks", 600, 0, 20000);
BASILISK_ATTACK_REACH = b.comment("Forward bite reach in blocks measured from the basilisk's center.").defineInRange("attackReach", 3.0D, 0.0D, 128.0D);
BASILISK_GAZE_RANGE = b.comment("Range in blocks for petrifying gaze checks.").defineInRange("gazeRange", 12.0D, 0.0D, 128.0D);
BASILISK_GAZE_DOT_THRESHOLD = b.comment("Dot threshold for the player gaze check.").defineInRange("gazeDotThreshold", 0.64D, -1.0D, 1.0D);
BASILISK_GAZE_FACING_THRESHOLD = b.comment("Dot threshold for the Basilisk facing check.").defineInRange("gazeFacingThreshold", 0.45D, -1.0D, 1.0D);
BASILISK_HISS_CHARGE_TICKS = b.comment("Ticks a player must keep looking to trigger petrification.").defineInRange("hissChargeTicks", 30, 0, 2000);
BASILISK_PLAYER_PARALYZE_TICKS = b.comment("Ticks the Paralyzed effect lasts on players.").defineInRange("playerParalyzeTicks", 50, 0, 20000);
BASILISK_PREY_PETRIFY_COOLDOWN_TICKS = b.comment("Ticks between prey petrification checks.").defineInRange("preyPetrifyCooldownTicks", 500, 0, 20000);
BASILISK_PREY_PETRIFY_RANGE = b.comment("Range in blocks for prey petrification checks.").defineInRange("preyPetrifyRange", 8.0D, 0.0D, 128.0D);
BASILISK_PREY_PETRIFY_TICKS = b.comment("Ticks the prey petrify effect lasts.").defineInRange("preyPetrifyTicks", 200, 0, 20000);
b.pop();
// Lucid
b.push("lucid");
LUCID_ATTACK_RANGE = b
.comment("Attack range in blocks. The Lucid fires its gravity blast when a target enters this radius.")
.defineInRange("attackRange", 9.0D, 1.0D, 32.0D);
LUCID_PEARL_INVERTED_DURATION_SECONDS = b
.comment("How long the Inverted effect from a Lucid pearl lasts, in seconds.")
.defineInRange("pearlInvertedDurationSeconds", 6.0D, 0.0D, 3600.0D);
b.pop();
// Dread effect
b.push("dread");
b.push("hallucinationSounds");
DREAD_HALLUCINATION_SOUNDS_ENABLED = b.comment("If false, the Dread effect will not play random hallucination sounds. Sound pool tag: data/antarchy/tags/sound_event/dread_hallucination_sounds.json").define("enabled", true);
DREAD_HALLUCINATION_SOUND_MIN_INTERVAL = b.comment("Minimum seconds between hallucination sound triggers.").defineInRange("minIntervalSeconds", 3.0D, 0.1D, 300.0D);
DREAD_HALLUCINATION_SOUND_MAX_INTERVAL = b.comment("Maximum seconds between hallucination sound triggers.").defineInRange("maxIntervalSeconds", 10.0D, 0.1D, 300.0D);
b.pop();
b.push("hallucinationMobs");
DREAD_HALLUCINATION_MOBS_ENABLED = b.comment("If false, the Dread effect will not render apparitions.").define("enabled", true);
DREAD_HALLUCINATION_MOB_MIN_INTERVAL = b.comment("Minimum seconds between apparition spawns.").defineInRange("minIntervalSeconds", 6.0D, 0.1D, 300.0D);
DREAD_HALLUCINATION_MOB_MAX_INTERVAL = b.comment("Maximum seconds between apparition spawns.").defineInRange("maxIntervalSeconds", 16.0D, 0.1D, 300.0D);
b.pop();
b.pop(); // dread
b.push("creepingHorror");
CREEPING_HORROR_HEALTH = b.comment("Base max health.").defineInRange("health", 15.0D, 1.0D, 32768.0D);
CREEPING_HORROR_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D);
b.pop();
b.push("lurkingTerror");
LURKING_TERROR_HEALTH = b.comment("Base max health.").defineInRange("health", 15.0D, 1.0D, 32768.0D);
LURKING_TERROR_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D);
b.pop();
b.push("jerry");
JERRY_INFANT_HEALTH = b.comment("Infant Jerry max health.").defineInRange("infantHealth", 20.0D, 1.0D, 32768.0D);
JERRY_INFANT_ATTACK_DAMAGE = b.comment("Infant Jerry damage per attached damage tick.").defineInRange("infantAttackDamage", 2.0D, 0.0D, 1024.0D);
JERRY_MATURE_HEALTH = b.comment("Mature Jerry max health.").defineInRange("matureHealth", 40.0D, 1.0D, 32768.0D);
JERRY_MATURE_ATTACK_DAMAGE = b.comment("Mature Jerry damage per attached damage tick.").defineInRange("matureAttackDamage", 3.5D, 0.0D, 1024.0D);
JERRY_ALPHA_HEALTH = b.comment("Alpha Jerry max health.").defineInRange("alphaHealth", 60.0D, 1.0D, 32768.0D);
JERRY_ALPHA_ATTACK_DAMAGE = b.comment("Alpha Jerry attack damage.").defineInRange("alphaAttackDamage", 6.0D, 0.0D, 1024.0D);
JERRY_GAMMA_HEALTH = b.comment("Gamma Jerry max health.").defineInRange("gammaHealth", 60.0D, 1.0D, 32768.0D);
JERRY_GAMMA_ATTACK_DAMAGE = b.comment("Gamma Jerry melee attack damage.").defineInRange("gammaAttackDamage", 7.0D, 0.0D, 1024.0D);
b.pop();
b.push("cheep");
CHEEP_HEALTH = b.comment("Base max health.").defineInRange("health", 8.0D, 1.0D, 32768.0D);
CHEEP_ATTACK_DAMAGE = b.comment("Base attack damage.").defineInRange("attackDamage", 3.0D, 0.0D, 1024.0D);
b.pop();
b.push("dorrie");
DORRIE_HEALTH = b.comment("Base max health.").defineInRange("health", 60.0D, 1.0D, 32768.0D);
b.pop();
b.push("ouranwood_deer");
OURANWOOD_DEER_HEALTH = b.comment("Base max health.").defineInRange("health", 20.0D, 1.0D, 32768.0D);
b.pop();
b.push("glimmer");
GLIMMER_HEALTH = b.comment("Base max health.").defineInRange("health", 20.0D, 1.0D, 32768.0D);
b.pop();
b.push("herculesBeetle");
HERCULES_BEETLE_HEALTH = b.comment("Base max health.").defineInRange("health", 500.0D, 1.0D, 32768.0D);
HERCULES_BEETLE_ATTACK_DAMAGE = b.comment("Base melee damage for ground and flying attacks.").defineInRange("attackDamage", 30.0D, 0.0D, 1024.0D);
HERCULES_BEETLE_CHARGE_DAMAGE = b.comment("AOE impact damage dealt when a charge collides.").defineInRange("chargeDamage", 40.0D, 0.0D, 1024.0D);
b.pop();
b.push("toreterror");
TORETERROR_HEALTH = b.comment("Base max health.").defineInRange("health", 300.0D, 1.0D, 32768.0D);
TORETERROR_JUMP_ATTACK_DAMAGE = b.comment("Damage dealt by the jump shockwave.").defineInRange("jumpAttackDamage", 14.0D, 0.0D, 1024.0D);
TORETERROR_JUMP_ATTACK_KNOCKBACK = b.comment("Knockback strength of the jump shockwave.").defineInRange("jumpAttackKnockback", 2.5D, 0.0D, 10.0D);
TORETERROR_SPIN_DAMAGE = b.comment("Damage per spin-attack tick.").defineInRange("spinDamage", 8.0D, 0.0D, 1024.0D);
TORETERROR_SPIN_KNOCKBACK = b.comment("Knockback strength of the spin attack.").defineInRange("spinKnockback", 1.5D, 0.0D, 10.0D);
TORETERROR_PROJECTILE_DAMAGE_MULTIPLIER = b.comment("Damage multiplier applied to projectile hits on the Toreterror (0.5 = half damage).").defineInRange("projectileDamageMultiplier", 0.5D, 0.0D, 1.0D);
TORETERROR_RANGED_WATER_BOMB_CHANCE = b.comment("Chance each ranged attack cycle launches a water bomb.").defineInRange("rangedWaterBombChance", 0.35D, 0.0D, 1.0D);
WATER_CANNON_COOLDOWN_SECONDS = b.comment("Cooldown between water cannon uses, in seconds.").defineInRange("waterCannonCooldownSeconds", 1.5D, 0.0D, 60.0D);
WATER_BOMB_DAMAGE = b.comment("Damage dealt by a Water Bomb hit.").defineInRange("waterBombDamage", 6.0D, 0.0D, 1024.0D);
WATER_BOMB_LIFETIME_TICKS = b.comment("Ticks before a Water Bomb despawns.").defineInRange("waterBombLifetimeTicks", 120, 1, 6000);
WATER_BOMB_GRAVITY = b.comment("Gravity applied to Water Bombs (higher = steeper arc).").defineInRange("waterBombGravity", 0.12D, 0.0D, 2.0D);
WATER_BOMB_KNOCKBACK = b.comment("Knockback strength when a Water Bomb hits an entity.").defineInRange("waterBombKnockback", 1.2D, 0.0D, 10.0D);
b.pop();
SPEC = b.build();
}
private AntarchyMobsConfig() {}
private static boolean isValidDimensionId(Object value) {
return value instanceof String s && net.minecraft.resources.ResourceLocation.tryParse(s) != null;
}
static boolean antsStealFromChests() { return ANTS_STEAL_FROM_CHESTS.get(); }
static boolean brownAntRequiresReagent() { return BROWN_ANT_REQUIRES_REAGENT.get(); }
static double brownAntHealth() { return BROWN_ANT_HEALTH.get(); }
static double brownAntMovementSpeed() { return BROWN_ANT_MOVEMENT_SPEED.get(); }
static double brownAntAttackDamage() { return BROWN_ANT_ATTACK_DAMAGE.get(); }
static String brownAntDestinationDimension() { return BROWN_ANT_DESTINATION_DIMENSION.get(); }
static boolean redAntRequiresReagent() { return RED_ANT_REQUIRES_REAGENT.get(); }
static double redAntHealth() { return RED_ANT_HEALTH.get(); }
static double redAntMovementSpeed() { return RED_ANT_MOVEMENT_SPEED.get(); }
static double redAntAttackDamage() { return RED_ANT_ATTACK_DAMAGE.get(); }
static String redAntDestinationDimension() { return RED_ANT_DESTINATION_DIMENSION.get(); }
static boolean rainbowAntRequiresReagent() { return RAINBOW_ANT_REQUIRES_REAGENT.get(); }
static double rainbowAntHealth() { return RAINBOW_ANT_HEALTH.get(); }
static double rainbowAntMovementSpeed() { return RAINBOW_ANT_MOVEMENT_SPEED.get(); }
static double rainbowAntAttackDamage() { return RAINBOW_ANT_ATTACK_DAMAGE.get(); }
static String rainbowAntNonInfinityFallbackDimension() { return RAINBOW_ANT_NON_INFINITY_FALLBACK_DIMENSION.get(); }
static boolean termiteRequiresReagent() { return TERMITE_REQUIRES_REAGENT.get(); }
static double termiteHealth() { return TERMITE_HEALTH.get(); }
static double termiteMovementSpeed() { return TERMITE_MOVEMENT_SPEED.get(); }
static double termiteAttackDamage() { return TERMITE_ATTACK_DAMAGE.get(); }
static String termiteDestinationDimension() { return TERMITE_DESTINATION_DIMENSION.get(); }
static boolean easterBunnyEnabled() { return EASTER_BUNNY_ENABLED.get(); }
static int easterBunnyNaturalSpawnChancePercent() { return EASTER_BUNNY_NATURAL_SPAWN_CHANCE_PERCENT.get(); }
static double waspHealth() { return WASP_HEALTH.get(); }
static double waspAttackDamage() { return WASP_ATTACK_DAMAGE.get(); }
static double waspMovementSpeed() { return WASP_MOVEMENT_SPEED.get(); }
static double bomberHealth() { return BOMBER_HEALTH.get(); }
static double bomberAttackDamage() { return BOMBER_ATTACK_DAMAGE.get(); }
static double bomberExplosionDamage() { return BOMBER_EXPLOSION_DAMAGE.get(); }
static double bomberExplosionRadius() { return BOMBER_EXPLOSION_RADIUS.get(); }
static double jumpyBugHealth() { return JUMPY_BUG_HEALTH.get(); }
static double jumpyBugPounceDamage() { return JUMPY_BUG_POUNCE_DAMAGE.get(); }
static double jumpyBugLatchDamage() { return JUMPY_BUG_LATCH_DAMAGE.get(); }
static double jumpyBugCamouflageAlpha() { return JUMPY_BUG_CAMOUFLAGE_ALPHA.get(); }
static double krakenHealth() { return KRAKEN_HEALTH.get(); }
static double krakenAttackDamage() { return KRAKEN_ATTACK_DAMAGE.get(); }
static double krakenProjectileDamageTakenMultiplier() { return KRAKEN_PROJECTILE_DAMAGE_TAKEN_MULTIPLIER.get(); }
static boolean krakenSquidSpawnEnabled() { return KRAKEN_SQUID_SPAWN_ENABLED.get(); }
static boolean krakenMassSpawnEnabled() { return KRAKEN_MASS_SPAWN_ENABLED.get(); }
static boolean krakenRequireBadOmenToSummon() { return KRAKEN_REQUIRE_BAD_OMEN_TO_SUMMON.get(); }
static double brutalflyHealth() { return BRUTALFLY_HEALTH.get(); }
static double brutalflySwipeDamage() { return BRUTALFLY_SWIPE_DAMAGE.get(); }
static double brutalflySpitDamage() { return BRUTALFLY_SPIT_DAMAGE.get(); }
static double mantisHealth() { return MANTIS_HEALTH.get(); }
static double mantisAttackDamage() { return MANTIS_ATTACK_DAMAGE.get(); }
static double mantisMovementSpeed() { return MANTIS_MOVEMENT_SPEED.get(); }
static double mantisFlyingSpeed() { return MANTIS_FLYING_SPEED.get(); }
static boolean mantisIgnoreLightLevel() { return MANTIS_IGNORE_LIGHT_LEVEL.get(); }
static double alphaMantisHealth() { return ALPHA_MANTIS_HEALTH.get(); }
static double alphaMantisAttackDamage() { return ALPHA_MANTIS_ATTACK_DAMAGE.get(); }
static double alphaMantisMovementSpeed() { return ALPHA_MANTIS_MOVEMENT_SPEED.get(); }
static double alphaMantisFlyingSpeed() { return ALPHA_MANTIS_FLYING_SPEED.get(); }
static int alphaMantisSummonIntervalTicks() { return ALPHA_MANTIS_SUMMON_INTERVAL_TICKS.get(); }
static int alphaMantisMaxMinions() { return ALPHA_MANTIS_MAX_MINIONS.get(); }
static double rollyPollyHealth() { return ROLLY_POLLY_HEALTH.get(); }
static double rollyPollyMovementSpeed() { return ROLLY_POLLY_MOVEMENT_SPEED.get(); }
static double rollyPollyRollSpeedMultiplier() { return ROLLY_POLLY_ROLL_SPEED_MULTIPLIER.get(); }
static int rollyPollyTameChance() { return ROLLY_POLLY_TAME_CHANCE.get(); }
static double rollyPollyBowlingDamage() { return ROLLY_POLLY_BOWLING_DAMAGE.get(); }
static double rollyPollyTumbleDamage() { return ROLLY_POLLY_TUMBLE_DAMAGE.get(); }
static double rollyPollyBowlingKnockback() { return ROLLY_POLLY_BOWLING_KNOCKBACK.get(); }
static double rollyPollyArmor() { return ROLLY_POLLY_ARMOR.get(); }
static double rollyPollyRolledArmorBonus() { return ROLLY_POLLY_ROLLED_ARMOR_BONUS.get(); }
static double triffidHealth() { return TRIFFID_HEALTH.get(); }
static double triffidAttackDamage() { return TRIFFID_ATTACK_DAMAGE.get(); }
static double triffidGrabDamage() { return TRIFFID_GRAB_DAMAGE.get(); }
static double caterpillarPupationTimeSeconds() { return CATERPILLAR_PUPATION_TIME_SECONDS.get(); }
static double antDanceRadius() { return ANT_DANCE_RADIUS.get(); }
static double reverieHealth() { return REVERIE_HEALTH.get(); }
static double reverieInterestRadius() { return REVERIE_INTEREST_RADIUS.get(); }
static double reverieAbandonPlayerDistance() { return REVERIE_ABANDON_PLAYER_DISTANCE.get(); }
static int reverieNoticeDurationTicks() { return REVERIE_NOTICE_DURATION_TICKS.get(); }
static int reverieInterestDurationTicks() { return REVERIE_INTEREST_DURATION_TICKS.get(); }
static int reverieRebindCooldownTicks() { return REVERIE_REBIND_COOLDOWN_TICKS.get(); }
static int reverieDamageReactionDurationTicks() { return REVERIE_DAMAGE_REACTION_DURATION_TICKS.get(); }
static double reverieDangerousFallDistance() { return REVERIE_DANGEROUS_FALL_DISTANCE.get(); }
static double reverieDangerousFallSpeed() { return REVERIE_DANGEROUS_FALL_SPEED.get(); }
static double reverieWarningThreatRadius() { return REVERIE_WARNING_THREAT_RADIUS.get(); }
static double reverieWarningThreatVerticalRange() { return REVERIE_WARNING_THREAT_VERTICAL_RANGE.get(); }
static int reverieDuplicationCooldownTicks() { return REVERIE_DUPLICATION_COOLDOWN_TICKS.get(); }
static double nightmareHealth() { return NIGHTMARE_HEALTH.get(); }
static double nightmareAttackDamage() { return NIGHTMARE_ATTACK_DAMAGE.get(); }
static boolean basiliskPetrifyingGazeEnabled() { return BASILISK_PETRIFYING_GAZE_ENABLED.get(); }
static int basiliskSpawnMaxLightLevel() { return BASILISK_SPAWN_MAX_LIGHT_LEVEL.get(); }
static double basiliskHealth() { return BASILISK_HEALTH.get(); }
static double basiliskAttackDamage() { return BASILISK_ATTACK_DAMAGE.get(); }
static double basiliskMovementSpeed() { return BASILISK_MOVEMENT_SPEED.get(); }
static double basiliskArmor() { return BASILISK_ARMOR.get(); }
static double basiliskKnockbackResistance() { return BASILISK_KNOCKBACK_RESISTANCE.get(); }
static double basiliskFollowRange() { return BASILISK_FOLLOW_RANGE.get(); }
static int basiliskXpReward() { return BASILISK_XP_REWARD.get(); }
static int basiliskAttackAnimTicks() { return BASILISK_ATTACK_ANIM_TICKS.get(); }
static int basiliskAttackDamageTick() { return BASILISK_ATTACK_DAMAGE_TICK.get(); }
static int basiliskHissCooldownTicks() { return BASILISK_HISS_COOLDOWN_TICKS.get(); }
static double basiliskAttackReach() { return BASILISK_ATTACK_REACH.get(); }
static double basiliskGazeRange() { return BASILISK_GAZE_RANGE.get(); }
static double basiliskGazeDotThreshold() { return BASILISK_GAZE_DOT_THRESHOLD.get(); }
static double basiliskGazeFacingThreshold() { return BASILISK_GAZE_FACING_THRESHOLD.get(); }
static int basiliskHissChargeTicks() { return BASILISK_HISS_CHARGE_TICKS.get(); }
static int basiliskPlayerParalyzeTicks() { return BASILISK_PLAYER_PARALYZE_TICKS.get(); }
static int basiliskPreyPetrifyCooldownTicks() { return BASILISK_PREY_PETRIFY_COOLDOWN_TICKS.get(); }
static double basiliskPreyPetrifyRange() { return BASILISK_PREY_PETRIFY_RANGE.get(); }
static int basiliskPreyPetrifyTicks() { return BASILISK_PREY_PETRIFY_TICKS.get(); }
static double lucidAttackRange() { return LUCID_ATTACK_RANGE.get(); }
static double lucidPearlInvertedDurationSeconds() { return LUCID_PEARL_INVERTED_DURATION_SECONDS.get(); }
static double toreterrorHealth() { return TORETERROR_HEALTH.get(); }
static double toreterrorJumpAttackDamage() { return TORETERROR_JUMP_ATTACK_DAMAGE.get(); }
static double toreterrorJumpAttackKnockback() { return TORETERROR_JUMP_ATTACK_KNOCKBACK.get(); }
static double toreterrorSpinDamage() { return TORETERROR_SPIN_DAMAGE.get(); }
static double toreterrorSpinKnockback() { return TORETERROR_SPIN_KNOCKBACK.get(); }
static double toreterrorProjectileDamageMultiplier() { return TORETERROR_PROJECTILE_DAMAGE_MULTIPLIER.get(); }
static double toreterrorRangedWaterBombChance() { return TORETERROR_RANGED_WATER_BOMB_CHANCE.get(); }
static double waterCannonCooldownSeconds() { return WATER_CANNON_COOLDOWN_SECONDS.get(); }
static double waterBombDamage() { return WATER_BOMB_DAMAGE.get(); }
static int waterBombLifetimeTicks() { return WATER_BOMB_LIFETIME_TICKS.get(); }
static double waterBombGravity() { return WATER_BOMB_GRAVITY.get(); }
static double waterBombKnockback() { return WATER_BOMB_KNOCKBACK.get(); }
static boolean dreadHallucinationSoundsEnabled() { return DREAD_HALLUCINATION_SOUNDS_ENABLED.get(); }
static double dreadHallucinationSoundMinInterval() { return DREAD_HALLUCINATION_SOUND_MIN_INTERVAL.get(); }
static double dreadHallucinationSoundMaxInterval() { return DREAD_HALLUCINATION_SOUND_MAX_INTERVAL.get(); }
static boolean dreadHallucinationMobsEnabled() { return DREAD_HALLUCINATION_MOBS_ENABLED.get(); }
static double dreadHallucinationMobMinInterval() { return DREAD_HALLUCINATION_MOB_MIN_INTERVAL.get(); }
static double dreadHallucinationMobMaxInterval() { return DREAD_HALLUCINATION_MOB_MAX_INTERVAL.get(); }
static double creepingHorrorHealth() { return CREEPING_HORROR_HEALTH.get(); }
static double creepingHorrorAttackDamage() { return CREEPING_HORROR_ATTACK_DAMAGE.get(); }
static double lurkingTerrorHealth() { return LURKING_TERROR_HEALTH.get(); }
static double lurkingTerrorAttackDamage() { return LURKING_TERROR_ATTACK_DAMAGE.get(); }
static double jerryInfantHealth() { return JERRY_INFANT_HEALTH.get(); }
static double jerryInfantAttackDamage() { return JERRY_INFANT_ATTACK_DAMAGE.get(); }
static double jerryMatureHealth() { return JERRY_MATURE_HEALTH.get(); }
static double jerryMatureAttackDamage() { return JERRY_MATURE_ATTACK_DAMAGE.get(); }
static double jerryAlphaHealth() { return JERRY_ALPHA_HEALTH.get(); }
static double jerryAlphaAttackDamage() { return JERRY_ALPHA_ATTACK_DAMAGE.get(); }
static double jerryGammaHealth() { return JERRY_GAMMA_HEALTH.get(); }
static double jerryGammaAttackDamage() { return JERRY_GAMMA_ATTACK_DAMAGE.get(); }
static double cheepHealth() { return CHEEP_HEALTH.get(); }
static double cheepAttackDamage() { return CHEEP_ATTACK_DAMAGE.get(); }
static double dorrieHealth() { return DORRIE_HEALTH.get(); }
static double ouranwoodDeerHealth() { return OURANWOOD_DEER_HEALTH.get(); }
static double glimmerHealth() { return GLIMMER_HEALTH.get(); }
static double herculesBeetleHealth() { return HERCULES_BEETLE_HEALTH.get(); }
static double herculesBeetleAttackDamage() { return HERCULES_BEETLE_ATTACK_DAMAGE.get(); }
static double herculesBeetleChargeDamage() { return HERCULES_BEETLE_CHARGE_DAMAGE.get(); }
}
@@ -0,0 +1,702 @@
package com.craisinlord.antarchy.forge;
import net.minecraftforge.common.ForgeConfigSpec;
public final class AntarchyToolsConfig {
public static final ForgeConfigSpec SPEC;
// Basilisk Dagger
private static final ForgeConfigSpec.DoubleValue BASILISK_DAGGER_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BASILISK_DAGGER_ATTACK_SPEED;
private static final ForgeConfigSpec.IntValue BASILISK_DAGGER_POISON_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue BASILISK_DAGGER_POISON_AMPLIFIER;
// Ultimate Tools
private static final ForgeConfigSpec.DoubleValue ULTIMATE_SWORD_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_SWORD_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_PICKAXE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_PICKAXE_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_AXE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_AXE_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_SHOVEL_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_SHOVEL_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_HOE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_HOE_ATTACK_SPEED;
private static final ForgeConfigSpec.IntValue ULTIMATE_TOOL_ENCHANTABILITY;
private static final ForgeConfigSpec.BooleanValue ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED;
// Ultimate Bow
private static final ForgeConfigSpec.DoubleValue ULTIMATE_BOW_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_BOW_PLAYER_HEAL;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_BOW_DRAW_SPEED_MULTIPLIER;
private static final ForgeConfigSpec.BooleanValue ULTIMATE_BOW_COMES_ENCHANTED_WITH_FLAME;
private static final ForgeConfigSpec.IntValue ULTIMATE_BOW_ENCHANTABILITY;
// Ultimate Crossbow
private static final ForgeConfigSpec.DoubleValue ULTIMATE_CROSSBOW_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_CROSSBOW_CHARGE_SPEED_MULTIPLIER;
private static final ForgeConfigSpec.IntValue ULTIMATE_CROSSBOW_ENCHANTABILITY;
// Ultimate Mace
private static final ForgeConfigSpec.DoubleValue ULTIMATE_MACE_DAMAGE_MULTIPLIER;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_MACE_ATTACK_SPEED;
private static final ForgeConfigSpec.IntValue ULTIMATE_MACE_ENCHANTABILITY;
// Ultimate Armor
private static final ForgeConfigSpec.BooleanValue ULTIMATE_ARMOR_COMES_ENCHANTED;
private static final ForgeConfigSpec.IntValue ULTIMATE_ARMOR_ENCHANTABILITY;
private static final ForgeConfigSpec.IntValue ULTIMATE_HELMET_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue ULTIMATE_CHESTPLATE_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue ULTIMATE_LEGGINGS_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue ULTIMATE_BOOTS_ARMOR_VALUE;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_HELMET_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_CHESTPLATE_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_LEGGINGS_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_BOOTS_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue ULTIMATE_ARMOR_KNOCKBACK_RESISTANCE;
// Battle Axe
private static final ForgeConfigSpec.DoubleValue BATTLE_AXE_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BATTLE_AXE_ATTACK_SPEED;
// Big Bertha
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_REACH_BONUS;
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue ATTITUDE_ADJUSTER_BASE_DAMAGE;
private static final ForgeConfigSpec.BooleanValue ATTITUDE_ADJUSTER_BREAKS_BLOCKS;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_THROWN_DAMAGE;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_LIGHTNING_DAMAGE;
private static final ForgeConfigSpec.BooleanValue KRAKENS_GRASP_INNATE_LOYALTY;
private static final ForgeConfigSpec.IntValue KRAKENS_GRASP_INNATE_LOYALTY_LEVEL;
private static final ForgeConfigSpec.IntValue KRAKENS_GRASP_TENTACLE_DURATION_TICKS;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_TENTACLE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue KRAKENS_GRASP_TENTACLE_RADIUS;
private static final ForgeConfigSpec.IntValue KRAKENS_GRASP_TENTACLE_DAMAGE_INTERVAL_TICKS;
private static final ForgeConfigSpec.IntValue BIG_BERTHA_BASILISK_PARALYZE_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue BIG_BERTHA_KRAKEN_SLOW_TICKS;
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_BASILISK_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_LUCID_INVERTED_DURATION_SECONDS;
private static final ForgeConfigSpec.DoubleValue BIG_BERTHA_LUCID_INVERTED_DAMAGE_BONUS_PERCENT;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_BASE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_REACH_BONUS;
private static final ForgeConfigSpec.IntValue SCORPION_WHIP_POISON_DURATION_TICKS;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_TETHER_MAX_RANGE;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_SNAP_BONUS_DAMAGE;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_PULL_STRENGTH;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_HEAVY_PULL_MULTIPLIER;
private static final ForgeConfigSpec.DoubleValue SCORPION_WHIP_SELF_PULL_MULTIPLIER;
private static final ForgeConfigSpec.IntValue SCORPION_WHIP_REEL_COOLDOWN_TICKS;
private static final ForgeConfigSpec.IntValue SCORPION_WHIP_SNAP_COOLDOWN_TICKS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_KATANA_ATTACK_DAMAGE;
private static final ForgeConfigSpec.DoubleValue BLOOD_CRYSTAL_KATANA_LAUNCH_STRENGTH;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_KATANA_TRAIL_DURATION_TICKS;
// Nightmare Gear
private static final ForgeConfigSpec.IntValue NIGHTMARE_HELMET_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue NIGHTMARE_CHESTPLATE_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue NIGHTMARE_LEGGINGS_ARMOR_VALUE;
private static final ForgeConfigSpec.IntValue NIGHTMARE_BOOTS_ARMOR_VALUE;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_HELMET_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_CHESTPLATE_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_LEGGINGS_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_BOOTS_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE;
private static final ForgeConfigSpec.DoubleValue PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_SWORD_BASE_DAMAGE;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_SWORD_ATTACK_SPEED;
private static final ForgeConfigSpec.DoubleValue NIGHTMARE_SWORD_SCALING_FACTOR;
// Fallen King's Crown
private static final ForgeConfigSpec.IntValue FALLEN_KING_CROWN_ARMOR_VALUE;
private static final ForgeConfigSpec.DoubleValue FALLEN_KING_CROWN_ARMOR_TOUGHNESS;
// Blood Crystal Armor
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_ARMOR_SHIELD_RECHARGE_TICKS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_APPLE_SHIELD_COUNT;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_APPLE_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_APPLE_SHIELD_RECHARGE_TICKS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_HARD_MAX_SHIELDS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_HELMET_DEFENSE;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_CHESTPLATE_DEFENSE;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_LEGGINGS_DEFENSE;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_BOOTS_DEFENSE;
private static final ForgeConfigSpec.DoubleValue BLOOD_CRYSTAL_ARMOR_TOUGHNESS;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_HELMET_DURABILITY;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_CHESTPLATE_DURABILITY;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_LEGGINGS_DURABILITY;
private static final ForgeConfigSpec.IntValue BLOOD_CRYSTAL_BOOTS_DURABILITY;
// Squidzooka
private static final ForgeConfigSpec.DoubleValue SQUIDZOOKA_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue SQUIDZOOKA_LAUNCH_VELOCITY;
private static final ForgeConfigSpec.DoubleValue RPO_LAUNCHER_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue RPO_LAUNCHER_LAUNCH_VELOCITY;
private static final ForgeConfigSpec.DoubleValue RPO_LAUNCHER_EXPLOSION_DAMAGE;
private static final ForgeConfigSpec.DoubleValue RPO_LAUNCHER_EXPLOSION_RADIUS;
// Size Rays
private static final ForgeConfigSpec.BooleanValue SIZE_CHANGING_RAYS_ENABLED;
private static final ForgeConfigSpec.DoubleValue SIZE_RAY_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue SIZE_RAY_MIN_SCALE;
private static final ForgeConfigSpec.DoubleValue SIZE_RAY_MAX_SCALE;
private static final ForgeConfigSpec.DoubleValue SIZE_RAY_DELTA_PER_HIT;
private static final ForgeConfigSpec.DoubleValue SHRINKING_POTION_DELTA;
private static final ForgeConfigSpec.DoubleValue GROWTH_POTION_DELTA;
// Gravity Gun
private static final ForgeConfigSpec.BooleanValue GRAVITY_GUN_ENABLED;
private static final ForgeConfigSpec.BooleanValue GRAVITY_GUN_BLOCKS_ENABLED;
private static final ForgeConfigSpec.BooleanValue GRAVITY_GUN_ENTITIES_ENABLED;
private static final ForgeConfigSpec.DoubleValue GRAVITY_GUN_RANGE;
private static final ForgeConfigSpec.DoubleValue GRAVITY_GUN_THROW_STRENGTH;
private static final ForgeConfigSpec.DoubleValue GRAVITY_GUN_BLAST_STRENGTH;
private static final ForgeConfigSpec.DoubleValue GRAVITY_GUN_COOLDOWN_SECONDS;
private static final ForgeConfigSpec.DoubleValue GRAVITY_GUN_MAX_HOLD_DISTANCE;
// Critter Cage
private static final ForgeConfigSpec.DoubleValue CRITTER_CAGE_MAX_CAPTURABLE_WIDTH;
private static final ForgeConfigSpec.DoubleValue CRITTER_CAGE_MAX_CAPTURABLE_HEIGHT;
// Miner's Dream
private static final ForgeConfigSpec.BooleanValue MINERS_DREAM_ENABLED;
private static final ForgeConfigSpec.IntValue MINERS_DREAM_MINIMUM_RANGE;
private static final ForgeConfigSpec.IntValue MINERS_DREAM_MAXIMUM_RANGE;
private static final ForgeConfigSpec.IntValue MINERS_DREAM_TORCH_SPACING;
private static final ForgeConfigSpec.IntValue MINERS_DREAM_BLOCKS_PER_TICK;
// Miscellaneous items / consumables
private static final ForgeConfigSpec.DoubleValue DUCT_TAPE_REPAIR_PERCENT_PER_USE;
private static final ForgeConfigSpec.DoubleValue POTENT_NYXITE_INVERTED_DURATION_SECONDS;
private static final ForgeConfigSpec.BooleanValue INVERT_PROJECTILES_FROM_INVERTED_PLAYERS;
private static final ForgeConfigSpec.IntValue CORNEA_EAR_NIGHT_VISION_SECONDS;
private static final ForgeConfigSpec.BooleanValue AMERICAN_ENABLED;
private static final ForgeConfigSpec.IntValue AMERICAN_BONUS_NUTRITION;
private static final ForgeConfigSpec.DoubleValue AMERICAN_BONUS_SATURATION;
private static final ForgeConfigSpec.IntValue AMERICAN_REGENERATION_DURATION_TICKS;
private static final ForgeConfigSpec.IntValue AMERICAN_REGENERATION_AMPLIFIER;
// Moggles
private static final ForgeConfigSpec.DoubleValue MOGGLES_VISION_RADIUS;
private static final ForgeConfigSpec.IntValue MOGGLES_VISION_MAX_LIGHT;
private static final ForgeConfigSpec.DoubleValue MOGGLES_VISION_ALPHA;
static {
ForgeConfigSpec.Builder b = new ForgeConfigSpec.Builder();
// Basilisk Dagger
b.push("basiliskDagger");
BASILISK_DAGGER_ATTACK_DAMAGE = b.comment("Attack damage.") .defineInRange("attackDamage", 6.0D, 0.0D, 1024.0D);
BASILISK_DAGGER_ATTACK_SPEED = b.comment("Attack speed.") .defineInRange("attackSpeed", -1.8D, -10.0D, 10.0D);
BASILISK_DAGGER_POISON_DURATION_TICKS = b.comment("Poison duration applied on hit.") .defineInRange("poisonDurationTicks", 200, 0, 20000);
BASILISK_DAGGER_POISON_AMPLIFIER = b.comment("Poison level applied on hit (0 = I).") .defineInRange("poisonAmplifier", 2, 0, 10);
b.pop();
// Ultimate Tools
b.push("ultimateTools");
ULTIMATE_SWORD_ATTACK_DAMAGE = b.comment("Attack damage of the Ultimate Sword.") .defineInRange("swordAttackDamage", 30.0D, 0.0D, 1024.0D);
ULTIMATE_SWORD_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Sword.") .defineInRange("swordAttackSpeed", -2.4D, -10.0D, 10.0D);
ULTIMATE_PICKAXE_ATTACK_DAMAGE = b.comment("Attack damage of the Ultimate Pickaxe.") .defineInRange("pickaxeAttackDamage", 22.0D, 0.0D, 1024.0D);
ULTIMATE_PICKAXE_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Pickaxe.") .defineInRange("pickaxeAttackSpeed", -2.8D, -10.0D, 10.0D);
ULTIMATE_AXE_ATTACK_DAMAGE = b.comment("Attack damage of the Ultimate Axe.") .defineInRange("axeAttackDamage", 38.0D, 0.0D, 1024.0D);
ULTIMATE_AXE_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Axe.") .defineInRange("axeAttackSpeed", -3.0D, -10.0D, 10.0D);
ULTIMATE_SHOVEL_ATTACK_DAMAGE = b.comment("Attack damage of the Ultimate Shovel.") .defineInRange("shovelAttackDamage", 24.0D, 0.0D, 1024.0D);
ULTIMATE_SHOVEL_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Shovel.") .defineInRange("shovelAttackSpeed", -3.0D, -10.0D, 10.0D);
ULTIMATE_HOE_ATTACK_DAMAGE = b.comment("Attack damage of the Ultimate Hoe.") .defineInRange("hoeAttackDamage", 8.0D, 0.0D, 1024.0D);
ULTIMATE_HOE_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Hoe.") .defineInRange("hoeAttackSpeed", 0.0D, -10.0D, 10.0D);
ULTIMATE_TOOL_ENCHANTABILITY = b.comment("Enchantability for all Ultimate tools.") .defineInRange("toolEnchantability", 25, 0, 100);
ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED = b
.comment("If false, Ultimate pickaxe, axe, shovel, and hoe lose their 3x3 mining mode and tooltip.")
.define("threeByThreeEnabled", true);
b.pop();
// Ultimate Bow
b.push("ultimateBow");
ULTIMATE_BOW_ATTACK_DAMAGE = b.comment("Damage dealt to non-player targets.") .defineInRange("attackDamage", 18.0D, 0.0D, 1024.0D);
ULTIMATE_BOW_PLAYER_HEAL = b.comment("Health restored to players hit by arrows from this bow.") .defineInRange("playerHeal", 8.0D, 0.0D, 1024.0D);
ULTIMATE_BOW_DRAW_SPEED_MULTIPLIER = b.comment("Draw speed relative to a normal bow. 2.5 = 2.5x as fast.") .defineInRange("drawSpeedMultiplier", 2.5D, 0.1D, 16.0D);
ULTIMATE_BOW_COMES_ENCHANTED_WITH_FLAME = b.comment("If true, Ultimate Bows are automatically given and keep the Flame enchant.") .define("comesEnchantedWithFlame", true);
ULTIMATE_BOW_ENCHANTABILITY = b.comment("Enchantability of the Ultimate Bow.") .defineInRange("enchantability", 20, 0, 100);
b.pop();
// Ultimate Crossbow
b.push("ultimateCrossbow");
ULTIMATE_CROSSBOW_ATTACK_DAMAGE = b.comment("Damage dealt by projectiles fired from the Ultimate Crossbow.").defineInRange("attackDamage", 8.0D, 0.0D, 1024.0D);
ULTIMATE_CROSSBOW_CHARGE_SPEED_MULTIPLIER = b
.comment(
"Charge speed relative to a normal crossbow. Below 1.0 is slower.",
"Default 0.25 means 4x slower (16-arrow full load ~5 s). Quick Charge still applies."
)
.defineInRange("chargeSpeedMultiplier", 0.25D, 0.01D, 16.0D);
ULTIMATE_CROSSBOW_ENCHANTABILITY = b.comment("Enchantability of the Ultimate Crossbow.").defineInRange("enchantability", 20, 0, 100);
b.pop();
// Ultimate Mace
b.push("ultimateMace");
ULTIMATE_MACE_DAMAGE_MULTIPLIER = b.comment("Multiplier on both base damage and smash bonus. 1.5 = 50% stronger than a normal mace.").defineInRange("damageMultiplier", 1.5D, 0.1D, 16.0D);
ULTIMATE_MACE_ATTACK_SPEED = b.comment("Attack speed of the Ultimate Mace.") .defineInRange("attackSpeed", -3.4D, -10.0D, 10.0D);
ULTIMATE_MACE_ENCHANTABILITY = b.comment("Enchantability of the Ultimate Mace.") .defineInRange("enchantability", 20, 0, 100);
b.pop();
// Ultimate Armor
b.push("ultimateArmor");
ULTIMATE_ARMOR_COMES_ENCHANTED = b.comment("If true, newly crafted Ultimate Armor has Protection, Fire Protection, Projectile Protection, and Blast Protection.").define("comesEnchanted", true);
ULTIMATE_ARMOR_ENCHANTABILITY = b.comment("Enchantability for all Ultimate Armor pieces.") .defineInRange("enchantability", 10, 0, 100);
ULTIMATE_HELMET_ARMOR_VALUE = b.comment("Armor points of the Ultimate Helmet.") .defineInRange("helmetArmor", 4, 0, 100);
ULTIMATE_CHESTPLATE_ARMOR_VALUE = b.comment("Armor points of the Ultimate Chestplate.") .defineInRange("chestplateArmor", 9, 0, 100);
ULTIMATE_LEGGINGS_ARMOR_VALUE = b.comment("Armor points of the Ultimate Leggings.") .defineInRange("leggingsArmor", 7, 0, 100);
ULTIMATE_BOOTS_ARMOR_VALUE = b.comment("Armor points of the Ultimate Boots.") .defineInRange("bootsArmor", 4, 0, 100);
ULTIMATE_HELMET_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Ultimate Helmet.") .defineInRange("helmetToughness", 3.0D, 0.0D, 100.0D);
ULTIMATE_CHESTPLATE_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Ultimate Chestplate.") .defineInRange("chestplateToughness", 3.0D, 0.0D, 100.0D);
ULTIMATE_LEGGINGS_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Ultimate Leggings.") .defineInRange("leggingsToughness", 3.0D, 0.0D, 100.0D);
ULTIMATE_BOOTS_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Ultimate Boots.") .defineInRange("bootsToughness", 3.0D, 0.0D, 100.0D);
ULTIMATE_ARMOR_KNOCKBACK_RESISTANCE = b.comment("Knockback resistance granted by each Ultimate Armor piece.") .defineInRange("knockbackResistance", 0.1D, 0.0D, 1.0D);
b.pop();
// Battle Axe
b.push("battleAxe");
BATTLE_AXE_ATTACK_DAMAGE = b.comment("Attack damage of the Battle Axe.").defineInRange("attackDamage", 46.0D, 0.0D, 4096.0D);
BATTLE_AXE_ATTACK_SPEED = b.comment("Attack speed of the Battle Axe.") .defineInRange("attackSpeed", -3.1D, -10.0D, 10.0D);
b.pop();
// Big Bertha
b.push("bigBertha");
BIG_BERTHA_ATTACK_DAMAGE = b.comment("Attack damage of Big Bertha.") .defineInRange("attackDamage", 55.0D, 0.0D, 4096.0D);
BIG_BERTHA_REACH_BONUS = b.comment("Extra attack range in blocks while held in main hand.") .defineInRange("reachBonus", 3.0D, 0.0D, 32.0D);
BIG_BERTHA_ATTACK_SPEED = b.comment("Attack speed of Big Bertha.") .defineInRange("attackSpeed", -3.0D, -10.0D, 10.0D);
BIG_BERTHA_BASILISK_PARALYZE_DURATION_TICKS = b.comment("Paralyze duration used by Basilisk mode.") .defineInRange("basiliskParalyzeDurationTicks", 80, 0, 20000);
BIG_BERTHA_KRAKEN_SLOW_TICKS = b.comment("Slow duration used by Kraken mode.") .defineInRange("krakenSlowTicks", 80, 0, 20000);
BIG_BERTHA_BASILISK_COOLDOWN_SECONDS = b.comment("Cooldown in seconds after using Basilisk mode's right-click paralyze.") .defineInRange("basiliskModeCooldownSeconds", 7.0D, 0.0D, 3600.0D);
BIG_BERTHA_LUCID_INVERTED_DURATION_SECONDS = b.comment("How long Lucid mode's inversion lasts on a target, in seconds.") .defineInRange("lucidModeInvertedDurationSeconds", 3.0D, 0.0D, 3600.0D);
BIG_BERTHA_LUCID_INVERTED_DAMAGE_BONUS_PERCENT = b.comment("Bonus damage percent from Lucid mode while the wielder is inverted.") .defineInRange("lucidModeInvertedDamageBonusPercent", 25.0D, 0.0D, 1000.0D);
b.pop();
b.push("attitudeAdjuster");
ATTITUDE_ADJUSTER_BASE_DAMAGE = b.comment("Base attack damage of the Attitude Adjuster.").defineInRange("baseDamage", 47.0D, 0.0D, 4096.0D);
ATTITUDE_ADJUSTER_BREAKS_BLOCKS = b.comment("If true, player ground slams can break a small patch of blocks on impact.").define("breaksBlocks", true);
b.pop();
b.push("krakensGrasp");
KRAKENS_GRASP_ATTACK_DAMAGE = b.comment("Melee attack damage of Kraken's Grasp.") .defineInRange("attackDamage", 16.0D, 0.0D, 4096.0D);
KRAKENS_GRASP_ATTACK_SPEED = b.comment("Attack speed of Kraken's Grasp.") .defineInRange("attackSpeed", -2.9D, -10.0D, 10.0D);
KRAKENS_GRASP_THROWN_DAMAGE = b.comment("Damage dealt when the thrown trident hits an entity.") .defineInRange("thrownDamage", 16.0D, 0.0D, 4096.0D);
KRAKENS_GRASP_LIGHTNING_DAMAGE = b.comment("Bonus damage from the lightning strike on every hit.") .defineInRange("lightningDamage", 6.0D, 0.0D, 4096.0D);
KRAKENS_GRASP_INNATE_LOYALTY = b.comment("Whether Kraken's Grasp automatically returns to its thrower like an enchanted Loyalty trident.").define("innateLoyalty", true);
KRAKENS_GRASP_INNATE_LOYALTY_LEVEL = b.comment("Effective Loyalty level used for the innate return, from 1 to 3.") .defineInRange("innateLoyaltyLevel", 3, 1, 3);
KRAKENS_GRASP_TENTACLE_DURATION_TICKS = b.comment("How long a summoned tentacle lasts, in ticks.") .defineInRange("tentacleDurationTicks", 100, 1, 72000);
KRAKENS_GRASP_TENTACLE_DAMAGE = b.comment("Damage a tentacle deals per damage interval to nearby entities.") .defineInRange("tentacleDamage", 3.0D, 0.0D, 4096.0D);
KRAKENS_GRASP_TENTACLE_RADIUS = b.comment("Radius in blocks around a tentacle that it can grab and damage.") .defineInRange("tentacleRadius", 3.0D, 0.0D, 32.0D);
KRAKENS_GRASP_TENTACLE_DAMAGE_INTERVAL_TICKS = b.comment("How often, in ticks, a tentacle damages nearby entities.") .defineInRange("tentacleDamageIntervalTicks", 20, 1, 2000);
b.pop();
b.push("scorpionWhip");
SCORPION_WHIP_BASE_DAMAGE = b.comment("Base lash damage of the Scorpion Stinger Whip.").defineInRange("baseDamage", 10.0D, 0.0D, 4096.0D);
SCORPION_WHIP_REACH_BONUS = b.comment("Extra entity interaction range in blocks while held in main hand.").defineInRange("reachBonus", 5.0D, 0.0D, 32.0D);
SCORPION_WHIP_POISON_DURATION_TICKS = b.comment("Poison duration applied on lash.").defineInRange("poisonDurationTicks", 100, 0, 20000);
SCORPION_WHIP_TETHER_MAX_RANGE = b.comment("Maximum tether distance before it breaks.").defineInRange("tetherMaxRange", 10.0D, 0.0D, 128.0D);
SCORPION_WHIP_SNAP_BONUS_DAMAGE = b.comment("Bonus damage dealt when snapping the tether free.").defineInRange("snapBonusDamage", 6.0D, 0.0D, 4096.0D);
SCORPION_WHIP_PULL_STRENGTH = b.comment("Pull strength applied to normal tethered targets.").defineInRange("pullStrength", 0.75D, 0.0D, 8.0D);
SCORPION_WHIP_HEAVY_PULL_MULTIPLIER = b.comment("Reduced pull strength applied to heavy targets.").defineInRange("heavyPullMultiplier", 0.25D, 0.0D, 8.0D);
SCORPION_WHIP_SELF_PULL_MULTIPLIER = b.comment("Self-pull strength toward heavy tethered targets.").defineInRange("selfPullMultiplier", 0.45D, 0.0D, 8.0D);
SCORPION_WHIP_REEL_COOLDOWN_TICKS = b.comment("Cooldown after reeling with the whip, in ticks.").defineInRange("reelCooldownTicks", 10, 0, 72000);
SCORPION_WHIP_SNAP_COOLDOWN_TICKS = b.comment("Cooldown after snapping the whip, in ticks.").defineInRange("snapCooldownTicks", 30, 0, 72000);
b.pop();
b.push("bloodCrystalKatana");
BLOOD_CRYSTAL_KATANA_ATTACK_DAMAGE = b.comment("Attack damage of the Blood Crystal Katana.").defineInRange("attackDamage", 7, 0, 1024);
BLOOD_CRYSTAL_KATANA_LAUNCH_STRENGTH = b.comment("Forward launch strength applied to the wielder when the katana hits.").defineInRange("launchStrength", 1.1D, 0.0D, 8.0D);
BLOOD_CRYSTAL_KATANA_TRAIL_DURATION_TICKS = b.comment("How long the crimson trail lingers after a katana hit, in ticks.").defineInRange("trailDurationTicks", 12, 0, 200);
b.pop();
// Nightmare Gear
b.push("nightmareArmor");
NIGHTMARE_HELMET_ARMOR_VALUE = b.comment("Armor points of the Nightmare Helmet. (Netherite default: 3)") .defineInRange("helmetArmor", 3, 0, 100);
NIGHTMARE_CHESTPLATE_ARMOR_VALUE = b.comment("Armor points of the Nightmare Chestplate. (Netherite default: 8)") .defineInRange("chestplateArmor", 8, 0, 100);
NIGHTMARE_LEGGINGS_ARMOR_VALUE = b.comment("Armor points of the Nightmare Leggings. (Netherite default: 6)") .defineInRange("leggingsArmor", 6, 0, 100);
NIGHTMARE_BOOTS_ARMOR_VALUE = b.comment("Armor points of the Nightmare Boots. (Netherite default: 3)") .defineInRange("bootsArmor", 3, 0, 100);
NIGHTMARE_HELMET_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Nightmare Helmet.") .defineInRange("helmetToughness", 3.0D, 0.0D, 100.0D);
NIGHTMARE_CHESTPLATE_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Nightmare Chestplate.") .defineInRange("chestplateToughness", 3.0D, 0.0D, 100.0D);
NIGHTMARE_LEGGINGS_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Nightmare Leggings.") .defineInRange("leggingsToughness", 3.0D, 0.0D, 100.0D);
NIGHTMARE_BOOTS_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Nightmare Boots.") .defineInRange("bootsToughness", 3.0D, 0.0D, 100.0D);
NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE = b.comment("Knockback resistance granted by each Nightmare Armor piece.") .defineInRange("knockbackResistance", 0.1D, 0.0D, 1.0D);
PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE = b.comment("Attack knockback added by each Primordial Armor piece.") .defineInRange("primordialArmorKnockbackPerPiece", 0.5D, 0.0D, 16.0D);
NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE = b.comment("Additional Dread aura range added by each Nightmare armor piece.").defineInRange("dreadAuraRangePerPiece", 2.0D, 0.0D, 64.0D);
b.pop();
b.push("nightmareSword");
NIGHTMARE_SWORD_BASE_DAMAGE = b
.comment(
"Base attack damage. Also the minimum damage at full health.",
"Formula: damage = baseDamage * (1 + missingHealthFraction * scalingFactor)"
)
.defineInRange("baseDamage", 15.0D, 0.0D, 1024.0D);
NIGHTMARE_SWORD_ATTACK_SPEED = b.comment("Attack speed of the Nightmare Sword.").defineInRange("attackSpeed", -2.4D, -10.0D, 10.0D);
NIGHTMARE_SWORD_SCALING_FACTOR = b
.comment(
"How much damage scales with missing health.",
"At 1.0 and 0 HP remaining: damage doubles. At full health: always baseDamage."
)
.defineInRange("scalingFactor", 1.5D, 0.0D, 100.0D);
b.pop();
b.push("fallenKingCrown");
FALLEN_KING_CROWN_ARMOR_VALUE = b.comment("Armor value of the Fallen King's Crown. Default: 2 (gold helmet).").defineInRange("armorValue", 2, 0, 100);
FALLEN_KING_CROWN_ARMOR_TOUGHNESS = b.comment("Armor toughness of the Fallen King's Crown. Default: 0.0 (gold helmet).").defineInRange("armorToughness", 0.0D, 0.0D, 100.0D);
b.pop();
// Blood Crystal Armor
b.push("bloodCrystalArmor");
BLOOD_CRYSTAL_ARMOR_SHIELD_RECHARGE_TICKS = b.comment("Ticks (20/s) for each armor Bloodglass Shield to recharge after shattering. Default: 600 (30s).").defineInRange("armorShieldRechargeTicks", 600, 1, 72000);
BLOOD_CRYSTAL_APPLE_SHIELD_COUNT = b.comment("Number of Bloodglass Shields granted by a Blood Crystal Apple (Bloodglass Ward level). Default: 2.").defineInRange("appleShieldCount", 2, 1, 8);
BLOOD_CRYSTAL_APPLE_DURATION_TICKS = b.comment("Duration in ticks of the Bloodglass Ward effect from a Blood Crystal Apple. Default: 2400 (120s).").defineInRange("appleDurationTicks", 2400, 1, 144000);
BLOOD_CRYSTAL_APPLE_SHIELD_RECHARGE_TICKS = b.comment("Ticks for each apple Bloodglass Shield to recharge while Bloodglass Ward is active. Default: 600 (30s).").defineInRange("appleShieldRechargeTicks", 600, 1, 72000);
BLOOD_CRYSTAL_HARD_MAX_SHIELDS = b.comment("Hard cap on total Bloodglass Shields from all sources combined. Default: 8.").defineInRange("hardMaxShields", 8, 1, 20);
BLOOD_CRYSTAL_HELMET_DEFENSE = b.comment("Armor defense value for Blood Crystal Helmet. Default: 2 (iron).").defineInRange("helmetDefense", 2, 0, 30);
BLOOD_CRYSTAL_CHESTPLATE_DEFENSE = b.comment("Armor defense value for Blood Crystal Chestplate. Default: 6 (iron).").defineInRange("chestplateDefense", 6, 0, 30);
BLOOD_CRYSTAL_LEGGINGS_DEFENSE = b.comment("Armor defense value for Blood Crystal Leggings. Default: 5 (iron).").defineInRange("leggingsDefense", 5, 0, 30);
BLOOD_CRYSTAL_BOOTS_DEFENSE = b.comment("Armor defense value for Blood Crystal Boots. Default: 2 (iron).").defineInRange("bootsDefense", 2, 0, 30);
BLOOD_CRYSTAL_ARMOR_TOUGHNESS = b.comment("Armor toughness for all Blood Crystal armor pieces. Default: 0.0 (iron).").defineInRange("armorToughness", 0.0, 0.0, 20.0);
BLOOD_CRYSTAL_HELMET_DURABILITY = b.comment("Max durability of Blood Crystal Helmet. Default: 77 (gold).").defineInRange("helmetDurability", 77, 1, 2000);
BLOOD_CRYSTAL_CHESTPLATE_DURABILITY = b.comment("Max durability of Blood Crystal Chestplate. Default: 112 (gold).").defineInRange("chestplateDurability", 112, 1, 2000);
BLOOD_CRYSTAL_LEGGINGS_DURABILITY = b.comment("Max durability of Blood Crystal Leggings. Default: 105 (gold).").defineInRange("leggingsDurability", 105, 1, 2000);
BLOOD_CRYSTAL_BOOTS_DURABILITY = b.comment("Max durability of Blood Crystal Boots. Default: 91 (gold).").defineInRange("bootsDurability", 91, 1, 2000);
b.pop();
// Squidzooka
b.push("squidzooka");
SQUIDZOOKA_COOLDOWN_SECONDS = b.comment("Cooldown in seconds after firing. Set to 0 to disable.").defineInRange("cooldownSeconds", 1.0D, 0.0D, 3600.0D);
SQUIDZOOKA_LAUNCH_VELOCITY = b.comment("Initial launch velocity applied to the Missile Squid.") .defineInRange("launchVelocity", 2.1D, 0.1D, 20.0D);
b.pop();
b.push("rpoLauncher");
RPO_LAUNCHER_COOLDOWN_SECONDS = b.comment("Cooldown in seconds after firing. Set to 0 to disable.").defineInRange("cooldownSeconds", 1.0D, 0.0D, 3600.0D);
RPO_LAUNCHER_LAUNCH_VELOCITY = b.comment("Initial launch velocity applied to the Octopus Bomb.") .defineInRange("launchVelocity", 2.1D, 0.1D, 20.0D);
RPO_LAUNCHER_EXPLOSION_DAMAGE = b.comment("Max damage dealt at the center of the ink explosion.") .defineInRange("explosionDamage", 14.0D, 0.0D, 4096.0D);
RPO_LAUNCHER_EXPLOSION_RADIUS = b.comment("Radius in blocks of the ink explosion.") .defineInRange("explosionRadius", 4.0D, 0.5D, 32.0D);
b.pop();
// Size Rays
b.push("sizeRays");
SIZE_CHANGING_RAYS_ENABLED = b
.comment(
"If false, shrink and grow rays cannot be fired by players or dispensers.",
"Immune entities tag: data/antarchy/tags/entity_types/size_changing_immune.json"
)
.define("enabled", true);
SIZE_RAY_COOLDOWN_SECONDS = b.comment("Cooldown in seconds after firing. Set to 0 to disable.") .defineInRange("cooldownSeconds", 1.0D, 0.0D, 3600.0D);
SIZE_RAY_MIN_SCALE = b.comment("Minimum entity scale the shrink ray can reach. 1.0 is normal size.") .defineInRange("minScale", 0.1D, 0.01D, 64.0D);
SIZE_RAY_MAX_SCALE = b.comment("Maximum entity scale the growth ray can reach. 1.0 is normal size.") .defineInRange("maxScale", 5.0D, 0.01D, 64.0D);
SIZE_RAY_DELTA_PER_HIT = b.comment("Scale delta per projectile hit. 0.25 changes scale by 25% of normal per hit.") .defineInRange("deltaPerHit", 0.25D, 0.001D, 64.0D);
SHRINKING_POTION_DELTA = b.comment("Scale delta per level of Shrinking Potion. Level II applies double this value.") .defineInRange("shrinkingPotionDelta", 0.3D, 0.001D, 64.0D);
GROWTH_POTION_DELTA = b.comment("Scale delta per level of Growth Potion. Level II applies double this value.") .defineInRange("growthPotionDelta", 0.5D, 0.001D, 64.0D);
b.pop();
// Gravity
b.push("gravity");
INVERT_PROJECTILES_FROM_INVERTED_PLAYERS = b
.comment(
"If true, projectiles fired by inverted players keep their inverted launch and gravity.",
"Affects bows, crossbows, throwables, and firework boosts."
)
.define("invertProjectilesFromInvertedPlayers", false);
b.pop();
// Gravity Gun
b.push("gravityGun");
GRAVITY_GUN_ENABLED = b.comment("Master toggle for the Gravity Gun.") .define("enabled", true);
GRAVITY_GUN_BLOCKS_ENABLED = b.comment("If false, the Gravity Gun cannot grab blocks.") .define("blocksEnabled", true);
GRAVITY_GUN_ENTITIES_ENABLED = b.comment("If false, the Gravity Gun cannot grab entities.") .define("entitiesEnabled", true);
GRAVITY_GUN_RANGE = b.comment("Search range for a target in blocks.") .defineInRange("range", 16.0D, 1.0D, 64.0D);
GRAVITY_GUN_THROW_STRENGTH = b.comment("Velocity multiplier when throwing a held target.") .defineInRange("throwStrength", 1.8D, 0.1D, 10.0D);
GRAVITY_GUN_BLAST_STRENGTH = b.comment("Velocity multiplier for the push blast.") .defineInRange("blastStrength", 1.4D, 0.1D, 10.0D);
GRAVITY_GUN_COOLDOWN_SECONDS = b.comment("Cooldown in seconds after any Gravity Gun action.") .defineInRange("cooldownSeconds", 0.35D, 0.0D, 10.0D);
GRAVITY_GUN_MAX_HOLD_DISTANCE = b.comment("Maximum distance a held target can be pushed from the player, in blocks.") .defineInRange("maxHoldDistance", 10.0D, 1.5D, 64.0D);
b.pop();
// Critter Cage
b.push("critterCage");
CRITTER_CAGE_MAX_CAPTURABLE_WIDTH = b.comment("Maximum capturable entity width/depth based on the live hitbox, in blocks.").defineInRange("maxCapturableWidth", 1.65D, 0.1D, 64.0D);
CRITTER_CAGE_MAX_CAPTURABLE_HEIGHT = b.comment("Maximum capturable entity height based on the live hitbox, in blocks.").defineInRange("maxCapturableHeight", 1.65D, 0.1D, 64.0D);
b.pop();
// Miner's Dream
b.push("minersDream");
MINERS_DREAM_ENABLED = b.comment("Master toggle. If false, the item remains craftable but cannot be used.").define("enabled", true);
MINERS_DREAM_MINIMUM_RANGE = b.comment("Minimum cave length in blocks. Clamped to [8, 256].") .defineInRange("minimumRange", 48, 8, 256);
MINERS_DREAM_MAXIMUM_RANGE = b.comment("Maximum cave length in blocks. Clamped to [8, 256].") .defineInRange("maximumRange", 96, 8, 256);
MINERS_DREAM_TORCH_SPACING = b.comment("Approximate blocks between torch placements along the cave.") .defineInRange("torchSpacing", 10, 4, 64);
MINERS_DREAM_BLOCKS_PER_TICK = b.comment("Maximum blocks removed per server tick while excavating.") .defineInRange("blocksPerTick", 150, 1, 2000);
b.pop();
// Miscellaneous items / consumables
b.push("ductTape");
DUCT_TAPE_REPAIR_PERCENT_PER_USE = b
.comment("Fraction of max durability repaired per use. 0.25 = 25% per application.")
.defineInRange("repairPercentPerUse", 0.25D, 0.0D, 1.0D);
b.pop();
b.push("potentNyxite");
POTENT_NYXITE_INVERTED_DURATION_SECONDS = b
.comment("How long the Inverted effect from Potent Nyxite eruptions lasts, in seconds.")
.defineInRange("invertedDurationSeconds", 60.0D, 0.0D, 3600.0D);
b.pop();
b.push("corneaEar");
CORNEA_EAR_NIGHT_VISION_SECONDS = b
.comment("How long Cornea Ear grants Night Vision after being eaten, in seconds.")
.defineInRange("nightVisionSeconds", 15, 0, 600);
b.pop();
b.push("american");
AMERICAN_ENABLED = b.comment("If false, foods cannot be Americanized with High Fructose Corn Syrup.").define("enabled", true);
AMERICAN_BONUS_NUTRITION = b.comment("Extra hunger points restored when eating an Americanized food.").defineInRange("bonusNutrition", 2, 0, 100);
AMERICAN_BONUS_SATURATION = b.comment("Extra saturation restored when eating an Americanized food.").defineInRange("bonusSaturation", 1.0D, 0.0D, 100.0D);
AMERICAN_REGENERATION_DURATION_TICKS = b.comment("Duration of the Regeneration effect granted when eating an Americanized food, in ticks.").defineInRange("regenerationDurationTicks", 60, 0, 72000);
AMERICAN_REGENERATION_AMPLIFIER = b.comment("Amplifier of the Regeneration effect granted when eating an Americanized food (0 = I).").defineInRange("regenerationAmplifier", 0, 0, 10);
b.pop();
b.push("moggles");
MOGGLES_VISION_RADIUS = b.comment("Radius used by Moggles cave detection.").defineInRange("visionRadius", 20.0D, 1.0D, 128.0D);
MOGGLES_VISION_MAX_LIGHT = b.comment("Maximum block light level counted as dark enough for Moggles.").defineInRange("visionMaxLight", 7, 0, 15);
MOGGLES_VISION_ALPHA = b.comment("Overlay alpha used by Moggles vision rendering.").defineInRange("visionAlpha", 0.65D, 0.0D, 1.0D);
b.pop();
SPEC = b.build();
}
private AntarchyToolsConfig() {}
static double basiliskDaggerAttackDamage() { return BASILISK_DAGGER_ATTACK_DAMAGE.get(); }
static double basiliskDaggerAttackSpeed() { return BASILISK_DAGGER_ATTACK_SPEED.get(); }
static int basiliskDaggerPoisonDurationTicks() { return BASILISK_DAGGER_POISON_DURATION_TICKS.get(); }
static int basiliskDaggerPoisonAmplifier() { return BASILISK_DAGGER_POISON_AMPLIFIER.get(); }
static double ultimateSwordAttackDamage() { return ULTIMATE_SWORD_ATTACK_DAMAGE.get(); }
static double ultimateSwordAttackSpeed() { return ULTIMATE_SWORD_ATTACK_SPEED.get(); }
static double ultimatePickaxeAttackDamage() { return ULTIMATE_PICKAXE_ATTACK_DAMAGE.get(); }
static double ultimatePickaxeAttackSpeed() { return ULTIMATE_PICKAXE_ATTACK_SPEED.get(); }
static double ultimateAxeAttackDamage() { return ULTIMATE_AXE_ATTACK_DAMAGE.get(); }
static double ultimateAxeAttackSpeed() { return ULTIMATE_AXE_ATTACK_SPEED.get(); }
static double ultimateShovelAttackDamage() { return ULTIMATE_SHOVEL_ATTACK_DAMAGE.get(); }
static double ultimateShovelAttackSpeed() { return ULTIMATE_SHOVEL_ATTACK_SPEED.get(); }
static double ultimateHoeAttackDamage() { return ULTIMATE_HOE_ATTACK_DAMAGE.get(); }
static double ultimateHoeAttackSpeed() { return ULTIMATE_HOE_ATTACK_SPEED.get(); }
static int ultimateToolEnchantability() { return ULTIMATE_TOOL_ENCHANTABILITY.get(); }
static boolean ultimateToolsThreeByThreeEnabled() { return ULTIMATE_TOOLS_THREE_BY_THREE_ENABLED.get(); }
static double ultimateBowAttackDamage() { return ULTIMATE_BOW_ATTACK_DAMAGE.get(); }
static double ultimateBowPlayerHeal() { return ULTIMATE_BOW_PLAYER_HEAL.get(); }
static double ultimateBowDrawSpeedMultiplier() { return ULTIMATE_BOW_DRAW_SPEED_MULTIPLIER.get(); }
static boolean ultimateBowComesEnchantedWithFlame() { return ULTIMATE_BOW_COMES_ENCHANTED_WITH_FLAME.get(); }
static int ultimateBowEnchantability() { return ULTIMATE_BOW_ENCHANTABILITY.get(); }
static double ultimateCrossbowAttackDamage() { return ULTIMATE_CROSSBOW_ATTACK_DAMAGE.get(); }
static double ultimateCrossbowChargeSpeedMultiplier() { return ULTIMATE_CROSSBOW_CHARGE_SPEED_MULTIPLIER.get(); }
static int ultimateCrossbowEnchantability() { return ULTIMATE_CROSSBOW_ENCHANTABILITY.get(); }
static double ultimateMaceDamageMultiplier() { return ULTIMATE_MACE_DAMAGE_MULTIPLIER.get(); }
static double ultimateMaceAttackSpeed() { return ULTIMATE_MACE_ATTACK_SPEED.get(); }
static int ultimateMaceEnchantability() { return ULTIMATE_MACE_ENCHANTABILITY.get(); }
static boolean ultimateArmorComesEnchanted() { return ULTIMATE_ARMOR_COMES_ENCHANTED.get(); }
static int ultimateArmorEnchantability() { return ULTIMATE_ARMOR_ENCHANTABILITY.get(); }
static int ultimateHelmetArmorValue() { return ULTIMATE_HELMET_ARMOR_VALUE.get(); }
static int ultimateChestplateArmorValue() { return ULTIMATE_CHESTPLATE_ARMOR_VALUE.get(); }
static int ultimateLeggingsArmorValue() { return ULTIMATE_LEGGINGS_ARMOR_VALUE.get(); }
static int ultimateBootsArmorValue() { return ULTIMATE_BOOTS_ARMOR_VALUE.get(); }
static double ultimateHelmetArmorToughness() { return ULTIMATE_HELMET_ARMOR_TOUGHNESS.get(); }
static double ultimateChestplateArmorToughness() { return ULTIMATE_CHESTPLATE_ARMOR_TOUGHNESS.get(); }
static double ultimateLeggingsArmorToughness() { return ULTIMATE_LEGGINGS_ARMOR_TOUGHNESS.get(); }
static double ultimateBootsArmorToughness() { return ULTIMATE_BOOTS_ARMOR_TOUGHNESS.get(); }
static double ultimateArmorKnockbackResistance() { return ULTIMATE_ARMOR_KNOCKBACK_RESISTANCE.get(); }
static double battleAxeAttackDamage() { return BATTLE_AXE_ATTACK_DAMAGE.get(); }
static double battleAxeAttackSpeed() { return BATTLE_AXE_ATTACK_SPEED.get(); }
static double bigBerthaAttackDamage() { return BIG_BERTHA_ATTACK_DAMAGE.get(); }
static double bigBerthaReachBonus() { return BIG_BERTHA_REACH_BONUS.get(); }
static double bigBerthaAttackSpeed() { return BIG_BERTHA_ATTACK_SPEED.get(); }
static double attitudeAdjusterBaseDamage() { return ATTITUDE_ADJUSTER_BASE_DAMAGE.get(); }
static boolean attitudeAdjusterBreaksBlocks() { return ATTITUDE_ADJUSTER_BREAKS_BLOCKS.get(); }
static int bigBerthaBasiliskParalyzeDurationTicks() { return BIG_BERTHA_BASILISK_PARALYZE_DURATION_TICKS.get(); }
static int bigBerthaKrakenSlowTicks() { return BIG_BERTHA_KRAKEN_SLOW_TICKS.get(); }
static double bigBerthaBasiliskCooldownSeconds() { return BIG_BERTHA_BASILISK_COOLDOWN_SECONDS.get(); }
static double bigBerthaLucidInvertedDurationSeconds() { return BIG_BERTHA_LUCID_INVERTED_DURATION_SECONDS.get(); }
static double bigBerthaLucidInvertedDamageBonusPercent(){ return BIG_BERTHA_LUCID_INVERTED_DAMAGE_BONUS_PERCENT.get(); }
static double krakensGraspAttackDamage() { return KRAKENS_GRASP_ATTACK_DAMAGE.get(); }
static double krakensGraspAttackSpeed() { return KRAKENS_GRASP_ATTACK_SPEED.get(); }
static double krakensGraspThrownDamage() { return KRAKENS_GRASP_THROWN_DAMAGE.get(); }
static double krakensGraspLightningDamage() { return KRAKENS_GRASP_LIGHTNING_DAMAGE.get(); }
static boolean krakensGraspInnateLoyalty() { return KRAKENS_GRASP_INNATE_LOYALTY.get(); }
static int krakensGraspInnateLoyaltyLevel() { return KRAKENS_GRASP_INNATE_LOYALTY_LEVEL.get(); }
static int krakensGraspTentacleDurationTicks() { return KRAKENS_GRASP_TENTACLE_DURATION_TICKS.get(); }
static double krakensGraspTentacleDamage() { return KRAKENS_GRASP_TENTACLE_DAMAGE.get(); }
static double krakensGraspTentacleRadius() { return KRAKENS_GRASP_TENTACLE_RADIUS.get(); }
static int krakensGraspTentacleDamageIntervalTicks() { return KRAKENS_GRASP_TENTACLE_DAMAGE_INTERVAL_TICKS.get(); }
static double scorpionWhipBaseDamage() { return SCORPION_WHIP_BASE_DAMAGE.get(); }
static double scorpionWhipReachBonus() { return SCORPION_WHIP_REACH_BONUS.get(); }
static int scorpionWhipPoisonDurationTicks() { return SCORPION_WHIP_POISON_DURATION_TICKS.get(); }
static double scorpionWhipTetherMaxRange() { return SCORPION_WHIP_TETHER_MAX_RANGE.get(); }
static double scorpionWhipSnapBonusDamage() { return SCORPION_WHIP_SNAP_BONUS_DAMAGE.get(); }
static double scorpionWhipPullStrength() { return SCORPION_WHIP_PULL_STRENGTH.get(); }
static double scorpionWhipHeavyPullMultiplier() { return SCORPION_WHIP_HEAVY_PULL_MULTIPLIER.get(); }
static double scorpionWhipSelfPullMultiplier() { return SCORPION_WHIP_SELF_PULL_MULTIPLIER.get(); }
static int scorpionWhipReelCooldownTicks() { return SCORPION_WHIP_REEL_COOLDOWN_TICKS.get(); }
static int scorpionWhipSnapCooldownTicks() { return SCORPION_WHIP_SNAP_COOLDOWN_TICKS.get(); }
static int bloodCrystalKatanaAttackDamage() { return BLOOD_CRYSTAL_KATANA_ATTACK_DAMAGE.get(); }
static double bloodCrystalKatanaLaunchStrength() { return BLOOD_CRYSTAL_KATANA_LAUNCH_STRENGTH.get(); }
static int bloodCrystalKatanaTrailDurationTicks() { return BLOOD_CRYSTAL_KATANA_TRAIL_DURATION_TICKS.get(); }
static int nightmareHelmetArmorValue() { return NIGHTMARE_HELMET_ARMOR_VALUE.get(); }
static int nightmareChestplateArmorValue() { return NIGHTMARE_CHESTPLATE_ARMOR_VALUE.get(); }
static int nightmareLeggingsArmorValue() { return NIGHTMARE_LEGGINGS_ARMOR_VALUE.get(); }
static int nightmareBootsArmorValue() { return NIGHTMARE_BOOTS_ARMOR_VALUE.get(); }
static double nightmareHelmetArmorToughness() { return NIGHTMARE_HELMET_ARMOR_TOUGHNESS.get(); }
static double nightmareChestplateArmorToughness() { return NIGHTMARE_CHESTPLATE_ARMOR_TOUGHNESS.get(); }
static double nightmareLeggingsArmorToughness() { return NIGHTMARE_LEGGINGS_ARMOR_TOUGHNESS.get(); }
static double nightmareBootsArmorToughness() { return NIGHTMARE_BOOTS_ARMOR_TOUGHNESS.get(); }
static double nightmareArmorKnockbackResistance() { return NIGHTMARE_ARMOR_KNOCKBACK_RESISTANCE.get(); }
static double primordialArmorKnockbackPerPiece() { return PRIMORDIAL_ARMOR_KNOCKBACK_PER_PIECE.get(); }
static double nightmareArmorDreadAuraRangePerPiece() { return NIGHTMARE_ARMOR_DREAD_AURA_RANGE_PER_PIECE.get(); }
static double nightmareSwordBaseDamage() { return NIGHTMARE_SWORD_BASE_DAMAGE.get(); }
static double nightmareSwordAttackSpeed() { return NIGHTMARE_SWORD_ATTACK_SPEED.get(); }
static double nightmareSwordScalingFactor() { return NIGHTMARE_SWORD_SCALING_FACTOR.get(); }
static int fallenKingCrownArmorValue() { return FALLEN_KING_CROWN_ARMOR_VALUE.get(); }
static double fallenKingCrownArmorToughness() { return FALLEN_KING_CROWN_ARMOR_TOUGHNESS.get(); }
static int bloodCrystalArmorShieldRechargeTicks() { return BLOOD_CRYSTAL_ARMOR_SHIELD_RECHARGE_TICKS.get(); }
static int bloodCrystalAppleShieldCount() { return BLOOD_CRYSTAL_APPLE_SHIELD_COUNT.get(); }
static int bloodCrystalAppleDurationTicks() { return BLOOD_CRYSTAL_APPLE_DURATION_TICKS.get(); }
static int bloodCrystalAppleShieldRechargeTicks() { return BLOOD_CRYSTAL_APPLE_SHIELD_RECHARGE_TICKS.get(); }
static int bloodCrystalHardMaxShields() { return BLOOD_CRYSTAL_HARD_MAX_SHIELDS.get(); }
static int bloodCrystalHelmetDefense() { return BLOOD_CRYSTAL_HELMET_DEFENSE.get(); }
static int bloodCrystalChestplateDefense() { return BLOOD_CRYSTAL_CHESTPLATE_DEFENSE.get(); }
static int bloodCrystalLeggingsDefense() { return BLOOD_CRYSTAL_LEGGINGS_DEFENSE.get(); }
static int bloodCrystalBootsDefense() { return BLOOD_CRYSTAL_BOOTS_DEFENSE.get(); }
static double bloodCrystalArmorToughness() { return BLOOD_CRYSTAL_ARMOR_TOUGHNESS.get(); }
static int bloodCrystalHelmetDurability() { return BLOOD_CRYSTAL_HELMET_DURABILITY.get(); }
static int bloodCrystalChestplateDurability() { return BLOOD_CRYSTAL_CHESTPLATE_DURABILITY.get(); }
static int bloodCrystalLeggingsDurability() { return BLOOD_CRYSTAL_LEGGINGS_DURABILITY.get(); }
static int bloodCrystalBootsDurability() { return BLOOD_CRYSTAL_BOOTS_DURABILITY.get(); }
static double squidzookaCooldownSeconds() { return SQUIDZOOKA_COOLDOWN_SECONDS.get(); }
static double squidzookaLaunchVelocity() { return SQUIDZOOKA_LAUNCH_VELOCITY.get(); }
static double rpoLauncherCooldownSeconds() { return RPO_LAUNCHER_COOLDOWN_SECONDS.get(); }
static double rpoLauncherLaunchVelocity() { return RPO_LAUNCHER_LAUNCH_VELOCITY.get(); }
static double rpoLauncherExplosionDamage() { return RPO_LAUNCHER_EXPLOSION_DAMAGE.get(); }
static double rpoLauncherExplosionRadius() { return RPO_LAUNCHER_EXPLOSION_RADIUS.get(); }
static boolean sizeChangingRaysEnabled() { return SIZE_CHANGING_RAYS_ENABLED.get(); }
static double sizeRayCooldownSeconds() { return SIZE_RAY_COOLDOWN_SECONDS.get(); }
static double sizeRayMinScale() { return SIZE_RAY_MIN_SCALE.get(); }
static double sizeRayMaxScale() { return SIZE_RAY_MAX_SCALE.get(); }
static double sizeRayDeltaPerHit() { return SIZE_RAY_DELTA_PER_HIT.get(); }
static double shrinkingPotionDelta() { return SHRINKING_POTION_DELTA.get(); }
static double growthPotionDelta() { return GROWTH_POTION_DELTA.get(); }
static boolean invertProjectilesFromInvertedPlayers() { return INVERT_PROJECTILES_FROM_INVERTED_PLAYERS.get(); }
static boolean gravityGunEnabled() { return GRAVITY_GUN_ENABLED.get(); }
static boolean gravityGunBlocksEnabled() { return GRAVITY_GUN_BLOCKS_ENABLED.get(); }
static boolean gravityGunEntitiesEnabled() { return GRAVITY_GUN_ENTITIES_ENABLED.get(); }
static double gravityGunRange() { return GRAVITY_GUN_RANGE.get(); }
static double gravityGunThrowStrength() { return GRAVITY_GUN_THROW_STRENGTH.get(); }
static double gravityGunBlastStrength() { return GRAVITY_GUN_BLAST_STRENGTH.get(); }
static double gravityGunCooldownSeconds() { return GRAVITY_GUN_COOLDOWN_SECONDS.get(); }
static double gravityGunMaxHoldDistance() { return GRAVITY_GUN_MAX_HOLD_DISTANCE.get(); }
static double critterCageMaxCapturableWidth() { return CRITTER_CAGE_MAX_CAPTURABLE_WIDTH.get(); }
static double critterCageMaxCapturableHeight() { return CRITTER_CAGE_MAX_CAPTURABLE_HEIGHT.get(); }
static boolean minersDreamEnabled() { return MINERS_DREAM_ENABLED.get(); }
static int minersDreamMinimumRange() { return MINERS_DREAM_MINIMUM_RANGE.get(); }
static int minersDreamMaximumRange() { return MINERS_DREAM_MAXIMUM_RANGE.get(); }
static int minersDreamTorchSpacing() { return MINERS_DREAM_TORCH_SPACING.get(); }
static int minersDreamBlocksPerTick() { return MINERS_DREAM_BLOCKS_PER_TICK.get(); }
static double ductTapeRepairPercentPerUse() { return DUCT_TAPE_REPAIR_PERCENT_PER_USE.get(); }
static double potentNyxiteInvertedDurationSeconds() { return POTENT_NYXITE_INVERTED_DURATION_SECONDS.get(); }
static int corneaEarNightVisionSeconds() { return CORNEA_EAR_NIGHT_VISION_SECONDS.get(); }
static boolean americanizingEnabled() { return AMERICAN_ENABLED.get(); }
static int americanBonusNutrition() { return AMERICAN_BONUS_NUTRITION.get(); }
static double americanBonusSaturation() { return AMERICAN_BONUS_SATURATION.get(); }
static int americanRegenerationDurationTicks() { return AMERICAN_REGENERATION_DURATION_TICKS.get(); }
static int americanRegenerationAmplifier() { return AMERICAN_REGENERATION_AMPLIFIER.get(); }
static double mogglesVisionRadius() { return MOGGLES_VISION_RADIUS.get(); }
static int mogglesVisionMaxLight() { return MOGGLES_VISION_MAX_LIGHT.get(); }
static double mogglesVisionAlpha() { return MOGGLES_VISION_ALPHA.get(); }
}
@@ -0,0 +1,17 @@
package com.craisinlord.antarchy.forge;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.block.state.properties.WoodType;
public final class AntarchyWoodTypes {
public static final WoodType OURANWOOD = register("ouranwood");
public static final WoodType PEACH = register("peach");
private AntarchyWoodTypes() {
}
private static WoodType register(String name) {
return WoodType.register(new WoodType(Antarchy.MODID + ":" + name, BlockSetType.JUNGLE));
}
}
@@ -0,0 +1,37 @@
package com.craisinlord.antarchy.forge;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.compat.infinity.InfinityCompatBridge;
import net.lerariemann.infinity.util.InfinityMethods;
import net.lerariemann.infinity.util.teleport.WarpLogic;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.RandomSource;
public final class ForgeInfinityCompat implements InfinityCompatBridge {
@Override
public boolean isAvailable() {
return true;
}
@Override
public ResourceLocation getRandomDimensionId(RandomSource random) {
try {
return InfinityMethods.getRandomId(random);
} catch (Throwable throwable) {
Antarchy.LOGGER.error("[Antarchy] Failed to get a random Infinity dimension id", throwable);
return null;
}
}
@Override
public boolean requestWarp(ServerPlayer player, ResourceLocation dimensionId) {
try {
WarpLogic.requestWarp(player, dimensionId, false);
return true;
} catch (Throwable throwable) {
Antarchy.LOGGER.error("[Antarchy] Failed to request an Infinity warp to {}", dimensionId, throwable);
return false;
}
}
}
@@ -0,0 +1,489 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.GoopedHudRenderer;
import com.craisinlord.antarchy.content.client.HordeHudRenderer;
import com.craisinlord.antarchy.content.client.hud.BloodglassHudRenderer;
import com.craisinlord.antarchy.content.client.particle.*;
import com.craisinlord.antarchy.content.client.renderer.*;
import com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer;
import com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer;
import com.craisinlord.antarchy.forge.AntarchyForgeFluidTypes;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeEntites;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeItems;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import com.mojang.blaze3d.shaders.FogShape;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.model.BoatModel;
import net.minecraft.client.model.ArmorStandModel;
import net.minecraft.client.model.ChestBoatModel;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.entity.ThrownItemRenderer;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import software.bernie.geckolib.renderer.GeoEntityRenderer;
import net.minecraft.client.Camera;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.BiomeColors;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.CampfireRenderer;
import net.minecraft.client.renderer.entity.ArmorStandRenderer;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.item.ItemProperties;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.item.CrossbowItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.FoliageColor;
import net.minecraft.world.level.material.FluidState;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.client.event.RegisterParticleProvidersEvent;
import net.minecraftforge.client.event.RegisterColorHandlersEvent;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.client.event.RegisterGuiOverlaysEvent;
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
import net.minecraftforge.client.model.DynamicFluidContainerModel;
import org.joml.Vector3f;
import software.bernie.geckolib.core.animatable.GeoAnimatable;
import com.craisinlord.antarchy.content.client.AntarchyGeoItem;
import com.craisinlord.antarchy.content.client.AntarchyGeoItemRenderer;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public final class AntarchyForgeClient {
private static final ResourceLocation DR_TRAYAURUS_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/dr_trayaurus.png");
private static final ResourceLocation OURANWOOD_BOAT_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/boat/ouranwood.png");
private static final ResourceLocation OURANWOOD_CHEST_BOAT_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/chest_boat/ouranwood.png");
private static final ResourceLocation PEACH_BOAT_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/boat/peach.png");
private static final ResourceLocation PEACH_CHEST_BOAT_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/entity/chest_boat/peach.png");
private static final ResourceLocation WATER_STILL = ResourceLocation.withDefaultNamespace("block/water_still");
private static final ResourceLocation WATER_FLOW = ResourceLocation.withDefaultNamespace("block/water_flow");
private static final ResourceLocation WATER_OVERLAY = ResourceLocation.withDefaultNamespace("block/water_overlay");
private static final ResourceLocation UNDERWATER_OVERLAY = ResourceLocation.withDefaultNamespace("textures/misc/underwater.png");
private static final ResourceLocation ANTIWATER_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_still");
private static final ResourceLocation ANTIWATER_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_flow");
private static final ResourceLocation BILE_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_still");
private static final ResourceLocation BILE_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_flowing");
private AntarchyForgeClient() {
}
@SubscribeEvent
public static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) {
event.registerBlockEntityRenderer(AntarchyForgeBlocks.DREAM_CAMPFIRE_BLOCK_ENTITY.get(), CampfireRenderer::new);
event.registerBlockEntityRenderer(AntarchyForgeBlocks.SEASHELL_BLOCK_ENTITY.get(), SeashellRenderer::new);
event.registerBlockEntityRenderer(AntarchyForgeBlocks.CRITTER_CAGE_BLOCK_ENTITY.get(), CritterCageRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.EASTER_BUNNY.get(), context -> withParalyzedGeoLayer(new EasterBunnyRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.FLYING_SQUIRREL.get(), context -> withParalyzedGeoLayer(new FlyingSquirrelRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.CATERPILLAR.get(), context -> withParalyzedGeoLayer(new CaterpillarRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BUTTERFLY.get(), context -> withParalyzedGeoLayer(new ButterflyRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.REVERIE.get(), context -> withParalyzedGeoLayer(new ReverieRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BRUTALFLY.get(), context -> withParalyzedGeoLayer(new BrutalflyRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.RED_ANT.get(), context -> withParalyzedGeoLayer(new AntRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BROWN_ANT.get(), context -> withParalyzedGeoLayer(new AntRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.RAINBOW_ANT.get(), context -> withParalyzedGeoLayer(new AntRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.MOLEWORM.get(), context -> withParalyzedGeoLayer(new MolewormRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.MANTIS.get(), context -> withParalyzedGeoLayer(new MantisRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.ALPHA_MANTIS.get(), context -> withParalyzedGeoLayer(new AlphaMantisRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.MOLEVORE.get(), context -> withParalyzedGeoLayer(new MolevoreRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.TRIFFID.get(), context -> withParalyzedGeoLayer(new TriffidRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.OURANWOOD_BOAT_ENTITY.get(), context -> new OuranwoodBoatRenderer<>(context, OURANWOOD_BOAT_TEXTURE, false));
event.registerEntityRenderer(AntarchyForgeEntites.OURANWOOD_CHEST_BOAT_ENTITY.get(), context -> new OuranwoodBoatRenderer<>(context, OURANWOOD_CHEST_BOAT_TEXTURE, true));
event.registerEntityRenderer(AntarchyForgeEntites.PEACH_BOAT_ENTITY.get(), context -> new PeachBoatRenderer<>(context, PEACH_BOAT_TEXTURE, false));
event.registerEntityRenderer(AntarchyForgeEntites.PEACH_CHEST_BOAT_ENTITY.get(), context -> new PeachBoatRenderer<>(context, PEACH_CHEST_BOAT_TEXTURE, true));
event.registerEntityRenderer(AntarchyForgeEntites.APPLE_COW.get(), context -> withParalyzedGeoLayer(new AppleCowRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.GOLDEN_APPLE_COW.get(), context -> withParalyzedGeoLayer(new AppleCowRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.ENCHANTED_GOLDEN_APPLE_COW.get(), context -> withParalyzedGeoLayer(new AppleCowRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.DIAMOND_MINECART.get(), DiamondMinecartRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.DR_TRAYAURUS.get(), context -> new DrTrayaurusRenderer(context, DR_TRAYAURUS_TEXTURE));
event.registerEntityRenderer(AntarchyForgeEntites.CLOUD_SHARK.get(), context -> withParalyzedGeoLayer(new CloudSharkRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.KRAKEN.get(), context -> withParalyzedGeoLayer(new KrakenRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.TENTACLE.get(), com.craisinlord.antarchy.content.client.renderer.TentacleRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.KRAKENS_GRASP_TRIDENT.get(), com.craisinlord.antarchy.content.client.renderer.KrakensGraspThrownTridentRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.MISSILE_SQUID.get(), context -> withParalyzedGeoLayer(new MissileSquidRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.OCTOPUS_BOMB.get(), context -> withParalyzedGeoLayer(new OctopusBombRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.NIGHTMARE.get(), context -> withParalyzedGeoLayer(new NightmareRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.LUCID.get(), context -> withParalyzedGeoLayer(new LucidRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BED_BUG.get(), context -> withParalyzedGeoLayer(new BedBugRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.WASP.get(), context -> withParalyzedGeoLayer(new WaspRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BOMBER.get(), context -> withParalyzedGeoLayer(new BomberRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.BASILISK.get(), context -> withParalyzedGeoLayer(new BasiliskRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.SHRINK_RAY_PROJECTILE.get(), SizeRayProjectileRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.GROWTH_RAY_PROJECTILE.get(), SizeRayProjectileRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.LUCID_BOLT.get(), LucidBoltRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.LUCID_PEARL_PROJECTILE.get(), ThrownItemRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.CRITTER_CAGE_PROJECTILE.get(), ThrownItemRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.HUSH_PROJECTILE.get(), HushProjectileRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.BRUTALFLY_ORB.get(), BrutalflyOrbRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.UPWARD_FALLING_BLOCK.get(), com.craisinlord.antarchy.content.client.renderer.UpwardFallingBlockRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.SCORPION.get(), context -> withParalyzedGeoLayer(new ScorpionRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.EMPEROR_SCORPION.get(), context -> withParalyzedGeoLayer(new EmperorScorpionRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.TORETERROR.get(), ToreterrorRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.WATER_BOMB.get(), WaterBombRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.CHEEP.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CheepRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.DORRIE.get(), context -> new com.craisinlord.antarchy.content.client.renderer.DorrieRenderer(context));
event.registerEntityRenderer(AntarchyForgeEntites.OURANWOOD_DEER.get(), context -> new com.craisinlord.antarchy.content.client.renderer.OuranwoodDeerRenderer(context));
event.registerEntityRenderer(AntarchyForgeEntites.GLIMMER.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.glimmer.GlimmerRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.ELKA.get(), context -> new com.craisinlord.antarchy.content.client.renderer.ElkaRenderer(context));
event.registerEntityRenderer(AntarchyForgeEntites.ROLLY_POLLY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.RollyPollyRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.TERMITE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.TermiteRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.CREEPING_HORROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.CreepingHorrorRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.LURKING_TERROR.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.LurkingTerrorRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.HERCULES_BEETLE.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.HerculesBeetleRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.JERRY.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JerryRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.JUMPY_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.JumpyBugRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.SPIT_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.SpitBugRenderer(context)));
event.registerEntityRenderer(AntarchyForgeEntites.SPIT_BUG_PROJECTILE.get(), com.craisinlord.antarchy.content.client.renderer.SpitBugProjectileRenderer::new);
event.registerEntityRenderer(AntarchyForgeEntites.STINK_BUG.get(), context -> withParalyzedGeoLayer(new com.craisinlord.antarchy.content.client.renderer.StinkBugRenderer(context)));
}
@SubscribeEvent
@SuppressWarnings({"unchecked", "rawtypes"})
public static void addRenderLayers(EntityRenderersEvent.AddLayers event) {
for (String skin : event.getSkins()) {
LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer =
(LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>>) event.getSkin(skin);
if (renderer != null) {
renderer.addLayer(new ParalyzedStonePlayerLayer(renderer));
renderer.addLayer(new GoopedLivingLayer(renderer));
renderer.addLayer(new BrutalflyElytraLayer(renderer));
renderer.addLayer(new FallenKingCrownLayer(renderer));
}
}
LivingEntityRenderer<net.minecraft.world.entity.decoration.ArmorStand, ArmorStandModel> armorStandRenderer =
(LivingEntityRenderer<net.minecraft.world.entity.decoration.ArmorStand, ArmorStandModel>) event.getRenderer(EntityType.ARMOR_STAND);
if (armorStandRenderer != null) {
armorStandRenderer.addLayer(new FallenKingCrownArmorStandLayer(armorStandRenderer));
}
BuiltInRegistries.ENTITY_TYPE.forEach(entityType -> addStatusLayersToEntity(event, entityType));
}
@SubscribeEvent
public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(OuranwoodBoatRenderer.boatLayer(), BoatModel::createBodyModel);
event.registerLayerDefinition(OuranwoodBoatRenderer.chestBoatLayer(), ChestBoatModel::createBodyModel);
event.registerLayerDefinition(PeachBoatRenderer.boatLayer(), BoatModel::createBodyModel);
event.registerLayerDefinition(PeachBoatRenderer.chestBoatLayer(), ChestBoatModel::createBodyModel);
}
@SuppressWarnings({"rawtypes", "unchecked"})
private static <E extends Entity> void addStatusLayersToEntity(EntityRenderersEvent.AddLayers event, EntityType<E> entityType) {
if (entityType == EntityType.PLAYER) {
return;
}
Object renderer = event.getRenderer((EntityType) entityType);
if (renderer == null) {
return;
}
if (renderer instanceof GeoEntityRenderer) {
return;
}
if (!(renderer instanceof LivingEntityRenderer)) {
return;
}
LivingEntityRenderer livingRenderer = (LivingEntityRenderer) renderer;
livingRenderer.addLayer(new ParalyzedStoneLivingLayer<>(livingRenderer));
livingRenderer.addLayer(new GoopedLivingLayer<>(livingRenderer));
}
private static <T extends LivingEntity & GeoAnimatable> GeoEntityRenderer<T> withParalyzedGeoLayer(GeoEntityRenderer<T> renderer) {
renderer.addRenderLayer(new ParalyzedStoneGeoLayer<>(renderer));
renderer.addRenderLayer(new GoopedGeoLayer<>(renderer));
return renderer;
}
@SubscribeEvent
public static void registerBlockColors(RegisterColorHandlersEvent.Block event) {
event.register(
(state, level, pos, tintIndex) -> tintIndex == 0 ? bluestoneWireColor(state.getValue(com.craisinlord.antarchy.content.block.BluestoneWireBlock.POWER)) : -1,
AntarchyForgeBlocks.BLUESTONE_WIRE.get()
);
event.register(
(state, level, pos, tintIndex) -> level != null && pos != null
? BiomeColors.getAverageFoliageColor(level, pos)
: FoliageColor.getDefaultColor(),
AntarchyForgeBlocks.OURANWOOD_LEAVES.get()
);
event.register(
(state, level, pos, tintIndex) -> 0xFF4A0000,
AntarchyForgeBlocks.ANTIWATER_BLOCK.get()
);
event.register(
(state, level, pos, tintIndex) -> level != null && pos != null
? BiomeColors.getAverageGrassColor(level, pos)
: net.minecraft.world.level.GrassColor.getDefaultColor(),
AntarchyForgeBlocks.SPIDER_LILY.get()
);
event.register(
(state, level, pos, tintIndex) -> level != null && pos != null
? BiomeColors.getAverageGrassColor(level, pos)
: net.minecraft.world.level.GrassColor.getDefaultColor(),
AntarchyForgeBlocks.POTTED_SPIDER_LILY.get()
);
}
@SubscribeEvent
public static void registerItemColors(RegisterColorHandlersEvent.Item event) {
event.register(
(stack, tintIndex) -> FoliageColor.getDefaultColor(),
AntarchyForgeItems.OURANWOOD_LEAVES_ITEM.get()
);
event.register(
(stack, tintIndex) -> tintIndex == 0 ? net.minecraft.world.level.GrassColor.getDefaultColor() : -1,
AntarchyForgeItems.SPIDER_LILY_ITEM.get()
);
event.register(
(stack, tintIndex) -> {
if (!(stack.getItem() instanceof com.craisinlord.antarchy.content.item.CritterCageItem cage)) {
return -1;
}
if (cage.getItemState(stack) != 2) {
return -1;
}
if (tintIndex == 1) {
return cage.getPrimaryColor(stack);
}
if (tintIndex == 2) {
return cage.getSecondaryColor(stack);
}
return -1;
},
AntarchyForgeItems.CRITTER_CAGE.get()
);
event.register(new DynamicFluidContainerModel.Colors(), AntarchyForgeItems.ICHOR_BUCKET.get());
event.register(new DynamicFluidContainerModel.Colors(), AntarchyForgeItems.LUMEN_BUCKET.get());
event.register(new DynamicFluidContainerModel.Colors(), AntarchyForgeItems.ANTIWATER_BUCKET.get());
}
@SubscribeEvent
public static void registerParticleProviders(RegisterParticleProvidersEvent event) {
event.registerSpriteSet(AntarchyForgeMisc.DREAM_FIRE_FLAME.get(), DreamFlameParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.STINKY_GAS.get(), HypnoticGasParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.STINKY_FLY.get(), FireflyParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.PEACH_LEAVES_PARTICLE.get(), PeachLeavesParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.LOTUS_POLLEN.get(), com.craisinlord.antarchy.content.client.particle.LotusPollenParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.HYPNOTIC_GAS.get(), HypnoticGasParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.HYPNOTIC_GAS_DOWN.get(), sprites -> new HypnoticGasParticle.Provider(sprites, true));
event.registerSpecial(AntarchyForgeMisc.HYPNOTIC_GAS_CLOUD.get(), new HypnoticGasCloudParticle.Provider());
event.registerSpecial(AntarchyForgeMisc.HYPNOTIC_GAS_CLOUD_DOWN.get(), new HypnoticGasCloudParticle.Provider(true));
event.registerSpriteSet(AntarchyForgeMisc.INVERTED_GEYSER_BASE.get(), InvertedGeyserBaseParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.INVERTED_GEYSER_PLUME.get(), InvertedGeyserPlumeParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.INVERTED_GEYSER_POOF.get(), InvertedGeyserBaseParticle.Provider::new);
event.registerSpecial(AntarchyForgeMisc.INVERTED_GEYSER_ERUPTION.get(), new InvertedGeyserEruptionParticle.Provider());
event.registerSpriteSet(AntarchyForgeMisc.FIREFLY.get(), FireflyParticle.Provider::new);
event.registerSpriteSet(AntarchyForgeMisc.ORANGE_ASH.get(), OrangeAshParticle.Provider::new);
}
@SubscribeEvent
public static void registerGuiLayers(RegisterGuiOverlaysEvent event) {
event.registerAboveAll("dread_darkness",
(gui, guiGraphics, partialTick, width, height) -> DreadHudRenderer.render(guiGraphics)
);
event.registerAboveAll("horde_intensity",
(gui, guiGraphics, partialTick, width, height) -> HordeHudRenderer.render(guiGraphics)
);
event.registerAboveAll("paralyzed_stone",
(gui, guiGraphics, partialTick, width, height) -> ParalyzedHudRenderer.render(guiGraphics)
);
event.registerAboveAll("gooped_tint",
(gui, guiGraphics, partialTick, width, height) -> GoopedHudRenderer.render(guiGraphics)
);
event.registerAboveAll("brutalfly_elytra",
(gui, guiGraphics, partialTick, width, height) -> BrutalflyElytraHudRenderer.render(guiGraphics)
);
event.registerBelow(
VanillaGuiOverlay.CHAT_PANEL.id(),
"bloodglass_hearts",
(gui, guiGraphics, partialTick, width, height) -> BloodglassHudRenderer.render(guiGraphics)
);
event.registerAboveAll("triffid_goo",
(gui, guiGraphics, partialTick, width, height) -> TriffidGooHudRenderer.render(guiGraphics)
);
event.registerAboveAll("jumpy_boots",
(gui, guiGraphics, partialTick, width, height) -> JumpyBootsHudRenderer.render(guiGraphics)
);
event.registerAboveAll("dorrie_jump",
(gui, guiGraphics, partialTick, width, height) -> DorrieJumpHudRenderer.render(guiGraphics)
);
event.registerAboveAll("hercules_beetle_charge",
(gui, guiGraphics, partialTick, width, height) -> HerculesBeetleChargeHudRenderer.render(guiGraphics)
);
}
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
event.enqueueWork(() -> {
net.minecraft.client.gui.screens.MenuScreens.register(AntarchyForgeMisc.DORRIE_INVENTORY_MENU.get(), com.craisinlord.antarchy.content.client.screen.DorrieInventoryScreen::new);
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIMETAL_RAIL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIMETAL_POWERED_RAIL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIMETAL_DETECTOR_RAIL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIMETAL_ACTIVATOR_RAIL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.OURANWOOD_LEAVES.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.OURANWOOD_DOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.OURANWOOD_TRAPDOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.OURANWOOD_ACORN_BLOCK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.POTTED_OURANWOOD_ACORN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PEACH_LEAVES.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PEACH_HANGING_PEACH.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PEACH_DOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PEACH_TRAPDOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PEACH_SAPLING.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.POTTED_PEACH_SAPLING.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DUPLICATOR_SAPLING.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ORANGE_MILKWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.PINK_MILKWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.AMBER_LICHEN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CREEPVINE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CAMELLIA.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.SPIDER_LILY.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.POTTED_SPIDER_LILY.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.LOTUS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.POTTED_LOTUS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.GIANT_LILY_PAD.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.HUSHWEED.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CRITTER_CAGE_BLOCK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CORNEA_STALK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CORN_CROP.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.WILD_CORN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.UMBRAL_MOSS_CARPET.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.NYXITE_SPIKE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CHITEN_SPIKE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.STAR_CORAL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.STAR_CORAL_FAN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.STAR_CORAL_WALL_FAN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DEAD_STAR_CORAL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DEAD_STAR_CORAL_FAN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DEAD_STAR_CORAL_WALL_FAN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.SMALL_BLOOD_CRYSTAL_BUD.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.MEDIUM_BLOOD_CRYSTAL_BUD.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.LARGE_BLOOD_CRYSTAL_BUD.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BLOOD_CRYSTAL_CRYSTAL.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_TORCH.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_WALL_TORCH.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_CEILING_TORCH.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BLUESTONE_WIRE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BLUESTONE_REPEATER.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BLUESTONE_COMPARATOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BLUESTONE_TORCH.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_LANTERN.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_CAMPFIRE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_FIRE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.DREAM_CEILING_FIRE.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ANTIWATER_BLOCK.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.LUMEN_BLOCK.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.ANTIWATER.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.FLOWING_ANTIWATER.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.ICHOR.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.FLOWING_ICHOR.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.LUMEN.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.FLOWING_LUMEN.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.BILE.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeMisc.FLOWING_BILE.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.ELYTHIA_PORTAL.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.THORAXIS_PORTAL.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.TRIFFID_GOO_BLOCK.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.URANIUM_DOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.TITANIUM_DOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.URANIUM_TRAPDOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.TITANIUM_TRAPDOOR.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.URANIUM_BARS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.TITANIUM_BARS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.CLOUD_BLOCK.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.JUMPY_BUG_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.SPIT_BUG_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.JERRY_EGG.get(), RenderType.translucent());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.BIOWART_TENDRILS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.HANGING_CREEPROOTS.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.MOLTING_VINES.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.POTTED_GLOWCAP_MUSHROOM.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyForgeBlocks.GLOWCAP_MUSHROOM.get(), RenderType.cutout());
registerUltimateBowProperties();
registerUltimateCrossbowProperties();
});
}
private static void registerUltimateBowProperties() {
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_BOW.get(),
ResourceLocation.withDefaultNamespace("pull"),
(stack, level, entity, seed) -> {
if (entity == null || entity.getUseItem() != stack) {
return 0.0F;
}
return (stack.getItem().getUseDuration(stack) - entity.getUseItemRemainingTicks()) / 20.0F;
}
);
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_BOW.get(),
ResourceLocation.withDefaultNamespace("pulling"),
(stack, level, entity, seed) ->
entity != null && entity.isUsingItem() && entity.getUseItem() == stack ? 1.0F : 0.0F
);
}
private static void registerUltimateCrossbowProperties() {
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_CROSSBOW.get(),
ResourceLocation.withDefaultNamespace("pull"),
(stack, level, entity, seed) -> {
if (entity == null || CrossbowItem.isCharged(stack) || entity.getUseItem() != stack) {
return 0.0F;
}
float adjustedChargeDuration = Math.max(1.0F, stack.getItem().getUseDuration(stack) - 3.0F);
return Mth.clamp((stack.getItem().getUseDuration(stack) - entity.getUseItemRemainingTicks()) / adjustedChargeDuration, 0.0F, 1.0F);
}
);
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_CROSSBOW.get(),
ResourceLocation.withDefaultNamespace("pulling"),
(stack, level, entity, seed) ->
entity != null && entity.isUsingItem() && entity.getUseItem() == stack && !CrossbowItem.isCharged(stack) ? 1.0F : 0.0F
);
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_CROSSBOW.get(),
ResourceLocation.withDefaultNamespace("charged"),
(stack, level, entity, seed) -> CrossbowItem.isCharged(stack) ? 1.0F : 0.0F
);
ItemProperties.register(
AntarchyForgeItems.ULTIMATE_CROSSBOW.get(),
ResourceLocation.withDefaultNamespace("firework"),
(stack, level, entity, seed) -> CrossbowItem.isCharged(stack) && CrossbowItem.containsChargedProjectile(stack, Items.FIREWORK_ROCKET) ? 1.0F : 0.0F
);
ItemProperties.register(
AntarchyForgeItems.CRITTER_CAGE.get(),
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "critter_cage_state"),
(stack, level, entity, seed) -> {
if (!(stack.getItem() instanceof com.craisinlord.antarchy.content.item.CritterCageItem cage)) {
return 0.0F;
}
return cage.getItemState(stack);
}
);
}
private static int bluestoneWireColor(int power) {
float normalized = power / 15.0F;
int red = (int) (6.0F + normalized * 54.0F);
int green = (int) (22.0F + normalized * 132.0F);
int blue = (int) (64.0F + normalized * 191.0F);
return red << 16 | green << 8 | blue;
}
}
@@ -0,0 +1,62 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;
import net.minecraftforge.client.settings.KeyConflictContext;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public final class AntarchyKeyBindings {
public static final String CATEGORY = "key.categories.antarchy";
public static final KeyMapping BRUTALFLY_FLAP = new KeyMapping(
"key.antarchy.brutalfly_flap",
KeyConflictContext.IN_GAME,
InputConstants.Type.KEYSYM,
InputConstants.KEY_LSHIFT,
CATEGORY
);
public static final KeyMapping DORRIE_CHARGE_JUMP = new KeyMapping(
"key.antarchy.dorrie_charge_jump",
KeyConflictContext.IN_GAME,
InputConstants.Type.KEYSYM,
InputConstants.KEY_LCONTROL,
CATEGORY
);
public static final KeyMapping HERCULES_BEETLE_CHARGE = new KeyMapping(
"key.antarchy.hercules_beetle_charge",
KeyConflictContext.IN_GAME,
InputConstants.Type.KEYSYM,
InputConstants.KEY_LCONTROL,
CATEGORY
);
public static final KeyMapping HERCULES_BEETLE_FLIGHT_TOGGLE = new KeyMapping(
"key.antarchy.hercules_beetle_flight_toggle",
KeyConflictContext.IN_GAME,
InputConstants.Type.KEYSYM,
InputConstants.KEY_R,
CATEGORY
);
private AntarchyKeyBindings() {}
@SubscribeEvent
public static void onRegisterKeyMappings(RegisterKeyMappingsEvent event) {
event.register(BRUTALFLY_FLAP);
event.register(DORRIE_CHARGE_JUMP);
event.register(HERCULES_BEETLE_CHARGE);
event.register(HERCULES_BEETLE_FLIGHT_TOGGLE);
}
public static boolean isHerculesBeetleFlightTogglePressed() {
return HERCULES_BEETLE_FLIGHT_TOGGLE.isDown();
}
}
@@ -0,0 +1,44 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.item.BigBerthaItem;
import com.craisinlord.antarchy.content.network.BigBerthaModeCyclePayload;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class BigBerthaClientHandler {
private static boolean lastUseDown;
private BigBerthaClientHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null || mc.screen != null) {
lastUseDown = false;
return;
}
if (!(mc.player.getMainHandItem().getItem() instanceof BigBerthaItem)) {
lastUseDown = false;
return;
}
boolean useDown = mc.options.keyUse.isDown();
if (useDown
&& !lastUseDown
&& mc.player.isShiftKeyDown()
&& mc.player.getCooldowns().isOnCooldown(mc.player.getMainHandItem().getItem())) {
AntarchyForgeNetworkCore.sendToServer(new BigBerthaModeCyclePayload());
}
lastUseDown = useDown;
}
}
@@ -0,0 +1,210 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.BloodCrystalKatanaTrailClientState;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.BufferUploader;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.blaze3d.vertex.VertexFormat;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.RenderLevelStageEvent;
import org.joml.Matrix4f;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.FORGE)
public final class BloodCrystalKatanaTrailHandler {
private static final int MAX_TRAIL_POINTS = 16;
private static final int POINT_LIFETIME_TICKS = 10;
private static final double MIN_DISTANCE_BETWEEN_POINTS = 0.05D;
private static final float CORE_WIDTH = 0.06F;
private static final float GLOW_WIDTH = 0.16F;
private static final Map<Integer, ArrayDeque<TrailPoint>> TRAILS = new HashMap<>();
private BloodCrystalKatanaTrailHandler() {}
private static final class TrailPoint {
private final Vec3 position;
private int age;
private TrailPoint(Vec3 position) {
this.position = position;
}
private float alpha() {
return 1.0F - ((float) age / POINT_LIFETIME_TICKS);
}
private boolean expired() {
return age >= POINT_LIFETIME_TICKS || alpha() <= 0.01F;
}
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null) {
TRAILS.clear();
BloodCrystalKatanaTrailClientState.clear();
return;
}
if (mc.isPaused()) {
return;
}
BloodCrystalKatanaTrailClientState.tick();
Set<Integer> activeIds = new HashSet<>();
for (Entity entity : mc.level.entitiesForRendering()) {
int remaining = BloodCrystalKatanaTrailClientState.getRemainingTicks(entity.getId());
if (remaining <= 0) {
continue;
}
activeIds.add(entity.getId());
Vec3 position = entity.position().add(0.0D, entity.getBbHeight() * 0.45D, 0.0D);
ArrayDeque<TrailPoint> points = TRAILS.computeIfAbsent(entity.getId(), id -> new ArrayDeque<>());
if (points.isEmpty() || points.peekFirst().position.distanceToSqr(position) >= MIN_DISTANCE_BETWEEN_POINTS * MIN_DISTANCE_BETWEEN_POINTS) {
points.addFirst(new TrailPoint(position));
while (points.size() > MAX_TRAIL_POINTS) {
points.pollLast();
}
}
}
TRAILS.keySet().removeIf(id -> !activeIds.contains(id));
for (ArrayDeque<TrailPoint> points : TRAILS.values()) {
Iterator<TrailPoint> iterator = points.iterator();
while (iterator.hasNext()) {
TrailPoint point = iterator.next();
point.age++;
if (point.expired()) {
iterator.remove();
}
}
}
TRAILS.values().removeIf(ArrayDeque::isEmpty);
}
@SubscribeEvent
public static void onRenderLevelStage(RenderLevelStageEvent event) {
if (event.getStage() != RenderLevelStageEvent.Stage.AFTER_PARTICLES || TRAILS.isEmpty()) {
return;
}
Minecraft mc = Minecraft.getInstance();
if (mc.level == null) {
return;
}
Camera camera = event.getCamera();
Vec3 cameraPos = camera.getPosition();
Matrix4f matrix = event.getPoseStack().last().pose();
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.depthMask(false);
RenderSystem.disableCull();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
Tesselator tesselator = Tesselator.getInstance();
List<List<TrailPoint>> snapshots = new ArrayList<>(TRAILS.size());
for (ArrayDeque<TrailPoint> deque : TRAILS.values()) {
if (deque.size() >= 2) {
snapshots.add(new ArrayList<>(deque));
}
}
if (snapshots.isEmpty()) {
RenderSystem.enableCull();
RenderSystem.depthMask(true);
RenderSystem.disableBlend();
return;
}
BufferBuilder glowBuffer = tesselator.getBuilder();
glowBuffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
for (List<TrailPoint> points : snapshots) {
buildTrail(glowBuffer, matrix, points, cameraPos, GLOW_WIDTH, 0.95F, 0.14F, 0.18F, 0.38F);
}
BufferUploader.drawWithShader(glowBuffer.end());
BufferBuilder coreBuffer = tesselator.getBuilder();
coreBuffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
for (List<TrailPoint> points : snapshots) {
buildTrail(coreBuffer, matrix, points, cameraPos, CORE_WIDTH, 1.0F, 0.32F, 0.36F, 0.92F);
}
BufferUploader.drawWithShader(coreBuffer.end());
RenderSystem.enableCull();
RenderSystem.depthMask(true);
RenderSystem.disableBlend();
}
private static void buildTrail(BufferBuilder builder, Matrix4f matrix, List<TrailPoint> points, Vec3 cameraPos,
float width, float red, float green, float blue, float alphaScale) {
for (int i = 0; i < points.size() - 1; i++) {
TrailPoint newer = points.get(i);
TrailPoint older = points.get(i + 1);
Vec3 side = cameraFacingRight(newer.position, older.position, cameraPos);
if (side == null) {
continue;
}
float nearAlpha = newer.alpha() * alphaScale;
float farAlpha = older.alpha() * alphaScale * 0.85F;
Vec3 nearOffset = side.scale(width);
Vec3 farOffset = side.scale(width);
Vec3 nearPos = newer.position.subtract(cameraPos);
Vec3 farPos = older.position.subtract(cameraPos);
builder.vertex(matrix, (float) (nearPos.x + nearOffset.x), (float) (nearPos.y + nearOffset.y), (float) (nearPos.z + nearOffset.z)).color(red, green, blue, nearAlpha).endVertex();
builder.vertex(matrix, (float) (nearPos.x - nearOffset.x), (float) (nearPos.y - nearOffset.y), (float) (nearPos.z - nearOffset.z)).color(red, green, blue, nearAlpha).endVertex();
builder.vertex(matrix, (float) (farPos.x - farOffset.x), (float) (farPos.y - farOffset.y), (float) (farPos.z - farOffset.z)).color(red, green, blue, farAlpha).endVertex();
builder.vertex(matrix, (float) (farPos.x + farOffset.x), (float) (farPos.y + farOffset.y), (float) (farPos.z + farOffset.z)).color(red, green, blue, farAlpha).endVertex();
}
}
private static Vec3 cameraFacingRight(Vec3 current, Vec3 next, Vec3 cameraPos) {
Vec3 segmentDirection = next.subtract(current);
if (segmentDirection.lengthSqr() < 1.0E-8D) {
return null;
}
segmentDirection = segmentDirection.normalize();
Vec3 midpoint = current.add(next).scale(0.5D);
Vec3 cameraDirection = cameraPos.subtract(midpoint);
if (cameraDirection.lengthSqr() < 1.0E-8D) {
return null;
}
cameraDirection = cameraDirection.normalize();
Vec3 side = segmentDirection.cross(cameraDirection);
if (side.lengthSqr() < 1.0E-8D) {
side = segmentDirection.cross(new Vec3(0.0D, 1.0D, 0.0D));
if (side.lengthSqr() < 1.0E-8D) {
return null;
}
}
return side.normalize();
}
}
@@ -0,0 +1,87 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.BrutalflyElytraClientState;
import com.craisinlord.antarchy.content.item.BrutalflyElytraFlightHelper;
import com.craisinlord.antarchy.content.item.BrutalflyElytraItem;
import com.craisinlord.antarchy.content.network.BrutalflyElytraFlapPayload;
import net.minecraft.client.Minecraft;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.RenderGuiOverlayEvent;
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class BrutalflyElytraClientHandler {
private static final Logger LOGGER = LoggerFactory.getLogger("Antarchy/BrutalflyElytra");
private static boolean lastJumpDown;
private static int chargeTicks;
static {
BrutalflyElytraItem.FLAP_KEY_NAME = () -> AntarchyKeyBindings.BRUTALFLY_FLAP.getTranslatedKeyMessage();
}
private BrutalflyElytraClientHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
BrutalflyElytraClientState.tick();
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.player == null || minecraft.level == null || minecraft.screen != null) {
reset();
return;
}
if (!BrutalflyElytraItem.isWearingBrutalflyElytra(minecraft.player) || !minecraft.player.isFallFlying()) {
reset();
return;
}
boolean sneakDown = AntarchyKeyBindings.BRUTALFLY_FLAP.isDown();
boolean wasSneakDown = lastJumpDown;
lastJumpDown = sneakDown;
if (sneakDown) {
chargeTicks = Math.min(chargeTicks + 1, BrutalflyElytraFlightHelper.FLAP_CHARGE_TICKS_MAX);
return;
}
if (wasSneakDown && chargeTicks > 0) {
AntarchyForgeNetworkCore.sendToServer(new BrutalflyElytraFlapPayload(chargeTicks));
}
chargeTicks = 0;
}
private static void reset() {
lastJumpDown = false;
chargeTicks = 0;
}
@SubscribeEvent
public static void onRenderGuiLayer(RenderGuiOverlayEvent.Pre event) {
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.player == null || !BrutalflyElytraItem.isWearingBrutalflyElytra(minecraft.player) || !minecraft.player.isFallFlying()) {
return;
}
if (event.getOverlay().id().equals(VanillaGuiOverlay.EXPERIENCE_BAR.id())) {
event.setCanceled(true);
}
}
public static boolean isCharging() {
return chargeTicks > 0 && lastJumpDown;
}
public static int getChargeTicks() {
return chargeTicks;
}
}
@@ -0,0 +1,45 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.content.item.BrutalflyElytraFlightHelper;
import com.craisinlord.antarchy.content.item.BrutalflyElytraItem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
public final class BrutalflyElytraHudRenderer {
private static final ResourceLocation GUI_ICONS_LOCATION = ResourceLocation.withDefaultNamespace("textures/gui/icons.png");
private static final int BAR_WIDTH = 182;
private static final int BAR_HEIGHT = 5;
private BrutalflyElytraHudRenderer() {
}
public static void render(GuiGraphics guiGraphics) {
Minecraft minecraft = Minecraft.getInstance();
Player player = minecraft.player;
if (player == null || minecraft.screen != null || player.isDeadOrDying()) {
return;
}
if (!BrutalflyElytraItem.isWearingBrutalflyElytra(player) || !player.isFallFlying()) {
return;
}
int width = minecraft.getWindow().getGuiScaledWidth();
int height = minecraft.getWindow().getGuiScaledHeight();
int x0 = width / 2 - BAR_WIDTH / 2;
int y0 = height - 29;
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 84, BAR_WIDTH, BAR_HEIGHT);
int chargeTicks = BrutalflyElytraClientHandler.getChargeTicks();
float chargeRatio = Mth.clamp(chargeTicks / (float) BrutalflyElytraFlightHelper.FLAP_CHARGE_TICKS_MAX, 0.0F, 1.0F);
int filledWidth = Mth.clamp((int) (chargeRatio * BAR_WIDTH), 0, BAR_WIDTH);
if (filledWidth > 0) {
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 0.35F + chargeRatio * 0.65F);
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 89, filledWidth, BAR_HEIGHT);
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
}
}
}
@@ -0,0 +1,49 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
import com.craisinlord.antarchy.content.item.BigBerthaItem;
import net.minecraft.client.Minecraft;
import net.minecraft.util.Mth;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.client.event.ViewportEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class CameraShakeHandler {
private static final int TORETERROR_SHAKE_TICKS = 25;
private CameraShakeHandler() {
}
@SubscribeEvent
public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null) {
CameraShakeClientState.clear();
return;
}
float shakeStrength = CameraShakeClientState.getStrength(event.getCamera().getPosition());
int beetleShakeTicks = HerculesBeetleImpactShakeClientState.getTicks();
if (beetleShakeTicks > 0) {
shakeStrength += (float) beetleShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F;
}
int bigBerthaShakeTicks = BigBerthaItem.clientShakeTicks;
if (bigBerthaShakeTicks > 0) {
shakeStrength += (float) bigBerthaShakeTicks / TORETERROR_SHAKE_TICKS * 2.0F;
}
if (shakeStrength <= 0.0F) return;
float time = (float) (mc.player.tickCount + event.getPartialTick());
event.setYaw(event.getYaw() + Mth.sin(time * 1.5F) * shakeStrength * 2.5F);
event.setPitch(event.getPitch() + Mth.cos(time * 1.8F) * shakeStrength * 2.0F);
event.setRoll(event.getRoll() + Mth.sin(time * 2.2F) * shakeStrength * 1.5F);
}
}
@@ -0,0 +1,51 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
import com.craisinlord.antarchy.content.network.DiamondMinecartInputPayload;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class DiamondMinecartClientHandler {
private DiamondMinecartClientHandler() {
}
private static byte lastFlags = 0;
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (!AntarchySettings.diamondMinecartEnabled()) return;
if (mc.player == null || mc.level == null) return;
if (!(mc.player.getVehicle() instanceof DiamondMinecartEntity)) return;
if (mc.screen != null) {
if (lastFlags != 0) {
AntarchyForgeNetworkCore.sendToServer(new DiamondMinecartInputPayload((byte) 0));
lastFlags = 0;
}
return;
}
byte flags = 0;
if (mc.options.keyUp.isDown()) flags |= DiamondMinecartInputPayload.FLAG_FORWARD;
if (mc.options.keyDown.isDown()) flags |= DiamondMinecartInputPayload.FLAG_BACK;
if (mc.options.keyLeft.isDown()) flags |= DiamondMinecartInputPayload.FLAG_LEFT;
if (mc.options.keyRight.isDown()) flags |= DiamondMinecartInputPayload.FLAG_RIGHT;
if (flags != lastFlags) {
AntarchyForgeNetworkCore.sendToServer(new DiamondMinecartInputPayload(flags));
lastFlags = flags;
}
}
}
@@ -0,0 +1,65 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.DorrieEntity;
import com.craisinlord.antarchy.content.network.DorrieChargeJumpPayload;
import com.craisinlord.antarchy.content.network.DorrieJumpInputPayload;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class DorrieJumpClientHandler {
private static boolean wasPressingJump = false;
private static boolean wasPressingCharge = false;
private DorrieJumpClientHandler() {}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
LocalPlayer player = mc.player;
if (player == null || mc.screen != null) {
resetAll();
return;
}
if (!(player.getVehicle() instanceof DorrieEntity)) {
resetAll();
return;
}
boolean pressingJump = mc.options.keyJump.isDown();
if (pressingJump != wasPressingJump) {
AntarchyForgeNetworkCore.sendToServer(new DorrieJumpInputPayload(pressingJump));
wasPressingJump = pressingJump;
}
boolean pressingCharge = AntarchyKeyBindings.DORRIE_CHARGE_JUMP.isDown();
if (pressingCharge != wasPressingCharge) {
AntarchyForgeNetworkCore.sendToServer(new DorrieChargeJumpPayload(pressingCharge));
if (!pressingCharge && player.getVehicle() instanceof DorrieEntity dorrie) {
dorrie.applyJumpImpulseClient();
}
wasPressingCharge = pressingCharge;
}
}
private static void resetAll() {
if (wasPressingJump) {
AntarchyForgeNetworkCore.sendToServer(new DorrieJumpInputPayload(false));
wasPressingJump = false;
}
if (wasPressingCharge) {
AntarchyForgeNetworkCore.sendToServer(new DorrieChargeJumpPayload(false));
wasPressingCharge = false;
}
}
}
@@ -0,0 +1,44 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.content.entity.DorrieEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
public final class DorrieJumpHudRenderer {
private static final ResourceLocation GUI_ICONS_LOCATION = ResourceLocation.withDefaultNamespace("textures/gui/icons.png");
private static final int BAR_WIDTH = 182;
private static final int BAR_HEIGHT = 5;
private DorrieJumpHudRenderer() {}
public static void render(GuiGraphics guiGraphics) {
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
if (player == null || mc.screen != null || player.isDeadOrDying()) return;
Entity vehicle = player.getVehicle();
if (!(vehicle instanceof DorrieEntity dorrie)) return;
int charge = dorrie.getJumpCharge();
if (charge <= 0) return;
int width = mc.getWindow().getGuiScaledWidth();
int height = mc.getWindow().getGuiScaledHeight();
int x0 = width / 2 - BAR_WIDTH / 2;
int y0 = height - 29;
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 84, BAR_WIDTH, BAR_HEIGHT);
float chargeRatio = Mth.clamp(charge / 100.0F, 0.0F, 1.0F);
int filledWidth = Mth.clamp((int) (chargeRatio * BAR_WIDTH), 0, BAR_WIDTH);
if (filledWidth > 0) {
guiGraphics.setColor(0.2F, 0.8F, 1.0F, 0.4F + chargeRatio * 0.6F);
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 89, filledWidth, BAR_HEIGHT);
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
}
}
}
@@ -0,0 +1,392 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeSounds;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.DeathScreen;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderSet;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Random;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class DreadClientHandler {
private static final int FOOTSTEP_MIN_INTERVAL_TICKS = 10;
private static final int FOOTSTEP_MAX_INTERVAL_TICKS = 22;
private static final int APPARITION_MIN_DURATION_TICKS = 16;
private static final int APPARITION_MAX_DURATION_TICKS = 34;
private static final int LUNGE_MIN_DURATION_TICKS = 10;
private static final int LUNGE_MAX_DURATION_TICKS = 16;
private static int nextSoundTick = 0;
private static int nextApparitionTick = 0;
private static int nextFootstepTick = 0;
private static final List<ApparitionEntry> ACTIVE_APPARITIONS = new ArrayList<>();
private static final Random RANDOM = new Random();
private DreadClientHandler() {
}
private enum ApparitionType {
PERIPHERAL_SILHOUETTE,
CROSSING_SHADOW,
LUNGE_FLASH
}
private static final class ApparitionEntry {
private final ApparitionType type;
private final float scale;
private final int lifetime;
private final int baseColor;
private float xNorm;
private float yNorm;
private float xVelocity;
private float yVelocity;
private int age;
private ApparitionEntry(ApparitionType type, float xNorm, float yNorm, float xVelocity, float yVelocity, float scale, int lifetime, int baseColor) {
this.type = type;
this.xNorm = xNorm;
this.yNorm = yNorm;
this.xVelocity = xVelocity;
this.yVelocity = yVelocity;
this.scale = scale;
this.lifetime = lifetime;
this.baseColor = baseColor;
}
private void tick() {
this.age++;
this.xNorm += this.xVelocity;
this.yNorm += this.yVelocity;
}
private boolean expired() {
return this.age >= this.lifetime;
}
private float alpha() {
float progress = this.lifetime <= 0 ? 1.0F : (float) this.age / (float) this.lifetime;
return Mth.clamp(Mth.sin(progress * (float) Math.PI), 0.0F, 1.0F);
}
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null) {
resetState();
return;
}
if (mc.isPaused()) {
return;
}
Player player = mc.player;
if (!player.isAlive() || player.isRemoved() || player.deathTime > 0 || player.isDeadOrDying() || mc.screen instanceof DeathScreen) {
resetState();
return;
}
tickApparitions();
if (!player.hasEffect(AntarchyForgeMisc.DREAD.get())) {
resetState();
return;
}
if (AntarchySettings.dreadHallucinationSoundsEnabled()) {
nextSoundTick--;
if (nextSoundTick <= 0) {
playHallucinationSound(mc, player);
nextSoundTick = randomIntervalTicks(
AntarchySettings.dreadHallucinationSoundMinInterval(),
AntarchySettings.dreadHallucinationSoundMaxInterval()
);
}
} else {
nextSoundTick = 0;
}
nextFootstepTick--;
if (nextFootstepTick <= 0) {
if (player.onGround() && player.getDeltaMovement().horizontalDistanceSqr() > 0.0025D) {
playFootstepSound(mc, player);
nextFootstepTick = randomTickInterval(FOOTSTEP_MIN_INTERVAL_TICKS, FOOTSTEP_MAX_INTERVAL_TICKS);
} else {
nextFootstepTick = 4;
}
}
if (AntarchySettings.dreadHallucinationMobsEnabled()) {
nextApparitionTick--;
if (nextApparitionTick <= 0) {
spawnApparition(mc, player);
nextApparitionTick = randomIntervalTicks(
AntarchySettings.dreadHallucinationMobMinInterval(),
AntarchySettings.dreadHallucinationMobMaxInterval()
);
}
} else {
nextApparitionTick = 0;
ACTIVE_APPARITIONS.clear();
}
}
public static void render(GuiGraphics guiGraphics) {
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
if (player == null || !player.hasEffect(AntarchyForgeMisc.DREAD.get()) || ACTIVE_APPARITIONS.isEmpty()) {
return;
}
int width = mc.getWindow().getGuiScaledWidth();
int height = mc.getWindow().getGuiScaledHeight();
for (ApparitionEntry entry : ACTIVE_APPARITIONS) {
float alpha = entry.alpha();
if (alpha <= 0.01F) {
continue;
}
switch (entry.type) {
case PERIPHERAL_SILHOUETTE -> renderPeripheralSilhouette(guiGraphics, width, height, entry, alpha);
case CROSSING_SHADOW -> renderCrossingShadow(guiGraphics, width, height, entry, alpha);
case LUNGE_FLASH -> renderLungeFlash(guiGraphics, width, height, entry, alpha);
}
}
}
private static void tickApparitions() {
Iterator<ApparitionEntry> iterator = ACTIVE_APPARITIONS.iterator();
while (iterator.hasNext()) {
ApparitionEntry entry = iterator.next();
entry.tick();
if (entry.expired()) {
iterator.remove();
}
}
}
private static void playHallucinationSound(Minecraft mc, Player player) {
Optional<HolderSet.Named<SoundEvent>> tagOpt =
BuiltInRegistries.SOUND_EVENT.getTag(AntarchyTags.SoundEvents.DREAD_HALLUCINATION_SOUNDS);
if (tagOpt.isEmpty()) {
return;
}
List<Holder<SoundEvent>> sounds = tagOpt.get().stream().toList();
if (sounds.isEmpty()) {
return;
}
SoundEvent soundEvent = sounds.get(RANDOM.nextInt(sounds.size())).value();
Vec3 look = player.getLookAngle();
double baseAngle = Math.atan2(-look.x, -look.z);
double spread = (RANDOM.nextDouble() - 0.5D) * Math.PI;
double angle = baseAngle + spread;
double distance = 10.0D + RANDOM.nextDouble() * 15.0D;
double soundX = player.getX() + Math.sin(angle) * distance;
double soundY = player.getY() + RANDOM.nextDouble() * 4.0D - 1.0D;
double soundZ = player.getZ() + Math.cos(angle) * distance;
mc.level.playLocalSound(
soundX,
soundY,
soundZ,
soundEvent,
SoundSource.HOSTILE,
1.0F,
0.85F + RANDOM.nextFloat() * 0.3F,
false
);
}
private static void spawnApparition(Minecraft mc, Player player) {
double roll = RANDOM.nextDouble();
if (roll < 0.5D) {
spawnPeripheralSilhouette();
return;
}
if (roll < 0.82D) {
spawnCrossingShadow();
return;
}
spawnLungeFlash(mc, player);
}
private static void spawnPeripheralSilhouette() {
boolean leftSide = RANDOM.nextBoolean();
float xNorm = leftSide ? 0.08F + RANDOM.nextFloat() * 0.08F : 0.84F + RANDOM.nextFloat() * 0.08F;
float yNorm = 0.48F + (RANDOM.nextFloat() - 0.5F) * 0.26F;
float scale = 0.85F + RANDOM.nextFloat() * 0.4F;
int lifetime = randomTickInterval(APPARITION_MIN_DURATION_TICKS, APPARITION_MAX_DURATION_TICKS);
ACTIVE_APPARITIONS.add(new ApparitionEntry(
ApparitionType.PERIPHERAL_SILHOUETTE,
xNorm,
yNorm,
leftSide ? -0.0015F : 0.0015F,
0.0F,
scale,
lifetime,
0x160000
));
}
private static void spawnCrossingShadow() {
boolean leftToRight = RANDOM.nextBoolean();
float xNorm = leftToRight ? -0.18F : 1.18F;
float yNorm = 0.38F + RANDOM.nextFloat() * 0.36F;
float velocity = leftToRight ? 0.04F + RANDOM.nextFloat() * 0.015F : -(0.04F + RANDOM.nextFloat() * 0.015F);
float scale = 0.9F + RANDOM.nextFloat() * 0.45F;
int lifetime = randomTickInterval(APPARITION_MIN_DURATION_TICKS, APPARITION_MAX_DURATION_TICKS);
ACTIVE_APPARITIONS.add(new ApparitionEntry(
ApparitionType.CROSSING_SHADOW,
xNorm,
yNorm,
velocity,
0.0F,
scale,
lifetime,
0x1A0000
));
}
private static void spawnLungeFlash(Minecraft mc, Player player) {
float xNorm = 0.5F + (RANDOM.nextBoolean() ? -1.0F : 1.0F) * (0.12F + RANDOM.nextFloat() * 0.12F);
float yNorm = 0.58F + (RANDOM.nextFloat() - 0.5F) * 0.12F;
float scale = 0.95F + RANDOM.nextFloat() * 0.35F;
int lifetime = randomTickInterval(LUNGE_MIN_DURATION_TICKS, LUNGE_MAX_DURATION_TICKS);
ACTIVE_APPARITIONS.add(new ApparitionEntry(
ApparitionType.LUNGE_FLASH,
xNorm,
yNorm,
0.0F,
-0.002F,
scale,
lifetime,
0x2A0000
));
mc.level.playLocalSound(
player.getX(),
player.getY() + 1.0D,
player.getZ(),
AntarchyForgeSounds.NIGHTMARE_BITE.get(),
SoundSource.HOSTILE,
0.4F,
0.88F + RANDOM.nextFloat() * 0.12F,
false
);
}
private static void playFootstepSound(Minecraft mc, Player player) {
double soundX = player.getX() + (RANDOM.nextDouble() - 0.5D) * 1.2D;
double soundY = player.getY() - 0.95D;
double soundZ = player.getZ() + (RANDOM.nextDouble() - 0.5D) * 1.2D;
mc.level.playLocalSound(
soundX,
soundY,
soundZ,
SoundEvents.SILVERFISH_STEP,
SoundSource.HOSTILE,
0.45F,
0.85F + RANDOM.nextFloat() * 0.25F,
false
);
}
private static void renderPeripheralSilhouette(GuiGraphics guiGraphics, int width, int height, ApparitionEntry entry, float alpha) {
int centerX = Math.round(entry.xNorm * width);
int baseY = Math.round(entry.yNorm * height);
int bodyWidth = Math.round(width * 0.045F * entry.scale);
int bodyHeight = Math.round(height * 0.24F * entry.scale);
int headSize = Math.round(bodyWidth * 0.78F);
int x0 = centerX - bodyWidth / 2;
int y0 = baseY - bodyHeight / 2;
int outerColor = alphaColor(entry.baseColor, alpha * 0.8F);
int innerColor = alphaColor(0x5A0000, alpha * 0.22F);
guiGraphics.fill(x0, y0, x0 + bodyWidth, y0 + bodyHeight, outerColor);
guiGraphics.fill(x0 - headSize / 2 + bodyWidth / 2, y0 - headSize / 2, x0 + bodyWidth / 2 + headSize / 2, y0 + headSize / 2, outerColor);
guiGraphics.fill(x0 + bodyWidth / 6, y0 + bodyHeight / 6, x0 + bodyWidth - bodyWidth / 6, y0 + bodyHeight - bodyHeight / 7, innerColor);
}
private static void renderCrossingShadow(GuiGraphics guiGraphics, int width, int height, ApparitionEntry entry, float alpha) {
int centerX = Math.round(entry.xNorm * width);
int centerY = Math.round(entry.yNorm * height);
int shadowWidth = Math.round(width * 0.22F * entry.scale);
int shadowHeight = Math.round(height * 0.035F * entry.scale);
int outerColor = alphaColor(entry.baseColor, alpha * 0.65F);
int innerColor = alphaColor(0x340000, alpha * 0.28F);
guiGraphics.fill(centerX - shadowWidth / 2, centerY - shadowHeight / 2, centerX + shadowWidth / 2, centerY + shadowHeight / 2, outerColor);
guiGraphics.fill(centerX - shadowWidth / 3, centerY - shadowHeight, centerX + shadowWidth / 3, centerY + shadowHeight, innerColor);
}
private static void renderLungeFlash(GuiGraphics guiGraphics, int width, int height, ApparitionEntry entry, float alpha) {
int centerX = Math.round(entry.xNorm * width);
int centerY = Math.round(entry.yNorm * height);
int faceWidth = Math.round(width * 0.11F * entry.scale);
int faceHeight = Math.round(height * 0.12F * entry.scale);
int shadowColor = alphaColor(entry.baseColor, alpha * 0.82F);
int glowColor = alphaColor(0x4A0000, alpha * 0.25F);
int eyeColor = alphaColor(0xB02020, alpha * 0.8F);
guiGraphics.fill(centerX - faceWidth / 2, centerY - faceHeight / 2, centerX + faceWidth / 2, centerY + faceHeight / 2, shadowColor);
guiGraphics.fill(centerX - faceWidth, centerY - faceHeight / 3, centerX + faceWidth, centerY + faceHeight, glowColor);
int eyeWidth = Math.max(2, faceWidth / 7);
int eyeHeight = Math.max(2, faceHeight / 12);
int eyeY = centerY - faceHeight / 8;
int eyeOffset = faceWidth / 4;
guiGraphics.fill(centerX - eyeOffset - eyeWidth, eyeY, centerX - eyeOffset + eyeWidth, eyeY + eyeHeight, eyeColor);
guiGraphics.fill(centerX + eyeOffset - eyeWidth, eyeY, centerX + eyeOffset + eyeWidth, eyeY + eyeHeight, eyeColor);
}
private static void resetState() {
ACTIVE_APPARITIONS.clear();
nextSoundTick = 0;
nextApparitionTick = 0;
nextFootstepTick = 0;
}
private static int randomIntervalTicks(double minSeconds, double maxSeconds) {
double seconds = minSeconds + RANDOM.nextDouble() * Math.max(0.0D, maxSeconds - minSeconds);
return Math.max(1, (int) (seconds * 20.0D));
}
private static int randomTickInterval(int minTicks, int maxTicks) {
return minTicks + RANDOM.nextInt(Math.max(1, maxTicks - minTicks + 1));
}
private static int alphaColor(int rgb, float alpha) {
int alphaByte = Mth.clamp((int) (alpha * 255.0F), 0, 255);
return (alphaByte << 24) | rgb;
}
}
@@ -0,0 +1,28 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
public final class DreadHudRenderer {
private DreadHudRenderer() {
}
public static void render(GuiGraphics guiGraphics) {
Minecraft minecraft = Minecraft.getInstance();
Player player = minecraft.player;
if (player == null || minecraft.screen != null || player.isDeadOrDying() || !player.hasEffect(AntarchyForgeMisc.DREAD.get())) {
return;
}
float pulse = Math.max(0.0F, Mth.sin(player.tickCount * ((float) Math.PI * 2.0F / 80.0F)));
int alpha = Mth.clamp(18 + Mth.floor(pulse * 64.0F), 0, 255);
int color = (alpha << 24) | 0x120000;
int width = minecraft.getWindow().getGuiScaledWidth();
int height = minecraft.getWindow().getGuiScaledHeight();
guiGraphics.fill(0, 0, width, height, color);
DreadClientHandler.render(guiGraphics);
}
}
@@ -0,0 +1,39 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.block.DuctTapeBlock;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.client.event.MovementInputUpdateEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class DuctTapeClientHandler {
private DuctTapeClientHandler() {
}
@SubscribeEvent
public static void onMovementInputUpdate(MovementInputUpdateEvent event) {
if (!(event.getEntity() instanceof LocalPlayer player)) {
return;
}
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || (!player.isNoGravity() && !DuctTapeBlock.isTouchingTape(mc.level, player))) {
return;
}
var input = event.getInput();
input.left = false;
input.right = false;
input.up = false;
input.down = false;
input.leftImpulse = 0.0F;
input.forwardImpulse = 0.0F;
input.jumping = false;
input.shiftKeyDown = false;
}
}
@@ -0,0 +1,91 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import com.craisinlord.antarchy.content.client.renderer.ElythiaSkyRenderer;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ElythiaFireflyManager {
private static final long NIGHT_START = 13000L;
private static final long NIGHT_END = 23000L;
private static final int SPAWN_INTERVAL = 3;
private static final int SPAWN_RADIUS_H = 20;
private static final int SPAWN_Y_MIN = -2;
private static final int SPAWN_Y_MAX = 10;
private static final int SOUND_INTERVAL_MIN = 250;
private static final int SOUND_INTERVAL_MAX = 450;
private static int nextSoundTick = SOUND_INTERVAL_MIN;
private ElythiaFireflyManager() {}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
ClientLevel level = mc.level;
if (level == null || mc.player == null) return;
if (mc.isPaused()) return;
if (!ElythiaSkyRenderer.shouldRender(level)) return;
long dayTime = level.getDayTime() % 24000L;
if (dayTime < NIGHT_START || dayTime > NIGHT_END) return;
long gameTime = level.getGameTime();
boolean fireflyBiome = level.getBiome(mc.player.blockPosition()).is(AntarchyTags.Biomes.ELYTHIA_FIREFLY_PARTICLE_BIOMES);
if (AntarchySettings.elythiaFireflyParticlesEnabled() && fireflyBiome) {
if (gameTime % SPAWN_INTERVAL == 0) {
Player player = mc.player;
int px = (int) player.getX();
int py = (int) player.getY();
int pz = (int) player.getZ();
int attempts = 1 + level.random.nextInt(3);
for (int i = 0; i < attempts; i++) {
int ox = level.random.nextInt(SPAWN_RADIUS_H * 2 + 1) - SPAWN_RADIUS_H;
int oy = SPAWN_Y_MIN + level.random.nextInt(SPAWN_Y_MAX - SPAWN_Y_MIN + 1);
int oz = level.random.nextInt(SPAWN_RADIUS_H * 2 + 1) - SPAWN_RADIUS_H;
BlockPos candidate = new BlockPos(px + ox, py + oy, pz + oz);
if (!level.getBlockState(candidate).isAir()) continue;
level.addParticle(
AntarchyForgeMisc.FIREFLY.get(),
candidate.getX() + level.random.nextDouble(),
candidate.getY() + level.random.nextDouble(),
candidate.getZ() + level.random.nextDouble(),
0.0, 0.0, 0.0
);
}
}
}
nextSoundTick--;
if (nextSoundTick <= 0) {
nextSoundTick = SOUND_INTERVAL_MIN + level.random.nextInt(SOUND_INTERVAL_MAX - SOUND_INTERVAL_MIN + 1);
Player player = mc.player;
level.playLocalSound(
player.getX(), player.getY(), player.getZ(),
AntarchySoundEvents.ELYTHIA_FIREFLY_AMBIENT.get(),
SoundSource.AMBIENT,
0.6f + level.random.nextFloat() * 0.3f,
0.9f + level.random.nextFloat() * 0.2f,
false
);
}
}
}
@@ -0,0 +1,46 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ArmorStandModel;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.decoration.ArmorStand;
import net.minecraft.world.item.ItemStack;
public final class FallenKingCrownArmorStandLayer extends RenderLayer<ArmorStand, ArmorStandModel> {
private final BlockRenderDispatcher blockRenderer;
public FallenKingCrownArmorStandLayer(RenderLayerParent<ArmorStand, ArmorStandModel> renderer) {
super(renderer);
this.blockRenderer = Minecraft.getInstance().getBlockRenderer();
}
@Override
public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLight, ArmorStand armorStand, float limbSwing, float limbSwingAmount, float partialTick, float ageInTicks, float netHeadYaw, float headPitch) {
ItemStack headStack = armorStand.getItemBySlot(EquipmentSlot.HEAD);
if (!headStack.is(com.craisinlord.antarchy.forge.registry.AntarchyForgeItems.FALLEN_KING_CROWN.get()) || armorStand.isInvisible()) {
return;
}
poseStack.pushPose();
this.getParentModel().head.translateAndRotate(poseStack);
poseStack.translate(0.5D, -0.125D, -0.5D);
poseStack.mulPose(Axis.XP.rotationDegrees(180.0F));
poseStack.mulPose(Axis.YP.rotationDegrees(180.0F));
this.blockRenderer.renderSingleBlock(
AntarchyForgeBlocks.FALLEN_KING_CROWN.get().defaultBlockState(),
poseStack,
buffer,
packedLight,
LivingEntityRenderer.getOverlayCoords(armorStand, 0.0F)
);
poseStack.popPose();
}
}
@@ -0,0 +1,58 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeItems;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> {
private final BlockRenderDispatcher blockRenderer;
public FallenKingCrownLayer(RenderLayerParent<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer) {
super(renderer);
this.blockRenderer = Minecraft.getInstance().getBlockRenderer();
}
@Override
public void render(
PoseStack poseStack,
MultiBufferSource buffer,
int packedLight,
AbstractClientPlayer player,
float limbSwing,
float limbSwingAmount,
float partialTick,
float ageInTicks,
float netHeadYaw,
float headPitch
) {
ItemStack headStack = player.getItemBySlot(EquipmentSlot.HEAD);
if (!headStack.is(AntarchyForgeItems.FALLEN_KING_CROWN.get()) || player.isInvisible()) {
return;
}
poseStack.pushPose();
this.getParentModel().head.translateAndRotate(poseStack);
poseStack.translate(0.5D, -0.125D, -0.5D);
poseStack.mulPose(Axis.XP.rotationDegrees(180.0F));
poseStack.mulPose(Axis.YP.rotationDegrees(180.0F));
this.blockRenderer.renderSingleBlock(
AntarchyForgeBlocks.FALLEN_KING_CROWN.get().defaultBlockState(),
poseStack,
buffer,
packedLight,
LivingEntityRenderer.getOverlayCoords(player, 0.0F)
);
poseStack.popPose();
}
}
@@ -0,0 +1,30 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import net.minecraft.world.entity.Entity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ViewportEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class GravityCameraRollHandler {
private GravityCameraRollHandler() {
}
@SubscribeEvent
public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
Entity entity = event.getCamera().getEntity();
if (entity == null) {
return;
}
float flipProgress = AntarchyGravityApi.getGravityFlipProgress(entity, (float) event.getPartialTick());
if (flipProgress <= 0.0F) {
return;
}
event.setRoll(event.getRoll() + 180.0F * flipProgress);
}
}
@@ -0,0 +1,67 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.item.GravityGunItem;
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.util.Mth;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.InputEvent;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class GravityGunClientHandler {
private static final double SCROLL_STEP_DISTANCE = 0.75D;
private static boolean lastAttackDown;
private GravityGunClientHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null || mc.screen != null || !AntarchySettings.gravityGunEnabled()) {
lastAttackDown = false;
return;
}
if (!(mc.player.getMainHandItem().getItem() instanceof GravityGunItem)) {
lastAttackDown = false;
return;
}
boolean attackDown = mc.options.keyAttack.isDown();
if (attackDown && !lastAttackDown) {
AntarchyForgeNetworkCore.sendToServer(new GravityGunPrimaryPayload());
}
lastAttackDown = attackDown;
}
@SubscribeEvent
public static void onMouseScroll(InputEvent.MouseScrollingEvent event) {
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null || mc.screen != null || !Screen.hasControlDown() || !AntarchySettings.gravityGunEnabled()) {
return;
}
if (!(mc.player.getMainHandItem().getItem() instanceof GravityGunItem) || !GravityGunItem.hasHeldTarget(mc.player.getMainHandItem())) {
return;
}
double scrollAmount = Mth.clamp(event.getScrollDelta(), -1.0D, 1.0D);
if (Math.abs(scrollAmount) < 1.0E-4D) {
return;
}
AntarchyForgeNetworkCore.sendToServer(new GravityGunScrollPayload(scrollAmount * SCROLL_STEP_DISTANCE));
event.setCanceled(true);
}
}
@@ -0,0 +1,47 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
public final class HerculesBeetleChargeHudRenderer {
private static final ResourceLocation GUI_ICONS_LOCATION = ResourceLocation.withDefaultNamespace("textures/gui/icons.png");
private static final int BAR_WIDTH = 182;
private static final int BAR_HEIGHT = 5;
private HerculesBeetleChargeHudRenderer() {
}
public static void render(GuiGraphics guiGraphics) {
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
if (player == null || mc.screen != null || player.isDeadOrDying()) {
return;
}
if (!(player.getVehicle() instanceof HerculesBeetleEntity beetle)) {
return;
}
int charge = beetle.getMountedCharge();
if (charge <= 0) {
return;
}
int width = mc.getWindow().getGuiScaledWidth();
int height = mc.getWindow().getGuiScaledHeight();
int x0 = width / 2 - BAR_WIDTH / 2;
int y0 = height - 29;
float chargeRatio = Mth.clamp(charge / 100.0F, 0.0F, 1.0F);
int filledWidth = Mth.clamp((int) (chargeRatio * BAR_WIDTH), 0, BAR_WIDTH);
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 84, BAR_WIDTH, BAR_HEIGHT);
if (filledWidth > 0) {
guiGraphics.setColor(1.0F, 0.78F, 0.2F, 0.45F + chargeRatio * 0.55F);
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 89, filledWidth, BAR_HEIGHT);
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
}
}
}
@@ -0,0 +1,84 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
import com.craisinlord.antarchy.content.client.HordeClientState;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import com.craisinlord.antarchy.content.network.HerculesBeetleFlightTogglePayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleJumpInputPayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleMountedAttackPayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleMountedChargePayload;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class HerculesBeetleClientHandler {
private static boolean wasPressingJump;
private static boolean wasPressingAttack;
private static boolean wasCharging;
private static boolean wasPressingFlightToggle;
private HerculesBeetleClientHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
CameraShakeClientState.tick();
HerculesBeetleImpactShakeClientState.tick();
HordeClientState.tick();
Minecraft mc = Minecraft.getInstance();
LocalPlayer player = mc.player;
if (player == null || mc.screen != null) {
resetAll();
return;
}
if (!(player.getVehicle() instanceof HerculesBeetleEntity)) {
resetAll();
return;
}
boolean pressingJump = mc.options.keyJump.isDown();
if (pressingJump != wasPressingJump) {
AntarchyForgeNetworkCore.sendToServer(new HerculesBeetleJumpInputPayload(pressingJump));
wasPressingJump = pressingJump;
}
boolean pressingAttack = mc.options.keyAttack.isDown();
if (pressingAttack && !wasPressingAttack) {
AntarchyForgeNetworkCore.sendToServer(new HerculesBeetleMountedAttackPayload());
}
wasPressingAttack = pressingAttack;
boolean charging = AntarchyKeyBindings.HERCULES_BEETLE_CHARGE.isDown();
if (charging != wasCharging) {
AntarchyForgeNetworkCore.sendToServer(new HerculesBeetleMountedChargePayload(charging));
}
wasCharging = charging;
boolean pressingFlightToggle = AntarchyKeyBindings.HERCULES_BEETLE_FLIGHT_TOGGLE.isDown();
if (pressingFlightToggle && !wasPressingFlightToggle) {
AntarchyForgeNetworkCore.sendToServer(new HerculesBeetleFlightTogglePayload());
}
wasPressingFlightToggle = pressingFlightToggle;
}
private static void resetAll() {
if (wasPressingJump) {
AntarchyForgeNetworkCore.sendToServer(new HerculesBeetleJumpInputPayload(false));
wasPressingJump = false;
}
wasPressingAttack = false;
wasCharging = false;
wasPressingFlightToggle = false;
}
}
@@ -0,0 +1,77 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserBaseParticleOptions;
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserParticleOptions;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.NoRenderParticle;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleProvider;
public final class InvertedGeyserEruptionParticle extends NoRenderParticle {
private final int fluidBlocks;
private final double motionX;
private final double motionY;
private final double motionZ;
private final InvertedGeyserParticleOptions plumeParticle;
private final InvertedGeyserBaseParticleOptions baseParticle;
private final InvertedGeyserBaseParticleOptions poofParticle;
protected InvertedGeyserEruptionParticle(
ClientLevel level,
double x,
double y,
double z,
double xd,
double yd,
double zd,
InvertedGeyserParticleOptions options
) {
super(level, x, y, z);
this.motionX = xd;
this.motionY = yd;
this.motionZ = zd;
this.fluidBlocks = options.fluidBlocks();
this.lifetime = 20;
this.plumeParticle = new InvertedGeyserParticleOptions(AntarchyForgeMisc.INVERTED_GEYSER_PLUME.get(), this.fluidBlocks, options.direction());
this.baseParticle = new InvertedGeyserBaseParticleOptions(AntarchyForgeMisc.INVERTED_GEYSER_BASE.get(), this.fluidBlocks, 1.5F, options.direction());
this.poofParticle = new InvertedGeyserBaseParticleOptions(AntarchyForgeMisc.INVERTED_GEYSER_POOF.get(), this.fluidBlocks, 2.0F, options.direction());
}
@Override
public void tick() {
super.tick();
if (this.age % 2 == 0) {
for (int i = 0; i < 2; i++) {
this.level.addParticle(this.baseParticle, this.x, this.y, this.z, this.motionX, this.motionY, this.motionZ);
}
}
for (int i = 0; i < this.fluidBlocks + 2; i++) {
this.level.addParticle(this.plumeParticle, this.x, this.y, this.z, this.motionX, this.motionY, this.motionZ);
}
if (this.age % 10 == 0) {
for (int i = 0; i < 20; i++) {
this.level.addParticle(this.poofParticle, this.x, this.y, this.z, this.motionX, this.motionY, this.motionZ);
}
}
}
public static final class Provider implements ParticleProvider<InvertedGeyserParticleOptions> {
@Override
public Particle createParticle(
InvertedGeyserParticleOptions options,
ClientLevel level,
double x,
double y,
double z,
double xd,
double yd,
double zd
) {
return new InvertedGeyserEruptionParticle(level, x, y, z, xd, yd, zd, options);
}
}
}
@@ -0,0 +1,117 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.item.JumpyBootsHelper;
import com.craisinlord.antarchy.content.item.JumpyBootsItem;
import com.craisinlord.antarchy.content.network.JumpyBootsLaunchPayload;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.RenderGuiOverlayEvent;
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class JumpyBootsClientHandler {
private static int chargeTicks = 0;
private static boolean wasCharging = false;
private static int primeWindowTicks = 0;
private static int storedChargeTicks = 0;
private JumpyBootsClientHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
LocalPlayer player = mc.player;
if (player == null || mc.level == null || mc.screen != null) {
reset();
return;
}
if (!JumpyBootsItem.isWearingJumpyBoots(player)) {
reset();
return;
}
boolean onGround = player.onGround();
boolean sneaking = player.input.shiftKeyDown;
boolean jumpPressed = mc.options.keyJump.consumeClick();
if (primeWindowTicks > 0) {
primeWindowTicks--;
if (jumpPressed) {
AntarchyForgeNetworkCore.sendToServer(new JumpyBootsLaunchPayload(storedChargeTicks, player.isSprinting()));
reset();
return;
}
if (primeWindowTicks <= 0) {
reset();
}
return;
}
if (!onGround) {
chargeTicks = 0;
wasCharging = false;
return;
}
if (jumpPressed && wasCharging && chargeTicks > 0) {
AntarchyForgeNetworkCore.sendToServer(new JumpyBootsLaunchPayload(chargeTicks, player.isSprinting()));
reset();
return;
}
if (sneaking) {
chargeTicks = Math.min(chargeTicks + 1, JumpyBootsHelper.CHARGE_TICKS_MAX);
wasCharging = true;
} else if (wasCharging && chargeTicks > 0) {
storedChargeTicks = chargeTicks;
if (jumpPressed) {
AntarchyForgeNetworkCore.sendToServer(new JumpyBootsLaunchPayload(storedChargeTicks, player.isSprinting()));
reset();
return;
}
primeWindowTicks = JumpyBootsHelper.PRIME_WINDOW_TICKS;
chargeTicks = 0;
wasCharging = false;
} else {
chargeTicks = 0;
wasCharging = false;
}
}
private static void reset() {
chargeTicks = 0;
wasCharging = false;
primeWindowTicks = 0;
storedChargeTicks = 0;
}
@SubscribeEvent
public static void onRenderGuiLayer(RenderGuiOverlayEvent.Pre event) {
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || !JumpyBootsItem.isWearingJumpyBoots(mc.player) || !isCharging()) {
return;
}
if (event.getOverlay().id().equals(VanillaGuiOverlay.EXPERIENCE_BAR.id())) {
event.setCanceled(true);
}
}
public static boolean isCharging() {
return chargeTicks > 0;
}
public static int getChargeTicks() {
return chargeTicks;
}
}
@@ -0,0 +1,48 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.content.item.JumpyBootsHelper;
import com.craisinlord.antarchy.content.item.JumpyBootsItem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
public final class JumpyBootsHudRenderer {
private static final ResourceLocation GUI_ICONS_LOCATION = ResourceLocation.withDefaultNamespace("textures/gui/icons.png");
private static final int BAR_WIDTH = 182;
private static final int BAR_HEIGHT = 5;
private JumpyBootsHudRenderer() {
}
public static void render(GuiGraphics guiGraphics) {
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
if (player == null || mc.screen != null || player.isDeadOrDying()) {
return;
}
if (!JumpyBootsItem.isWearingJumpyBoots(player)) {
return;
}
if (!JumpyBootsClientHandler.isCharging()) {
return;
}
int width = mc.getWindow().getGuiScaledWidth();
int height = mc.getWindow().getGuiScaledHeight();
int x0 = width / 2 - BAR_WIDTH / 2;
int y0 = height - 29;
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 84, BAR_WIDTH, BAR_HEIGHT);
int chargeTicks = JumpyBootsClientHandler.getChargeTicks();
float chargeRatio = Mth.clamp(chargeTicks / (float) JumpyBootsHelper.CHARGE_TICKS_MAX, 0.0F, 1.0F);
int filledWidth = Mth.clamp((int) (chargeRatio * BAR_WIDTH), 0, BAR_WIDTH);
if (filledWidth > 0) {
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 0.35F + chargeRatio * 0.65F);
guiGraphics.blit(GUI_ICONS_LOCATION, x0, y0, 0, 89, filledWidth, BAR_HEIGHT);
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
}
}
}
@@ -0,0 +1,292 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.lucid.LucidEntity;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeSounds;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.DeathScreen;
import net.minecraft.client.resources.sounds.AbstractTickableSoundInstance;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class LucidSoundHandler {
private static final double START_SCAN_RADIUS = 96.0D;
private static final int ANIM_ATTACK = 2;
private static final int ANIM_DEATH = 3;
private static final Map<UUID, LucidLoopSet> ACTIVE_LOOPS = new HashMap<>();
private LucidSoundHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null || mc.isPaused()) {
resetAll(mc);
return;
}
if (!mc.player.isAlive() || mc.player.isRemoved() || mc.player.isDeadOrDying() || mc.screen instanceof DeathScreen) {
resetAll(mc);
return;
}
pruneStaleLoops(mc);
refreshNearbyLucids(mc);
}
private static void refreshNearbyLucids(Minecraft mc) {
List<LucidEntity> lucids = mc.level.getEntitiesOfClass(
LucidEntity.class,
mc.player.getBoundingBox().inflate(START_SCAN_RADIUS)
);
for (LucidEntity lucid : lucids) {
if (!lucid.shouldPlayAmbientLoop()) {
continue;
}
LucidLoopSet set = ACTIVE_LOOPS.get(lucid.getUUID());
if (set == null) {
set = new LucidLoopSet(lucid);
ACTIVE_LOOPS.put(lucid.getUUID(), set);
set.start(mc);
continue;
}
set.refresh(mc, lucid);
}
}
private static void pruneStaleLoops(Minecraft mc) {
Iterator<Map.Entry<UUID, LucidLoopSet>> iterator = ACTIVE_LOOPS.entrySet().iterator();
while (iterator.hasNext()) {
LucidLoopSet set = iterator.next().getValue();
if (!set.isValid()) {
set.stop(mc);
iterator.remove();
continue;
}
if (!set.entity.shouldPlayAmbientLoop()) {
set.stop(mc);
iterator.remove();
}
}
}
private static void resetAll(Minecraft mc) {
for (LucidLoopSet set : ACTIVE_LOOPS.values()) {
set.stop(mc);
}
ACTIVE_LOOPS.clear();
}
private static final class LucidLoopSet {
private LucidEntity entity;
@Nullable private LucidLoopSound ambient;
@Nullable private LucidLoopSound flying;
private int lastAnimationState = -1;
private LucidLoopSet(LucidEntity entity) {
this.entity = entity;
}
private boolean isValid() {
return this.entity != null && this.entity.isAlive() && !this.entity.isRemoved();
}
private void start(Minecraft mc) {
this.playAttackSoundIfNeeded(mc, this.entity);
if (this.ambient == null || !mc.getSoundManager().isActive(this.ambient)) {
this.ambient = new LucidLoopSound(
this.entity,
AntarchyForgeSounds.LUCID_AMBIENT.get(),
SoundSource.HOSTILE,
0.14F,
0.97F,
true
);
mc.getSoundManager().play(this.ambient);
}
if (this.entity.shouldPlayFlyingLoop() && (this.flying == null || !mc.getSoundManager().isActive(this.flying))) {
this.flying = new LucidLoopSound(
this.entity,
AntarchyForgeSounds.LUCID_FLYING.get(),
SoundSource.HOSTILE,
0.18F,
1.0F,
false
);
mc.getSoundManager().play(this.flying);
}
}
private void refresh(Minecraft mc, LucidEntity entity) {
this.entity = entity;
this.playAttackSoundIfNeeded(mc, entity);
if (this.ambient == null || !mc.getSoundManager().isActive(this.ambient)) {
this.ambient = new LucidLoopSound(
entity,
AntarchyForgeSounds.LUCID_AMBIENT.get(),
SoundSource.HOSTILE,
0.14F,
0.97F,
true
);
mc.getSoundManager().play(this.ambient);
} else {
this.ambient.setEntity(entity);
}
if (entity.shouldPlayFlyingLoop()) {
if (this.flying == null || !mc.getSoundManager().isActive(this.flying)) {
this.flying = new LucidLoopSound(
entity,
AntarchyForgeSounds.LUCID_FLYING.get(),
SoundSource.HOSTILE,
0.18F,
1.0F,
false
);
mc.getSoundManager().play(this.flying);
} else {
this.flying.setEntity(entity);
}
} else if (this.flying != null) {
mc.getSoundManager().stop(this.flying);
this.flying = null;
}
}
private void stop(Minecraft mc) {
if (this.ambient != null) {
mc.getSoundManager().stop(this.ambient);
this.ambient = null;
}
if (this.flying != null) {
mc.getSoundManager().stop(this.flying);
this.flying = null;
}
this.lastAnimationState = -1;
}
private void playAttackSoundIfNeeded(Minecraft mc, LucidEntity entity) {
int currentState = entity.getAnimationState();
if (currentState == ANIM_ATTACK && this.lastAnimationState != ANIM_ATTACK) {
mc.getSoundManager().play(new LucidOneShotSound(
entity,
AntarchyForgeSounds.LUCID_ATTACK.get(),
SoundSource.HOSTILE,
1.0F,
1.02F + entity.getRandom().nextFloat() * 0.08F
));
}
this.lastAnimationState = currentState;
}
}
private static final class LucidLoopSound extends AbstractTickableSoundInstance {
private LucidEntity entity;
private final boolean ambient;
private LucidLoopSound(LucidEntity entity, SoundEvent soundEvent, SoundSource source,
float volume, float pitch, boolean ambient) {
super(soundEvent, source, RandomSource.create());
this.entity = entity;
this.ambient = ambient;
this.looping = true;
this.delay = 0;
this.relative = false;
this.attenuation = SoundInstance.Attenuation.LINEAR;
this.volume = volume;
this.pitch = pitch;
this.x = entity.getX();
this.y = entity.getY();
this.z = entity.getZ();
}
private void setEntity(LucidEntity entity) {
this.entity = entity;
}
@Override
public void tick() {
if (this.entity == null
|| this.entity.isRemoved()
|| this.entity.isDeadOrDying()
|| this.entity.getAnimationState() == 3
|| !this.entity.shouldPlayAmbientLoop()) {
this.stop();
return;
}
if (!this.ambient && !this.entity.shouldPlayFlyingLoop()) {
this.stop();
return;
}
this.x = this.entity.getX();
this.y = this.entity.getY();
this.z = this.entity.getZ();
}
@Override
public boolean canStartSilent() {
return true;
}
}
private static final class LucidOneShotSound extends AbstractTickableSoundInstance {
private LucidEntity entity;
private LucidOneShotSound(LucidEntity entity, SoundEvent soundEvent, SoundSource source,
float volume, float pitch) {
super(soundEvent, source, RandomSource.create());
this.entity = entity;
this.looping = false;
this.delay = 0;
this.relative = false;
this.attenuation = SoundInstance.Attenuation.LINEAR;
this.volume = volume;
this.pitch = pitch;
this.x = entity.getX();
this.y = entity.getY();
this.z = entity.getZ();
}
@Override
public void tick() {
if (this.entity == null
|| this.entity.isRemoved()
|| this.entity.isDeadOrDying()
|| this.entity.getAnimationState() == ANIM_DEATH) {
this.stop();
return;
}
this.x = this.entity.getX();
this.y = this.entity.getY();
this.z = this.entity.getZ();
}
}
}
@@ -0,0 +1,63 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.item.MogglesCaveDetector;
import com.craisinlord.antarchy.content.item.MogglesLogic;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public final class MogglesClientRenderer {
private MogglesClientRenderer() {}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
Level level = mc.level;
if (player == null || level == null) return;
if (!MogglesLogic.isWearingMoggles(player) || level.canSeeSky(player.blockPosition())) {
MogglesCaveDetector.clear();
return;
}
// Run cave BFS (internally rate-limited to every 40 ticks).
MogglesCaveDetector.tick(player, level);
BlockPos target = MogglesCaveDetector.getCaveTarget();
if (target == null) return;
// Spawn particle trail toward the cave every 2 ticks.
if (level.getGameTime() % 2 != 0) return;
Vec3 eye = player.getEyePosition();
Vec3 end = Vec3.atCenterOf(target);
double totalDist = eye.distanceTo(end);
if (totalDist < 1.5) return;
Vec3 dir = end.subtract(eye).normalize();
int steps = Math.min(5, (int) (totalDist / 1.5));
double spacing = (totalDist - 1.5) / Math.max(steps, 1);
for (int i = 0; i < steps; i++) {
double t = 1.5 + i * spacing;
Vec3 p = eye.add(dir.scale(t));
Vec3 vel = dir.scale(0.04);
level.addParticle(ParticleTypes.END_ROD,
p.x, p.y, p.z,
vel.x, vel.y, vel.z);
}
}
}
@@ -0,0 +1,96 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.particles.BlockParticleOption;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.MovementInputUpdateEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ParalyzedClientHandler {
private static final int PARTICLE_INTERVAL = 3;
private static final int PARTICLES_PER_ENTITY = 4;
private static final double PARTICLE_RADIUS = 24.0;
private ParalyzedClientHandler() {
}
@SubscribeEvent
public static void onMovementInputUpdate(MovementInputUpdateEvent event) {
if (!event.getEntity().hasEffect(AntarchyForgeMisc.PARALYZED.get())) {
return;
}
var input = event.getInput();
input.left = false;
input.right = false;
input.up = false;
input.down = false;
input.leftImpulse = 0.0F;
input.forwardImpulse = 0.0F;
input.jumping = false;
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.player == null || mc.level == null) {
return;
}
Player player = mc.player;
if (player.hasEffect(AntarchyForgeMisc.PARALYZED.get())) {
while (mc.options.keyAttack.consumeClick()) { }
while (mc.options.keyUse.consumeClick()) { }
}
if (player.tickCount % PARTICLE_INTERVAL != 0) {
return;
}
ClientLevel level = mc.level;
level.getEntitiesOfClass(
LivingEntity.class,
player.getBoundingBox().inflate(PARTICLE_RADIUS),
entity -> entity != player
&& entity.isAlive()
&& entity.hasEffect(AntarchyForgeMisc.PARALYZED.get())
).forEach(entity -> spawnStoneParticles(level, entity));
}
private static void spawnStoneParticles(ClientLevel level, LivingEntity entity) {
BlockState stone = Blocks.STONE.defaultBlockState();
BlockParticleOption particle = new BlockParticleOption(ParticleTypes.BLOCK, stone);
float w = entity.getBbWidth();
float h = entity.getBbHeight();
for (int i = 0; i < PARTICLES_PER_ENTITY; i++) {
double px = entity.getX() + (Math.random() - 0.5) * w;
double py = entity.getY() + Math.random() * h;
double pz = entity.getZ() + (Math.random() - 0.5) * w;
double vx = (Math.random() - 0.5) * 0.08;
double vy = Math.random() * 0.06;
double vz = (Math.random() - 0.5) * 0.08;
level.addParticle(particle, px, py, pz, vx, vy, vz);
}
}
}
@@ -0,0 +1,44 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.util.Mth;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.player.Player;
public final class ParalyzedHudRenderer {
private ParalyzedHudRenderer() {
}
public static void render(GuiGraphics guiGraphics) {
Minecraft mc = Minecraft.getInstance();
Player player = mc.player;
if (player == null || player.isDeadOrDying()) {
return;
}
MobEffectInstance effect = player.getEffect(AntarchyForgeMisc.PARALYZED.get());
if (effect == null) {
return;
}
int duration = effect.getDuration();
float fade = effect.isInfiniteDuration()
? 1.0F
: Math.min(1.0F, Math.max(duration, 20) / 20.0F);
float pulse = 0.85F + 0.15F * Mth.sin(player.tickCount * ((float) Math.PI * 2.0F / 120.0F));
int alpha = Mth.clamp((int) (fade * pulse * 0xC0), 0, 0xFF);
int width = mc.getWindow().getGuiScaledWidth();
int height = mc.getWindow().getGuiScaledHeight();
int color = (alpha << 24) | 0x303030;
guiGraphics.fill(0, 0, width, height, color);
int innerAlpha = Mth.clamp(alpha / 3, 0, 0xFF);
int innerColor = (innerAlpha << 24) | 0x606060;
int margin = Math.min(width, height) / 6;
guiGraphics.fill(margin, margin, width - margin, height - margin, innerColor);
}
}
@@ -0,0 +1,18 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import software.bernie.geckolib.event.GeoRenderEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ParalyzedStoneRenderHandler {
private ParalyzedStoneRenderHandler() {
}
@SubscribeEvent
public static void onCompileGeoEntityLayers(GeoRenderEvent.Entity.CompileRenderLayers event) {
}
}
@@ -0,0 +1,282 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.ReverieEntity;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferUploader;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.blaze3d.vertex.VertexFormat;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.RenderLevelStageEvent;
import org.joml.Matrix4f;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.FORGE)
public final class ReverieTrailHandler {
private static final int MAX_TRAIL_POINTS = 20;
private static final int IDLE_LIFETIME_TICKS = 8;
private static final int NORMAL_LIFETIME_TICKS = 14;
private static final int DASH_LIFETIME_TICKS = 22;
private static final float CORE_LINE_WIDTH = 0.035f;
private static final float GLOW_LINE_WIDTH = 0.10f;
private static final double MIN_DISTANCE_BETWEEN_POINTS = 0.05;
private static final double DASH_DISTANCE_THRESHOLD = 0.35;
private static final Map<Integer, ArrayDeque<TrailPoint>> TRAILS = new HashMap<>();
private ReverieTrailHandler() {}
private static final class TrailPoint {
final Vec3 pos;
final ReverieEntity.Mood mood;
int age;
final int lifetime;
TrailPoint(Vec3 pos, ReverieEntity.Mood mood, int lifetime) {
this.pos = pos;
this.mood = mood;
this.age = 0;
this.lifetime = lifetime;
}
float progress() {
return lifetime <= 0 ? 1f : (float) age / (float) lifetime;
}
boolean expired() {
return age >= lifetime;
}
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null) {
TRAILS.clear();
return;
}
if (mc.isPaused()) return;
Set<Integer> activeIds = new HashSet<>();
for (Entity entity : mc.level.entitiesForRendering()) {
if (!(entity instanceof ReverieEntity reverie)) continue;
int id = reverie.getId();
activeIds.add(id);
ReverieEntity.Mood mood = reverie.getMood();
Vec3 pos = reverie.position().add(0.0, reverie.getBbHeight() * 0.5, 0.0);
ArrayDeque<TrailPoint> points = TRAILS.computeIfAbsent(id, k -> new ArrayDeque<>());
if (points.isEmpty()) {
points.addFirst(new TrailPoint(pos, mood, lifetimeFor(mood, false)));
} else {
Vec3 lastPos = points.peekFirst().pos;
double distSq = pos.distanceToSqr(lastPos);
if (distSq >= MIN_DISTANCE_BETWEEN_POINTS * MIN_DISTANCE_BETWEEN_POINTS) {
boolean isDash = distSq >= DASH_DISTANCE_THRESHOLD * DASH_DISTANCE_THRESHOLD;
points.addFirst(new TrailPoint(pos, mood, lifetimeFor(mood, isDash)));
while (points.size() > MAX_TRAIL_POINTS) {
points.pollLast();
}
}
}
Iterator<TrailPoint> it = points.iterator();
while (it.hasNext()) {
TrailPoint p = it.next();
p.age++;
if (p.expired()) it.remove();
}
}
TRAILS.keySet().removeIf(id -> !activeIds.contains(id));
}
private static int lifetimeFor(ReverieEntity.Mood mood, boolean isDash) {
if (isDash || mood == ReverieEntity.Mood.PURPLE) return DASH_LIFETIME_TICKS;
if (mood == ReverieEntity.Mood.WHITE) return IDLE_LIFETIME_TICKS;
return NORMAL_LIFETIME_TICKS;
}
@SubscribeEvent
public static void onRenderLevelStage(RenderLevelStageEvent event) {
if (event.getStage() != RenderLevelStageEvent.Stage.AFTER_PARTICLES) return;
if (TRAILS.isEmpty()) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null) return;
Camera camera = event.getCamera();
Vec3 camPos = camera.getPosition();
Matrix4f mat = event.getPoseStack().last().pose();
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.depthMask(false);
RenderSystem.disableCull();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
Tesselator tesselator = Tesselator.getInstance();
List<List<TrailPoint>> snapshots = new ArrayList<>(TRAILS.size());
for (ArrayDeque<TrailPoint> deque : TRAILS.values()) {
if (deque.size() >= 2) snapshots.add(new ArrayList<>(deque));
}
if (snapshots.isEmpty()) {
RenderSystem.enableCull();
RenderSystem.depthMask(true);
RenderSystem.disableBlend();
return;
}
BufferBuilder glowBuf = tesselator.getBuilder();
glowBuf.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
for (List<TrailPoint> points : snapshots) {
buildPass(glowBuf, mat, points, camPos, true);
}
BufferUploader.drawWithShader(glowBuf.end());
BufferBuilder coreBuf = tesselator.getBuilder();
coreBuf.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
for (List<TrailPoint> points : snapshots) {
buildPass(coreBuf, mat, points, camPos, false);
}
BufferUploader.drawWithShader(coreBuf.end());
RenderSystem.enableCull();
RenderSystem.depthMask(true);
RenderSystem.disableBlend();
}
private static void buildPass(BufferBuilder buf, Matrix4f mat, List<TrailPoint> points, Vec3 camPos, boolean glow) {
int n = points.size();
for (int i = 0; i < n - 1; i++) {
TrailPoint newer = points.get(i);
TrailPoint older = points.get(i + 1);
float alphaNearer = (glow ? glowAlpha(newer.mood) : coreAlpha(newer.mood)) * indexAlpha(i, n) * (1f - newer.progress());
float alphaFarther = (glow ? glowAlpha(older.mood) : coreAlpha(older.mood)) * indexAlpha(i + 1, n) * (1f - older.progress());
if (alphaNearer < 0.005f && alphaFarther < 0.005f) continue;
Vec3 right = cameraFacingRight(newer.pos, older.pos, camPos);
if (right == null) continue;
float halfWidth = glow ? glowHalfWidth(newer.mood) : coreHalfWidth(newer.mood);
right = right.scale(halfWidth);
float[] cn = color(newer.mood);
float[] co = color(older.mood);
Vec3 na = newer.pos.subtract(camPos);
Vec3 nb = older.pos.subtract(camPos);
buf.vertex(mat, (float)(na.x + right.x), (float)(na.y + right.y), (float)(na.z + right.z)).color(cn[0], cn[1], cn[2], alphaNearer).endVertex();
buf.vertex(mat, (float)(na.x - right.x), (float)(na.y - right.y), (float)(na.z - right.z)).color(cn[0], cn[1], cn[2], alphaNearer).endVertex();
buf.vertex(mat, (float)(nb.x - right.x), (float)(nb.y - right.y), (float)(nb.z - right.z)).color(co[0], co[1], co[2], alphaFarther).endVertex();
buf.vertex(mat, (float)(nb.x + right.x), (float)(nb.y + right.y), (float)(nb.z + right.z)).color(co[0], co[1], co[2], alphaFarther).endVertex();
}
}
private static Vec3 cameraFacingRight(Vec3 a, Vec3 b, Vec3 camPos) {
Vec3 segDir = b.subtract(a);
if (segDir.lengthSqr() < 1e-12) return null;
segDir = segDir.normalize();
Vec3 mid = a.add(b).scale(0.5);
Vec3 toCamera = camPos.subtract(mid);
if (toCamera.lengthSqr() < 1e-12) return null;
toCamera = toCamera.normalize();
Vec3 right = segDir.cross(toCamera);
if (right.lengthSqr() < 1e-10) {
right = segDir.cross(new Vec3(0.0, 1.0, 0.0));
if (right.lengthSqr() < 1e-10) return null;
}
return right.normalize();
}
private static float indexAlpha(int i, int n) {
if (n <= 1) return 1f;
return 1f - (float) i / (float) (n - 1);
}
private static final float[] COLOR_WHITE = { 1.0f, 1.0f, 1.0f };
private static final float[] COLOR_YELLOW = { 1.0f, 0.85f, 0.1f };
private static final float[] COLOR_RED = { 1.0f, 0.1f, 0.05f };
private static final float[] COLOR_PURPLE = { 0.7f, 0.1f, 1.0f };
private static final float[] COLOR_BLUE = { 0.1f, 0.5f, 1.0f };
private static float[] color(ReverieEntity.Mood mood) {
return switch (mood) {
case WHITE -> COLOR_WHITE;
case YELLOW -> COLOR_YELLOW;
case RED -> COLOR_RED;
case PURPLE -> COLOR_PURPLE;
case BLUE -> COLOR_BLUE;
};
}
private static float glowAlpha(ReverieEntity.Mood mood) {
return switch (mood) {
case WHITE -> 0.15f;
case YELLOW -> 0.30f;
case RED -> 0.55f;
case PURPLE -> 0.65f;
case BLUE -> 0.35f;
};
}
private static float coreAlpha(ReverieEntity.Mood mood) {
return switch (mood) {
case WHITE -> 0.35f;
case YELLOW -> 0.55f;
case RED -> 0.85f;
case PURPLE -> 0.95f;
case BLUE -> 0.60f;
};
}
private static float glowHalfWidth(ReverieEntity.Mood mood) {
float base = GLOW_LINE_WIDTH * 0.5f;
return switch (mood) {
case WHITE -> base * 0.60f;
case YELLOW -> base * 0.80f;
case RED -> base * 1.00f;
case PURPLE -> base * 1.25f;
case BLUE -> base * 0.90f;
};
}
private static float coreHalfWidth(ReverieEntity.Mood mood) {
float base = CORE_LINE_WIDTH * 0.5f;
return switch (mood) {
case WHITE -> base * 0.60f;
case YELLOW -> base * 0.80f;
case RED -> base * 1.20f;
case PURPLE -> base * 1.50f;
case BLUE -> base * 1.00f;
};
}
}
@@ -0,0 +1,151 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.ScorpionWhipTetherClientState;
import com.craisinlord.antarchy.content.item.ScorpionWhipItem;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.BufferUploader;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.blaze3d.vertex.VertexFormat;
import java.util.Map;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.HumanoidArm;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.client.event.RenderLevelStageEvent;
import org.joml.Matrix4f;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.FORGE)
public final class ScorpionWhipTetherRenderHandler {
private ScorpionWhipTetherRenderHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.level == null) {
ScorpionWhipTetherClientState.clear();
}
}
@SubscribeEvent
public static void onRenderLevelStage(RenderLevelStageEvent event) {
if (event.getStage() != RenderLevelStageEvent.Stage.AFTER_PARTICLES) {
return;
}
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.level == null) {
return;
}
Map<Integer, Integer> tethers = ScorpionWhipTetherClientState.snapshot();
if (tethers.isEmpty()) {
return;
}
Camera camera = event.getCamera();
Vec3 cameraPos = camera.getPosition();
Matrix4f pose = event.getPoseStack().last().pose();
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.depthMask(false);
RenderSystem.disableCull();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
BufferBuilder buffer = Tesselator.getInstance().getBuilder();
buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
for (Map.Entry<Integer, Integer> entry : tethers.entrySet()) {
Entity source = minecraft.level.getEntity(entry.getKey());
Entity target = minecraft.level.getEntity(entry.getValue());
if (!(source instanceof Player player) || target == null || target.isRemoved()) {
continue;
}
buildTether(
buffer,
pose,
tetherStart(player, event.getPartialTick()),
target.position().add(0.0D, target.getBbHeight() * 0.5D, 0.0D),
cameraPos
);
}
BufferUploader.drawWithShader(buffer.end());
RenderSystem.enableCull();
RenderSystem.depthMask(true);
RenderSystem.disableBlend();
}
private static Vec3 tetherStart(Player player, float partialTick) {
Vec3 start = player.getEyePosition(partialTick).add(0.0D, -0.45D, 0.0D);
boolean mainHandWhip = player.getMainHandItem().getItem() instanceof ScorpionWhipItem;
boolean offHandWhip = player.getOffhandItem().getItem() instanceof ScorpionWhipItem;
if (!mainHandWhip && !offHandWhip) {
return start;
}
boolean useMainHand = mainHandWhip || !offHandWhip;
HumanoidArm arm = useMainHand ? player.getMainArm() : player.getMainArm().getOpposite();
float bodyYaw = Mth.rotLerp(partialTick, player.yBodyRotO, player.yBodyRot);
double radians = Math.toRadians(bodyYaw + 90.0F);
double side = arm == HumanoidArm.RIGHT ? -0.28D : 0.28D;
return start.add(Math.cos(radians) * side, -0.12D, Math.sin(radians) * side);
}
private static void buildTether(BufferBuilder buffer, Matrix4f pose, Vec3 start, Vec3 end, Vec3 cameraPos) {
Vec3 delta = end.subtract(start);
double length = delta.length();
if (length < 0.001D) {
return;
}
Vec3 forward = delta.scale(1.0D / length);
Vec3 right = forward.cross(new Vec3(0.0D, 1.0D, 0.0D));
if (right.lengthSqr() < 1.0E-6D) {
right = forward.cross(new Vec3(1.0D, 0.0D, 0.0D));
}
right = right.normalize();
int segments = Math.max(16, Mth.ceil(length * 8.0D));
for (int i = 0; i < segments; i++) {
double t0 = (double) i / (double) segments;
double t1 = (double) (i + 1) / (double) segments;
Vec3 p0 = ropePoint(start, delta, t0, length);
Vec3 p1 = ropePoint(start, delta, t1, length);
float width = 0.045F;
Vec3 offset = right.scale(width);
Vec3 a = p0.subtract(cameraPos);
Vec3 b = p1.subtract(cameraPos);
float shade = i % 2 == 0 ? 0.82F : 0.62F;
float red = 0.36F * shade;
float green = 0.20F * shade;
float blue = 0.11F * shade;
buffer.vertex(pose, (float) (a.x + offset.x), (float) (a.y + offset.y), (float) (a.z + offset.z)).color(red, green, blue, 1.0F).endVertex();
buffer.vertex(pose, (float) (a.x - offset.x), (float) (a.y - offset.y), (float) (a.z - offset.z)).color(red, green, blue, 1.0F).endVertex();
buffer.vertex(pose, (float) (b.x - offset.x), (float) (b.y - offset.y), (float) (b.z - offset.z)).color(red, green, blue, 1.0F).endVertex();
buffer.vertex(pose, (float) (b.x + offset.x), (float) (b.y + offset.y), (float) (b.z + offset.z)).color(red, green, blue, 1.0F).endVertex();
}
}
private static Vec3 ropePoint(Vec3 start, Vec3 delta, double t, double length) {
double sag = Math.sin(t * Math.PI) * Math.min(0.45D, length * 0.07D);
return start.add(delta.scale(t)).add(0.0D, -sag, 0.0D);
}
}
@@ -0,0 +1,56 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.AntarchySoundEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.sounds.SoundSource;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.FORGE)
public final class StinkySoundHandler {
private static final int FIRST_SOUND_DELAY = 20;
private static final int MIN_INTERVAL = 60;
private static final int MAX_INTERVAL = 120;
private static int nextSoundTick = FIRST_SOUND_DELAY;
private StinkySoundHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
Minecraft mc = Minecraft.getInstance();
if (mc.level == null || mc.player == null || mc.isPaused()) {
nextSoundTick = FIRST_SOUND_DELAY;
return;
}
if (!mc.player.hasEffect(AntarchyObjects.STINKY_EFFECT.get())) {
nextSoundTick = FIRST_SOUND_DELAY;
return;
}
nextSoundTick--;
if (nextSoundTick > 0) {
return;
}
mc.level.playLocalSound(
mc.player.getX(),
mc.player.getY(),
mc.player.getZ(),
AntarchySoundEvents.STINKY_FLY.get(),
SoundSource.AMBIENT,
0.14F + mc.level.random.nextFloat() * 0.06F,
0.92F + mc.level.random.nextFloat() * 0.16F,
false
);
nextSoundTick = MIN_INTERVAL + mc.level.random.nextInt(MAX_INTERVAL - MIN_INTERVAL + 1);
}
}
@@ -0,0 +1,18 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.client.event.ViewportEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class ThoraxisGravityCameraHandler {
private ThoraxisGravityCameraHandler() {
}
@SubscribeEvent
public static void onComputeCameraAngles(ViewportEvent.ComputeCameraAngles event) {
}
}
@@ -0,0 +1,45 @@
package com.craisinlord.antarchy.forge.client;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.core.BlockPos;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.Block;
public final class TriffidGooHudRenderer {
private TriffidGooHudRenderer() {
}
private static float fadeProgress = 0f;
private static final float FADE_SPEED = 0.05f;
private static final int MAX_ALPHA = 0x55;
public static void render(GuiGraphics guiGraphics) {
Minecraft minecraft = Minecraft.getInstance();
Player player = minecraft.player;
if (player == null || player.isDeadOrDying()) {
fadeProgress = Math.max(0f, fadeProgress - FADE_SPEED);
if (fadeProgress <= 0f) return;
} else {
Block goo = AntarchyForgeBlocks.TRIFFID_GOO_BLOCK.get();
BlockPos feet = player.blockPosition();
boolean inGoo = player.level().getBlockState(feet).is(goo)
|| player.level().getBlockState(feet.above()).is(goo);
if (inGoo) {
fadeProgress = Math.min(1f, fadeProgress + FADE_SPEED);
} else {
fadeProgress = Math.max(0f, fadeProgress - FADE_SPEED);
}
if (fadeProgress <= 0f || minecraft.screen != null) return;
}
int alpha = Mth.floor(MAX_ALPHA * fadeProgress);
int color = (alpha << 24) | 0x003300;
int width = minecraft.getWindow().getGuiScaledWidth();
int height = minecraft.getWindow().getGuiScaledHeight();
guiGraphics.fill(0, 0, width, height, color);
}
}
@@ -0,0 +1,121 @@
package com.craisinlord.antarchy.forge.client;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.WaspEntity;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeSounds;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.sounds.AbstractTickableSoundInstance;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.RandomSource;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.TickEvent;
import org.jetbrains.annotations.Nullable;
@Mod.EventBusSubscriber(modid = Antarchy.MODID, value = Dist.CLIENT)
public final class WaspSoundHandler {
private static final double START_SCAN_RADIUS = 96.0D;
private static final Map<UUID, WaspLoopSound> ACTIVE_LOOPS = new HashMap<>();
private WaspSoundHandler() {
}
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
if (event.phase != TickEvent.Phase.END) return;
// Ambient buzzing now comes from the wasp entity itself.
}
private static void refreshNearbyWasps(Minecraft mc) {
for (WaspEntity wasp : mc.level.getEntitiesOfClass(WaspEntity.class, mc.player.getBoundingBox().inflate(START_SCAN_RADIUS))) {
WaspLoopSound loopSound = ACTIVE_LOOPS.get(wasp.getUUID());
if (loopSound == null || !mc.getSoundManager().isActive(loopSound)) {
loopSound = new WaspLoopSound(
wasp,
AntarchyForgeSounds.WASP_IDLE.get(),
SoundSource.HOSTILE,
0.12F,
1.0F
);
ACTIVE_LOOPS.put(wasp.getUUID(), loopSound);
mc.getSoundManager().play(loopSound);
} else {
loopSound.setEntity(wasp);
}
}
}
private static void pruneStaleLoops(Minecraft mc) {
Iterator<Map.Entry<UUID, WaspLoopSound>> iterator = ACTIVE_LOOPS.entrySet().iterator();
while (iterator.hasNext()) {
WaspLoopSound loopSound = iterator.next().getValue();
if (!loopSound.isValid()) {
loopSound.stop(mc);
iterator.remove();
}
}
}
private static void resetAll(Minecraft mc) {
for (WaspLoopSound loopSound : ACTIVE_LOOPS.values()) {
loopSound.stop(mc);
}
ACTIVE_LOOPS.clear();
}
private static final class WaspLoopSound extends AbstractTickableSoundInstance {
@Nullable
private WaspEntity entity;
private WaspLoopSound(WaspEntity entity, SoundEvent soundEvent, SoundSource source, float volume, float pitch) {
super(soundEvent, source, RandomSource.create());
this.entity = entity;
this.looping = true;
this.delay = 0;
this.relative = false;
this.attenuation = SoundInstance.Attenuation.LINEAR;
this.volume = volume;
this.pitch = pitch;
this.x = entity.getX();
this.y = entity.getY();
this.z = entity.getZ();
}
private void setEntity(WaspEntity entity) {
this.entity = entity;
}
private boolean isValid() {
return this.entity != null && this.entity.isAlive() && !this.entity.isRemoved();
}
private void stop(Minecraft mc) {
mc.getSoundManager().stop(this);
}
@Override
public void tick() {
if (this.entity == null || this.entity.isRemoved() || this.entity.isDeadOrDying() || !this.entity.isAlive()) {
this.stop();
return;
}
this.x = this.entity.getX();
this.y = this.entity.getY();
this.z = this.entity.getZ();
}
@Override
public boolean canStartSilent() {
return true;
}
}
}
@@ -0,0 +1,55 @@
package com.craisinlord.antarchy.forge.content.block;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.CornCropBlock;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
public final class WildCornBlock extends CornCropBlock {
public WildCornBlock(BlockBehaviour.Properties properties) {
super(properties);
this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 3).setValue(HALF, DoubleBlockHalf.LOWER));
}
@Override
public boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) {
return state.is(Blocks.GRASS_BLOCK);
}
@Override
public boolean isRandomlyTicking(BlockState state) {
return false;
}
@Override
public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
}
@Override
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state, boolean isClient) {
return false;
}
@Override
public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state) {
return false;
}
@Override
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
}
@Override
public ItemStack getCloneItemStack(BlockGetter level, BlockPos pos, BlockState state) {
return new ItemStack(AntarchyObjects.CORN.get());
}
}
@@ -0,0 +1,463 @@
package com.craisinlord.antarchy.forge.content.fluid;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fluids.ForgeFlowingFluid;
public abstract class AntiwaterFluid extends ForgeFlowingFluid {
private static final int MAX_HORIZONTAL_SPREAD_AMOUNT = 5;
private static final int MAX_VERTICAL_FLOW_AMOUNT = 7;
protected AntiwaterFluid(Properties properties) {
super(properties);
}
@Override
protected BlockState createLegacyBlock(FluidState state) {
return AntarchyForgeBlocks.ANTIWATER_BLOCK.get()
.defaultBlockState()
.setValue(LiquidBlock.LEVEL, getLegacyLevel(state));
}
@Override
public Vec3 getFlow(BlockGetter level, BlockPos pos, FluidState state) {
double flowX = 0.0D;
double flowZ = 0.0D;
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos neighborPos = pos.relative(direction);
FluidState neighborFluid = level.getFluidState(neighborPos);
int neighborAmount = this.isSame(neighborFluid.getType()) ? neighborFluid.getAmount() : 0;
int currentAmount = state.getAmount();
int delta = neighborAmount - currentAmount;
if (delta != 0) {
flowX += direction.getStepX() * delta;
flowZ += direction.getStepZ() * delta;
}
}
Vec3 flow = new Vec3(flowX, 1.0D, flowZ);
return flow.lengthSqr() < 1.0E-6D ? new Vec3(0.0D, 1.0D, 0.0D) : flow.normalize();
}
@Override
protected boolean canConvertToSource(Level level) {
return false;
}
@Override
public int getTickDelay(LevelReader level) {
return 5;
}
@Override
protected int getSpreadDelay(Level level, BlockPos pos, FluidState currentState, FluidState newState) {
return this.getTickDelay(level);
}
@Override
protected boolean canBeReplacedWith(FluidState state, BlockGetter level, BlockPos pos, Fluid fluid, Direction direction) {
return direction != Direction.DOWN && !this.isSame(fluid);
}
@Override
protected boolean canSpreadTo(
BlockGetter level,
BlockPos fromPos,
BlockState fromState,
Direction direction,
BlockPos toPos,
BlockState toState,
FluidState toFluidState,
Fluid fluid
) {
if (direction == Direction.DOWN) {
return false;
}
return super.canSpreadTo(level, fromPos, fromState, direction, toPos, toState, toFluidState, fluid);
}
@Override
protected FluidState getNewLiquid(Level level, BlockPos pos, BlockState blockState) {
FluidState currentState = blockState.getFluidState();
if (!currentState.isSource() && !this.isFlowingStateValid(level, pos, currentState)) {
return Fluids.EMPTY.defaultFluidState();
}
if (this.canCreateSourceAt(level, pos)) {
return this.getSource(false);
}
if (this.isValidVerticalSupport(level, pos)) {
return this.getFlowing(MAX_VERTICAL_FLOW_AMOUNT, false);
}
int bestNeighborAmount = this.getBestHorizontalNeighborAmount(level, pos);
if (bestNeighborAmount > 1) {
return this.getFlowing(bestNeighborAmount - 1, false);
}
return net.minecraft.world.level.material.Fluids.EMPTY.defaultFluidState();
}
/*
@Override
protected void spread(Level level, BlockPos pos, FluidState state) {
if (state.isEmpty()) {
return;
}
if (!state.isSource() && !this.isFlowingStateValid(level, pos, state)) {
level.setBlockAndUpdate(pos, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState());
this.scheduleCleanup(level, pos);
return;
}
BlockState blockState = level.getBlockState(pos);
int nextAmount = state.getAmount() - 1;
BlockPos abovePos = pos.above();
BlockState aboveState = level.getBlockState(abovePos);
FluidState aboveFluid = level.getFluidState(abovePos);
if (!aboveState.isSolid() && !aboveFluid.getType().isSame(this)) {
FluidState upwardState = this.getFlowing(8, false);
if (this.canSpreadTo(level, pos, blockState, Direction.UP, abovePos, aboveState, aboveFluid, upwardState.getType())) {
this.spreadTo(level, abovePos, aboveState, Direction.UP, upwardState);
}
}
if (!this.canHangAt(level, pos)) {
return;
}
if (nextAmount <= 0) {
return;
}
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos targetPos = pos.relative(direction);
BlockState targetState = level.getBlockState(targetPos);
FluidState targetFluid = targetState.getFluidState();
if (!this.canSpreadHorizontallyInto(level, targetPos)) {
continue;
}
FluidState horizontalState = this.getFlowing(Math.min(nextAmount, MAX_HORIZONTAL_SPREAD_AMOUNT), false);
if (!this.canSpreadTo(level, pos, blockState, direction, targetPos, targetState, targetFluid, horizontalState.getType())) {
continue;
}
this.spreadTo(level, targetPos, targetState, direction, horizontalState);
}
}
*/
@Override
protected void spread(Level level, BlockPos pos, FluidState state) {
if (state.isEmpty()) {
return;
}
if (!state.isSource() && !this.isFlowingStateValid(level, pos, state)) {
level.setBlockAndUpdate(pos, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState());
this.scheduleCleanup(level, pos);
return;
}
BlockState blockState = level.getBlockState(pos);
this.spreadUpward(level, pos, state, blockState);
if (!this.canHangAt(level, pos)) {
return;
}
int nextAmount = state.getAmount() - 1;
if (nextAmount <= 0) {
return;
}
this.spreadHorizontally(level, pos, blockState, nextAmount);
}
@Override
protected int getSlopeFindDistance(LevelReader level) {
return 4;
}
@Override
public void tick(Level level, BlockPos pos, FluidState state) {
if (!state.isSource() && !this.isFlowingStateValid(level, pos, state)) {
level.setBlockAndUpdate(pos, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState());
this.scheduleDependentCleanup(level, pos);
return;
}
super.tick(level, pos, state);
}
private boolean hasCeiling(Level level, BlockPos pos) {
return level.getBlockState(pos.above()).isSolid();
}
private boolean canHangAt(Level level, BlockPos pos) {
return this.hasCeiling(level, pos);
}
private boolean hasHorizontalSupport(Level level, BlockPos pos) {
FluidState state = level.getFluidState(pos);
if (!this.isAntiwater(state)) {
return false;
}
int currentAmount = state.getAmount();
for (Direction direction : Direction.Plane.HORIZONTAL) {
FluidState neighbor = level.getFluidState(pos.relative(direction));
if (!this.isAntiwater(neighbor)) {
continue;
}
if (this.getHorizontalSpreadAmount(neighbor) > currentAmount) {
return true;
}
}
return false;
}
private boolean canSpreadHorizontallyInto(Level level, BlockPos pos) {
return true;
}
private int getBestHorizontalNeighborAmount(Level level, BlockPos pos) {
int bestAmount = 0;
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos neighborPos = pos.relative(direction);
FluidState neighborFluid = level.getFluidState(neighborPos);
if (neighborFluid.isEmpty() || !neighborFluid.getType().isSame(this)) {
continue;
}
if (!this.hasSourceConnection(level, neighborPos, neighborFluid, new HashSet<>())) {
continue;
}
bestAmount = Math.max(bestAmount, this.getHorizontalSpreadAmount(neighborFluid));
}
return bestAmount;
}
private int getHorizontalSpreadAmount(FluidState state) {
if (state.isSource() || this.isValidVerticalSupportState(state)) {
return MAX_HORIZONTAL_SPREAD_AMOUNT + 1;
}
return state.getAmount();
}
private boolean isValidVerticalSupportState(FluidState state) {
return this.isAntiwater(state) && !state.isSource() && state.getAmount() >= MAX_VERTICAL_FLOW_AMOUNT;
}
private boolean isFlowingStateValid(Level level, BlockPos pos, FluidState state) {
return state.isSource()
|| this.hasImmediateVerticalSupport(level, pos)
|| this.hasHorizontalSupport(level, pos);
}
private boolean canCreateSourceAt(Level level, BlockPos pos) {
if (!this.canHangAt(level, pos)) {
return false;
}
int sourceNeighbors = 0;
for (Direction direction : Direction.Plane.HORIZONTAL) {
FluidState neighbor = level.getFluidState(pos.relative(direction));
if (this.isAntiwater(neighbor) && neighbor.isSource()) {
sourceNeighbors++;
if (sourceNeighbors >= 2) {
return true;
}
}
}
return false;
}
private boolean isValidVerticalSupport(Level level, BlockPos pos) {
return this.hasImmediateVerticalSupport(level, pos);
}
private boolean isAntiwater(FluidState state) {
return !state.isEmpty() && state.getType().isSame(this);
}
private boolean hasImmediateVerticalSupport(Level level, BlockPos pos) {
FluidState below = level.getFluidState(pos.below());
return this.isAntiwater(below);
}
private void spreadUpward(Level level, BlockPos pos, FluidState state, BlockState blockState) {
BlockPos abovePos = pos.above();
BlockState aboveState = level.getBlockState(abovePos);
FluidState aboveFluid = level.getFluidState(abovePos);
// Antiwater flowing into water solidifies rather than displacing it
if (aboveFluid.getFluidType() == ForgeMod.WATER_TYPE.get()) {
BlockState result = state.isSource()
? AntarchyForgeBlocks.ANTIMETAL.get().defaultBlockState()
: AntarchyForgeBlocks.NYXITE.get().defaultBlockState();
net.minecraftforge.event.level.BlockEvent.FluidPlaceBlockEvent fluidPlaceEvent =
new net.minecraftforge.event.level.BlockEvent.FluidPlaceBlockEvent(level, pos, pos, result);
net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(fluidPlaceEvent);
level.setBlockAndUpdate(pos, fluidPlaceEvent.getNewState());
level.levelEvent(1501, pos, 0);
return;
}
FluidState upwardState = this.getFlowing(MAX_VERTICAL_FLOW_AMOUNT, false);
if (!this.canSpreadTo(level, pos, blockState, Direction.UP, abovePos, aboveState, aboveFluid, upwardState.getType())) {
return;
}
if (aboveFluid.getType().isSame(this) && aboveFluid.getAmount() >= upwardState.getAmount()) {
return;
}
this.spreadTo(level, abovePos, aboveState, Direction.UP, upwardState);
}
private void spreadHorizontally(Level level, BlockPos pos, BlockState blockState, int nextAmount) {
FluidState horizontalState = this.getFlowing(Math.min(nextAmount, MAX_HORIZONTAL_SPREAD_AMOUNT), false);
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos targetPos = pos.relative(direction);
BlockState targetState = level.getBlockState(targetPos);
FluidState targetFluid = targetState.getFluidState();
if (!this.canSpreadHorizontallyInto(level, targetPos)) {
continue;
}
if (targetFluid.getType().isSame(this) && targetFluid.getAmount() >= horizontalState.getAmount()) {
continue;
}
if (!this.canSpreadTo(level, pos, blockState, direction, targetPos, targetState, targetFluid, horizontalState.getType())) {
continue;
}
this.spreadTo(level, targetPos, targetState, direction, horizontalState);
}
}
private boolean hasSourceConnection(Level level, BlockPos pos, FluidState state, Set<BlockPos> visited) {
if (!this.isAntiwater(state)) {
return false;
}
if (state.isSource()) {
return true;
}
if (!visited.add(pos)) {
return false;
}
FluidState below = level.getFluidState(pos.below());
if (this.hasSourceConnection(level, pos.below(), below, visited)) {
return true;
}
int currentAmount = state.getAmount();
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos neighborPos = pos.relative(direction);
FluidState neighbor = level.getFluidState(neighborPos);
if (!this.isAntiwater(neighbor)) {
continue;
}
if (this.getHorizontalSpreadAmount(neighbor) <= currentAmount) {
continue;
}
if (this.hasSourceConnection(level, neighborPos, neighbor, visited)) {
return true;
}
}
return false;
}
private void scheduleCleanup(Level level, BlockPos pos) {
int tickDelay = this.getTickDelay(level);
level.scheduleTick(pos, this, tickDelay);
level.scheduleTick(pos.above(), this, tickDelay);
level.scheduleTick(pos.below(), this, tickDelay);
for (Direction direction : Direction.Plane.HORIZONTAL) {
level.scheduleTick(pos.relative(direction), this, tickDelay);
}
}
private void scheduleDependentCleanup(Level level, BlockPos pos) {
int tickDelay = this.getTickDelay(level);
level.scheduleTick(pos.above(), this, tickDelay);
for (Direction direction : Direction.Plane.HORIZONTAL) {
level.scheduleTick(pos.relative(direction), this, tickDelay);
}
}
public static final class Source extends AntiwaterFluid {
public Source(Properties properties) {
super(properties);
}
@Override
public int getAmount(FluidState state) {
return 8;
}
@Override
public boolean isSource(FluidState state) {
return true;
}
}
public static final class Flowing extends AntiwaterFluid {
public Flowing(Properties properties) {
super(properties);
this.registerDefaultState(this.getStateDefinition().any().setValue(LEVEL, 7));
}
@Override
protected void createFluidStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<Fluid, FluidState> builder) {
super.createFluidStateDefinition(builder);
builder.add(LEVEL);
}
@Override
public int getAmount(FluidState state) {
return state.getValue(LEVEL);
}
@Override
public boolean isSource(FluidState state) {
return false;
}
}
}
@@ -0,0 +1,76 @@
package com.craisinlord.antarchy.forge.content.fluid;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityDirection;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityRotationUtil;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.fluids.FluidType;
public class AntiwaterFluidType extends FluidType {
public AntiwaterFluidType(Properties properties) {
super(properties);
}
@Override
public boolean move(FluidState state, LivingEntity entity, Vec3 movementVector, double gravity) {
double prevY = entity.getY();
float swimSpeed = entity.isSprinting() ? 0.026F : 0.02F;
entity.moveRelative(swimSpeed, movementVector);
entity.move(MoverType.SELF, entity.getDeltaMovement());
Vec3 motion = entity.getDeltaMovement();
if (entity.horizontalCollision && entity.onClimbable()) {
motion = new Vec3(motion.x, 0.2, motion.z);
}
AntarchyGravityDirection gravityDirection = AntarchyGravityApi.getGravityDirection(entity);
Vec3 worldMotion = gravityDirection.isInverted()
? AntarchyGravityRotationUtil.vecPlayerToWorld(motion, gravityDirection)
: motion;
double drag = entity.isSwimming() ? 0.9 : 0.8;
worldMotion = worldMotion.scale(drag);
boolean isFlying = entity instanceof Player p && p.getAbilities().flying;
if (!isFlying) {
worldMotion = worldMotion.add(0.0D, 0.005D, 0.0D);
}
entity.setDeltaMovement(
gravityDirection.isInverted()
? AntarchyGravityRotationUtil.vecWorldToPlayer(worldMotion, gravityDirection)
: worldMotion
);
if (entity.horizontalCollision && entity.isFree(
worldMotion.x,
worldMotion.y + 0.6 - entity.getY() + prevY,
worldMotion.z)) {
Vec3 boostedWorldMotion = new Vec3(worldMotion.x, 0.3D, worldMotion.z);
entity.setDeltaMovement(
gravityDirection.isInverted()
? AntarchyGravityRotationUtil.vecWorldToPlayer(boostedWorldMotion, gravityDirection)
: boostedWorldMotion
);
}
return true;
}
@Override
public void setItemMovement(ItemEntity entity) {
Vec3 vec3 = entity.getDeltaMovement();
entity.setDeltaMovement(
vec3.x * 0.99,
vec3.y + (vec3.y < 0.06 ? 5.0E-4 : 0.0),
vec3.z * 0.99
);
}
}
@@ -0,0 +1,195 @@
package com.craisinlord.antarchy.forge.entity.multipart;
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
import com.craisinlord.antarchy.content.entity.multipart.MultipartFramework;
import com.craisinlord.antarchy.content.entity.multipart.MultipartPartAccess;
import com.craisinlord.antarchy.content.entity.multipart.MultipartPartDefinition;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.OwnableEntity;
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.entity.PartEntity;
import org.jetbrains.annotations.Nullable;
public class MultipartPartEntity extends PartEntity<Entity> implements OwnableEntity, MultipartPartAccess {
private final MultipartEntityOwner owner;
private final int partIndex;
private final MultipartPartDefinition definition;
public MultipartPartEntity(Entity parent, MultipartEntityOwner owner, int partIndex, MultipartPartDefinition definition) {
super(parent);
this.owner = owner;
this.partIndex = partIndex;
this.definition = definition;
this.setNoGravity(true);
this.refreshDimensions();
this.antarchy$syncFromParent();
}
public int getPartIndex() {
return this.partIndex;
}
public String getPartName() {
return this.definition.name();
}
public float getDamageMultiplier() {
return this.definition.damageMultiplier();
}
public MultipartPartDefinition getPartDefinition() {
return this.definition;
}
@Override
public @Nullable java.util.UUID getOwnerUUID() {
Entity parent = this.getParent();
return parent instanceof OwnableEntity ownable ? ownable.getOwnerUUID() : null;
}
@Override
public EntityDimensions getDimensions(Pose pose) {
return EntityDimensions.scalable(this.definition.width(), this.definition.height());
}
@Override
public void antarchy$syncFromParent() {
Entity parent = this.getParent();
if (parent == null || parent.isRemoved()) {
return;
}
double oldX = this.getX();
double oldY = this.getY();
double oldZ = this.getZ();
double yawRadians = Math.toRadians(parent.getYRot());
Vec3 forward = new Vec3(-Math.sin(yawRadians), 0.0D, Math.cos(yawRadians));
Vec3 right = new Vec3(forward.z, 0.0D, -forward.x);
Vec3 position = new Vec3(
parent.getX() + forward.x * this.definition.forwardOffset() + right.x * this.definition.lateralOffset(),
parent.getY() + this.definition.yOffset(),
parent.getZ() + forward.z * this.definition.forwardOffset() + right.z * this.definition.lateralOffset()
);
this.setPos(position.x, position.y, position.z);
this.setRot(parent.getYRot(), parent.getXRot());
this.xo = oldX;
this.yo = oldY;
this.zo = oldZ;
this.xOld = oldX;
this.yOld = oldY;
this.zOld = oldZ;
}
@Override
public boolean is(Entity entity) {
return entity == this || entity == this.getParent();
}
@Override
public boolean isPickable() {
return true;
}
@Override
public boolean isAttackable() {
return true;
}
@Override
public boolean isPushable() {
return false;
}
@Override
public boolean canBeCollidedWith() {
// Always true so player melee raycasts (ProjectileUtil.getEntityHitResult) can find this part.
// Physical push is prevented separately via isPushable()=false and canCollideWith()=false.
return !this.isRemoved();
}
@Override
public boolean canCollideWith(Entity entity) {
if (!this.definition.collisionEnabled()) {
return false;
}
Entity parent = this.getParent();
if (entity == parent) {
return false;
}
if (entity instanceof PartEntity<?> otherPart && otherPart.getParent() == parent) {
return false;
}
return entity.canBeCollidedWith() && !this.isPassengerOfSameVehicle(entity);
}
@Override
public boolean shouldBeSaved() {
return false;
}
@Override
public ItemStack getPickResult() {
Entity parent = this.getParent();
return parent == null ? ItemStack.EMPTY : parent.getPickResult();
}
@Override
public boolean hurt(DamageSource source, float amount) {
Entity parent = this.getParent();
if (parent == null || parent.isRemoved()) {
return false;
}
if (this.level().isClientSide()) {
if (source.getEntity() instanceof Player) {
MultipartFramework.sendMultipartAttack(parent.getUUID(), this.partIndex, amount * this.definition.damageMultiplier());
}
return true;
}
return this.owner.antarchy$hurtMultipartPart(this, source, amount * this.definition.damageMultiplier());
}
@Override
public boolean isInvulnerableTo(DamageSource source) {
return false;
}
@Override
public InteractionResult interactAt(Player player, Vec3 vec, InteractionHand hand) {
Entity parent = this.getParent();
if (parent == null || parent.isRemoved()) {
return InteractionResult.PASS;
}
if (this.level().isClientSide()) {
MultipartFramework.sendMultipartInteract(parent.getUUID(), this.partIndex, hand.ordinal());
return InteractionResult.SUCCESS;
}
return this.owner.antarchy$interactMultipartPart(this, player, vec, hand);
}
@Override
protected void defineSynchedData() {
}
@Override
protected void readAdditionalSaveData(CompoundTag tag) {
}
@Override
protected void addAdditionalSaveData(CompoundTag tag) {
}
}
@@ -0,0 +1,64 @@
package com.craisinlord.antarchy.forge.entity.multipart;
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
import com.craisinlord.antarchy.forge.mixins.level.ClientLevelPartEntitiesAccessor;
import com.craisinlord.antarchy.forge.mixins.level.ServerLevelPartEntitiesAccessor;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraftforge.entity.PartEntity;
public final class MultipartPartLevelRegistry {
private MultipartPartLevelRegistry() {
}
public static void register(MultipartEntityOwner owner) {
Entity[] parts = owner.antarchy$getMultipartParts();
if (parts == null) {
return;
}
Int2ObjectMap<PartEntity<?>> registry = getRegistry(((Entity) owner).level());
if (registry == null) {
return;
}
for (Entity part : parts) {
if (part instanceof PartEntity<?> partEntity) {
registry.put(partEntity.getId(), partEntity);
}
}
}
public static void unregister(MultipartEntityOwner owner) {
Entity[] parts = owner.antarchy$getMultipartParts();
if (parts == null) {
return;
}
Int2ObjectMap<PartEntity<?>> registry = getRegistry(((Entity) owner).level());
if (registry == null) {
return;
}
for (Entity part : parts) {
if (part instanceof PartEntity<?> partEntity) {
registry.remove(partEntity.getId());
}
}
}
private static Int2ObjectMap<PartEntity<?>> getRegistry(Level level) {
if (level instanceof ServerLevel serverLevel) {
return ((ServerLevelPartEntitiesAccessor) serverLevel).antarchy$getPartEntities();
}
if (level instanceof ClientLevel clientLevel) {
return ((ClientLevelPartEntitiesAccessor) clientLevel).antarchy$getPartEntities();
}
return null;
}
}
@@ -0,0 +1,39 @@
package com.craisinlord.antarchy.forge.mixins.client;
import com.craisinlord.antarchy.content.client.renderer.AntiwaterFluidRenderer;
import com.craisinlord.antarchy.content.fluid.AntarchyFluidChecks;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.block.LiquidBlockRenderer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LiquidBlockRenderer.class)
public abstract class LiquidBlockRendererMixin {
@Inject(method = "tesselate", at = @At("HEAD"), cancellable = true)
private void antarchy$renderAntiwater(
BlockAndTintGetter level,
BlockPos pos,
VertexConsumer buffer,
BlockState blockState,
FluidState fluidState,
CallbackInfo ci
) {
if (!AntarchyFluidChecks.isAntiwater(fluidState)) {
return;
}
TextureAtlasSprite[] sprites = ForgeHooksClient.getFluidSprites(level, pos, fluidState);
int tint = IClientFluidTypeExtensions.of(fluidState).getTintColor(fluidState, level, pos);
AntiwaterFluidRenderer.render(level, pos, buffer, blockState, fluidState, sprites[0], sprites[1], sprites[2], tint);
ci.cancel();
}
}
@@ -0,0 +1,56 @@
package com.craisinlord.antarchy.forge.mixins.entity;
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
import net.minecraft.world.entity.Entity;
import net.minecraftforge.entity.PartEntity;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
@Mixin(Entity.class)
/*
* Exposes multipart child lookup from base entities.
*/
public abstract class MultipartEntityBridgeMixin {
@Unique
private Entity[] antarchy$multipartSourceParts;
@Unique
private PartEntity<?>[] antarchy$multipartBridgeParts;
public boolean isMultipartEntity() {
return (Object) this instanceof MultipartEntityOwner;
}
@Nullable
public PartEntity<?>[] getParts() {
if (!((Object) this instanceof MultipartEntityOwner owner)) {
return null;
}
Entity[] parts = owner.antarchy$getMultipartParts();
if (parts == null) {
parts = owner.antarchy$createMultipartParts();
owner.antarchy$setMultipartParts(parts);
owner.antarchy$syncMultipartParts();
}
if (parts.length == 0) {
return new PartEntity<?>[0];
}
if (this.antarchy$multipartSourceParts != parts || this.antarchy$multipartBridgeParts == null || this.antarchy$multipartBridgeParts.length != parts.length) {
PartEntity<?>[] bridgedParts = new PartEntity<?>[parts.length];
for (int i = 0; i < parts.length; i++) {
if (!(parts[i] instanceof PartEntity<?> part)) {
throw new IllegalStateException("Multipart owner returned a non-PartEntity child: " + parts[i]);
}
bridgedParts[i] = part;
}
this.antarchy$multipartSourceParts = parts;
this.antarchy$multipartBridgeParts = bridgedParts;
}
return this.antarchy$multipartBridgeParts;
}
}
@@ -0,0 +1,34 @@
package com.craisinlord.antarchy.forge.mixins.entity;
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
import com.craisinlord.antarchy.forge.entity.multipart.MultipartPartLevelRegistry;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.entity.EntityInLevelCallback;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Entity.class)
/*
* Keeps multipart child entities registered in NeoForge levels.
*/
public abstract class MultipartEntityLevelRegistryMixin {
@Inject(method = "setLevelCallback", at = @At("TAIL"))
private void antarchy$registerMultipartParts(EntityInLevelCallback entityInLevelCallback, CallbackInfo ci) {
if ((Object) this instanceof MultipartEntityOwner owner
&& entityInLevelCallback != EntityInLevelCallback.NULL) {
if (owner.antarchy$getMultipartParts() == null) {
owner.antarchy$spawnMultipartParts();
}
MultipartPartLevelRegistry.register(owner);
}
}
@Inject(method = "setRemoved", at = @At("HEAD"))
private void antarchy$unregisterMultipartParts(Entity.RemovalReason removalReason, CallbackInfo ci) {
if ((Object) this instanceof MultipartEntityOwner owner) {
MultipartPartLevelRegistry.unregister(owner);
}
}
}
@@ -0,0 +1,25 @@
package com.craisinlord.antarchy.forge.mixins.entity;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.world.entity.Mob;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Mob.class)
/*
* Stops mob AI movement while paralyzed.
*/
public abstract class ParalyzedMobFreezeMixin {
@Inject(method = "serverAiStep", at = @At("HEAD"))
private void antarchy$freezeAiWhileParalyzed(CallbackInfo ci) {
Mob mob = (Mob) (Object) this;
if (!mob.hasEffect(AntarchyForgeMisc.PARALYZED.get())) {
return;
}
mob.getNavigation().stop();
mob.setJumping(false);
}
}
@@ -0,0 +1,37 @@
package com.craisinlord.antarchy.forge.mixins.infinity;
import com.craisinlord.antarchy.Antarchy;
import net.lerariemann.infinity.util.config.ConfigGenInvocation;
import net.lerariemann.infinity.util.config.ConfigGenerator;
import net.minecraft.server.MinecraftServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(value = ConfigGenInvocation.class, remap = false)
/*
* Guards against a NPE in Infinite Dimensions' SurfaceRuleScanner when another mod
* registers a surface rule with a missing "biome_is" field. Without this, the crash
* propagates up through PlayerList.placeNewPlayer and kicks the player on login
*/
public class ConfigGenInvocationMixin {
@Redirect(
method = "run",
at = @At(
value = "INVOKE",
target = "Lnet/lerariemann/infinity/util/config/ConfigGenerator;generateAll(Lnet/minecraft/server/MinecraftServer;)V"
),
remap = false
)
private void antarchy$safeGenerateAll(MinecraftServer server) {
try {
ConfigGenerator.generateAll(server);
} catch (Exception e) {
Antarchy.LOGGER.error(
"[Antarchy] Infinite Dimensions surface rule scan crashed — likely a mod has a malformed surface rule (null 'biome_is' entry). Player login will continue.",
e
);
}
}
}
@@ -0,0 +1,83 @@
package com.craisinlord.antarchy.forge.mixins.item;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeMisc;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BucketItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(BucketItem.class)
public abstract class BucketItemThoraxisWaterMixin {
private static final ResourceLocation THORAXIS_DIMENSION_ID =
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "thoraxis");
@Shadow
@Final
public Fluid content;
@Shadow
protected abstract void playEmptySound(@Nullable Player player, LevelAccessor level, BlockPos pos);
@Inject(
method = "emptyContents(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/phys/BlockHitResult;Lnet/minecraft/world/item/ItemStack;)Z",
at = @At("HEAD"),
cancellable = true,
remap = false
)
private void antarchy$replaceWaterVaporizeCheckWithAntiwater(
@Nullable Player player,
Level level,
BlockPos pos,
@Nullable BlockHitResult hitResult,
@Nullable ItemStack container,
CallbackInfoReturnable<Boolean> cir
) {
if (this.content != Fluids.WATER) {
return;
}
if (!level.dimension().location().equals(THORAXIS_DIMENSION_ID)) {
return;
}
if (container == null) {
return;
}
BlockState state = level.getBlockState(pos);
boolean canReplace = state.canBeReplaced(this.content);
if (!state.isAir() && !canReplace && !state.getFluidState().isSource()) {
cir.setReturnValue(false);
return;
}
if (!level.isClientSide) {
if (canReplace && !state.liquid()) {
level.destroyBlock(pos, true);
}
}
boolean placed = level.setBlock(pos, AntarchyForgeMisc.ANTIWATER.get().defaultFluidState().createLegacyBlock(), 11);
if (placed || state.getFluidState().isSource()) {
this.playEmptySound(player, level, pos);
cir.setReturnValue(true);
return;
}
cir.setReturnValue(false);
}
}
@@ -0,0 +1,16 @@
package com.craisinlord.antarchy.forge.mixins.level;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraftforge.entity.PartEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ClientLevel.class)
/*
* Accessor for client part-entity storage.
*/
public interface ClientLevelPartEntitiesAccessor {
@Accessor("partEntities")
Int2ObjectMap<PartEntity<?>> antarchy$getPartEntities();
}
@@ -0,0 +1,24 @@
package com.craisinlord.antarchy.forge.mixins.level;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.RegistryAccess;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.storage.PrimaryLevelData;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PrimaryLevelData.class)
public abstract class LevelStemDiagnosticMixin {
@Inject(method = "createTag", at = @At("HEAD"))
private void antarchy$logLevelStems(RegistryAccess registryAccess, CompoundTag playerTag, CallbackInfoReturnable<CompoundTag> cir) {
try {
var registry = registryAccess.registryOrThrow(Registries.LEVEL_STEM);
Antarchy.LOGGER.info("[Antarchy/Diagnostic] createTag LEVEL_STEM size={} keys={}", registry.size(), registry.keySet());
} catch (Throwable t) {
Antarchy.LOGGER.error("[Antarchy/Diagnostic] createTag LEVEL_STEM lookup failed", t);
}
}
}
@@ -0,0 +1,16 @@
package com.craisinlord.antarchy.forge.mixins.level;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import net.minecraft.server.level.ServerLevel;
import net.minecraftforge.entity.PartEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ServerLevel.class)
/*
* Accessor for server part-entity storage.
*/
public interface ServerLevelPartEntitiesAccessor {
@Accessor("dragonParts")
Int2ObjectMap<PartEntity<?>> antarchy$getPartEntities();
}
@@ -0,0 +1,81 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.compat.network.CustomPacketPayload;
import com.craisinlord.antarchy.compat.network.StreamCodec;
import io.netty.buffer.ByteBuf;
import java.util.function.BiConsumer;
import java.util.function.Supplier;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.network.NetworkDirection;
import net.minecraftforge.network.NetworkEvent;
import net.minecraftforge.network.NetworkRegistry;
import net.minecraftforge.network.PacketDistributor;
import net.minecraftforge.network.simple.SimpleChannel;
public final class AntarchyForgeNetworkCore {
private static final String PROTOCOL_VERSION = "1";
private static final SimpleChannel CHANNEL = NetworkRegistry.ChannelBuilder
.named(new ResourceLocation(Antarchy.MODID, "main"))
.networkProtocolVersion(() -> PROTOCOL_VERSION)
.clientAcceptedVersions(PROTOCOL_VERSION::equals)
.serverAcceptedVersions(PROTOCOL_VERSION::equals)
.simpleChannel();
private static int nextId = 0;
private AntarchyForgeNetworkCore() {
}
public static <T extends CustomPacketPayload> void registerS2C(Class<T> clazz, StreamCodec<ByteBuf, T> codec, java.util.function.Consumer<T> clientHandler) {
CHANNEL.registerMessage(
nextId++,
clazz,
(msg, buf) -> codec.encode(buf, msg),
codec::decode,
(msg, ctxSupplier) -> {
NetworkEvent.Context ctx = ctxSupplier.get();
ctx.enqueueWork(() -> clientHandler.accept(msg));
ctx.setPacketHandled(true);
},
java.util.Optional.of(NetworkDirection.PLAY_TO_CLIENT)
);
}
public static <T extends CustomPacketPayload> void registerC2S(Class<T> clazz, StreamCodec<ByteBuf, T> codec, BiConsumer<ServerPlayer, T> serverHandler) {
CHANNEL.registerMessage(
nextId++,
clazz,
(msg, buf) -> codec.encode(buf, msg),
codec::decode,
(msg, ctxSupplier) -> {
NetworkEvent.Context ctx = ctxSupplier.get();
ServerPlayer player = ctx.getSender();
ctx.enqueueWork(() -> {
if (player != null) {
serverHandler.accept(player, msg);
}
});
ctx.setPacketHandled(true);
},
java.util.Optional.of(NetworkDirection.PLAY_TO_SERVER)
);
}
public static <T> void sendToPlayer(ServerPlayer player, T payload) {
CHANNEL.send(PacketDistributor.PLAYER.with(() -> player), payload);
}
public static <T> void sendToTracking(ServerPlayer player, T payload) {
CHANNEL.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(player::getVehicle), payload);
}
public static <T> void sendToTrackingEntity(net.minecraft.world.entity.Entity entity, T payload) {
CHANNEL.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), payload);
}
public static <T> void sendToServer(T payload) {
CHANNEL.sendToServer(payload);
}
}
@@ -0,0 +1,116 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
import com.craisinlord.antarchy.content.gravity.AntarchyGravityApi;
import com.craisinlord.antarchy.content.item.BigBerthaItem;
import com.craisinlord.antarchy.content.item.GravityGunItem;
import com.craisinlord.antarchy.content.network.BigBerthaModeCyclePayload;
import com.craisinlord.antarchy.content.network.DiamondMinecartInputPayload;
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
import com.craisinlord.antarchy.content.network.GravityStatePayload;
import com.craisinlord.antarchy.content.network.ImpactShakePayload;
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
import net.minecraft.client.Minecraft;
import net.minecraft.world.entity.Entity;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.phys.Vec3;
public final class AntarchyGravityNetworking {
private AntarchyGravityNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerS2C(GravityStatePayload.class, GravityStatePayload.STREAM_CODEC, AntarchyGravityNetworking::handleGravityState);
AntarchyForgeNetworkCore.registerS2C(ImpactShakePayload.class, ImpactShakePayload.STREAM_CODEC, AntarchyGravityNetworking::handleImpactShake);
AntarchyForgeNetworkCore.registerC2S(GravityGunPrimaryPayload.class, GravityGunPrimaryPayload.STREAM_CODEC, AntarchyGravityNetworking::handleGravityGunPrimary);
AntarchyForgeNetworkCore.registerC2S(GravityGunScrollPayload.class, GravityGunScrollPayload.STREAM_CODEC, AntarchyGravityNetworking::handleGravityGunScroll);
AntarchyForgeNetworkCore.registerC2S(BigBerthaModeCyclePayload.class, BigBerthaModeCyclePayload.STREAM_CODEC, AntarchyGravityNetworking::handleBigBerthaModeCycle);
AntarchyForgeNetworkCore.registerC2S(DiamondMinecartInputPayload.class, DiamondMinecartInputPayload.STREAM_CODEC, AntarchyGravityNetworking::handleDiamondMinecartInput);
}
public static void syncToPlayer(ServerPlayer target, Entity entity) {
GravityStatePayload payload = new GravityStatePayload(
entity.getId(),
AntarchyGravityApi.getGravityDirection(entity),
AntarchyGravityApi.getPrevGravityDirection(entity),
AntarchyGravityApi.isGravityForced(entity),
AntarchyGravityApi.getTransitionDuration(entity),
AntarchyGravityApi.getTransitionRemaining(entity)
);
AntarchyForgeNetworkCore.sendToPlayer(target, payload);
}
public static void syncEntity(Entity entity) {
GravityStatePayload payload = new GravityStatePayload(
entity.getId(),
AntarchyGravityApi.getGravityDirection(entity),
AntarchyGravityApi.getPrevGravityDirection(entity),
AntarchyGravityApi.isGravityForced(entity),
AntarchyGravityApi.getTransitionDuration(entity),
AntarchyGravityApi.getTransitionRemaining(entity)
);
AntarchyForgeNetworkCore.sendToTrackingEntity(entity, payload);
}
private static void handleGravityState(GravityStatePayload payload) {
var player = Minecraft.getInstance().player;
if (player == null) {
return;
}
Entity entity = player.level().getEntity(payload.entityId());
if (entity == null && player.getId() == payload.entityId()) {
entity = player;
}
if (entity == null) {
return;
}
AntarchyGravityApi.applySyncedState(
entity,
payload.direction(),
payload.previousDirection(),
payload.forced(),
payload.transitionDuration(),
payload.transitionRemaining()
);
}
private static void handleImpactShake(ImpactShakePayload payload) {
CameraShakeClientState.triggerImpact(
new Vec3(payload.x(), payload.y(), payload.z()),
payload.intensity(),
payload.durationTicks(),
payload.radius()
);
}
private static void handleGravityGunScroll(ServerPlayer serverPlayer, GravityGunScrollPayload payload) {
if (!(serverPlayer.getMainHandItem().getItem() instanceof GravityGunItem)) {
return;
}
GravityGunItem.adjustHeldDistance(serverPlayer.getMainHandItem(), payload.distanceDelta());
}
private static void handleDiamondMinecartInput(ServerPlayer serverPlayer, DiamondMinecartInputPayload payload) {
if (!(serverPlayer.getVehicle() instanceof DiamondMinecartEntity cart)) return;
cart.onInputReceived(payload.inputFlags());
}
private static void handleBigBerthaModeCycle(ServerPlayer serverPlayer, BigBerthaModeCyclePayload payload) {
if (!(serverPlayer.getMainHandItem().getItem() instanceof BigBerthaItem bigBerthaItem)) {
return;
}
bigBerthaItem.tryCycleModeWhileCoolingDown(serverPlayer.serverLevel(), serverPlayer, serverPlayer.getMainHandItem());
}
private static void handleGravityGunPrimary(ServerPlayer serverPlayer, GravityGunPrimaryPayload payload) {
if (!(serverPlayer.getMainHandItem().getItem() instanceof GravityGunItem gravityGunItem)) {
return;
}
gravityGunItem.firePrimary(serverPlayer.serverLevel(), serverPlayer, serverPlayer.getMainHandItem());
}
}
@@ -0,0 +1,78 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.item.BrutalflyElytraFlightHelper;
import com.craisinlord.antarchy.content.item.BrutalflyElytraItem;
import com.craisinlord.antarchy.content.network.BrutalflyElytraAnimationPayload;
import com.craisinlord.antarchy.content.network.BrutalflyElytraFlapPayload;
import com.craisinlord.antarchy.content.client.BrutalflyElytraClientState;
import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
public final class BrutalflyElytraNetworking {
private BrutalflyElytraNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerC2S(BrutalflyElytraFlapPayload.class, BrutalflyElytraFlapPayload.STREAM_CODEC, BrutalflyElytraNetworking::handleFlap);
AntarchyForgeNetworkCore.registerS2C(BrutalflyElytraAnimationPayload.class, BrutalflyElytraAnimationPayload.STREAM_CODEC, BrutalflyElytraNetworking::handleAnimation);
}
private static void handleFlap(ServerPlayer serverPlayer, BrutalflyElytraFlapPayload payload) {
ItemStack chestStack = serverPlayer.getItemBySlot(EquipmentSlot.CHEST);
if (!(chestStack.getItem() instanceof BrutalflyElytraItem)) {
return;
}
if (serverPlayer.isSpectator() || !serverPlayer.isFallFlying() || serverPlayer.isPassenger()) {
return;
}
if (serverPlayer.getCooldowns().isOnCooldown(chestStack.getItem())) {
return;
}
BrutalflyElytraFlightHelper.FlapTier tier = BrutalflyElytraFlightHelper.resolveFlapTier(payload.chargeTicks());
if (tier == BrutalflyElytraFlightHelper.FlapTier.FAIL) {
return;
}
float lift = BrutalflyElytraFlightHelper.liftFor(tier);
float forwardBoost = BrutalflyElytraFlightHelper.forwardBoostFor(tier);
Vec3 look = serverPlayer.getLookAngle();
Vec3 boost = new Vec3(look.x * forwardBoost, lift, look.z * forwardBoost);
serverPlayer.setDeltaMovement(serverPlayer.getDeltaMovement().add(boost));
serverPlayer.hasImpulse = true;
serverPlayer.hurtMarked = true;
serverPlayer.resetFallDistance();
serverPlayer.connection.send(new ClientboundSetEntityMotionPacket(serverPlayer));
chestStack.hurtAndBreak(1, serverPlayer, p -> p.broadcastBreakEvent(EquipmentSlot.CHEST));
serverPlayer.getCooldowns().addCooldown(chestStack.getItem(), BrutalflyElytraFlightHelper.FLAP_COOLDOWN_TICKS);
serverPlayer.level().playSound(
null,
serverPlayer.blockPosition(),
SoundEvents.PHANTOM_FLAP,
SoundSource.PLAYERS,
0.9F,
tier == BrutalflyElytraFlightHelper.FlapTier.PERFECT ? 0.8F : tier == BrutalflyElytraFlightHelper.FlapTier.GOOD ? 0.95F : 1.1F
);
AntarchyForgeNetworkCore.sendToTrackingEntity(
serverPlayer,
new BrutalflyElytraAnimationPayload(
serverPlayer.getId(),
BrutalflyElytraFlightHelper.animationTicksFor(tier),
lift
)
);
}
private static void handleAnimation(BrutalflyElytraAnimationPayload payload) {
BrutalflyElytraClientState.trigger(
payload.entityId(),
payload.durationTicks(),
payload.strength()
);
}
}
@@ -0,0 +1,29 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.entity.DorrieEntity;
import com.craisinlord.antarchy.content.network.DorrieChargeJumpPayload;
import com.craisinlord.antarchy.content.network.DorrieJumpInputPayload;
import net.minecraft.server.level.ServerPlayer;
public final class DorrieJumpNetworking {
private DorrieJumpNetworking() {}
public static void register() {
AntarchyForgeNetworkCore.registerC2S(DorrieJumpInputPayload.class, DorrieJumpInputPayload.STREAM_CODEC, DorrieJumpNetworking::handleJumpInput);
AntarchyForgeNetworkCore.registerC2S(DorrieChargeJumpPayload.class, DorrieChargeJumpPayload.STREAM_CODEC, DorrieJumpNetworking::handleChargeInput);
}
private static void handleJumpInput(ServerPlayer player, DorrieJumpInputPayload payload) {
if (!(player.getVehicle() instanceof DorrieEntity dorrie)) return;
dorrie.setPressingJump(payload.pressing());
}
private static void handleChargeInput(ServerPlayer player, DorrieChargeJumpPayload payload) {
if (!(player.getVehicle() instanceof DorrieEntity dorrie)) return;
if (payload.pressing()) {
dorrie.startJumpCharge();
} else {
dorrie.releaseJump();
}
}
}
@@ -0,0 +1,55 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import com.craisinlord.antarchy.content.network.HerculesBeetleFlightTogglePayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleImpactShakePayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleJumpInputPayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleMountedAttackPayload;
import com.craisinlord.antarchy.content.network.HerculesBeetleMountedChargePayload;
import net.minecraft.server.level.ServerPlayer;
public final class HerculesBeetleNetworking {
private HerculesBeetleNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerC2S(HerculesBeetleJumpInputPayload.class, HerculesBeetleJumpInputPayload.STREAM_CODEC, HerculesBeetleNetworking::handleJumpInput);
AntarchyForgeNetworkCore.registerC2S(HerculesBeetleFlightTogglePayload.class, HerculesBeetleFlightTogglePayload.STREAM_CODEC, HerculesBeetleNetworking::handleFlightToggle);
AntarchyForgeNetworkCore.registerC2S(HerculesBeetleMountedAttackPayload.class, HerculesBeetleMountedAttackPayload.STREAM_CODEC, HerculesBeetleNetworking::handleMountedAttack);
AntarchyForgeNetworkCore.registerC2S(HerculesBeetleMountedChargePayload.class, HerculesBeetleMountedChargePayload.STREAM_CODEC, HerculesBeetleNetworking::handleMountedCharge);
AntarchyForgeNetworkCore.registerS2C(HerculesBeetleImpactShakePayload.class, HerculesBeetleImpactShakePayload.STREAM_CODEC, HerculesBeetleNetworking::handleImpactShake);
}
private static void handleJumpInput(ServerPlayer player, HerculesBeetleJumpInputPayload payload) {
if (player.getVehicle() instanceof HerculesBeetleEntity beetle) {
beetle.setRiderJumpPressed(payload.pressing());
}
}
private static void handleMountedAttack(ServerPlayer player, HerculesBeetleMountedAttackPayload payload) {
if (player.getVehicle() instanceof HerculesBeetleEntity beetle) {
beetle.handleMountedRegularAttack(player);
}
}
private static void handleFlightToggle(ServerPlayer player, HerculesBeetleFlightTogglePayload payload) {
if (player.getVehicle() instanceof HerculesBeetleEntity beetle) {
beetle.toggleMountedFlight(player);
}
}
private static void handleMountedCharge(ServerPlayer player, HerculesBeetleMountedChargePayload payload) {
if (player.getVehicle() instanceof HerculesBeetleEntity beetle) {
if (payload.pressing()) {
beetle.startMountedCharge(player);
} else {
beetle.releaseMountedCharge(player);
}
}
}
private static void handleImpactShake(HerculesBeetleImpactShakePayload payload) {
HerculesBeetleImpactShakeClientState.trigger(payload.durationTicks());
}
}
@@ -0,0 +1,76 @@
package com.craisinlord.antarchy.forge.network;
import net.minecraftforge.fml.common.Mod;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.item.JumpyBootsHelper;
import com.craisinlord.antarchy.content.item.JumpyBootsItem;
import com.craisinlord.antarchy.content.network.JumpyBootsLaunchPayload;
import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
@Mod.EventBusSubscriber(modid = Antarchy.MODID)
public final class JumpyBootsNetworking {
private JumpyBootsNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerC2S(JumpyBootsLaunchPayload.class, JumpyBootsLaunchPayload.STREAM_CODEC, JumpyBootsNetworking::handleLaunch);
}
private static void handleLaunch(ServerPlayer player, JumpyBootsLaunchPayload payload) {
{
if (!JumpyBootsItem.isWearingJumpyBoots(player)) return;
if (player.isSpectator() || player.isPassenger()) return;
ItemStack boots = player.getItemBySlot(EquipmentSlot.FEET);
if (player.getCooldowns().isOnCooldown(boots.getItem())) return;
int clampedCharge = Math.min(payload.chargeTicks(), JumpyBootsHelper.CHARGE_TICKS_MAX);
if (clampedCharge <= 0) return;
float verticalBoost = JumpyBootsHelper.verticalBoostFor(clampedCharge);
Vec3 current = player.getDeltaMovement();
double newY = verticalBoost;
double newX = current.x;
double newZ = current.z;
if (payload.sprinting()) {
Vec3 look = player.getLookAngle();
newX += look.x * JumpyBootsHelper.SPRINT_FORWARD_BOOST;
newZ += look.z * JumpyBootsHelper.SPRINT_FORWARD_BOOST;
}
player.setDeltaMovement(newX, newY, newZ);
player.setPos(player.getX(), player.getY() + 0.001, player.getZ());
player.hasImpulse = true;
player.hurtMarked = true;
player.resetFallDistance();
player.connection.send(new ClientboundSetEntityMotionPacket(player));
player.level().playSound(null, player.blockPosition(), SoundEvents.SLIME_JUMP, SoundSource.PLAYERS, 1.0F, 0.6F + (clampedCharge / (float) JumpyBootsHelper.CHARGE_TICKS_MAX) * 0.6F);
player.getPersistentData().putLong(JumpyBootsHelper.FALL_PROTECTION_NBT_KEY, player.level().getGameTime() + JumpyBootsHelper.FALL_PROTECTION_TICKS);
player.getCooldowns().addCooldown(boots.getItem(), JumpyBootsHelper.COOLDOWN_TICKS);
}
}
@SubscribeEvent
public static void onLivingFall(LivingFallEvent event) {
if (!(event.getEntity() instanceof ServerPlayer player)) return;
if (!JumpyBootsItem.isWearingJumpyBoots(player)) return;
long protectionUntil = player.getPersistentData().getLong(JumpyBootsHelper.FALL_PROTECTION_NBT_KEY);
if (player.level().getGameTime() < protectionUntil) {
event.setDamageMultiplier(event.getDamageMultiplier() * 0.25F);
}
}
}
@@ -0,0 +1,78 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
import com.craisinlord.antarchy.content.entity.multipart.network.MultipartAttackPayload;
import com.craisinlord.antarchy.content.entity.multipart.network.MultipartInteractPayload;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
public final class MultipartNetworking {
private MultipartNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerC2S(MultipartAttackPayload.class, MultipartAttackPayload.STREAM_CODEC, MultipartNetworking::handleAttack);
AntarchyForgeNetworkCore.registerC2S(MultipartInteractPayload.class, MultipartInteractPayload.STREAM_CODEC, MultipartNetworking::handleInteract);
}
private static void handleAttack(ServerPlayer serverPlayer, MultipartAttackPayload payload) {
{
Entity entity = serverPlayer.serverLevel().getEntity(payload.parentId());
if (!(entity instanceof MultipartEntityOwner owner)) {
return;
}
Entity[] parts = owner.antarchy$getMultipartParts();
if (parts == null) {
parts = owner.antarchy$createMultipartParts();
owner.antarchy$setMultipartParts(parts);
owner.antarchy$syncMultipartParts();
}
if (payload.partIndex() < 0 || payload.partIndex() >= parts.length) {
return;
}
Entity part = parts[payload.partIndex()];
if (part == null || part.isRemoved()) {
return;
}
if (serverPlayer.distanceToSqr(part) > 10000.0D) {
return;
}
DamageSource source = serverPlayer.level().damageSources().playerAttack(serverPlayer);
owner.antarchy$hurtMultipartPart(part, source, payload.damage());
}
}
private static void handleInteract(ServerPlayer serverPlayer, MultipartInteractPayload payload) {
{
Entity entity = serverPlayer.serverLevel().getEntity(payload.parentId());
if (!(entity instanceof MultipartEntityOwner owner)) {
return;
}
Entity[] parts = owner.antarchy$getMultipartParts();
if (parts == null) {
parts = owner.antarchy$createMultipartParts();
owner.antarchy$setMultipartParts(parts);
owner.antarchy$syncMultipartParts();
}
if (payload.partIndex() < 0 || payload.partIndex() >= parts.length) {
return;
}
Entity part = parts[payload.partIndex()];
if (part == null || part.isRemoved()) {
return;
}
InteractionHand hand = payload.handId() == 0 ? InteractionHand.MAIN_HAND : InteractionHand.OFF_HAND;
owner.antarchy$interactMultipartPart(part, serverPlayer, part.position(), hand);
}
}
}
@@ -0,0 +1,59 @@
package com.craisinlord.antarchy.forge.network;
import com.craisinlord.antarchy.content.client.ThoraxisWeatherClientState;
import com.craisinlord.antarchy.content.weather.ThoraxisWeatherKind;
import com.craisinlord.antarchy.content.weather.ThoraxisWeatherSnapshot;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
public final class ThoraxisWeatherNetworking {
private ThoraxisWeatherNetworking() {
}
public static void register() {
AntarchyForgeNetworkCore.registerS2C(
com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload.class,
com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload.STREAM_CODEC,
ThoraxisWeatherNetworking::handleWeatherPayload
);
}
public static void syncLevel(ServerLevel level, ThoraxisWeatherSnapshot snapshot) {
com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload payload = new com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload(
snapshot.dimension(),
snapshot.kind(),
snapshot.expiresAt(),
snapshot.anchor().getX(),
snapshot.anchor().getY(),
snapshot.anchor().getZ()
);
for (ServerPlayer player : level.players()) {
AntarchyForgeNetworkCore.sendToPlayer(player, payload);
}
}
public static void syncPlayer(ServerPlayer player, ThoraxisWeatherSnapshot snapshot) {
com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload payload = new com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload(
snapshot.dimension(),
snapshot.kind(),
snapshot.expiresAt(),
snapshot.anchor().getX(),
snapshot.anchor().getY(),
snapshot.anchor().getZ()
);
AntarchyForgeNetworkCore.sendToPlayer(player, payload);
}
private static void handleWeatherPayload(com.craisinlord.antarchy.content.network.ThoraxisWeatherPayload payload) {
ThoraxisWeatherClientState.apply(
new ResourceLocation(payload.dimensionId()),
ThoraxisWeatherKind.byId(payload.weatherId()),
payload.expiresAt(),
payload.anchorX(),
payload.anchorY(),
payload.anchorZ()
);
}
}
@@ -0,0 +1,673 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.*;
import com.craisinlord.antarchy.content.block.entity.AntNestBlockEntity;
import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity;
import com.craisinlord.antarchy.content.block.entity.DreamCampfireBlockEntity;
import com.craisinlord.antarchy.content.block.entity.HushweedBlockEntity;
import com.craisinlord.antarchy.content.block.entity.PotentNyxiteBlockEntity;
import com.craisinlord.antarchy.content.block.entity.SeashellBlockEntity;
import com.craisinlord.antarchy.content.block.entity.WaspNestBlockEntity;
import com.craisinlord.antarchy.content.fluid.BileLiquidBlock;
import com.craisinlord.antarchy.content.fluid.LumenLiquidBlock;
import com.craisinlord.antarchy.content.portal.PermanentPortalType;
import com.craisinlord.antarchy.forge.content.block.WildCornBlock;
import com.craisinlord.antarchy.forge.AntarchyWoodTypes;
import com.craisinlord.antarchy.forge.content.fluid.AntiwaterFluidType;
import com.mojang.serialization.MapCodec;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.Registries;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraft.world.level.material.MapColor;
import net.minecraft.world.level.block.state.properties.WoodType;
import net.minecraft.world.level.material.FlowingFluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fluids.ForgeFlowingFluid;
import net.minecraftforge.registries.RegistryObject;
public final class AntarchyForgeBlocks {
private static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(Antarchy.MODID);
private static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITY_TYPES = DeferredRegister.create(Registries.BLOCK_ENTITY_TYPE, Antarchy.MODID);
public static final RegistryObject<DuplicatorLogBlock> DUPLICATOR_LOG = BLOCKS.register("duplicator_log",
() -> new DuplicatorLogBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG).randomTicks()));
public static final RegistryObject<OuranwoodLogBlock> OURANWOOD_LOG = BLOCKS.register("ouranwood_log",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_LOG)));
public static final RegistryObject<OuranwoodLogBlock> OURANWOOD_WOOD = BLOCKS.register("ouranwood_wood",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WOOD)));
public static final RegistryObject<OuranwoodLogBlock> MOSSY_OURANWOOD_LOG = BLOCKS.register("mossy_ouranwood_log",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_LOG)));
public static final RegistryObject<OuranwoodLogBlock> MOSSY_OURANWOOD_WOOD = BLOCKS.register("mossy_ouranwood_wood",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WOOD)));
public static final RegistryObject<OuranwoodLogBlock> STRIPPED_OURANWOOD_LOG = BLOCKS.register("stripped_ouranwood_log",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_JUNGLE_LOG)));
public static final RegistryObject<OuranwoodLogBlock> STRIPPED_OURANWOOD_WOOD = BLOCKS.register("stripped_ouranwood_wood",
() -> new OuranwoodLogBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_JUNGLE_WOOD)));
public static final RegistryObject<Block> OURANWOOD_PLANKS = BLOCKS.register("ouranwood_planks",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.JUNGLE_PLANKS)));
public static final RegistryObject<StairBlock> OURANWOOD_STAIRS = BLOCKS.register("ouranwood_stairs",
() -> new StairBlock(OURANWOOD_PLANKS.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.JUNGLE_STAIRS)));
public static final RegistryObject<SlabBlock> OURANWOOD_SLAB = BLOCKS.register("ouranwood_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_SLAB)));
public static final RegistryObject<FenceBlock> OURANWOOD_FENCE = BLOCKS.register("ouranwood_fence",
() -> new FenceBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_FENCE)));
public static final RegistryObject<FenceGateBlock> OURANWOOD_FENCE_GATE = BLOCKS.register("ouranwood_fence_gate",
() -> new FenceGateBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_FENCE_GATE), WoodType.JUNGLE));
public static final RegistryObject<DoorBlock> OURANWOOD_DOOR = BLOCKS.register("ouranwood_door",
() -> new DoorBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_DOOR), BlockSetType.JUNGLE));
public static final RegistryObject<TrapDoorBlock> OURANWOOD_TRAPDOOR = BLOCKS.register("ouranwood_trapdoor",
() -> new TrapDoorBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_TRAPDOOR), BlockSetType.JUNGLE));
public static final RegistryObject<PressurePlateBlock> OURANWOOD_PRESSURE_PLATE = BLOCKS.register("ouranwood_pressure_plate",
() -> new PressurePlateBlock(PressurePlateBlock.Sensitivity.EVERYTHING, BlockBehaviour.Properties.copy(Blocks.JUNGLE_PRESSURE_PLATE), BlockSetType.JUNGLE));
public static final RegistryObject<ButtonBlock> OURANWOOD_BUTTON = BLOCKS.register("ouranwood_button",
() -> new ButtonBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_BUTTON), BlockSetType.JUNGLE, 30, false));
public static final RegistryObject<OuranwoodLeavesBlock> OURANWOOD_LEAVES = BLOCKS.register("ouranwood_leaves",
() -> new OuranwoodLeavesBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_LEAVES).randomTicks()));
public static final RegistryObject<OuranwoodAcornBlock> OURANWOOD_ACORN_BLOCK = BLOCKS.register("ouranwood_acorn",
() -> new OuranwoodAcornBlock(BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING).randomTicks().noCollission()));
public static final RegistryObject<FlowerPotBlock> POTTED_OURANWOOD_ACORN = BLOCKS.register("potted_ouranwood_acorn",
() -> new FlowerPotBlock(OURANWOOD_ACORN_BLOCK.get(), BlockBehaviour.Properties.copy(Blocks.POTTED_DANDELION)));
public static final RegistryObject<MilkweedBlock> ORANGE_MILKWEED = BLOCKS.register("orange_milkweed",
() -> new MilkweedBlock(BlockBehaviour.Properties.copy(Blocks.PEONY)));
public static final RegistryObject<MilkweedBlock> PINK_MILKWEED = BLOCKS.register("pink_milkweed",
() -> new MilkweedBlock(BlockBehaviour.Properties.copy(Blocks.PEONY)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.CamelliaBlock> CAMELLIA = BLOCKS.register("camellia",
() -> new com.craisinlord.antarchy.content.block.CamelliaBlock(BlockBehaviour.Properties.copy(Blocks.PEONY)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.SpiderLilyBlock> SPIDER_LILY = BLOCKS.register("spider_lily",
() -> new com.craisinlord.antarchy.content.block.SpiderLilyBlock(BlockBehaviour.Properties.copy(Blocks.POPPY)));
public static final RegistryObject<FlowerPotBlock> POTTED_SPIDER_LILY = BLOCKS.register("potted_spider_lily",
() -> new FlowerPotBlock(SPIDER_LILY.get(), BlockBehaviour.Properties.copy(Blocks.POTTED_DANDELION)));
public static final RegistryObject<GiantLilyPadBlock> GIANT_LILY_PAD = BLOCKS.register("giant_lily_pad",
() -> new GiantLilyPadBlock(BlockBehaviour.Properties.copy(Blocks.LILY_PAD)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.LotusBlock> LOTUS = BLOCKS.register("lotus",
() -> new com.craisinlord.antarchy.content.block.LotusBlock(BlockBehaviour.Properties.copy(Blocks.SPORE_BLOSSOM)));
public static final RegistryObject<FlowerPotBlock> POTTED_LOTUS = BLOCKS.register("potted_lotus",
() -> new FlowerPotBlock(LOTUS.get(), BlockBehaviour.Properties.copy(Blocks.POTTED_DANDELION)));
public static final RegistryObject<SeashellBlock> SEASHELL = BLOCKS.register("seashell",
() -> new SeashellBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG).noOcclusion()));
public static final RegistryObject<CritterCageBlock> CRITTER_CAGE_BLOCK = BLOCKS.register("critter_cage_block",
() -> new CritterCageBlock(BlockBehaviour.Properties.of().strength(5.0F, 6.0F).sound(net.minecraft.world.level.block.SoundType.METAL).noOcclusion()));
public static final RegistryObject<StandingSignBlock> OURANWOOD_SIGN = BLOCKS.register("ouranwood_sign",
() -> new StandingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_SIGN), AntarchyWoodTypes.OURANWOOD));
public static final RegistryObject<WallSignBlock> OURANWOOD_WALL_SIGN = BLOCKS.register("ouranwood_wall_sign",
() -> new WallSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WALL_SIGN), AntarchyWoodTypes.OURANWOOD));
public static final RegistryObject<CeilingHangingSignBlock> OURANWOOD_HANGING_SIGN = BLOCKS.register("ouranwood_hanging_sign",
() -> new CeilingHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_HANGING_SIGN), AntarchyWoodTypes.OURANWOOD));
public static final RegistryObject<WallHangingSignBlock> OURANWOOD_WALL_HANGING_SIGN = BLOCKS.register("ouranwood_wall_hanging_sign",
() -> new WallHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WALL_HANGING_SIGN), AntarchyWoodTypes.OURANWOOD));
public static final RegistryObject<RotatedPillarBlock> PEACH_LOG = BLOCKS.register("peach_log",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_LOG)));
public static final RegistryObject<RotatedPillarBlock> PEACH_WOOD = BLOCKS.register("peach_wood",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WOOD)));
public static final RegistryObject<RotatedPillarBlock> STRIPPED_PEACH_LOG = BLOCKS.register("stripped_peach_log",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_JUNGLE_LOG)));
public static final RegistryObject<RotatedPillarBlock> STRIPPED_PEACH_WOOD = BLOCKS.register("stripped_peach_wood",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_JUNGLE_WOOD)));
public static final RegistryObject<Block> PEACH_PLANKS = BLOCKS.register("peach_planks",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.JUNGLE_PLANKS)));
public static final RegistryObject<StairBlock> PEACH_STAIRS = BLOCKS.register("peach_stairs",
() -> new StairBlock(PEACH_PLANKS.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.JUNGLE_STAIRS)));
public static final RegistryObject<SlabBlock> PEACH_SLAB = BLOCKS.register("peach_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_SLAB)));
public static final RegistryObject<FenceBlock> PEACH_FENCE = BLOCKS.register("peach_fence",
() -> new FenceBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_FENCE)));
public static final RegistryObject<FenceGateBlock> PEACH_FENCE_GATE = BLOCKS.register("peach_fence_gate",
() -> new FenceGateBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_FENCE_GATE), WoodType.JUNGLE));
public static final RegistryObject<DoorBlock> PEACH_DOOR = BLOCKS.register("peach_door",
() -> new DoorBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_DOOR), BlockSetType.JUNGLE));
public static final RegistryObject<TrapDoorBlock> PEACH_TRAPDOOR = BLOCKS.register("peach_trapdoor",
() -> new TrapDoorBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_TRAPDOOR), BlockSetType.JUNGLE));
public static final RegistryObject<PressurePlateBlock> PEACH_PRESSURE_PLATE = BLOCKS.register("peach_pressure_plate",
() -> new PressurePlateBlock(PressurePlateBlock.Sensitivity.EVERYTHING, BlockBehaviour.Properties.copy(Blocks.JUNGLE_PRESSURE_PLATE), BlockSetType.JUNGLE));
public static final RegistryObject<ButtonBlock> PEACH_BUTTON = BLOCKS.register("peach_button",
() -> new ButtonBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_BUTTON), BlockSetType.JUNGLE, 30, false));
public static final RegistryObject<PeachLeavesBlock> PEACH_LEAVES = BLOCKS.register("peach_leaves",
() -> new PeachLeavesBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_LEAVES).randomTicks()));
public static final RegistryObject<HangingPeachBlock> PEACH_HANGING_PEACH = BLOCKS.register("hanging_peach",
() -> new HangingPeachBlock(BlockBehaviour.Properties.of().noOcclusion().instabreak()));
public static final RegistryObject<com.craisinlord.antarchy.content.block.PeachSaplingBlock> PEACH_SAPLING = BLOCKS.register("peach_sapling",
() -> new com.craisinlord.antarchy.content.block.PeachSaplingBlock(BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING).randomTicks().noCollission()));
public static final RegistryObject<FlowerPotBlock> POTTED_PEACH_SAPLING = BLOCKS.register("potted_peach_sapling",
() -> new FlowerPotBlock(PEACH_SAPLING.get(), BlockBehaviour.Properties.copy(Blocks.POTTED_DANDELION)));
public static final RegistryObject<StandingSignBlock> PEACH_SIGN = BLOCKS.register("peach_sign",
() -> new StandingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_SIGN), AntarchyWoodTypes.PEACH));
public static final RegistryObject<WallSignBlock> PEACH_WALL_SIGN = BLOCKS.register("peach_wall_sign",
() -> new WallSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WALL_SIGN), AntarchyWoodTypes.PEACH));
public static final RegistryObject<CeilingHangingSignBlock> PEACH_HANGING_SIGN = BLOCKS.register("peach_hanging_sign",
() -> new CeilingHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_HANGING_SIGN), AntarchyWoodTypes.PEACH));
public static final RegistryObject<WallHangingSignBlock> PEACH_WALL_HANGING_SIGN = BLOCKS.register("peach_wall_hanging_sign",
() -> new WallHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.JUNGLE_WALL_HANGING_SIGN), AntarchyWoodTypes.PEACH));
public static final RegistryObject<DuplicatorSaplingBlock> DUPLICATOR_SAPLING = BLOCKS.register("duplicator_sapling",
() -> new DuplicatorSaplingBlock(BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING).randomTicks().noCollission()));
public static final RegistryObject<DuctTapeBlock> DUCT_TAPE = BLOCKS.register("duct_tape",
() -> new DuctTapeBlock(BlockBehaviour.Properties.of()
.strength(0.2F)
.sound(SoundType.WOOL)
.noOcclusion()
.replaceable()));
public static final RegistryObject<InfestedRootedDirtBlock> INFESTED_ROOTED_DIRT = BLOCKS.register("infested_rooted_dirt",
() -> new InfestedRootedDirtBlock(BlockBehaviour.Properties.copy(Blocks.ROOTED_DIRT).randomTicks()));
public static final RegistryObject<InfestedCoarseDirtBlock> INFESTED_COARSE_DIRT = BLOCKS.register("infested_coarse_dirt",
() -> new InfestedCoarseDirtBlock(BlockBehaviour.Properties.copy(Blocks.COARSE_DIRT).randomTicks()));
public static final RegistryObject<Block> NYXITE = BLOCKS.register("nyxite",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<Block> POLISHED_NYXITE = BLOCKS.register("polished_nyxite",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<Block> CHISELED_NYXITE = BLOCKS.register("chiseled_nyxite",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<Block> NYXITE_BRICKS = BLOCKS.register("nyxite_bricks",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<StairBlock> NYXITE_STAIRS = BLOCKS.register("nyxite_stairs",
() -> new StairBlock(NYXITE.get().defaultBlockState(), nyxiteProperties()));
public static final RegistryObject<SlabBlock> NYXITE_SLAB = BLOCKS.register("nyxite_slab",
() -> new SlabBlock(nyxiteProperties()));
public static final RegistryObject<WallBlock> NYXITE_WALL = BLOCKS.register("nyxite_wall",
() -> new WallBlock(nyxiteProperties()));
public static final RegistryObject<StairBlock> POLISHED_NYXITE_STAIRS = BLOCKS.register("polished_nyxite_stairs",
() -> new StairBlock(POLISHED_NYXITE.get().defaultBlockState(), nyxiteProperties()));
public static final RegistryObject<SlabBlock> POLISHED_NYXITE_SLAB = BLOCKS.register("polished_nyxite_slab",
() -> new SlabBlock(nyxiteProperties()));
public static final RegistryObject<WallBlock> POLISHED_NYXITE_WALL = BLOCKS.register("polished_nyxite_wall",
() -> new WallBlock(nyxiteProperties()));
public static final RegistryObject<com.craisinlord.antarchy.content.block.PolishedNyxitePressurePlateBlock> POLISHED_NYXITE_PRESSURE_PLATE = BLOCKS.register("polished_nyxite_pressure_plate",
() -> new com.craisinlord.antarchy.content.block.PolishedNyxitePressurePlateBlock(BlockSetType.STONE, BlockBehaviour.Properties.copy(Blocks.STONE_PRESSURE_PLATE)));
public static final RegistryObject<ButtonBlock> POLISHED_NYXITE_BUTTON = BLOCKS.register("polished_nyxite_button",
() -> new ButtonBlock(BlockBehaviour.Properties.copy(Blocks.STONE_BUTTON), BlockSetType.STONE, 20, true));
public static final RegistryObject<StairBlock> NYXITE_BRICK_STAIRS = BLOCKS.register("nyxite_brick_stairs",
() -> new StairBlock(NYXITE_BRICKS.get().defaultBlockState(), nyxiteProperties()));
public static final RegistryObject<SlabBlock> NYXITE_BRICK_SLAB = BLOCKS.register("nyxite_brick_slab",
() -> new SlabBlock(nyxiteProperties()));
public static final RegistryObject<WallBlock> NYXITE_BRICK_WALL = BLOCKS.register("nyxite_brick_wall",
() -> new WallBlock(nyxiteProperties()));
public static final RegistryObject<Block> SHELLSTONE = BLOCKS.register("shellstone",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<Block> POLISHED_SHELLSTONE = BLOCKS.register("polished_shellstone",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<Block> SHELLSTONE_BRICKS = BLOCKS.register("shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<Block> CHISELED_SHELLSTONE = BLOCKS.register("chiseled_shellstone",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<Block> MOSSY_SHELLSTONE_BRICKS = BLOCKS.register("mossy_shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<Block> CRACKED_SHELLSTONE_BRICKS = BLOCKS.register("cracked_shellstone_bricks",
() -> new Block(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<StairBlock> MOSSY_SHELLSTONE_BRICK_STAIRS = BLOCKS.register("mossy_shellstone_brick_stairs",
() -> new StairBlock(MOSSY_SHELLSTONE_BRICKS.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<SlabBlock> MOSSY_SHELLSTONE_BRICK_SLAB = BLOCKS.register("mossy_shellstone_brick_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<WallBlock> MOSSY_SHELLSTONE_BRICK_WALL = BLOCKS.register("mossy_shellstone_brick_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<StairBlock> SHELLSTONE_STAIRS = BLOCKS.register("shellstone_stairs",
() -> new StairBlock(SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<SlabBlock> SHELLSTONE_SLAB = BLOCKS.register("shellstone_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<WallBlock> SHELLSTONE_WALL = BLOCKS.register("shellstone_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<StairBlock> POLISHED_SHELLSTONE_STAIRS = BLOCKS.register("polished_shellstone_stairs",
() -> new StairBlock(POLISHED_SHELLSTONE.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<SlabBlock> POLISHED_SHELLSTONE_SLAB = BLOCKS.register("polished_shellstone_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<WallBlock> POLISHED_SHELLSTONE_WALL = BLOCKS.register("polished_shellstone_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<StairBlock> SHELLSTONE_BRICK_STAIRS = BLOCKS.register("shellstone_brick_stairs",
() -> new StairBlock(SHELLSTONE_BRICKS.get().defaultBlockState(), AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<SlabBlock> SHELLSTONE_BRICK_SLAB = BLOCKS.register("shellstone_brick_slab",
() -> new SlabBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<WallBlock> SHELLSTONE_BRICK_WALL = BLOCKS.register("shellstone_brick_wall",
() -> new WallBlock(AntarchyObjects.shellstoneProperties()));
public static final RegistryObject<com.craisinlord.antarchy.content.block.TriffidGooBlock> TRIFFID_GOO_BLOCK = BLOCKS.register("triffid_goo_block",
() -> new com.craisinlord.antarchy.content.block.TriffidGooBlock(BlockBehaviour.Properties.copy(Blocks.SLIME_BLOCK).noOcclusion().isViewBlocking((s, l, p) -> false).isSuffocating((s, l, p) -> false)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.CloudBlock> CLOUD_BLOCK = BLOCKS.register("cloud_block",
() -> new com.craisinlord.antarchy.content.block.CloudBlock(
AntarchyForgeItems::cloudBucketItem,
BlockBehaviour.Properties.copy(Blocks.POWDER_SNOW).noLootTable().noOcclusion()
));
public static final RegistryObject<AntDimensionPortalBlock> ELYTHIA_PORTAL = BLOCKS.register("elythia_portal",
() -> new AntDimensionPortalBlock(PermanentPortalType.ELYTHIA, portalProperties()));
public static final RegistryObject<AntDimensionPortalBlock> THORAXIS_PORTAL = BLOCKS.register("thoraxis_portal",
() -> new AntDimensionPortalBlock(PermanentPortalType.THORAXIS, portalProperties()));
public static final RegistryObject<AntDimensionPortalBlock> CAVARYN_PORTAL = BLOCKS.register("cavaryn_portal",
() -> new AntDimensionPortalBlock(PermanentPortalType.CAVARYN, portalProperties()));
public static final RegistryObject<Block> PALE_NYXITE = BLOCKS.register("pale_nyxite",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<NyxiteSpikeBlock> NYXITE_SPIKE = BLOCKS.register("nyxite_spike",
() -> new NyxiteSpikeBlock(BlockBehaviour.Properties.copy(Blocks.POINTED_DRIPSTONE)));
public static final RegistryObject<ChitenSpikeBlock> CHITEN_SPIKE = BLOCKS.register("chiten_spike",
() -> new ChitenSpikeBlock(BlockBehaviour.Properties.copy(Blocks.POINTED_DRIPSTONE)));
public static final RegistryObject<PotentNyxiteBlock> POTENT_NYXITE = BLOCKS.register("potent_nyxite",
() -> new PotentNyxiteBlock(
AntarchyForgeItems::potentNyxiteBlockEntityType,
BlockBehaviour.Properties.copy(Blocks.NETHERRACK).lightLevel(state -> 3)
));
public static final RegistryObject<Block> MYRMITE = BLOCKS.register("myrmite",
() -> new Block(nyxiteProperties()));
public static final RegistryObject<Block> BIOMITE = BLOCKS.register("biomite",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.NETHERRACK)));
public static final RegistryObject<Block> BIOMITE_TURF = BLOCKS.register("biomite_turf",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.NETHERRACK).lightLevel(state -> 2)));
public static final RegistryObject<BiowartBlock> BIOWART = BLOCKS.register("biowart",
() -> new BiowartBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_BLOCK).lightLevel(state -> 2)));
public static final RegistryObject<BiowartTendrilsBlock> BIOWART_TENDRILS = BLOCKS.register("biowart_tendrils",
() -> new BiowartTendrilsBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_CARPET).lightLevel(state -> 2).noCollission().noOcclusion()));
public static final RegistryObject<Block> MYRMITE_COAL_ORE = BLOCKS.register("myrmite_coal_ore",
() -> createOre(Blocks.COAL_ORE, 0, 2, MapColor.COLOR_GRAY));
public static final RegistryObject<Block> BROODSTONE = BLOCKS.register("broodstone",
() -> new Block(broodstoneProperties()));
public static final RegistryObject<Block> POLISHED_BROODSTONE = BLOCKS.register("polished_broodstone",
() -> new Block(broodstoneProperties()));
public static final RegistryObject<Block> CHISELED_BROODSTONE = BLOCKS.register("chiseled_broodstone",
() -> new Block(broodstoneProperties()));
public static final RegistryObject<Block> BROODSTONE_BRICKS = BLOCKS.register("broodstone_bricks",
() -> new Block(broodstoneProperties()));
public static final RegistryObject<StairBlock> BROODSTONE_STAIRS = BLOCKS.register("broodstone_stairs",
() -> new StairBlock(BROODSTONE.get().defaultBlockState(), broodstoneProperties()));
public static final RegistryObject<SlabBlock> BROODSTONE_SLAB = BLOCKS.register("broodstone_slab",
() -> new SlabBlock(broodstoneProperties()));
public static final RegistryObject<WallBlock> BROODSTONE_WALL = BLOCKS.register("broodstone_wall",
() -> new WallBlock(broodstoneProperties()));
public static final RegistryObject<StairBlock> POLISHED_BROODSTONE_STAIRS = BLOCKS.register("polished_broodstone_stairs",
() -> new StairBlock(POLISHED_BROODSTONE.get().defaultBlockState(), broodstoneProperties()));
public static final RegistryObject<SlabBlock> POLISHED_BROODSTONE_SLAB = BLOCKS.register("polished_broodstone_slab",
() -> new SlabBlock(broodstoneProperties()));
public static final RegistryObject<WallBlock> POLISHED_BROODSTONE_WALL = BLOCKS.register("polished_broodstone_wall",
() -> new WallBlock(broodstoneProperties()));
public static final RegistryObject<StairBlock> BROODSTONE_BRICK_STAIRS = BLOCKS.register("broodstone_brick_stairs",
() -> new StairBlock(BROODSTONE_BRICKS.get().defaultBlockState(), broodstoneProperties()));
public static final RegistryObject<SlabBlock> BROODSTONE_BRICK_SLAB = BLOCKS.register("broodstone_brick_slab",
() -> new SlabBlock(broodstoneProperties()));
public static final RegistryObject<WallBlock> BROODSTONE_BRICK_WALL = BLOCKS.register("broodstone_brick_wall",
() -> new WallBlock(broodstoneProperties()));
public static final RegistryObject<Block> BROODSTONE_URANIUM_ORE = BLOCKS.register("broodstone_uranium_ore",
() -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> BROODSTONE_TITANIUM_ORE = BLOCKS.register("broodstone_titanium_ore",
() -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<RotatedPillarBlock> CHITEN_BLOCK = BLOCKS.register("chiten_block",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.BONE_BLOCK).requiresCorrectToolForDrops()));
public static final RegistryObject<UmbralMossBlock> UMBRAL_MOSS_BLOCK = BLOCKS.register("umbral_moss_block",
() -> new UmbralMossBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_BLOCK)));
public static final RegistryObject<UmbralMossCarpetBlock> UMBRAL_MOSS_CARPET = BLOCKS.register("umbral_moss_carpet",
() -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_CARPET).noOcclusion()));
public static final RegistryObject<AmberMossBlock> AMBER_MOSS_BLOCK = BLOCKS.register("amber_moss_block",
() -> new AmberMossBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_BLOCK)));
public static final RegistryObject<UmbralMossCarpetBlock> AMBER_MOSS_CARPET = BLOCKS.register("amber_moss_carpet",
() -> new UmbralMossCarpetBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_CARPET).noOcclusion()));
public static final RegistryObject<AmberLichenBlock> AMBER_LICHEN = BLOCKS.register("amber_lichen",
() -> new AmberLichenBlock(BlockBehaviour.Properties.copy(Blocks.GLOW_LICHEN).lightLevel(state -> 4)));
public static final RegistryObject<Block> BILE_VEIN = BLOCKS.register("bile_vein",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.NETHERRACK).lightLevel(state -> 2)));
public static final RegistryObject<CreepvineBlock> CREEPVINE = BLOCKS.register("creepvine",
() -> new CreepvineBlock(BlockBehaviour.Properties.copy(Blocks.VINE)));
public static final RegistryObject<BlushMossBlock> BLUSH_MOSS_BLOCK = BLOCKS.register("blush_moss_block",
() -> new BlushMossBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_BLOCK)));
public static final RegistryObject<BlushMossCarpetBlock> BLUSH_MOSS_CARPET = BLOCKS.register("blush_moss_carpet",
() -> new BlushMossCarpetBlock(BlockBehaviour.Properties.copy(Blocks.MOSS_CARPET).noOcclusion()));
public static final RegistryObject<DreamTorchBlock> DREAM_TORCH = BLOCKS.register("dream_torch",
() -> new DreamTorchBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_TORCH)));
public static final RegistryObject<DreamWallTorchBlock> DREAM_WALL_TORCH = BLOCKS.register("dream_wall_torch",
() -> new DreamWallTorchBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_WALL_TORCH)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.DreamCeilingTorchBlock> DREAM_CEILING_TORCH = BLOCKS.register("dream_ceiling_torch",
() -> new com.craisinlord.antarchy.content.block.DreamCeilingTorchBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_TORCH)));
public static final RegistryObject<LanternBlock> DREAM_LANTERN = BLOCKS.register("dream_lantern",
() -> new LanternBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_LANTERN)));
public static final RegistryObject<DreamCampfireBlock> DREAM_CAMPFIRE = BLOCKS.register("dream_campfire",
() -> new DreamCampfireBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_CAMPFIRE)));
public static final RegistryObject<DreamFireBlock> DREAM_FIRE = BLOCKS.register("dream_fire",
() -> new DreamFireBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_FIRE)));
public static final RegistryObject<DreamCeilingFireBlock> DREAM_CEILING_FIRE = BLOCKS.register("dream_fire_ceiling",
() -> new DreamCeilingFireBlock(BlockBehaviour.Properties.copy(Blocks.SOUL_FIRE)));
public static final RegistryObject<BedBugEggBlock> BED_BUG_EGG = BLOCKS.register("bed_bug_egg",
() -> new BedBugEggBlock(BlockBehaviour.Properties.of()
.strength(0.15F)
.sound(SoundType.METAL)
.randomTicks()
.noOcclusion()
.noCollission()
.replaceable()));
public static final RegistryObject<CreepingHorrorEggBlock> CREEPING_HORROR_EGG = BLOCKS.register("creeping_horror_egg",
() -> new CreepingHorrorEggBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG)));
public static final RegistryObject<JumpyBugEggBlock> JUMPY_BUG_EGG = BLOCKS.register("jumpy_bug_egg",
() -> new JumpyBugEggBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG)));
public static final RegistryObject<SpitBugEggBlock> SPIT_BUG_EGG = BLOCKS.register("spit_bug_egg",
() -> new SpitBugEggBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG)));
public static final RegistryObject<JerryEggBlock> JERRY_EGG = BLOCKS.register("jerry_egg",
() -> new JerryEggBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG).randomTicks()));
public static final RegistryObject<LurkingTerrorEggBlock> LURKING_TERROR_EGG = BLOCKS.register("lurking_terror_egg",
() -> new LurkingTerrorEggBlock(BlockBehaviour.Properties.copy(Blocks.TURTLE_EGG)));
static {
BiowartBlock.bindTendrils(BIOWART_TENDRILS);
}
public static final RegistryObject<WaspNestBlock> WASP_NEST = BLOCKS.register("wasp_nest",
() -> new WaspNestBlock(AntarchyForgeItems::waspNestBlockEntityType, BlockBehaviour.Properties.copy(Blocks.BEE_NEST)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock> OURANWOOD_SQUIRREL_NEST = BLOCKS.register("ouranwood_squirrel_nest",
() -> new com.craisinlord.antarchy.content.block.OuranwoodSquirrelNestBlock(BlockBehaviour.Properties.copy(Blocks.COARSE_DIRT).noLootTable()));
public static final RegistryObject<com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock> BRUTALFLY_COCOON_SPAWNER = BLOCKS.register("brutalfly_cocoon_spawner",
() -> new com.craisinlord.antarchy.content.block.BrutalflyCocoonSpawnerBlock(BlockBehaviour.Properties.of().noCollission().instabreak().noLootTable()));
public static final RegistryObject<HushweedBlock> HUSHWEED = BLOCKS.register("hushweed",
() -> new HushweedBlock(BlockBehaviour.Properties.copy(Blocks.AZALEA).noCollission().noOcclusion()));
public static final RegistryObject<HangingCreeprootsBlock> HANGING_CREEPROOTS = BLOCKS.register("hanging_creeproots",
() -> new HangingCreeprootsBlock(BlockBehaviour.Properties.copy(Blocks.HANGING_ROOTS)));
public static final RegistryObject<MoltingVinesBlock> MOLTING_VINES = BLOCKS.register("molting_vines",
() -> new MoltingVinesBlock(BlockBehaviour.Properties.copy(Blocks.WEEPING_VINES)));
public static final RegistryObject<LiquidBlock> BILE_BLOCK = BLOCKS.register("bile",
() -> new BileLiquidBlock((FlowingFluid) AntarchyForgeMisc.BILE.get(), BlockBehaviour.Properties.copy(Blocks.WATER).lightLevel(state -> 5).noLootTable()));
public static final RegistryObject<LiquidBlock> ICHOR_BLOCK = BLOCKS.register("ichor",
() -> new LiquidBlock((FlowingFluid) AntarchyForgeMisc.ICHOR.get(), BlockBehaviour.Properties.copy(Blocks.WATER).noLootTable()));
public static final RegistryObject<LiquidBlock> ANTIWATER_BLOCK = BLOCKS.register("antiwater",
() -> new com.craisinlord.antarchy.content.fluid.AntiwaterLiquidBlock((FlowingFluid) AntarchyForgeMisc.ANTIWATER.get(),
BlockBehaviour.Properties.copy(Blocks.WATER).noLootTable()));
public static final RegistryObject<LiquidBlock> LUMEN_BLOCK = BLOCKS.register("lumen",
() -> new LumenLiquidBlock((FlowingFluid) AntarchyForgeMisc.LUMEN.get(),
BlockBehaviour.Properties.copy(Blocks.WATER).lightLevel(state -> 9).noLootTable()));
public static final RegistryObject<Block> LUMEN_FROGLIGHT = BLOCKS.register("lumen_froglight",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.OCHRE_FROGLIGHT)));
public static final RegistryObject<Block> ROSEATE_FROGLIGHT = BLOCKS.register("roseate_froglight",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.OCHRE_FROGLIGHT)));
public static final RegistryObject<AntNestBlock> RED_ANT_NEST = BLOCKS.register("red_ant_nest",
() -> new AntNestBlock(
AntarchyForgeEntites.RED_ANT,
AntarchyForgeItems::antNestBlockEntityType,
true,
BlockBehaviour.Properties.copy(Blocks.MAGMA_BLOCK).lightLevel(state -> 3).noLootTable()
));
public static final RegistryObject<AntNestBlock> BROWN_ANT_NEST = BLOCKS.register("brown_ant_nest",
() -> new AntNestBlock(AntarchyForgeEntites.BROWN_ANT, AntarchyForgeItems::antNestBlockEntityType, BlockBehaviour.Properties.copy(Blocks.DIRT).noLootTable()));
public static final RegistryObject<AntNestBlock> RAINBOW_ANT_NEST = BLOCKS.register("rainbow_ant_nest",
() -> new AntNestBlock(AntarchyForgeEntites.RAINBOW_ANT, AntarchyForgeItems::antNestBlockEntityType, BlockBehaviour.Properties.copy(Blocks.DIRT).noLootTable()));
public static final RegistryObject<AntNestBlock> TERMITE_NEST = BLOCKS.register("termite_nest",
() -> new AntNestBlock(AntarchyForgeEntites.TERMITE, AntarchyForgeItems::antNestBlockEntityType, BlockBehaviour.Properties.copy(Blocks.DIRT).noLootTable()));
public static final RegistryObject<Block> URANIUM_ORE = BLOCKS.register("uranium_ore",
() -> createOre(Blocks.EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> DEEPSLATE_URANIUM_ORE = BLOCKS.register("deepslate_uranium_ore",
() -> createOre(Blocks.DEEPSLATE_EMERALD_ORE, 4, 8, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> TITANIUM_ORE = BLOCKS.register("titanium_ore",
() -> createOre(Blocks.DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<Block> DEEPSLATE_TITANIUM_ORE = BLOCKS.register("deepslate_titanium_ore",
() -> createOre(Blocks.DEEPSLATE_DIAMOND_ORE, 4, 8, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<BluestoneOreBlock> BLUESTONE_ORE = BLOCKS.register("bluestone_ore",
() -> new BluestoneOreBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_ORE).mapColor(MapColor.COLOR_BLUE)));
public static final RegistryObject<BluestoneWireBlock> BLUESTONE_WIRE = BLOCKS.register("bluestone_wire",
() -> new BluestoneWireBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_WIRE).mapColor(MapColor.COLOR_BLUE).noCollission().instabreak()));
public static final RegistryObject<BluestoneBlock> BLUESTONE_BLOCK = BLOCKS.register("bluestone_block",
() -> new BluestoneBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_BLOCK).mapColor(MapColor.COLOR_BLUE)));
public static final RegistryObject<BluestoneRepeaterBlock> BLUESTONE_REPEATER = BLOCKS.register("bluestone_repeater",
() -> new BluestoneRepeaterBlock(BlockBehaviour.Properties.copy(Blocks.REPEATER).mapColor(MapColor.COLOR_BLUE).noCollission()));
public static final RegistryObject<BluestoneComparatorBlock> BLUESTONE_COMPARATOR = BLOCKS.register("bluestone_comparator",
() -> new BluestoneComparatorBlock(BlockBehaviour.Properties.copy(Blocks.COMPARATOR).mapColor(MapColor.COLOR_BLUE).noCollission(), AntarchyForgeBlocks::bluestoneComparatorBlockEntityType));
public static final RegistryObject<BluestoneTorchBlock> BLUESTONE_TORCH = BLOCKS.register("bluestone_torch",
() -> new BluestoneTorchBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_TORCH).mapColor(MapColor.COLOR_BLUE).lightLevel(state -> state.getValue(BluestoneTorchBlock.LIT) ? 7 : 0).noCollission().instabreak()));
public static final RegistryObject<Block> URANIUM_BLOCK = BLOCKS.register("uranium_block",
() -> createStorageBlock(Blocks.EMERALD_BLOCK, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> TITANIUM_BLOCK = BLOCKS.register("titanium_block",
() -> createStorageBlock(Blocks.DIAMOND_BLOCK, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<Block> RAW_URANIUM_BLOCK = BLOCKS.register("raw_uranium_block",
() -> createRawStorageBlock(Blocks.EMERALD_ORE, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> RAW_TITANIUM_BLOCK = BLOCKS.register("raw_titanium_block",
() -> createRawStorageBlock(Blocks.DIAMOND_ORE, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<Block> CUT_URANIUM = BLOCKS.register("cut_uranium",
() -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> CUT_TITANIUM = BLOCKS.register("cut_titanium",
() -> createHorizontalFacingStorageBlock(Blocks.CUT_COPPER, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<SlabBlock> CUT_URANIUM_SLAB = BLOCKS.register("cut_uranium_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_YELLOW)));
public static final RegistryObject<SlabBlock> CUT_TITANIUM_SLAB = BLOCKS.register("cut_titanium_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.CUT_COPPER_SLAB).mapColor(MapColor.COLOR_LIGHT_BLUE)));
public static final RegistryObject<StairBlock> CUT_URANIUM_STAIRS = BLOCKS.register("cut_uranium_stairs",
() -> new StairBlock(CUT_URANIUM.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_YELLOW)));
public static final RegistryObject<StairBlock> CUT_TITANIUM_STAIRS = BLOCKS.register("cut_titanium_stairs",
() -> new StairBlock(CUT_TITANIUM.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.CUT_COPPER_STAIRS).mapColor(MapColor.COLOR_LIGHT_BLUE)));
public static final RegistryObject<Block> CHISELED_URANIUM = BLOCKS.register("chiseled_uranium",
() -> createHorizontalFacingStorageBlock(Blocks.CHISELED_STONE_BRICKS, MapColor.COLOR_YELLOW));
public static final RegistryObject<Block> CHISELED_TITANIUM = BLOCKS.register("chiseled_titanium",
() -> createHorizontalFacingStorageBlock(Blocks.CHISELED_STONE_BRICKS, MapColor.COLOR_LIGHT_BLUE));
public static final RegistryObject<SignalSavingBulbBlock> URANIUM_BULB = BLOCKS.register("uranium_bulb",
() -> new SignalSavingBulbBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_LAMP).mapColor(MapColor.COLOR_YELLOW)));
public static final RegistryObject<SignalSavingBulbBlock> TITANIUM_BULB = BLOCKS.register("titanium_bulb",
() -> new SignalSavingBulbBlock(BlockBehaviour.Properties.copy(Blocks.REDSTONE_LAMP).mapColor(MapColor.COLOR_LIGHT_BLUE)));
public static final RegistryObject<DoorBlock> URANIUM_DOOR = BLOCKS.register("uranium_door",
() -> new DoorBlock(BlockBehaviour.Properties.copy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_YELLOW), BlockSetType.IRON));
public static final RegistryObject<DoorBlock> TITANIUM_DOOR = BLOCKS.register("titanium_door",
() -> new DoorBlock(BlockBehaviour.Properties.copy(Blocks.IRON_DOOR).mapColor(MapColor.COLOR_LIGHT_BLUE), BlockSetType.IRON));
public static final RegistryObject<TrapDoorBlock> URANIUM_TRAPDOOR = BLOCKS.register("uranium_trapdoor",
() -> new TrapDoorBlock(BlockBehaviour.Properties.copy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_YELLOW), BlockSetType.IRON));
public static final RegistryObject<TrapDoorBlock> TITANIUM_TRAPDOOR = BLOCKS.register("titanium_trapdoor",
() -> new TrapDoorBlock(BlockBehaviour.Properties.copy(Blocks.IRON_TRAPDOOR).mapColor(MapColor.COLOR_LIGHT_BLUE), BlockSetType.IRON));
public static final RegistryObject<IronBarsBlock> URANIUM_BARS = BLOCKS.register("uranium_bars",
() -> new IronBarsBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_YELLOW)));
public static final RegistryObject<IronBarsBlock> TITANIUM_BARS = BLOCKS.register("titanium_bars",
() -> new IronBarsBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BARS).mapColor(MapColor.COLOR_LIGHT_BLUE)));
public static final RegistryObject<RotatedPillarBlock> ANTIMETAL = BLOCKS.register("antimetal",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.BASALT)));
public static final RegistryObject<RotatedPillarBlock> POLISHED_ANTIMETAL = BLOCKS.register("polished_antimetal",
() -> new RotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.POLISHED_BASALT)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock> ANTIMETAL_SCAFFOLDING = BLOCKS.register("antimetal_scaffolding",
() -> new com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock(BlockBehaviour.Properties.copy(Blocks.SCAFFOLDING)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.AntimetalRailBlock> ANTIMETAL_RAIL = BLOCKS.register("antimetal_rail",
() -> new com.craisinlord.antarchy.content.block.AntimetalRailBlock(BlockBehaviour.Properties.copy(Blocks.RAIL)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.AntimetalPoweredRailBlock> ANTIMETAL_POWERED_RAIL = BLOCKS.register("antimetal_powered_rail",
() -> new com.craisinlord.antarchy.content.block.AntimetalPoweredRailBlock(BlockBehaviour.Properties.copy(Blocks.POWERED_RAIL)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.AntimetalDetectorRailBlock> ANTIMETAL_DETECTOR_RAIL = BLOCKS.register("antimetal_detector_rail",
() -> new com.craisinlord.antarchy.content.block.AntimetalDetectorRailBlock(BlockBehaviour.Properties.copy(Blocks.DETECTOR_RAIL)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.AntimetalActivatorRailBlock> ANTIMETAL_ACTIVATOR_RAIL = BLOCKS.register("antimetal_activator_rail",
() -> new com.craisinlord.antarchy.content.block.AntimetalActivatorRailBlock(BlockBehaviour.Properties.copy(Blocks.ACTIVATOR_RAIL)));
public static final RegistryObject<CorneaStalkBlock> CORNEA_STALK = BLOCKS.register("cornea_stalk",
() -> new CorneaStalkBlock(BlockBehaviour.Properties.copy(Blocks.SWEET_BERRY_BUSH).randomTicks()));
public static final RegistryObject<com.craisinlord.antarchy.content.block.GlowcapMushroomBlock> GLOWCAP_MUSHROOM = BLOCKS.register("glowcap_mushroom",
() -> new com.craisinlord.antarchy.content.block.GlowcapMushroomBlock(BlockBehaviour.Properties.copy(Blocks.RED_MUSHROOM).lightLevel(state -> 12).randomTicks()));
public static final RegistryObject<FlowerPotBlock> POTTED_GLOWCAP_MUSHROOM = BLOCKS.register("potted_glowcap_mushroom",
() -> new FlowerPotBlock(GLOWCAP_MUSHROOM.get(), BlockBehaviour.Properties.copy(Blocks.POTTED_DANDELION).lightLevel(state -> 12)));
public static final RegistryObject<net.minecraft.world.level.block.HugeMushroomBlock> GLOWCAP_MUSHROOM_BLOCK = BLOCKS.register("glowcap_mushroom_block",
() -> new net.minecraft.world.level.block.HugeMushroomBlock(BlockBehaviour.Properties.copy(Blocks.RED_MUSHROOM_BLOCK).lightLevel(state -> 13)));
public static final RegistryObject<CornCropBlock> CORN_CROP = BLOCKS.register("corn_crop",
() -> new CornCropBlock(BlockBehaviour.Properties.copy(Blocks.WHEAT).randomTicks().noCollission().noOcclusion()));
public static final RegistryObject<WildCornBlock> WILD_CORN = BLOCKS.register("wild_corn",
() -> new WildCornBlock(BlockBehaviour.Properties.copy(Blocks.WHEAT).noCollission().noOcclusion()));
public static final RegistryObject<Block> FALLEN_KING_CROWN = BLOCKS.register("fallen_king_crown",
() -> new Block(BlockBehaviour.Properties.of()
.strength(0.2F)
.sound(SoundType.METAL)
.noOcclusion()
.isSuffocating((state, level, pos) -> false)
.isViewBlocking((state, level, pos) -> false)));
public static final RegistryObject<AmethystClusterBlock> SMALL_BLOOD_CRYSTAL_BUD = BLOCKS.register("small_blood_crystal_bud",
() -> new AmethystClusterBlock(3, 4, BlockBehaviour.Properties.copy(Blocks.SMALL_AMETHYST_BUD)));
public static final RegistryObject<AmethystClusterBlock> MEDIUM_BLOOD_CRYSTAL_BUD = BLOCKS.register("medium_blood_crystal_bud",
() -> new AmethystClusterBlock(4, 3, BlockBehaviour.Properties.copy(Blocks.MEDIUM_AMETHYST_BUD)));
public static final RegistryObject<AmethystClusterBlock> LARGE_BLOOD_CRYSTAL_BUD = BLOCKS.register("large_blood_crystal_bud",
() -> new AmethystClusterBlock(5, 3, BlockBehaviour.Properties.copy(Blocks.LARGE_AMETHYST_BUD)));
public static final RegistryObject<Block> BUDDING_BLOOD_CRYSTAL = BLOCKS.register("budding_blood_crystal",
() -> new BuddingBloodCrystalBlock(
BlockBehaviour.Properties.copy(Blocks.BUDDING_AMETHYST),
AntarchyForgeBlocks::smallBloodCrystalBudBlock,
AntarchyForgeBlocks::mediumBloodCrystalBudBlock,
AntarchyForgeBlocks::largeBloodCrystalBudBlock,
AntarchyForgeBlocks::bloodCrystalCrystalBlock
));
public static final RegistryObject<Block> BLOOD_CRYSTAL = BLOCKS.register("blood_crystal_block",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK)));
public static final RegistryObject<AmethystClusterBlock> BLOOD_CRYSTAL_CRYSTAL = BLOCKS.register("blood_crystal_cluster",
() -> new AmethystClusterBlock(7, 3, BlockBehaviour.Properties.copy(Blocks.AMETHYST_CLUSTER)));
public static final RegistryObject<Block> DREAM_SAND = BLOCKS.register("dream_sand",
() -> new DreamSandBlock(BlockBehaviour.Properties.copy(Blocks.SAND)));
public static final RegistryObject<Block> DREAM_SANDSTONE = BLOCKS.register("dream_sandstone",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.SANDSTONE)));
public static final RegistryObject<Block> CHISELED_DREAM_SANDSTONE = BLOCKS.register("chiseled_dream_sandstone",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.CHISELED_SANDSTONE)));
public static final RegistryObject<Block> CUT_DREAM_SANDSTONE = BLOCKS.register("cut_dream_sandstone",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.CUT_SANDSTONE)));
public static final RegistryObject<Block> SMOOTH_DREAM_SANDSTONE = BLOCKS.register("smooth_dream_sandstone",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.SMOOTH_SANDSTONE)));
public static final RegistryObject<StairBlock> DREAM_SANDSTONE_STAIRS = BLOCKS.register("dream_sandstone_stairs",
() -> new StairBlock(DREAM_SANDSTONE.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.SANDSTONE_STAIRS)));
public static final RegistryObject<SlabBlock> DREAM_SANDSTONE_SLAB = BLOCKS.register("dream_sandstone_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.SANDSTONE_SLAB)));
public static final RegistryObject<WallBlock> DREAM_SANDSTONE_WALL = BLOCKS.register("dream_sandstone_wall",
() -> new WallBlock(BlockBehaviour.Properties.copy(Blocks.SANDSTONE_WALL)));
public static final RegistryObject<StairBlock> SMOOTH_DREAM_SANDSTONE_STAIRS = BLOCKS.register("smooth_dream_sandstone_stairs",
() -> new StairBlock(SMOOTH_DREAM_SANDSTONE.get().defaultBlockState(), BlockBehaviour.Properties.copy(Blocks.SMOOTH_SANDSTONE_STAIRS)));
public static final RegistryObject<SlabBlock> SMOOTH_DREAM_SANDSTONE_SLAB = BLOCKS.register("smooth_dream_sandstone_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.SMOOTH_SANDSTONE_SLAB)));
public static final RegistryObject<SlabBlock> CUT_DREAM_SANDSTONE_SLAB = BLOCKS.register("cut_dream_sandstone_slab",
() -> new SlabBlock(BlockBehaviour.Properties.copy(Blocks.CUT_SANDSTONE_SLAB)));
public static final RegistryObject<Block> DEAD_STAR_CORAL_BLOCK = BLOCKS.register("dead_star_coral_block",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_BLOCK)));
public static final RegistryObject<net.minecraft.world.level.block.BaseCoralPlantBlock> DEAD_STAR_CORAL = BLOCKS.register("dead_star_coral",
() -> new net.minecraft.world.level.block.BaseCoralPlantBlock(BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL)));
public static final RegistryObject<net.minecraft.world.level.block.BaseCoralFanBlock> DEAD_STAR_CORAL_FAN = BLOCKS.register("dead_star_coral_fan",
() -> new net.minecraft.world.level.block.BaseCoralFanBlock(BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_FAN)));
public static final RegistryObject<net.minecraft.world.level.block.BaseCoralWallFanBlock> DEAD_STAR_CORAL_WALL_FAN = BLOCKS.register("dead_star_coral_wall_fan",
() -> new net.minecraft.world.level.block.BaseCoralWallFanBlock(BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_WALL_FAN)));
public static final RegistryObject<Block> STAR_CORAL_BLOCK = BLOCKS.register("star_coral_block",
() -> new com.craisinlord.antarchy.content.block.StarCoralBlock(DEAD_STAR_CORAL_BLOCK.get(), BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_BLOCK).lightLevel(state -> 8)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.StarCoralPlantBlock> STAR_CORAL = BLOCKS.register("star_coral",
() -> new com.craisinlord.antarchy.content.block.StarCoralPlantBlock(DEAD_STAR_CORAL.get(), BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL).lightLevel(state -> 8)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.StarCoralFanBlock> STAR_CORAL_FAN = BLOCKS.register("star_coral_fan",
() -> new com.craisinlord.antarchy.content.block.StarCoralFanBlock(DEAD_STAR_CORAL_FAN.get(), BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_FAN).lightLevel(state -> 8)));
public static final RegistryObject<com.craisinlord.antarchy.content.block.StarCoralWallFanBlock> STAR_CORAL_WALL_FAN = BLOCKS.register("star_coral_wall_fan",
() -> new com.craisinlord.antarchy.content.block.StarCoralWallFanBlock(DEAD_STAR_CORAL_WALL_FAN.get(), BlockBehaviour.Properties.copy(Blocks.TUBE_CORAL_WALL_FAN).lightLevel(state -> 8)));
// Block entity types
public static final RegistryObject<BlockEntityType<AntNestBlockEntity>> ANT_NEST_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("ant_nest",
() -> BlockEntityType.Builder.of(
AntNestBlockEntity::new,
RED_ANT_NEST.get(),
BROWN_ANT_NEST.get(),
RAINBOW_ANT_NEST.get(),
TERMITE_NEST.get()
).build(null));
public static final RegistryObject<BlockEntityType<DreamCampfireBlockEntity>> DREAM_CAMPFIRE_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("dream_campfire",
() -> BlockEntityType.Builder.of(
DreamCampfireBlockEntity::new,
DREAM_CAMPFIRE.get()
).build(null));
public static final RegistryObject<BlockEntityType<WaspNestBlockEntity>> WASP_NEST_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("wasp_nest",
() -> BlockEntityType.Builder.of(
WaspNestBlockEntity::new,
WASP_NEST.get()
).build(null));
public static final RegistryObject<BlockEntityType<HushweedBlockEntity>> HUSHWEED_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("hushweed",
() -> BlockEntityType.Builder.of(
HushweedBlockEntity::new,
HUSHWEED.get()
).build(null));
public static final RegistryObject<BlockEntityType<PotentNyxiteBlockEntity>> POTENT_NYXITE_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("potent_nyxite",
() -> BlockEntityType.Builder.of(
(pos, state) -> new PotentNyxiteBlockEntity(pos, state, AntarchyForgeItems::potentNyxiteBlockEntityType),
POTENT_NYXITE.get()
).build(null));
public static final RegistryObject<BlockEntityType<SeashellBlockEntity>> SEASHELL_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("seashell",
() -> BlockEntityType.Builder.of(
SeashellBlockEntity::new,
SEASHELL.get()
).build(null));
public static final RegistryObject<BlockEntityType<CritterCageBlockEntity>> CRITTER_CAGE_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("critter_cage_block",
() -> BlockEntityType.Builder.of(
CritterCageBlockEntity::new,
CRITTER_CAGE_BLOCK.get()
).build(null));
public static final RegistryObject<BlockEntityType<com.craisinlord.antarchy.content.block.entity.BluestoneComparatorBlockEntity>> BLUESTONE_COMPARATOR_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("bluestone_comparator",
() -> BlockEntityType.Builder.of(
(pos, state) -> new com.craisinlord.antarchy.content.block.entity.BluestoneComparatorBlockEntity(pos, state, AntarchyForgeBlocks::bluestoneComparatorBlockEntityType),
BLUESTONE_COMPARATOR.get()
).build(null));
private AntarchyForgeBlocks() {}
public static void register(IEventBus modEventBus) {
BLOCKS.register(modEventBus);
BLOCK_ENTITY_TYPES.register(modEventBus);
}
static BlockBehaviour.Properties nyxiteProperties() {
return BlockBehaviour.Properties.copy(Blocks.NETHERRACK);
}
static BlockBehaviour.Properties broodstoneProperties() {
return BlockBehaviour.Properties.copy(Blocks.DEEPSLATE).requiresCorrectToolForDrops();
}
private static BlockBehaviour.Properties portalProperties() {
return BlockBehaviour.Properties.of()
.strength(-1.0F)
.noCollission()
.noOcclusion()
.lightLevel(state -> 11)
.noLootTable()
.isSuffocating((state, level, pos) -> false)
.isViewBlocking((state, level, pos) -> false);
}
private static Block createOre(Block copyFrom, int minExperience, int maxExperience, MapColor mapColor) {
return new DropExperienceBlock(BlockBehaviour.Properties.copy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops(), UniformInt.of(minExperience, maxExperience));
}
static Block createStorageBlock(Block copyFrom, MapColor mapColor) {
return new Block(BlockBehaviour.Properties.copy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops());
}
static Block createHorizontalFacingStorageBlock(Block copyFrom, MapColor mapColor) {
return new SimpleHorizontalFacingBlock(BlockBehaviour.Properties.copy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops());
}
static Block createRawStorageBlock(Block copyFrom, MapColor mapColor) {
return new Block(BlockBehaviour.Properties.copy(copyFrom).mapColor(mapColor).requiresCorrectToolForDrops());
}
private static Block smallBloodCrystalBudBlock() {
return SMALL_BLOOD_CRYSTAL_BUD.get();
}
private static Block mediumBloodCrystalBudBlock() {
return MEDIUM_BLOOD_CRYSTAL_BUD.get();
}
private static Block largeBloodCrystalBudBlock() {
return LARGE_BLOOD_CRYSTAL_BUD.get();
}
private static Block bloodCrystalCrystalBlock() {
return BLOOD_CRYSTAL_CRYSTAL.get();
}
private static BlockEntityType<com.craisinlord.antarchy.content.block.entity.BluestoneComparatorBlockEntity> bluestoneComparatorBlockEntityType() {
return BLUESTONE_COMPARATOR_BLOCK_ENTITY.get();
}
private static final class SimpleHorizontalFacingBlock extends HorizontalDirectionalBlock {
private SimpleHorizontalFacingBlock(BlockBehaviour.Properties properties) {
super(properties);
registerDefaultState(stateDefinition.any().setValue(FACING, Direction.NORTH));
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(FACING);
}
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
return defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite());
}
@Override
public BlockState rotate(BlockState state, Rotation rotation) {
return state.setValue(FACING, rotation.rotate(state.getValue(FACING)));
}
@Override
public BlockState mirror(BlockState state, Mirror mirror) {
return state.rotate(mirror.getRotation(state.getValue(FACING)));
}
}
}
@@ -0,0 +1,61 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.creative.CreativeTabContents;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.item.*;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.registries.RegistryObject;
public class AntarchyForgeCreativeModeTabs {
private AntarchyForgeCreativeModeTabs() {}
private static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Antarchy.MODID);
public static void register(IEventBus modEventBus) {
CREATIVE_MODE_TABS.register(modEventBus);
modEventBus.addListener(AntarchyForgeCreativeModeTabs::buildCreativeTabs);
}
public static final RegistryObject<CreativeModeTab> ANTARCHY_TAB = CREATIVE_MODE_TABS.register("antarchy",
() -> CreativeModeTab.builder()
.title(net.minecraft.network.chat.Component.translatable("itemGroup.antarchy.antarchy"))
.icon(() -> new ItemStack(AntarchyForgeItems.BIG_BERTHA.get()))
.displayItems((parameters, output) -> {})
.build());
static void buildCreativeTabs(BuildCreativeModeTabContentsEvent event) {
if (event.getTabKey() == ANTARCHY_TAB.getKey()) {
CreativeTabContents.populateAntarchyTab(new CreativeTabContents.AntarchyTabOutput() {
@Override
public void accept(net.minecraft.world.level.ItemLike item) {
event.accept(item);
}
@Override
public void accept(ItemStack stack) {
event.accept(stack);
}
});
return;
}
CreativeTabContents.populateNeoForgeVanillaTab(event.getTabKey(), event.getParameters().holders(),
new CreativeTabContents.NeoForgeVanillaTabOutput() {
@Override
public void accept(net.minecraft.world.level.ItemLike item) {
event.accept(item);
}
@Override
public void accept(ItemStack stack) {
event.accept(stack);
}
@Override
public void insertAfter(net.minecraft.world.level.ItemLike anchor, net.minecraft.world.level.ItemLike item) {
event.getEntries().putAfter(new ItemStack(anchor), new ItemStack(item), CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
});
}
}
@@ -0,0 +1,416 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.AppleCow;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.EnchantedGoldenAppleCow;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.GoldenAppleCow;
import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity;
import com.craisinlord.antarchy.content.entity.BedBugEntity;
import com.craisinlord.antarchy.content.entity.BomberEntity;
import com.craisinlord.antarchy.content.entity.ButterflyEntity;
import com.craisinlord.antarchy.content.entity.CaterpillarEntity;
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
import com.craisinlord.antarchy.content.entity.DrTrayaurusEntity;
import com.craisinlord.antarchy.content.entity.EasterBunnyEntity;
import com.craisinlord.antarchy.content.entity.EmperorScorpionEntity;
import com.craisinlord.antarchy.content.entity.ElkaEntity;
import com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity;
import com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity;
import com.craisinlord.antarchy.content.entity.HushProjectileEntity;
import com.craisinlord.antarchy.content.entity.CritterCageProjectileEntity;
import com.craisinlord.antarchy.content.entity.HerculesBeetleEntity;
import com.craisinlord.antarchy.content.entity.JerryEntity;
import com.craisinlord.antarchy.content.entity.JumpyBugEntity;
import com.craisinlord.antarchy.content.entity.AlphaMantisEntity;
import com.craisinlord.antarchy.content.entity.RollyPollyEntity;
import com.craisinlord.antarchy.content.entity.MantisEntity;
import com.craisinlord.antarchy.content.entity.MissileSquidEntity;
import com.craisinlord.antarchy.content.entity.OctopusBombEntity;
import com.craisinlord.antarchy.content.entity.MolevoreEntity;
import com.craisinlord.antarchy.content.entity.MolewormEntity;
import com.craisinlord.antarchy.content.entity.OuranwoodBoatEntity;
import com.craisinlord.antarchy.content.entity.OuranwoodChestBoatEntity;
import com.craisinlord.antarchy.content.entity.PeachBoatEntity;
import com.craisinlord.antarchy.content.entity.PeachChestBoatEntity;
import com.craisinlord.antarchy.content.entity.ReverieEntity;
import com.craisinlord.antarchy.content.entity.ScorpionEntity;
import com.craisinlord.antarchy.content.entity.SizeRayProjectileEntity;
import com.craisinlord.antarchy.content.entity.SpitBugEntity;
import com.craisinlord.antarchy.content.entity.SpitBugProjectileEntity;
import com.craisinlord.antarchy.content.entity.StinkBugEntity;
import com.craisinlord.antarchy.content.entity.TriffidEntity;
import com.craisinlord.antarchy.content.entity.UpwardFallingBlockEntity;
import com.craisinlord.antarchy.content.entity.WaspEntity;
import com.craisinlord.antarchy.content.entity.ant.BaseAntEntity;
import com.craisinlord.antarchy.content.entity.ant.BrownAntEntity;
import com.craisinlord.antarchy.content.entity.ant.RainbowAntEntity;
import com.craisinlord.antarchy.content.entity.ant.RedAntEntity;
import com.craisinlord.antarchy.content.entity.ant.TermiteEntity;
import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity;
import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity;
import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyOrbEntity;
import com.craisinlord.antarchy.content.entity.flying_squirrel.FlyingSquirrelEntity;
import com.craisinlord.antarchy.content.entity.kraken.KrakenEntity;
import com.craisinlord.antarchy.content.entity.kraken.KrakensGraspThrownTrident;
import com.craisinlord.antarchy.content.entity.kraken.TentacleEntity;
import com.craisinlord.antarchy.content.entity.lucid.LucidBoltEntity;
import com.craisinlord.antarchy.content.entity.lucid.LucidEntity;
import com.craisinlord.antarchy.content.entity.lucid.LucidEyeProjectileEntity;
import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity;
import com.craisinlord.antarchy.content.entity.CheepEntity;
import com.craisinlord.antarchy.content.entity.CreepingHorrorEntity;
import com.craisinlord.antarchy.content.entity.DorrieEntity;
import com.craisinlord.antarchy.content.entity.LurkingTerrorEntity;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import com.craisinlord.antarchy.content.entity.WaterBombEntity;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.entity.animal.Cow;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.RegistryObject;
import net.minecraftforge.fml.ModList;
public final class AntarchyForgeEntites {
private static final DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(Registries.ENTITY_TYPE, Antarchy.MODID);
public static final boolean CREATE_LOADED = isModLoaded("create");
private static boolean isModLoaded(String modId) {
try {
return ModList.get().isLoaded(modId);
} catch (Throwable ignored) {
return false;
}
}
public static final RegistryObject<EntityType<RedAntEntity>> RED_ANT = ENTITY_TYPES.register("red_ant",
() -> buildAntType(RedAntEntity::new, MobCategory.CREATURE, "red_ant"));
public static final RegistryObject<EntityType<BrownAntEntity>> BROWN_ANT = ENTITY_TYPES.register("brown_ant",
() -> buildAntType(BrownAntEntity::new, MobCategory.CREATURE, "brown_ant"));
public static final RegistryObject<EntityType<RainbowAntEntity>> RAINBOW_ANT = ENTITY_TYPES.register("rainbow_ant",
() -> buildAntType(RainbowAntEntity::new, MobCategory.CREATURE, "rainbow_ant"));
public static final RegistryObject<EntityType<TermiteEntity>> TERMITE = ENTITY_TYPES.register("termite",
() -> buildAntType(TermiteEntity::new, MobCategory.CREATURE, "termite"));
public static final RegistryObject<EntityType<MolewormEntity>> MOLEWORM = ENTITY_TYPES.register("moleworm",
() -> EntityType.Builder.of(MolewormEntity::new, MobCategory.MONSTER)
.sized(0.4F, 0.3F)
.clientTrackingRange(8)
.build("moleworm"));
public static final RegistryObject<EntityType<MantisEntity>> MANTIS = ENTITY_TYPES.register("mantis",
() -> EntityType.Builder.of(MantisEntity::new, MobCategory.MONSTER)
.sized(3.125F, 2.5F)
.clientTrackingRange(8)
.build("mantis"));
public static final RegistryObject<EntityType<AlphaMantisEntity>> ALPHA_MANTIS = ENTITY_TYPES.register("alpha_mantis",
() -> EntityType.Builder.of(AlphaMantisEntity::new, MobCategory.MONSTER)
.sized(4.25F, 3.35F)
.clientTrackingRange(10)
.build("alpha_mantis"));
public static final RegistryObject<EntityType<RollyPollyEntity>> ROLLY_POLLY = ENTITY_TYPES.register("rolly_polly",
() -> EntityType.Builder.of(RollyPollyEntity::new, MobCategory.CREATURE)
.sized(0.95F, 0.85F)
.clientTrackingRange(10)
.build("rolly_polly"));
public static final RegistryObject<EntityType<OuranwoodBoatEntity>> OURANWOOD_BOAT_ENTITY = ENTITY_TYPES.register("ouranwood_boat",
() -> EntityType.Builder.<OuranwoodBoatEntity>of(OuranwoodBoatEntity::new, MobCategory.MISC)
.sized(1.375F, 0.5625F)
.clientTrackingRange(10)
.updateInterval(10)
.build("ouranwood_boat"));
public static final RegistryObject<EntityType<OuranwoodChestBoatEntity>> OURANWOOD_CHEST_BOAT_ENTITY = ENTITY_TYPES.register("ouranwood_chest_boat",
() -> EntityType.Builder.<OuranwoodChestBoatEntity>of(OuranwoodChestBoatEntity::new, MobCategory.MISC)
.sized(1.375F, 0.5625F)
.clientTrackingRange(10)
.updateInterval(10)
.build("ouranwood_chest_boat"));
public static final RegistryObject<EntityType<PeachBoatEntity>> PEACH_BOAT_ENTITY = ENTITY_TYPES.register("peach_boat",
() -> EntityType.Builder.<PeachBoatEntity>of(PeachBoatEntity::new, MobCategory.MISC)
.sized(1.375F, 0.5625F)
.clientTrackingRange(10)
.updateInterval(10)
.build("peach_boat"));
public static final RegistryObject<EntityType<PeachChestBoatEntity>> PEACH_CHEST_BOAT_ENTITY = ENTITY_TYPES.register("peach_chest_boat",
() -> EntityType.Builder.<PeachChestBoatEntity>of(PeachChestBoatEntity::new, MobCategory.MISC)
.sized(1.375F, 0.5625F)
.clientTrackingRange(10)
.updateInterval(10)
.build("peach_chest_boat"));
public static final RegistryObject<EntityType<MolevoreEntity>> MOLEVORE = ENTITY_TYPES.register("molevore",
() -> EntityType.Builder.of(MolevoreEntity::new, MobCategory.MONSTER)
.sized(1.95F, 1.1F)
.clientTrackingRange(10)
.build("molevore"));
public static final RegistryObject<EntityType<TriffidEntity>> TRIFFID = ENTITY_TYPES.register("triffid",
() -> EntityType.Builder.of(TriffidEntity::new, MobCategory.MONSTER)
.sized(2.0F, 5.0F)
.clientTrackingRange(10)
.build("triffid"));
public static final RegistryObject<EntityType<BedBugEntity>> BED_BUG = ENTITY_TYPES.register("bed_bug",
() -> EntityType.Builder.of(BedBugEntity::new, MobCategory.CREATURE)
.sized(1.15F, 0.8F)
.clientTrackingRange(8)
.build("bed_bug"));
public static final RegistryObject<EntityType<StinkBugEntity>> STINK_BUG = ENTITY_TYPES.register("stink_bug",
() -> EntityType.Builder.of(StinkBugEntity::new, MobCategory.CREATURE)
.sized(0.35F, 0.2F)
.clientTrackingRange(8)
.build("stink_bug"));
public static final RegistryObject<EntityType<WaspEntity>> WASP = ENTITY_TYPES.register("wasp",
() -> EntityType.Builder.of(WaspEntity::new, MobCategory.MONSTER)
.sized(0.8625F, 1.365F)
.clientTrackingRange(8)
.build("wasp"));
public static final RegistryObject<EntityType<BomberEntity>> BOMBER = ENTITY_TYPES.register("bomber",
() -> EntityType.Builder.of(BomberEntity::new, MobCategory.MONSTER)
.sized(0.55F, 0.75F)
.clientTrackingRange(8)
.build("bomber"));
public static final RegistryObject<EntityType<JumpyBugEntity>> JUMPY_BUG = ENTITY_TYPES.register("jumpy_bug",
() -> EntityType.Builder.of(JumpyBugEntity::new, MobCategory.MONSTER)
.sized(3.0F, 6.0F)
.clientTrackingRange(8)
.build("jumpy_bug"));
public static final RegistryObject<EntityType<SpitBugEntity>> SPIT_BUG = ENTITY_TYPES.register("spit_bug",
() -> EntityType.Builder.of(SpitBugEntity::new, MobCategory.MONSTER)
.sized(2.5F, 3.0F)
.clientTrackingRange(10)
.build("spit_bug"));
public static final RegistryObject<EntityType<SpitBugProjectileEntity>> SPIT_BUG_PROJECTILE = ENTITY_TYPES.register("spit_bug_projectile",
() -> EntityType.Builder.<SpitBugProjectileEntity>of(SpitBugProjectileEntity::new, MobCategory.MISC)
.sized(0.5F, 0.5F)
.clientTrackingRange(8)
.updateInterval(1)
.build("spit_bug_projectile"));
public static final RegistryObject<EntityType<SizeRayProjectileEntity>> SHRINK_RAY_PROJECTILE = ENTITY_TYPES.register("shrink_ray_projectile",
() -> EntityType.Builder.<SizeRayProjectileEntity>of(SizeRayProjectileEntity::createShrink, MobCategory.MISC)
.sized(0.5F, 0.5F)
.clientTrackingRange(8)
.updateInterval(1)
.build("shrink_ray_projectile"));
public static final RegistryObject<EntityType<SizeRayProjectileEntity>> GROWTH_RAY_PROJECTILE = ENTITY_TYPES.register("growth_ray_projectile",
() -> EntityType.Builder.<SizeRayProjectileEntity>of(SizeRayProjectileEntity::createGrowth, MobCategory.MISC)
.sized(0.5F, 0.5F)
.clientTrackingRange(8)
.updateInterval(1)
.build("growth_ray_projectile"));
public static final RegistryObject<EntityType<DiamondMinecartEntity>> DIAMOND_MINECART = ENTITY_TYPES.register("diamond_minecart",
() -> EntityType.Builder.<DiamondMinecartEntity>of((entityType, level) -> new DiamondMinecartEntity(entityType, level, AntarchyForgeItems.diamondMinecartItem()), MobCategory.MISC)
.sized(0.98F, 0.7F)
.clientTrackingRange(8)
.build("diamond_minecart"));
public static final RegistryObject<EntityType<EasterBunnyEntity>> EASTER_BUNNY = ENTITY_TYPES.register("easter_bunny",
() -> EntityType.Builder.of(EasterBunnyEntity::new, MobCategory.CREATURE)
.sized(0.5F, 1.0F)
.clientTrackingRange(8)
.build("easter_bunny"));
public static final RegistryObject<EntityType<FlyingSquirrelEntity>> FLYING_SQUIRREL = ENTITY_TYPES.register("flying_squirrel",
() -> EntityType.Builder.of(FlyingSquirrelEntity::new, MobCategory.CREATURE)
.sized(0.6F, 0.7F)
.clientTrackingRange(8)
.build("flying_squirrel"));
public static final RegistryObject<EntityType<CaterpillarEntity>> CATERPILLAR = ENTITY_TYPES.register("caterpillar",
() -> EntityType.Builder.of(CaterpillarEntity::new, MobCategory.CREATURE)
.sized(0.8775F, 0.585F)
.clientTrackingRange(8)
.build("caterpillar"));
public static final RegistryObject<EntityType<ButterflyEntity>> BUTTERFLY = ENTITY_TYPES.register("butterfly",
() -> EntityType.Builder.of(ButterflyEntity::new, MobCategory.AMBIENT)
.sized(1.125F, 0.6875F)
.clientTrackingRange(8)
.build("butterfly"));
public static final RegistryObject<EntityType<ReverieEntity>> REVERIE = ENTITY_TYPES.register("reverie",
() -> EntityType.Builder.of(ReverieEntity::new, MobCategory.AMBIENT)
.sized(0.7F, 0.7F)
.clientTrackingRange(8)
.build("reverie"));
public static final RegistryObject<EntityType<BrutalflyEntity>> BRUTALFLY = ENTITY_TYPES.register("brutalfly",
() -> EntityType.Builder.of(BrutalflyEntity::new, MobCategory.MONSTER)
.sized(2.4F, 2.1F)
.clientTrackingRange(12)
.build("brutalfly"));
public static final RegistryObject<EntityType<AppleCow>> APPLE_COW = ENTITY_TYPES.register("apple_cow",
() -> buildCowType(AppleCow::new, "apple_cow"));
public static final RegistryObject<EntityType<GoldenAppleCow>> GOLDEN_APPLE_COW = ENTITY_TYPES.register("golden_apple_cow",
() -> buildCowType(GoldenAppleCow::new, "golden_apple_cow"));
public static final RegistryObject<EntityType<EnchantedGoldenAppleCow>> ENCHANTED_GOLDEN_APPLE_COW = ENTITY_TYPES.register("enchanted_golden_apple_cow",
() -> buildCowType(EnchantedGoldenAppleCow::new, "enchanted_golden_apple_cow"));
public static final RegistryObject<EntityType<DrTrayaurusEntity>> DR_TRAYAURUS = ENTITY_TYPES.register("dr_trayaurus",
() -> EntityType.Builder.of(DrTrayaurusEntity::new, MobCategory.MISC)
.sized(0.6F, 1.95F)
.clientTrackingRange(10)
.build("dr_trayaurus"));
public static final RegistryObject<EntityType<CloudSharkEntity>> CLOUD_SHARK = ENTITY_TYPES.register("cloud_shark",
() -> EntityType.Builder.of(CloudSharkEntity::new, MobCategory.MONSTER)
.sized(2.4F, 0.9F)
.clientTrackingRange(10)
.build("cloud_shark"));
public static final RegistryObject<EntityType<KrakenEntity>> KRAKEN = ENTITY_TYPES.register("kraken",
() -> EntityType.Builder.of(KrakenEntity::new, MobCategory.MONSTER)
.sized(11.4F, 39.0F)
.clientTrackingRange(12)
.build("kraken"));
public static final RegistryObject<EntityType<MissileSquidEntity>> MISSILE_SQUID = ENTITY_TYPES.register("missile_squid",
() -> EntityType.Builder.of(MissileSquidEntity::new, MobCategory.MONSTER)
.sized(1.62F, 3.18F)
.clientTrackingRange(10)
.build("missile_squid"));
public static final RegistryObject<EntityType<OctopusBombEntity>> OCTOPUS_BOMB = ENTITY_TYPES.register("octopus_bomb",
() -> EntityType.Builder.of(OctopusBombEntity::new, MobCategory.WATER_CREATURE)
.sized(2.4F, 2.9F)
.clientTrackingRange(10)
.build("octopus_bomb"));
public static final RegistryObject<EntityType<NightmareEntity>> NIGHTMARE = ENTITY_TYPES.register("nightmare",
() -> EntityType.Builder.of(NightmareEntity::new, MobCategory.MONSTER)
.sized(3.2F, 3.8F)
.clientTrackingRange(12)
.build("nightmare"));
public static final RegistryObject<EntityType<LucidEntity>> LUCID = ENTITY_TYPES.register("lucid",
() -> EntityType.Builder.of(LucidEntity::new, MobCategory.MONSTER)
.sized(2.0F, 2.0F)
.clientTrackingRange(10)
.build("lucid"));
public static final RegistryObject<EntityType<LucidBoltEntity>> LUCID_BOLT = ENTITY_TYPES.register("lucid_bolt",
() -> EntityType.Builder.<LucidBoltEntity>of(LucidBoltEntity::new, MobCategory.MISC)
.sized(0.3F, 0.3F)
.clientTrackingRange(8)
.updateInterval(1)
.build("lucid_bolt"));
public static final RegistryObject<EntityType<KrakensGraspThrownTrident>> KRAKENS_GRASP_TRIDENT = ENTITY_TYPES.register("krakens_grasp_trident",
() -> EntityType.Builder.<KrakensGraspThrownTrident>of(KrakensGraspThrownTrident::new, MobCategory.MISC)
.sized(0.5F, 0.5F)
.clientTrackingRange(8)
.updateInterval(1)
.fireImmune()
.build("krakens_grasp_trident"));
public static final RegistryObject<EntityType<TentacleEntity>> TENTACLE = ENTITY_TYPES.register("tentacle",
() -> EntityType.Builder.of(TentacleEntity::new, MobCategory.MISC)
.sized(1.2F, 4.5F)
.clientTrackingRange(10)
.build("tentacle"));
public static final RegistryObject<EntityType<ScorpionEntity>> SCORPION = ENTITY_TYPES.register("scorpion",
() -> EntityType.Builder.of(ScorpionEntity::new, MobCategory.MONSTER)
.sized(1.5F, 1.0F)
.clientTrackingRange(8)
.build("scorpion"));
public static final RegistryObject<EntityType<BasiliskEntity>> BASILISK = ENTITY_TYPES.register("basilisk",
() -> EntityType.Builder.of(BasiliskEntity::new, MobCategory.MONSTER)
.sized(3.0F, 3.5F)
.clientTrackingRange(14)
.build("basilisk"));
public static final RegistryObject<EntityType<EmperorScorpionEntity>> EMPEROR_SCORPION = ENTITY_TYPES.register("emperor_scorpion",
() -> EntityType.Builder.of(EmperorScorpionEntity::new, MobCategory.MONSTER)
.sized(6.0F, 3.0F)
.clientTrackingRange(12)
.build("emperor_scorpion"));
public static final RegistryObject<EntityType<LucidEyeProjectileEntity>> LUCID_PEARL_PROJECTILE = ENTITY_TYPES.register("lucid_pearl_projectile",
() -> EntityType.Builder.<LucidEyeProjectileEntity>of(LucidEyeProjectileEntity::new, MobCategory.MISC)
.sized(0.25F, 0.25F)
.clientTrackingRange(8)
.updateInterval(1)
.build("lucid_pearl_projectile"));
public static final RegistryObject<EntityType<CritterCageProjectileEntity>> CRITTER_CAGE_PROJECTILE = ENTITY_TYPES.register("critter_cage_projectile",
() -> EntityType.Builder.<CritterCageProjectileEntity>of(CritterCageProjectileEntity::new, MobCategory.MISC)
.sized(0.25F, 0.25F)
.clientTrackingRange(8)
.updateInterval(1)
.build("critter_cage_projectile"));
public static final RegistryObject<EntityType<HushProjectileEntity>> HUSH_PROJECTILE = ENTITY_TYPES.register("hush_projectile",
() -> EntityType.Builder.<HushProjectileEntity>of(HushProjectileEntity::new, MobCategory.MISC)
.sized(0.35F, 0.35F)
.clientTrackingRange(8)
.updateInterval(1)
.build("hush_projectile"));
public static final RegistryObject<EntityType<BrutalflyOrbEntity>> BRUTALFLY_ORB = ENTITY_TYPES.register("brutalfly_orb",
() -> EntityType.Builder.<BrutalflyOrbEntity>of(BrutalflyOrbEntity::new, MobCategory.MISC)
.sized(0.75F, 0.75F)
.clientTrackingRange(10)
.updateInterval(1)
.build("brutalfly_orb"));
public static final RegistryObject<EntityType<ToreterrorEntity>> TORETERROR = ENTITY_TYPES.register("toreterror",
() -> EntityType.Builder.of(ToreterrorEntity::new, MobCategory.MONSTER)
.sized(2.0F, 3.0F)
.clientTrackingRange(14)
.build("toreterror"));
public static final RegistryObject<EntityType<WaterBombEntity>> WATER_BOMB = ENTITY_TYPES.register("water_bomb",
() -> EntityType.Builder.<WaterBombEntity>of(WaterBombEntity::new, MobCategory.MISC)
.sized(0.4F, 0.4F)
.clientTrackingRange(8)
.updateInterval(1)
.build("water_bomb"));
public static final RegistryObject<EntityType<CreepingHorrorEntity>> CREEPING_HORROR = ENTITY_TYPES.register("creeping_horror",
() -> EntityType.Builder.of(CreepingHorrorEntity::new, MobCategory.MONSTER)
.sized(1.3F, 1.5F)
.clientTrackingRange(10)
.build("creeping_horror"));
public static final RegistryObject<EntityType<LurkingTerrorEntity>> LURKING_TERROR = ENTITY_TYPES.register("lurking_terror",
() -> EntityType.Builder.of(LurkingTerrorEntity::new, MobCategory.MONSTER)
.sized(1.3F, 1.5F)
.clientTrackingRange(10)
.build("lurking_terror"));
public static final RegistryObject<EntityType<JerryEntity>> JERRY = ENTITY_TYPES.register("jerry",
() -> EntityType.Builder.of(JerryEntity::new, MobCategory.MONSTER)
.sized(1.4F, 1.4F)
.clientTrackingRange(10)
.build("jerry"));
public static final RegistryObject<EntityType<CheepEntity>> CHEEP = ENTITY_TYPES.register("cheep",
() -> EntityType.Builder.of(CheepEntity::new, MobCategory.WATER_AMBIENT)
.sized(1.0F, 1.2F)
.clientTrackingRange(8)
.build("cheep"));
public static final RegistryObject<EntityType<DorrieEntity>> DORRIE = ENTITY_TYPES.register("dorrie",
() -> EntityType.Builder.of(DorrieEntity::new, MobCategory.CREATURE)
.sized(1.6F, 1.4F)
.clientTrackingRange(10)
.build("dorrie"));
public static final RegistryObject<EntityType<HerculesBeetleEntity>> HERCULES_BEETLE = ENTITY_TYPES.register("hercules_beetle",
() -> EntityType.Builder.of(HerculesBeetleEntity::new, MobCategory.MONSTER)
.sized(3.0F, 4.0F)
.clientTrackingRange(12)
.build("hercules_beetle"));
public static final RegistryObject<EntityType<OuranwoodDeerEntity>> OURANWOOD_DEER = ENTITY_TYPES.register("ouranwood_deer",
() -> EntityType.Builder.of(OuranwoodDeerEntity::new, MobCategory.CREATURE)
.sized(1.125F, 1.75F)
.clientTrackingRange(8)
.build("ouranwood_deer"));
public static final RegistryObject<EntityType<GlimmerEntity>> GLIMMER = ENTITY_TYPES.register("glimmer",
() -> EntityType.Builder.of(GlimmerEntity::new, MobCategory.CREATURE)
.sized(0.9F, 1.4F)
.clientTrackingRange(8)
.build("glimmer"));
public static final RegistryObject<EntityType<ElkaEntity>> ELKA = ENTITY_TYPES.register("elka",
() -> EntityType.Builder.of(ElkaEntity::new, MobCategory.CREATURE)
.sized(2.2F, 3.5F)
.clientTrackingRange(10)
.build("elka"));
public static final RegistryObject<EntityType<UpwardFallingBlockEntity>> UPWARD_FALLING_BLOCK = ENTITY_TYPES.register("upward_falling_block",
() -> EntityType.Builder.<UpwardFallingBlockEntity>of(
UpwardFallingBlockEntity::new, MobCategory.MISC)
.sized(0.98F, 0.98F)
.clientTrackingRange(10)
.updateInterval(1)
.build("upward_falling_block"));
private AntarchyForgeEntites() {}
public static void register(IEventBus modEventBus) {
ENTITY_TYPES.register(modEventBus);
}
static <T extends BaseAntEntity> EntityType<T> buildAntType(EntityType.EntityFactory<T> factory, MobCategory category, String name) {
return EntityType.Builder.of(factory, category)
.sized(0.6375F, 0.2125F)
.clientTrackingRange(8)
.build(name);
}
static <T extends Cow> EntityType<T> buildCowType(EntityType.EntityFactory<T> factory, String name) {
return EntityType.Builder.of(factory, MobCategory.CREATURE)
.sized(0.9F, 1.4F)
.clientTrackingRange(10)
.build(name);
}
}
@@ -0,0 +1,98 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.config.AntarchySettings;
import com.craisinlord.antarchy.content.entity.*;
import com.craisinlord.antarchy.content.entity.CreepingHorrorEntity;
import com.craisinlord.antarchy.content.entity.LurkingTerrorEntity;
import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity;
import com.craisinlord.antarchy.content.entity.brutalfly.BrutalflyEntity;
import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity;
import com.craisinlord.antarchy.content.entity.flying_squirrel.FlyingSquirrelEntity;
import com.craisinlord.antarchy.content.entity.kraken.KrakenEntity;
import com.craisinlord.antarchy.content.entity.kraken.TentacleEntity;
import com.craisinlord.antarchy.content.entity.lucid.LucidEntity;
import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity;
import com.craisinlord.antarchy.content.entity.ToreterrorEntity;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.animal.Cow;
import net.minecraft.world.entity.animal.Rabbit;
import net.minecraft.world.entity.npc.Villager;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
public class AntarchyForgeEntityAttributes {
private AntarchyForgeEntityAttributes() {}
public static void register(IEventBus modEventBus) {
modEventBus.addListener(AntarchyForgeEntityAttributes::registerEntityAttributes);
}
static void registerEntityAttributes(EntityAttributeCreationEvent event) {
AttributeSupplier rabbitAttributes = Rabbit.createAttributes().build();
event.put(AntarchyForgeEntites.EASTER_BUNNY.get(), rabbitAttributes);
event.put(AntarchyForgeEntites.FLYING_SQUIRREL.get(), FlyingSquirrelEntity.createAttributes().build());
event.put(AntarchyForgeEntites.CATERPILLAR.get(), CaterpillarEntity.createAttributes().build());
event.put(AntarchyForgeEntites.BUTTERFLY.get(), ButterflyEntity.createAttributes().build());
event.put(AntarchyForgeEntites.REVERIE.get(), ReverieEntity.createAttributes().build());
event.put(AntarchyForgeEntites.BRUTALFLY.get(), BrutalflyEntity.createAttributes().build());
AttributeSupplier cowAttributes = Cow.createAttributes().build();
event.put(AntarchyForgeEntites.APPLE_COW.get(), cowAttributes);
event.put(AntarchyForgeEntites.GOLDEN_APPLE_COW.get(), cowAttributes);
event.put(AntarchyForgeEntites.ENCHANTED_GOLDEN_APPLE_COW.get(), cowAttributes);
event.put(AntarchyForgeEntites.TERMITE.get(), buildAntAttributes(
AntarchySettings.termiteHealth(),
AntarchySettings.termiteMovementSpeed(),
AntarchySettings.termiteAttackDamage()
).build());
event.put(AntarchyForgeEntites.ROLLY_POLLY.get(), RollyPollyEntity.createAttributes().build());
event.put(AntarchyForgeEntites.DR_TRAYAURUS.get(), Villager.createAttributes().build());
event.put(AntarchyForgeEntites.CLOUD_SHARK.get(), CloudSharkEntity.createAttributes().build());
event.put(AntarchyForgeEntites.KRAKEN.get(), KrakenEntity.createAttributes().build());
event.put(AntarchyForgeEntites.MISSILE_SQUID.get(), MissileSquidEntity.createAttributes().build());
event.put(AntarchyForgeEntites.OCTOPUS_BOMB.get(), OctopusBombEntity.createAttributes().build());
event.put(AntarchyForgeEntites.TENTACLE.get(), TentacleEntity.createAttributes().build());
event.put(AntarchyForgeEntites.NIGHTMARE.get(), NightmareEntity.createAttributes().build());
event.put(AntarchyForgeEntites.BED_BUG.get(), BedBugEntity.createAttributes().build());
event.put(AntarchyForgeEntites.STINK_BUG.get(), StinkBugEntity.createAttributes().build());
event.put(AntarchyForgeEntites.WASP.get(), WaspEntity.createAttributes().build());
event.put(AntarchyForgeEntites.BOMBER.get(), BomberEntity.createAttributes().build());
event.put(AntarchyForgeEntites.JUMPY_BUG.get(), JumpyBugEntity.createAttributes().build());
event.put(AntarchyForgeEntites.SPIT_BUG.get(), SpitBugEntity.createAttributes().build());
event.put(AntarchyForgeEntites.MANTIS.get(), MantisEntity.createAttributes().build());
event.put(AntarchyForgeEntites.ALPHA_MANTIS.get(), AlphaMantisEntity.createAttributes().build());
event.put(AntarchyForgeEntites.TRIFFID.get(), TriffidEntity.createAttributes().build());
event.put(AntarchyForgeEntites.LUCID.get(), LucidEntity.createAttributes().build());
event.put(AntarchyForgeEntites.SCORPION.get(), ScorpionEntity.createAttributes().build());
event.put(AntarchyForgeEntites.BASILISK.get(), BasiliskEntity.createAttributes().build());
event.put(AntarchyForgeEntites.EMPEROR_SCORPION.get(), EmperorScorpionEntity.createAttributes().build());
event.put(AntarchyForgeEntites.TORETERROR.get(), ToreterrorEntity.createAttributes().build());
event.put(AntarchyForgeEntites.CREEPING_HORROR.get(), CreepingHorrorEntity.createAttributes().build());
event.put(AntarchyForgeEntites.LURKING_TERROR.get(), LurkingTerrorEntity.createAttributes().build());
event.put(AntarchyForgeEntites.JERRY.get(), JerryEntity.createAttributes().build());
AttributeSupplier redAntAttributes = buildAntAttributes(AntarchySettings.redAntHealth(), AntarchySettings.redAntMovementSpeed(), AntarchySettings.redAntAttackDamage()).build();
AttributeSupplier brownAntAttributes = buildAntAttributes(AntarchySettings.brownAntHealth(), AntarchySettings.brownAntMovementSpeed(), AntarchySettings.brownAntAttackDamage()).build();
AttributeSupplier rainbowAntAttributes = buildAntAttributes(AntarchySettings.rainbowAntHealth(), AntarchySettings.rainbowAntMovementSpeed(), AntarchySettings.rainbowAntAttackDamage()).build();
event.put(AntarchyForgeEntites.RED_ANT.get(), redAntAttributes);
event.put(AntarchyForgeEntites.BROWN_ANT.get(), brownAntAttributes);
event.put(AntarchyForgeEntites.RAINBOW_ANT.get(), rainbowAntAttributes);
event.put(AntarchyForgeEntites.MOLEWORM.get(), MolewormEntity.createAttributes().build());
event.put(AntarchyForgeEntites.MOLEVORE.get(), MolevoreEntity.createAttributes().build());
event.put(AntarchyForgeEntites.CHEEP.get(), com.craisinlord.antarchy.content.entity.CheepEntity.createAttributes().build());
event.put(AntarchyForgeEntites.DORRIE.get(), com.craisinlord.antarchy.content.entity.DorrieEntity.createAttributes().build());
event.put(AntarchyForgeEntites.HERCULES_BEETLE.get(), com.craisinlord.antarchy.content.entity.HerculesBeetleEntity.createAttributes().build());
event.put(AntarchyForgeEntites.OURANWOOD_DEER.get(), com.craisinlord.antarchy.content.entity.OuranwoodDeerEntity.createAttributes().build());
event.put(AntarchyForgeEntites.GLIMMER.get(), com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity.createAttributes().build());
event.put(AntarchyForgeEntites.ELKA.get(), ElkaEntity.createAttributes().build());
}
private static AttributeSupplier.Builder buildAntAttributes(double health, double speed, double attackDamage) {
return net.minecraft.world.entity.Mob.createMobAttributes()
.add(Attributes.MAX_HEALTH, health)
.add(Attributes.MOVEMENT_SPEED, speed)
.add(Attributes.ATTACK_DAMAGE, attackDamage);
}
}
@@ -0,0 +1,410 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserBaseParticleOptions;
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserParticleOptions;
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
import com.craisinlord.antarchy.content.effect.GoopedMobEffect;
import com.craisinlord.antarchy.content.effect.GrowthMobEffect;
import com.craisinlord.antarchy.content.effect.InvertedMobEffect;
import com.craisinlord.antarchy.content.effect.ParalyzedMobEffect;
import com.craisinlord.antarchy.content.effect.ShrinkMobEffect;
import com.craisinlord.antarchy.content.effect.StinkyMobEffect;
import com.craisinlord.antarchy.content.recipe.AmericanizeRecipe;
import com.craisinlord.antarchy.content.worldgen.ants.BrownAntNestFeature;
import com.craisinlord.antarchy.content.worldgen.ants.RainbowAntNestFeature;
import com.craisinlord.antarchy.content.worldgen.ants.RedAntNestFeature;
import com.craisinlord.antarchy.content.worldgen.ants.TermiteNestFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.CavarynBileCystFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.CavarynBileVeinFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.CavarynCreepvineFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.CavarynEggPatchFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.CavarynWallAmberMossFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.HangingCreeprootsFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.ChitenSpikeConfiguration;
import com.craisinlord.antarchy.content.worldgen.cavaryn.ChitenSpikeFeature;
import com.craisinlord.antarchy.content.worldgen.cavaryn.MoltingVinesFeature;
import com.craisinlord.antarchy.content.worldgen.ocean.SeashellFeature;
import com.craisinlord.antarchy.content.worldgen.elythia.*;
import com.craisinlord.antarchy.forge.worldgen.CornPatchFeature;
import com.craisinlord.antarchy.forge.worldgen.LumenLilyPadFeature;
import com.craisinlord.antarchy.content.worldgen.thoraxis.*;
import com.craisinlord.antarchy.forge.content.fluid.AntiwaterFluid;
import net.minecraft.core.Holder;
import net.minecraft.core.particles.ParticleType;
import net.minecraft.core.particles.SimpleParticleType;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.flag.FeatureFlags;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.world.level.biome.BiomeSource;
import net.minecraft.world.level.levelgen.DensityFunction;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration;
import net.minecraft.world.level.material.Fluid;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fluids.ForgeFlowingFluid;
import net.minecraftforge.fluids.FluidType;
import net.minecraftforge.registries.RegistryObject;
import net.minecraftforge.registries.ForgeRegistries;
public final class AntarchyForgeMisc {
private static final DeferredRegister<MobEffect> MOB_EFFECTS = DeferredRegister.create(Registries.MOB_EFFECT, Antarchy.MODID);
private static final DeferredRegister<Potion> POTIONS = DeferredRegister.create(Registries.POTION, Antarchy.MODID);
private static final DeferredRegister<FluidType> FLUID_TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, Antarchy.MODID);
private static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(Registries.FLUID, Antarchy.MODID);
private static final DeferredRegister<ParticleType<?>> PARTICLE_TYPES = DeferredRegister.create(Registries.PARTICLE_TYPE, Antarchy.MODID);
private static final DeferredRegister<Feature<?>> FEATURES = DeferredRegister.create(Registries.FEATURE, Antarchy.MODID);
private static final DeferredRegister<com.mojang.serialization.Codec<? extends BiomeSource>> BIOME_SOURCES = DeferredRegister.create(Registries.BIOME_SOURCE, Antarchy.MODID);
private static final DeferredRegister<com.mojang.serialization.Codec<? extends DensityFunction>> DENSITY_FUNCTION_TYPES = DeferredRegister.create(Registries.DENSITY_FUNCTION_TYPE, Antarchy.MODID);
private static final DeferredRegister<Attribute> ATTRIBUTES = DeferredRegister.create(Registries.ATTRIBUTE, Antarchy.MODID);
private static final DeferredRegister<MenuType<?>> MENU_TYPES = DeferredRegister.create(Registries.MENU, Antarchy.MODID);
private static final DeferredRegister<net.minecraft.world.entity.animal.FrogVariant> FROG_VARIANTS =
DeferredRegister.create(Registries.FROG_VARIANT, Antarchy.MODID);
public static final RegistryObject<net.minecraft.world.entity.animal.FrogVariant> ELYTHIA_FROG_VARIANT = FROG_VARIANTS.register(
"elythia",
() -> new net.minecraft.world.entity.animal.FrogVariant(com.craisinlord.antarchy.content.entity.ElythiaFrog.TEXTURE)
);
private static final DeferredRegister<net.minecraft.world.item.crafting.RecipeSerializer<?>> RECIPE_SERIALIZERS =
DeferredRegister.create(Registries.RECIPE_SERIALIZER, Antarchy.MODID);
public static final RegistryObject<net.minecraft.world.item.crafting.RecipeSerializer<AmericanizeRecipe>> AMERICANIZE_SERIALIZER =
RECIPE_SERIALIZERS.register("americanize", () -> AmericanizeRecipe.SERIALIZER);
public static final RegistryObject<Attribute> SCALE = ATTRIBUTES.register(
"scale",
() -> new net.minecraft.world.entity.ai.attributes.RangedAttribute("attribute.antarchy.scale", 1.0, 0.0625, 16.0).setSyncable(true)
);
public static final RegistryObject<Attribute> DOUBLE_DAMAGE_CHANCE = ATTRIBUTES.register(
"double_damage_chance",
() -> new net.minecraft.world.entity.ai.attributes.RangedAttribute("attribute.antarchy.double_damage_chance", 0.0, 0.0, 1.0).setSyncable(true)
);
public static final RegistryObject<Attribute> BLOODGLASS_MAX_HEARTS = ATTRIBUTES.register(
"bloodglass_max_hearts",
() -> new net.minecraft.world.entity.ai.attributes.RangedAttribute("attribute.antarchy.bloodglass_max_hearts", 0.0, 0.0, 8.0).setSyncable(true)
);
public static final RegistryObject<MenuType<com.craisinlord.antarchy.content.menu.DorrieInventoryMenu>> DORRIE_INVENTORY_MENU = MENU_TYPES.register(
"dorrie_inventory",
() -> new MenuType<>(com.craisinlord.antarchy.content.menu.DorrieInventoryMenu::new, FeatureFlags.DEFAULT_FLAGS)
);
// Mob effects
public static final RegistryObject<DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
public static final RegistryObject<ParalyzedMobEffect> PARALYZED = MOB_EFFECTS.register("paralyzed", ParalyzedMobEffect::new);
public static final RegistryObject<InvertedMobEffect> INVERTED = MOB_EFFECTS.register("inverted", InvertedMobEffect::new);
public static final RegistryObject<StinkyMobEffect> STINKY = MOB_EFFECTS.register("stinky", StinkyMobEffect::new);
public static final RegistryObject<GoopedMobEffect> GOOPED = MOB_EFFECTS.register("gooped", GoopedMobEffect::new);
public static final RegistryObject<com.craisinlord.antarchy.content.effect.BloodglassWardEffect> BLOODGLASS_WARD = MOB_EFFECTS.register("bloodglass_ward", com.craisinlord.antarchy.content.effect.BloodglassWardEffect::new);
public static final RegistryObject<ShrinkMobEffect> SHRINKING_EFFECT = MOB_EFFECTS.register("shrinking", ShrinkMobEffect::new);
public static final RegistryObject<GrowthMobEffect> GROWTH_EFFECT = MOB_EFFECTS.register("growth", GrowthMobEffect::new);
// Potions
public static final RegistryObject<Potion> INVERSION = POTIONS.register("inversion",
() -> new Potion(new MobEffectInstance(mobEffectHolder(INVERTED), 600)));
public static final RegistryObject<Potion> LONG_INVERSION = POTIONS.register("long_inversion",
() -> new Potion("inversion", new MobEffectInstance(mobEffectHolder(INVERTED), 2400)));
public static final RegistryObject<Potion> STINKY_POTION = POTIONS.register("stinky",
() -> new Potion(new MobEffectInstance(mobEffectHolder(STINKY), 1200)));
public static final RegistryObject<Potion> LONG_STINKY = POTIONS.register("long_stinky",
() -> new Potion("stinky", new MobEffectInstance(mobEffectHolder(STINKY), 2400)));
public static final RegistryObject<Potion> PARALYSIS = POTIONS.register("paralysis",
() -> new Potion(new MobEffectInstance(mobEffectHolder(PARALYZED), 200)));
public static final RegistryObject<Potion> LONG_PARALYSIS = POTIONS.register("long_paralysis",
() -> new Potion("paralysis", new MobEffectInstance(mobEffectHolder(PARALYZED), 400)));
public static final RegistryObject<Potion> HASTE = POTIONS.register("haste",
() -> new Potion(new MobEffectInstance(MobEffects.DIG_SPEED, 1200, 0)));
public static final RegistryObject<Potion> STRONG_HASTE = POTIONS.register("strong_haste",
() -> new Potion("haste", new MobEffectInstance(MobEffects.DIG_SPEED, 600, 1)));
public static final RegistryObject<Potion> SHRINKING = POTIONS.register("shrinking",
() -> new Potion(new MobEffectInstance(mobEffectHolder(SHRINKING_EFFECT), 1200, 0)));
public static final RegistryObject<Potion> STRONG_SHRINKING = POTIONS.register("strong_shrinking",
() -> new Potion("shrinking", new MobEffectInstance(mobEffectHolder(SHRINKING_EFFECT), 900, 1)));
public static final RegistryObject<Potion> EXTREME_SHRINKING = POTIONS.register("extreme_shrinking",
() -> new Potion("shrinking", new MobEffectInstance(mobEffectHolder(SHRINKING_EFFECT), 600, 2)));
public static final RegistryObject<Potion> GROWING = POTIONS.register("growing",
() -> new Potion(new MobEffectInstance(mobEffectHolder(GROWTH_EFFECT), 1200, 0)));
public static final RegistryObject<Potion> STRONG_GROWING = POTIONS.register("strong_growing",
() -> new Potion("growing", new MobEffectInstance(mobEffectHolder(GROWTH_EFFECT), 900, 1)));
public static final RegistryObject<Potion> EXTREME_GROWING = POTIONS.register("extreme_growing",
() -> new Potion("growing", new MobEffectInstance(mobEffectHolder(GROWTH_EFFECT), 600, 2)));
// Fluids
public static final RegistryObject<Fluid> BILE = FLUIDS.register("bile",
() -> new ForgeFlowingFluid.Source(bileProperties()));
public static final RegistryObject<Fluid> FLOWING_BILE = FLUIDS.register("flowing_bile",
() -> new ForgeFlowingFluid.Flowing(bileProperties()));
public static final RegistryObject<Fluid> ICHOR = FLUIDS.register("ichor",
() -> new ForgeFlowingFluid.Source(ichorProperties()));
public static final RegistryObject<Fluid> FLOWING_ICHOR = FLUIDS.register("flowing_ichor",
() -> new ForgeFlowingFluid.Flowing(ichorProperties()));
public static final RegistryObject<Fluid> ANTIWATER = FLUIDS.register("antiwater",
() -> new AntiwaterFluid.Source(antiwaterProperties()));
public static final RegistryObject<Fluid> FLOWING_ANTIWATER = FLUIDS.register("flowing_antiwater",
() -> new AntiwaterFluid.Flowing(antiwaterProperties()));
public static final RegistryObject<Fluid> LUMEN = FLUIDS.register("lumen",
() -> new ForgeFlowingFluid.Source(lumenProperties()));
public static final RegistryObject<Fluid> FLOWING_LUMEN = FLUIDS.register("flowing_lumen",
() -> new ForgeFlowingFluid.Flowing(lumenProperties()));
// Particle types
public static final RegistryObject<SimpleParticleType> DREAM_FIRE_FLAME = PARTICLE_TYPES.register("dream_fire_flame",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> STINKY_GAS = PARTICLE_TYPES.register("stinky_gas",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> STINKY_FLY = PARTICLE_TYPES.register("stinky_fly",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> PEACH_LEAVES_PARTICLE = PARTICLE_TYPES.register("peach_leaves_particle",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> LOTUS_POLLEN = PARTICLE_TYPES.register("lotus_pollen",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> HYPNOTIC_GAS = PARTICLE_TYPES.register("hypnotic_gas",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> HYPNOTIC_GAS_CLOUD = PARTICLE_TYPES.register("hypnotic_gas_cloud",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> HYPNOTIC_GAS_DOWN = PARTICLE_TYPES.register("hypnotic_gas_down",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> HYPNOTIC_GAS_CLOUD_DOWN = PARTICLE_TYPES.register("hypnotic_gas_cloud_down",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> FIREFLY = PARTICLE_TYPES.register("firefly",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<SimpleParticleType> ORANGE_ASH = PARTICLE_TYPES.register("orange_ash",
AntarchyForgeMisc::simpleParticleType);
public static final RegistryObject<ParticleType<InvertedGeyserBaseParticleOptions>> INVERTED_GEYSER_BASE = PARTICLE_TYPES.register("inverted_geyser_base",
() -> particleType(InvertedGeyserBaseParticleOptions.deserializer()));
public static final RegistryObject<ParticleType<InvertedGeyserParticleOptions>> INVERTED_GEYSER_PLUME = PARTICLE_TYPES.register("inverted_geyser_plume",
() -> particleType(InvertedGeyserParticleOptions.deserializer()));
public static final RegistryObject<ParticleType<InvertedGeyserBaseParticleOptions>> INVERTED_GEYSER_POOF = PARTICLE_TYPES.register("inverted_geyser_poof",
() -> particleType(InvertedGeyserBaseParticleOptions.deserializer()));
public static final RegistryObject<ParticleType<InvertedGeyserParticleOptions>> INVERTED_GEYSER_ERUPTION = PARTICLE_TYPES.register("inverted_geyser_eruption",
() -> particleType(InvertedGeyserParticleOptions.deserializer()));
// Features
public static final RegistryObject<RedAntNestFeature> RED_ANT_NEST_FEATURE = FEATURES.register("red_ant_nest",
() -> new RedAntNestFeature(SimpleBlockConfiguration.CODEC));
public static final RegistryObject<BrownAntNestFeature> BROWN_ANT_NEST_FEATURE = FEATURES.register("brown_ant_nest",
() -> new BrownAntNestFeature(SimpleBlockConfiguration.CODEC));
public static final RegistryObject<RainbowAntNestFeature> RAINBOW_ANT_NEST_FEATURE = FEATURES.register("rainbow_ant_nest",
() -> new RainbowAntNestFeature(SimpleBlockConfiguration.CODEC));
public static final RegistryObject<TermiteNestFeature> TERMITE_NEST_FEATURE = FEATURES.register("termite_nest",
() -> new TermiteNestFeature(SimpleBlockConfiguration.CODEC));
public static final RegistryObject<OuranwoodTreeFeature> OURANWOOD_LARGE_TREE = FEATURES.register("ouranwood_large_tree",
() -> new OuranwoodTreeFeature(OuranwoodTreeConfiguration.CODEC));
public static final RegistryObject<OuranwoodTreeFeature> OURANWOOD_YOUNG_TREE = FEATURES.register("ouranwood_young_tree",
() -> new OuranwoodTreeFeature(OuranwoodTreeConfiguration.CODEC));
public static final RegistryObject<OuranwoodTreeFeature> OURANWOOD_MEDIUM_TREE = FEATURES.register("ouranwood_medium_tree",
() -> new OuranwoodTreeFeature(OuranwoodTreeConfiguration.CODEC));
public static final RegistryObject<OuranwoodCocoonTreeFeature> OURANWOOD_COCOON_TREE = FEATURES.register("ouranwood_cocoon_tree",
() -> new OuranwoodCocoonTreeFeature(OuranwoodTreeConfiguration.CODEC));
public static final RegistryObject<PeachTreeFeature> PEACH_TREE_FEATURE = FEATURES.register("peach_tree",
() -> new PeachTreeFeature(PeachTreeConfiguration.CODEC));
public static final RegistryObject<PeachTreeFeature> PEACH_LARGE_TREE_FEATURE = FEATURES.register("peach_large_tree",
() -> new PeachTreeFeature(PeachTreeConfiguration.CODEC));
public static final RegistryObject<ElythiaFloraFeature> ELYTHIA_FOREST_FLORA = FEATURES.register("elythia_forest_flora",
() -> new ElythiaFloraFeature(NoneFeatureConfiguration.CODEC, ElythiaFloraFeature.Variant.FOREST));
public static final RegistryObject<ElythiaFloraFeature> ELYTHIA_MEADOW_FLORA = FEATURES.register("elythia_meadow_flora",
() -> new ElythiaFloraFeature(NoneFeatureConfiguration.CODEC, ElythiaFloraFeature.Variant.MEADOW));
public static final RegistryObject<ElythiaFloraFeature> PEACH_FOREST_FLORA = FEATURES.register("peach_forest_flora",
() -> new ElythiaFloraFeature(NoneFeatureConfiguration.CODEC, ElythiaFloraFeature.Variant.PEACH_FOREST));
public static final RegistryObject<ElythiaFloraFeature> FLOWER_FOREST_MILKWEED = FEATURES.register("flower_forest_milkweed",
() -> new ElythiaFloraFeature(NoneFeatureConfiguration.CODEC, ElythiaFloraFeature.Variant.FLOWER_FOREST_MILKWEED));
public static final RegistryObject<CornPatchFeature> CORN_PATCH = FEATURES.register("corn_patch",
() -> new CornPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.ocean.StarCoralPatchFeature> STAR_CORAL_PATCH = FEATURES.register("star_coral_patch",
() -> new com.craisinlord.antarchy.content.worldgen.ocean.StarCoralPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<SeashellFeature> SEASHELL_PATCH = FEATURES.register("seashell_patch",
() -> new SeashellFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ElythiaFloraFeature> ELYTHIA_BUTTERFLY_FIELDS_FLORA = FEATURES.register("butterfly_fields_flora",
() -> new ElythiaFloraFeature(NoneFeatureConfiguration.CODEC, ElythiaFloraFeature.Variant.BUTTERFLY_FIELDS));
public static final RegistryObject<ElythiaSurfaceCoverFeature> ELYTHIA_SURFACE_COVER = FEATURES.register("elythia_surface_cover",
() -> new ElythiaSurfaceCoverFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ElythiaUndergroundFeature> ELYTHIA_UNDERGROUND = FEATURES.register("elythia_underground",
() -> new ElythiaUndergroundFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<BrutalflyCocoonFeature> BRUTALFLY_COCOON = FEATURES.register("brutalfly_cocoon",
() -> new BrutalflyCocoonFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<MolewormTunnelsFeature> ELYTHIA_MOLEWORM_TUNNELS = FEATURES.register("elythia_moleworm_tunnels",
() -> new MolewormTunnelsFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<MolewormCaveEntranceFeature> ELYTHIA_MOLEWORM_CAVE_ENTRANCES = FEATURES.register("elythia_moleworm_cave_entrances",
() -> new MolewormCaveEntranceFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<MolewormWarrensFeature> ELYTHIA_MOLEWORM_WARRENS = FEATURES.register("elythia_moleworm_warrens",
() -> new MolewormWarrensFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<MolewormSurfaceMoundsFeature> ELYTHIA_MOLEWORM_SURFACE_MOUNDS = FEATURES.register("elythia_moleworm_surface_mounds",
() -> new MolewormSurfaceMoundsFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<TriffidPatchFeature> TRIFFID_PATCH = FEATURES.register("triffid_patch",
() -> new TriffidPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ElythiaPondFeature> ELYTHIA_POND = FEATURES.register("elythia_pond",
() -> new ElythiaPondFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<LumenPoolFeature> LUMEN_POOL = FEATURES.register("lumen_pools",
() -> new LumenPoolFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<LumenLilyPadFeature> LUMEN_LILY_PADS = FEATURES.register("lumen_lily_pads",
() -> new LumenLilyPadFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature> GIANT_LILY_PAD_PATCH = FEATURES.register("giant_lily_pad_patch",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature> GIANT_LILY_PAD_PATCH_PEACH_FOREST = FEATURES.register("giant_lily_pad_patch_peach_forest",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.GiantLilyPadPatchFeature(NoneFeatureConfiguration.CODEC, 0.12F));
public static final RegistryObject<LumenStreamFeature> LUMEN_STREAM = FEATURES.register("lumen_streams",
() -> new LumenStreamFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<LumenSpireFeature> LUMEN_SPIRE = FEATURES.register("lumen_spires",
() -> new LumenSpireFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ElythiaTuffBoulderFeature> ELYTHIA_TUFF_BOULDER = FEATURES.register("elythia_tuff_boulder",
() -> new ElythiaTuffBoulderFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ElythiaLargeTuffBoulderFeature> ELYTHIA_LARGE_TUFF_BOULDER = FEATURES.register("elythia_large_tuff_boulder",
() -> new ElythiaLargeTuffBoulderFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<PeachForestMossyBoulderFeature> PEACH_FOREST_MOSSY_BOULDER = FEATURES.register("peach_forest_mossy_boulder",
() -> new PeachForestMossyBoulderFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<PeachForestPondFeature> PEACH_FOREST_POND = FEATURES.register("peach_forest_pond",
() -> new PeachForestPondFeature(PeachForestPondConfiguration.CODEC));
public static final RegistryObject<CoralSpikeFeature> ELYTHIA_CORAL_SPIKE = FEATURES.register("elythia_coral_spike",
() -> new CoralSpikeFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.elythia.FallenOuranwoodFeature> FALLEN_OURANWOOD_TREE = FEATURES.register("fallen_ouranwood_tree",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.FallenOuranwoodFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.elythia.FungalMushroomFeature> FUNGAL_MUSHROOM = FEATURES.register("fungal_mushroom",
() -> new com.craisinlord.antarchy.content.worldgen.elythia.FungalMushroomFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ThoraxisFissureFeature> THORAXIS_FISSURE = FEATURES.register("thoraxis_fissure",
() -> new ThoraxisFissureFeature(ThoraxisFissureConfiguration.CODEC));
public static final RegistryObject<ThoraxisRibColumnsFeature> THORAXIS_RIB_COLUMNS = FEATURES.register("thoraxis_rib_columns",
() -> new ThoraxisRibColumnsFeature(ThoraxisRibColumnsConfiguration.CODEC));
public static final RegistryObject<ThoraxisSpikeFeature> THORAXIS_SPIKE = FEATURES.register("thoraxis_spike",
() -> new ThoraxisSpikeFeature(ThoraxisSpikeConfiguration.CODEC));
public static final RegistryObject<NyxiteSpikeFeature> NYXITE_SPIKES = FEATURES.register("nyxite_spikes",
() -> new NyxiteSpikeFeature(NyxiteSpikeConfiguration.CODEC));
public static final RegistryObject<ChitenSpikeFeature> CAVARYN_CHITEN_SPIKES = FEATURES.register("cavaryn_chiten_spikes",
() -> new ChitenSpikeFeature(ChitenSpikeConfiguration.CODEC));
public static final RegistryObject<CavarynBileVeinFeature> CAVARYN_BILE_VEINS = FEATURES.register("cavaryn_bile_veins",
() -> new CavarynBileVeinFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<CavarynBileCystFeature> CAVARYN_BILE_CYSTS = FEATURES.register("cavaryn_bile_cysts",
() -> new CavarynBileCystFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<CavarynCreepvineFeature> CAVARYN_CREEPVINE = FEATURES.register("cavaryn_creepvine",
() -> new CavarynCreepvineFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<HangingCreeprootsFeature> HANGING_CREEPROOTS = FEATURES.register("hanging_creeproots",
() -> new HangingCreeprootsFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<MoltingVinesFeature> MOLTING_VINES = FEATURES.register("molting_vines",
() -> new MoltingVinesFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.cavaryn.GroundMoltingVinesFeature> GROUND_MOLTING_VINES = FEATURES.register("ground_molting_vines",
() -> new com.craisinlord.antarchy.content.worldgen.cavaryn.GroundMoltingVinesFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.cavaryn.JumpyBugEggCeilingFeature> JUMPY_BUG_EGG_CEILING = FEATURES.register("jumpy_bug_egg_ceiling",
() -> new com.craisinlord.antarchy.content.worldgen.cavaryn.JumpyBugEggCeilingFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.cavaryn.SpitBugEggPatchFeature> SPIT_BUG_EGG_PATCH = FEATURES.register("spit_bug_egg_patch",
() -> new com.craisinlord.antarchy.content.worldgen.cavaryn.SpitBugEggPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.cavaryn.RollyCavesGiantCavernFeature> ROLLY_CAVES_GIANT_CAVERN = FEATURES.register("rolly_caves_giant_cavern",
() -> new com.craisinlord.antarchy.content.worldgen.cavaryn.RollyCavesGiantCavernFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<CavarynWallAmberMossFeature> CAVARYN_WALL_AMBER_MOSS = FEATURES.register("cavaryn_wall_amber_moss",
() -> new CavarynWallAmberMossFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<AntiwaterSpringsFeature> ANTIWATER_SPRINGS = FEATURES.register("antiwater_springs",
() -> new AntiwaterSpringsFeature(AntiwaterSpringsConfiguration.CODEC));
public static final RegistryObject<PotentNyxiteFeature> POTENT_NYXITE_FEATURE = FEATURES.register("potent_nyxite",
() -> new PotentNyxiteFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ThoraxisBloodCrystalFeature> THORAXIS_BLOOD_CRYSTAL_SPIRES = FEATURES.register("thoraxis_blood_crystal_spires",
() -> new ThoraxisBloodCrystalFeature(ThoraxisBloodCrystalConfiguration.CODEC));
public static final RegistryObject<CloudSeaCalciteFeature> CLOUD_SEA_CALCITE_BANKS = FEATURES.register("cloud_sea_calcite_banks",
() -> new CloudSeaCalciteFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<BedBugNestFeature> BED_BUG_NEST = FEATURES.register("bed_bug_nest",
() -> new BedBugNestFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<BedBugSurfaceClusterFeature> BED_BUG_SURFACE_CLUSTER = FEATURES.register("bed_bug_surface_cluster",
() -> new BedBugSurfaceClusterFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<CavarynEggPatchFeature> CAVARYN_TERROR_EGG_PATCH = FEATURES.register("cavaryn_terror_egg_patch",
() -> new CavarynEggPatchFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.mushroom.GlowcapHugeMushroomFeature> HUGE_GLOWCAP_MUSHROOM = FEATURES.register("huge_glowcap_mushroom",
() -> new com.craisinlord.antarchy.content.worldgen.mushroom.GlowcapHugeMushroomFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<com.craisinlord.antarchy.content.worldgen.mushroom.GlowcapHugeMushroomWorldgenFeature> HUGE_GLOWCAP_MUSHROOM_WORLDGEN = FEATURES.register("huge_glowcap_mushroom_worldgen",
() -> new com.craisinlord.antarchy.content.worldgen.mushroom.GlowcapHugeMushroomWorldgenFeature(NoneFeatureConfiguration.CODEC));
public static final RegistryObject<ThoraxisAntiwaterPoolFeature> THORAXIS_ANTIWATER_POOL = FEATURES.register("thoraxis_antiwater_pool",
() -> new ThoraxisAntiwaterPoolFeature(ThoraxisAntiwaterPoolConfiguration.CODEC));
public static final RegistryObject<LucidAntiwaterPoolFeature> LUCID_ANTIWATER_POOL = FEATURES.register("lucid_antiwater_pool",
() -> new LucidAntiwaterPoolFeature(ThoraxisAntiwaterPoolConfiguration.CODEC));
public static final RegistryObject<ThoraxisDuneFeature> THORAXIS_DUNE = FEATURES.register("thoraxis_dune",
() -> new ThoraxisDuneFeature(ThoraxisDuneConfiguration.CODEC));
// Biome sources
public static final RegistryObject<com.mojang.serialization.Codec<ElythiaBiomeSource>> ELYTHIA_BIOME_SOURCE = BIOME_SOURCES.register("elythia_biome_source",
() -> ElythiaBiomeSource.CODEC.codec());
public static final RegistryObject<com.mojang.serialization.Codec<ThoraxisBiomeSource>> THORAXIS_BIOME_SOURCE = BIOME_SOURCES.register("thoraxis_biome_source",
() -> ThoraxisBiomeSource.CODEC.codec());
// Density function
public static final RegistryObject<com.mojang.serialization.Codec<ElythiaRiverCarveFunction>> ELYTHIA_RIVER_CARVE = DENSITY_FUNCTION_TYPES.register("elythia_river_carve",
() -> ElythiaRiverCarveFunction.KEY_CODEC.codec());
private AntarchyForgeMisc() {}
public static MobEffect mobEffectHolder(RegistryObject<? extends MobEffect> effect) {
return effect.get();
}
public static Holder<Attribute> attributeHolder(RegistryObject<? extends Attribute> attribute) {
return BuiltInRegistries.ATTRIBUTE.wrapAsHolder(attribute.get());
}
public static void register(IEventBus modEventBus) {
MOB_EFFECTS.register(modEventBus);
POTIONS.register(modEventBus);
FLUID_TYPES.register(modEventBus);
FLUIDS.register(modEventBus);
PARTICLE_TYPES.register(modEventBus);
FEATURES.register(modEventBus);
BIOME_SOURCES.register(modEventBus);
DENSITY_FUNCTION_TYPES.register(modEventBus);
ATTRIBUTES.register(modEventBus);
MENU_TYPES.register(modEventBus);
FROG_VARIANTS.register(modEventBus);
RECIPE_SERIALIZERS.register(modEventBus);
}
static ForgeFlowingFluid.Properties ichorProperties() {
return new ForgeFlowingFluid.Properties(com.craisinlord.antarchy.forge.AntarchyForgeFluidTypes.ICHOR_TYPE, ICHOR, FLOWING_ICHOR)
.bucket(() -> AntarchyForgeItems.ICHOR_BUCKET.get())
.block(() -> AntarchyForgeBlocks.ICHOR_BLOCK.get())
.slopeFindDistance(4)
.levelDecreasePerBlock(1)
.tickRate(5);
}
static ForgeFlowingFluid.Properties bileProperties() {
return new ForgeFlowingFluid.Properties(com.craisinlord.antarchy.forge.AntarchyForgeFluidTypes.BILE_TYPE, BILE, FLOWING_BILE)
.bucket(() -> AntarchyForgeItems.BILE_BUCKET.get())
.block(() -> AntarchyForgeBlocks.BILE_BLOCK.get())
.slopeFindDistance(4)
.levelDecreasePerBlock(1)
.tickRate(5);
}
static ForgeFlowingFluid.Properties antiwaterProperties() {
return new ForgeFlowingFluid.Properties(com.craisinlord.antarchy.forge.AntarchyForgeFluidTypes.ANTIWATER_TYPE, ANTIWATER, FLOWING_ANTIWATER)
.bucket(() -> AntarchyForgeItems.ANTIWATER_BUCKET.get())
.block(() -> AntarchyForgeBlocks.ANTIWATER_BLOCK.get())
.slopeFindDistance(4)
.levelDecreasePerBlock(1)
.tickRate(5);
}
static ForgeFlowingFluid.Properties lumenProperties() {
return new ForgeFlowingFluid.Properties(com.craisinlord.antarchy.forge.AntarchyForgeFluidTypes.LUMEN_TYPE, LUMEN, FLOWING_LUMEN)
.bucket(() -> AntarchyForgeItems.LUMEN_BUCKET.get())
.block(() -> AntarchyForgeBlocks.LUMEN_BLOCK.get())
.slopeFindDistance(4)
.levelDecreasePerBlock(1)
.tickRate(5);
}
private static SimpleParticleType simpleParticleType() {
return new SimpleParticleType(true) {
};
}
private static <T extends net.minecraft.core.particles.ParticleOptions> ParticleType<T> particleType(
net.minecraft.core.particles.ParticleOptions.Deserializer<T> deserializer
) {
return new ParticleType<>(false, deserializer) {
@Override
public com.mojang.serialization.Codec<T> codec() {
return null;
}
};
}
}
@@ -0,0 +1,43 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.content.network.BloodCrystalKatanaTrailPayload;
import com.craisinlord.antarchy.forge.network.AntarchyForgeNetworkCore;
import com.craisinlord.antarchy.forge.network.AntarchyGravityNetworking;
import com.craisinlord.antarchy.forge.network.BrutalflyElytraNetworking;
import com.craisinlord.antarchy.forge.network.DorrieJumpNetworking;
import com.craisinlord.antarchy.forge.network.HerculesBeetleNetworking;
import com.craisinlord.antarchy.forge.network.JumpyBootsNetworking;
import com.craisinlord.antarchy.forge.network.MultipartNetworking;
public class AntarchyForgePayloadHandlers {
private AntarchyForgePayloadHandlers() {}
public static void register() {
AntarchyGravityNetworking.register();
BrutalflyElytraNetworking.register();
JumpyBootsNetworking.register();
DorrieJumpNetworking.register();
HerculesBeetleNetworking.register();
AntarchyForgeNetworkCore.registerS2C(
com.craisinlord.antarchy.content.network.BloodglassStatePayload.class,
com.craisinlord.antarchy.content.network.BloodglassStatePayload.STREAM_CODEC,
payload -> com.craisinlord.antarchy.content.client.BloodglassClientState.update(payload.shieldsActive(), payload.shieldsMax())
);
AntarchyForgeNetworkCore.registerS2C(
BloodCrystalKatanaTrailPayload.class,
BloodCrystalKatanaTrailPayload.STREAM_CODEC,
payload -> com.craisinlord.antarchy.content.client.BloodCrystalKatanaTrailClientState.trigger(payload.entityId(), payload.durationTicks())
);
AntarchyForgeNetworkCore.registerS2C(
com.craisinlord.antarchy.content.network.ScorpionWhipTetherPayload.class,
com.craisinlord.antarchy.content.network.ScorpionWhipTetherPayload.STREAM_CODEC,
payload -> com.craisinlord.antarchy.content.client.ScorpionWhipTetherClientState.update(payload.playerId(), payload.targetId())
);
AntarchyForgeNetworkCore.registerS2C(
com.craisinlord.antarchy.content.network.HordeIntensityPayload.class,
com.craisinlord.antarchy.content.network.HordeIntensityPayload.STREAM_CODEC,
payload -> com.craisinlord.antarchy.content.client.HordeClientState.update(payload.intensity())
);
MultipartNetworking.register();
}
}
@@ -0,0 +1,188 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.Antarchy;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.RegistryObject;
public final class AntarchyForgeSounds {
private static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(Registries.SOUND_EVENT, Antarchy.MODID);
public static final RegistryObject<SoundEvent> SQUIDZOOKA_FIRE = registerSoundEvent("squidzooka_fire");
public static final RegistryObject<SoundEvent> SHRINK_RAY_SOUND = registerSoundEvent("shrink_ray");
public static final RegistryObject<SoundEvent> GROWTH_RAY_SOUND = registerSoundEvent("growth_ray");
public static final RegistryObject<SoundEvent> SIZE_RAY_CHARGE = registerSoundEvent("size_ray_charge");
public static final RegistryObject<SoundEvent> ANT_AMBIENT = registerSoundEvent("ant_ambient");
public static final RegistryObject<SoundEvent> ANT_IDLE = registerSoundEvent("ant_idle");
public static final RegistryObject<SoundEvent> ANT_HURT = registerSoundEvent("ant_hurt");
public static final RegistryObject<SoundEvent> ANT_BITE = registerSoundEvent("ant_bite");
public static final RegistryObject<SoundEvent> ANT_GATHER = registerSoundEvent("ant_gather");
public static final RegistryObject<SoundEvent> ANT_NEST = registerSoundEvent("ant_nest");
public static final RegistryObject<SoundEvent> CLOUD_SHARK_BITE = registerSoundEvent("cloud_shark_bite");
public static final RegistryObject<SoundEvent> CLOUD_SHARK_IDLE = registerSoundEvent("cloud_shark_idle");
public static final RegistryObject<SoundEvent> CLOUD_SHARK_HURT = registerSoundEvent("cloud_shark_hurt");
public static final RegistryObject<SoundEvent> CLOUD_SHARK_DEATH = registerSoundEvent("cloud_shark_death");
public static final RegistryObject<SoundEvent> CLOUD_SHARK_FLY = registerSoundEvent("cloud_shark_fly");
public static final RegistryObject<SoundEvent> CATERPILLAR_IDLE = registerSoundEvent("caterpillar_idle");
public static final RegistryObject<SoundEvent> CATERPILLAR_HURT = registerSoundEvent("caterpillar_hurt");
public static final RegistryObject<SoundEvent> CATERPILLAR_CRAWL = registerSoundEvent("caterpillar_crawl");
public static final RegistryObject<SoundEvent> BUTTERFLY_HURT = registerSoundEvent("butterfly_hurt");
public static final RegistryObject<SoundEvent> BRUTALFLY_IDLE = registerSoundEvent("brutalfly_idle");
public static final RegistryObject<SoundEvent> BRUTALFLY_DEATH = registerSoundEvent("brutalfly_death");
public static final RegistryObject<SoundEvent> ELYTHIA_FIREFLY_AMBIENT = registerSoundEvent("ambient.elythia.firefly");
public static final RegistryObject<SoundEvent> MISSILE_SQUID_AMBIENT = registerSoundEvent("missile_squid_ambient");
public static final RegistryObject<SoundEvent> MISSILE_SQUID_HURT = registerSoundEvent("missile_squid_hurt");
public static final RegistryObject<SoundEvent> MISSILE_SQUID_DEATH = registerSoundEvent("missile_squid_death");
public static final RegistryObject<SoundEvent> MISSILE_SQUID_ATTACK = registerSoundEvent("missile_squid_attack");
public static final RegistryObject<SoundEvent> KRAKEN_FLYING_LOOP = registerSoundEvent("kraken_flying_loop");
public static final RegistryObject<SoundEvent> KRAKEN_FLYING_SIDEWAYS_LOOP = registerSoundEvent("kraken_flying_sideways_loop");
public static final RegistryObject<SoundEvent> KRAKEN_ATTACK = registerSoundEvent("kraken_attack");
public static final RegistryObject<SoundEvent> KRAKEN_SPIN = registerSoundEvent("kraken_spin");
public static final RegistryObject<SoundEvent> KRAKEN_ROAR = registerSoundEvent("kraken_roar");
public static final RegistryObject<SoundEvent> KRAKEN_SUMMON = registerSoundEvent("kraken_summon");
public static final RegistryObject<SoundEvent> KRAKEN_HURT = registerSoundEvent("kraken_hurt");
public static final RegistryObject<SoundEvent> KRAKEN_DEATH = registerSoundEvent("kraken_death");
public static final RegistryObject<SoundEvent> BASILISK_IDLE_LOOP = registerSoundEvent("basilisk_idle_loop");
public static final RegistryObject<SoundEvent> BASILISK_SLITHER_LOOP = registerSoundEvent("basilisk_slither_loop");
public static final RegistryObject<SoundEvent> BASILISK_BITE = registerSoundEvent("basilisk_bite");
public static final RegistryObject<SoundEvent> BASILISK_HISS = registerSoundEvent("basilisk_hiss");
public static final RegistryObject<SoundEvent> BASILISK_HURT = registerSoundEvent("basilisk_hurt");
public static final RegistryObject<SoundEvent> BASILISK_DEATH = registerSoundEvent("basilisk_death");
public static final RegistryObject<SoundEvent> THORAXIS_NIGHTMARE_WASTES_AMBIENT = registerSoundEvent("thoraxis_nightmare_wastes_ambient");
public static final RegistryObject<SoundEvent> THORAXIS_NIGHTMARE_WASTES_ADDITIONS = registerSoundEvent("thoraxis_nightmare_wastes_additions");
public static final RegistryObject<SoundEvent> THORAXIS_NIGHTMARE_WASTES_MOOD = registerSoundEvent("thoraxis_nightmare_wastes_mood");
public static final RegistryObject<SoundEvent> THORAXIS_DREAM_DUNES_AMBIENT = registerSoundEvent("thoraxis_dream_dunes_ambient");
public static final RegistryObject<SoundEvent> THORAXIS_DREAM_DUNES_ADDITIONS = registerSoundEvent("thoraxis_dream_dunes_additions");
public static final RegistryObject<SoundEvent> THORAXIS_DREAM_DUNES_MOOD = registerSoundEvent("thoraxis_dream_dunes_mood");
public static final RegistryObject<SoundEvent> THORAXIS_LUCID_POOLS_AMBIENT = registerSoundEvent("thoraxis_lucid_pools_ambient");
public static final RegistryObject<SoundEvent> THORAXIS_LUCID_POOLS_ADDITIONS = registerSoundEvent("thoraxis_lucid_pools_additions");
public static final RegistryObject<SoundEvent> THORAXIS_LUCID_POOLS_MOOD = registerSoundEvent("thoraxis_lucid_pools_mood");
public static final RegistryObject<SoundEvent> LUCID_AMBIENT = registerSoundEvent("lucid_ambient");
public static final RegistryObject<SoundEvent> LUCID_FLYING = registerSoundEvent("lucid_flying");
public static final RegistryObject<SoundEvent> LUCID_ATTACK = registerSoundEvent("lucid_attack");
public static final RegistryObject<SoundEvent> LUCID_BOLT_SOUND = registerSoundEvent("lucid_bolt");
public static final RegistryObject<SoundEvent> LUCID_HURT = registerSoundEvent("lucid_hurt");
public static final RegistryObject<SoundEvent> LUCID_DEATH = registerSoundEvent("lucid_death");
public static final RegistryObject<SoundEvent> REVERIE_IDLE = registerSoundEvent("reverie_idle");
public static final RegistryObject<SoundEvent> REVERIE_HURT = registerSoundEvent("reverie_hurt");
public static final RegistryObject<SoundEvent> REVERIE_WORRY = registerSoundEvent("reverie_worry");
public static final RegistryObject<SoundEvent> REVERIE_SAVE = registerSoundEvent("reverie_save");
public static final RegistryObject<SoundEvent> REVERIE_JOIN_PLAYER = registerSoundEvent("reverie_join_player");
public static final RegistryObject<SoundEvent> REVERIE_ALERT = registerSoundEvent("reverie_alert");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_IDLE = registerSoundEvent("flying_squirrel_idle");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_BEG = registerSoundEvent("flying_squirrel_beg");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_NUT = registerSoundEvent("flying_squirrel_nut");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_GLIDE_LOOP = registerSoundEvent("flying_squirrel_glide_loop");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_HURT = registerSoundEvent("flying_squirrel_hurt");
public static final RegistryObject<SoundEvent> FLYING_SQUIRREL_DEATH = registerSoundEvent("flying_squirrel_death");
public static final RegistryObject<SoundEvent> NIGHTMARE_IDLE = registerSoundEvent("nightmare_idle");
public static final RegistryObject<SoundEvent> NIGHTMARE_HURT = registerSoundEvent("nightmare_hurt");
public static final RegistryObject<SoundEvent> NIGHTMARE_ROAR = registerSoundEvent("nightmare_roar");
public static final RegistryObject<SoundEvent> NIGHTMARE_DEATH = registerSoundEvent("nightmare_death");
public static final RegistryObject<SoundEvent> NIGHTMARE_BITE = registerSoundEvent("nightmare_bite");
public static final RegistryObject<SoundEvent> NIGHTMARE_FLAP = registerSoundEvent("nightmare_flap");
public static final RegistryObject<SoundEvent> TRIFFID_ATTACK = registerSoundEvent("triffid_attack");
public static final RegistryObject<SoundEvent> TRIFFID_GRAB = registerSoundEvent("triffid_grab");
public static final RegistryObject<SoundEvent> TRIFFID_HURT = registerSoundEvent("triffid_hurt");
public static final RegistryObject<SoundEvent> TRIFFID_DEATH = registerSoundEvent("triffid_death");
public static final RegistryObject<SoundEvent> TRIFFID_HISS = registerSoundEvent("triffid_hiss");
public static final RegistryObject<SoundEvent> TRIFFID_GROWL = registerSoundEvent("triffid_growl");
public static final RegistryObject<SoundEvent> MANTIS_AMBIENT = registerSoundEvent("mantis_ambient");
public static final RegistryObject<SoundEvent> MANTIS_HURT = registerSoundEvent("mantis_hurt");
public static final RegistryObject<SoundEvent> MANTIS_ATTACK = registerSoundEvent("mantis_attack");
public static final RegistryObject<SoundEvent> MANTIS_FLY_LOOP = registerSoundEvent("mantis_fly_loop");
public static final RegistryObject<SoundEvent> GRAVITY_GUN_PICKUP = registerSoundEvent("gravity_gun_pickup");
public static final RegistryObject<SoundEvent> GRAVITY_GUN_DROP = registerSoundEvent("gravity_gun_drop");
public static final RegistryObject<SoundEvent> GRAVITY_GUN_HOLD_LOOP = registerSoundEvent("gravity_gun_hold_loop");
public static final RegistryObject<SoundEvent> GRAVITY_GUN_LAUNCH = registerSoundEvent("gravity_gun_launch");
public static final RegistryObject<SoundEvent> GRAVITY_GUN_DRYFIRE = registerSoundEvent("gravity_gun_dryfire");
public static final RegistryObject<SoundEvent> BED_BUG_AMBIENT = registerSoundEvent("bed_bug_ambient");
public static final RegistryObject<SoundEvent> BED_BUG_HURT = registerSoundEvent("bed_bug_hurt");
public static final RegistryObject<SoundEvent> BED_BUG_ATTACK = registerSoundEvent("bed_bug_attack");
public static final RegistryObject<SoundEvent> WASP_IDLE = registerSoundEvent("wasp_idle");
public static final RegistryObject<SoundEvent> WASP_HURT = registerSoundEvent("wasp_hurt");
public static final RegistryObject<SoundEvent> WASP_ATTACK = registerSoundEvent("wasp_attack");
public static final RegistryObject<SoundEvent> WASP_DEATH = registerSoundEvent("wasp_death");
public static final RegistryObject<SoundEvent> SCORPION_AMBIENT = registerSoundEvent("scorpion_ambient");
public static final RegistryObject<SoundEvent> SCORPION_HURT = registerSoundEvent("scorpion_hurt");
public static final RegistryObject<SoundEvent> SCORPION_ATTACK = registerSoundEvent("scorpion_attack");
public static final RegistryObject<SoundEvent> EMPEROR_SCORPION_AMBIENT = registerSoundEvent("emperor_scorpion_ambient");
public static final RegistryObject<SoundEvent> EMPEROR_SCORPION_HURT = registerSoundEvent("emperor_scorpion_hurt");
public static final RegistryObject<SoundEvent> EMPEROR_SCORPION_ATTACK = registerSoundEvent("emperor_scorpion_attack");
public static final RegistryObject<SoundEvent> EMPEROR_SCORPION_ROAR = registerSoundEvent("emperor_scorpion_roar");
public static final RegistryObject<SoundEvent> MOLEWORM_AMBIENT = registerSoundEvent("moleworm_ambient");
public static final RegistryObject<SoundEvent> MOLEWORM_HURT = registerSoundEvent("moleworm_hurt");
public static final RegistryObject<SoundEvent> MOLEWORM_ATTACK = registerSoundEvent("moleworm_attack");
public static final RegistryObject<SoundEvent> MOLEWORM_DIG = registerSoundEvent("moleworm_dig");
public static final RegistryObject<SoundEvent> MOLEVORE_AMBIENT = registerSoundEvent("molevore_ambient");
public static final RegistryObject<SoundEvent> MOLEVORE_HURT = registerSoundEvent("molevore_hurt");
public static final RegistryObject<SoundEvent> MOLEVORE_ATTACK = registerSoundEvent("molevore_attack");
public static final RegistryObject<SoundEvent> MOLEVORE_DIG = registerSoundEvent("molevore_dig");
public static final RegistryObject<SoundEvent> BOMBER_WALK = registerSoundEvent("bomber_walk");
public static final RegistryObject<SoundEvent> BOMBER_KNOCK = registerSoundEvent("bomber_knock");
public static final RegistryObject<SoundEvent> BOMBER_EXPLODE = registerSoundEvent("bomber_explode");
public static final RegistryObject<SoundEvent> TORETERROR_IDLE = registerSoundEvent("toreterror_idle");
public static final RegistryObject<SoundEvent> TORETERROR_HURT = registerSoundEvent("toreterror_hurt");
public static final RegistryObject<SoundEvent> TORETERROR_DEATH = registerSoundEvent("toreterror_death");
public static final RegistryObject<SoundEvent> TORETERROR_BOMBER_FIRE = registerSoundEvent("toreterror_bomber_fire");
public static final RegistryObject<SoundEvent> TORETERROR_SPIN = registerSoundEvent("toreterror_spin");
public static final RegistryObject<SoundEvent> TORETERROR_RICOCHET = registerSoundEvent("toreterror_ricochet");
public static final RegistryObject<SoundEvent> WATER_CANNON_FIRE = registerSoundEvent("water_cannon_fire");
public static final RegistryObject<SoundEvent> TORETERROR_JUMP_UP = registerSoundEvent("toreterror_jump_up");
public static final RegistryObject<SoundEvent> TORETERROR_JUMP_LAND = registerSoundEvent("toreterror_jump_land");
public static final RegistryObject<SoundEvent> STINKY_FLY = registerSoundEvent("stinky_fly");
public static final RegistryObject<SoundEvent> STINK_BUG_FART = registerSoundEvent("stink_bug_fart");
public static final RegistryObject<SoundEvent> STINK_BUG_IDLE = registerSoundEvent("stink_bug_idle");
public static final RegistryObject<SoundEvent> CAVARYN_HEARTBEAT = registerSoundEvent("cavaryn_heartbeat");
public static final RegistryObject<SoundEvent> ROLLY_POLLY_IDLE = registerSoundEvent("rolly_polly_idle");
public static final RegistryObject<SoundEvent> ROLLY_POLLY_WHEEL_MODE = registerSoundEvent("rolly_polly_wheel_mode");
public static final RegistryObject<SoundEvent> ROLLY_POLLY_NORMAL_MODE = registerSoundEvent("rolly_polly_normal_mode");
public static final RegistryObject<SoundEvent> ROLLY_POLLY_ROLL = registerSoundEvent("rolly_polly_roll");
public static final RegistryObject<SoundEvent> CREEPING_HORROR_GROWL = registerSoundEvent("creeping_horror_growl");
public static final RegistryObject<SoundEvent> CREEPING_HORROR_HURT = registerSoundEvent("creeping_horror_hurt");
public static final RegistryObject<SoundEvent> CREEPING_HORROR_BITE = registerSoundEvent("creeping_horror_bite");
public static final RegistryObject<SoundEvent> LURKING_TERROR_SNARL = registerSoundEvent("lurking_terror_snarl");
public static final RegistryObject<SoundEvent> LURKING_TERROR_HURT = registerSoundEvent("lurking_terror_hurt");
public static final RegistryObject<SoundEvent> LURKING_TERROR_BITE = registerSoundEvent("lurking_terror_bite");
public static final RegistryObject<SoundEvent> LURKING_TERROR_FLY_LOOP = registerSoundEvent("lurking_terror_fly_loop");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_IDLE = registerSoundEvent("hercules_beetle_idle");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_HURT = registerSoundEvent("hercules_beetle_hurt");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_ATTACK = registerSoundEvent("hercules_beetle_attack");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_CRY = registerSoundEvent("hercules_beetle_cry");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_CHARGE_START = registerSoundEvent("hercules_beetle_charge_start");
public static final RegistryObject<SoundEvent> HERCULES_BEETLE_KNOCKED_DOWN = registerSoundEvent("hercules_beetle_knocked_down");
public static final RegistryObject<SoundEvent> JUMPY_BUG_IDLE = registerSoundEvent("jumpy_bug_idle");
public static final RegistryObject<SoundEvent> SPIT_BUG_IDLE = registerSoundEvent("spit_bug_idle");
public static final RegistryObject<SoundEvent> JUMPY_BUG_HURT = registerSoundEvent("jumpy_bug_hurt");
public static final RegistryObject<SoundEvent> JUMPY_BUG_JUMP = registerSoundEvent("jumpy_bug_jump");
public static final RegistryObject<SoundEvent> SPIT_BUG_HURT = registerSoundEvent("spit_bug_hurt");
public static final RegistryObject<SoundEvent> SPIT_BUG_SPIT = registerSoundEvent("spit_bug_spit");
public static final RegistryObject<SoundEvent> BRUTALFLY_SPIT = registerSoundEvent("brutalfly_spit");
public static final RegistryObject<SoundEvent> JERRY_YOUNG_IDLE = registerSoundEvent("jerry_young_idle");
public static final RegistryObject<SoundEvent> JERRY_YOUNG_HURT = registerSoundEvent("jerry_young_hurt");
public static final RegistryObject<SoundEvent> JERRY_YOUNG_DEATH = registerSoundEvent("jerry_young_death");
public static final RegistryObject<SoundEvent> JERRY_YOUNG_ATTACK = registerSoundEvent("jerry_young_attack");
public static final RegistryObject<SoundEvent> JERRY_ADULT_IDLE = registerSoundEvent("jerry_adult_idle");
public static final RegistryObject<SoundEvent> JERRY_ADULT_HURT = registerSoundEvent("jerry_adult_hurt");
public static final RegistryObject<SoundEvent> JERRY_ADULT_DEATH = registerSoundEvent("jerry_adult_death");
public static final RegistryObject<SoundEvent> JERRY_ADULT_ATTACK = registerSoundEvent("jerry_adult_attack");
public static final RegistryObject<SoundEvent> DUCT_TAPE_USE = registerSoundEvent("duct_tape_use");
public static final RegistryObject<SoundEvent> POTENT_NYXITE_HYPNOTIC_GAS = registerSoundEvent("potent_nyxite_hypnotic_gas");
public static final RegistryObject<SoundEvent> POTENT_NYXITE_GEYSER_ERUPTION_START = registerSoundEvent("potent_nyxite_geyser_eruption_start");
public static final RegistryObject<SoundEvent> POTENT_NYXITE_GEYSER_ERUPTION_ACTIVE = registerSoundEvent("potent_nyxite_geyser_eruption_active");
public static final RegistryObject<SoundEvent> POTENT_NYXITE_GEYSER_CONTINUOUS_START = registerSoundEvent("potent_nyxite_geyser_continuous_start");
public static final RegistryObject<SoundEvent> POTENT_NYXITE_GEYSER_CONTINUOUS_ACTIVE = registerSoundEvent("potent_nyxite_geyser_continuous_active");
private AntarchyForgeSounds() {}
public static void register(IEventBus modEventBus) {
SOUND_EVENTS.register(modEventBus);
}
private static RegistryObject<SoundEvent> registerSoundEvent(String path) {
return SOUND_EVENTS.register(path,
() -> SoundEvent.createVariableRangeEvent(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, path)));
}
}
@@ -0,0 +1,63 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.content.entity.*;
import net.minecraft.world.entity.animal.AbstractFish;
import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity;
import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity;
import com.craisinlord.antarchy.content.entity.flying_squirrel.FlyingSquirrelEntity;
import com.craisinlord.antarchy.content.entity.kraken.KrakenEntity;
import com.craisinlord.antarchy.content.entity.lucid.LucidEntity;
import com.craisinlord.antarchy.content.entity.nightmare.NightmareEntity;
import net.minecraft.world.entity.animal.Cow;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.event.entity.SpawnPlacementRegisterEvent;
public class AntarchyForgeSpawnPlacements {
private AntarchyForgeSpawnPlacements() {}
public static void register(IEventBus modEventBus) {
modEventBus.addListener(AntarchyForgeSpawnPlacements::registerSpawnPlacements);
}
static void registerSpawnPlacements(SpawnPlacementRegisterEvent event) {
event.register(AntarchyForgeEntites.FLYING_SQUIRREL.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING, FlyingSquirrelEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.CATERPILLAR.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CaterpillarEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.BUTTERFLY.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ButterflyEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.REVERIE.get(), net.minecraft.world.entity.SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ReverieEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.BRUTALFLY.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Monster::checkMonsterSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.APPLE_COW.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.GOLDEN_APPLE_COW.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.ENCHANTED_GOLDEN_APPLE_COW.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.CLOUD_SHARK.get(), net.minecraft.world.entity.SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CloudSharkEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.WASP.get(), net.minecraft.world.entity.SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaspEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.BOMBER.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, BomberEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.JUMPY_BUG.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, JumpyBugEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.SPIT_BUG.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, SpitBugEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.KRAKEN.get(), net.minecraft.world.entity.SpawnPlacements.Type.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, KrakenEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.MISSILE_SQUID.get(), net.minecraft.world.entity.SpawnPlacements.Type.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MissileSquidEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.OCTOPUS_BOMB.get(), net.minecraft.world.entity.SpawnPlacements.Type.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, OctopusBombEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.NIGHTMARE.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, NightmareEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.MOLEWORM.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MolewormEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.MANTIS.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MantisEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.ALPHA_MANTIS.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AlphaMantisEntity::checkAlphaMantisSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.MOLEVORE.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, MolevoreEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.BED_BUG.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, BedBugEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.STINK_BUG.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, StinkBugEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.LUCID.get(), net.minecraft.world.entity.SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LucidEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.SCORPION.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ScorpionEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.BASILISK.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, BasiliskEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.EMPEROR_SCORPION.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EmperorScorpionEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.CREEPING_HORROR.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CreepingHorrorEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.LURKING_TERROR.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, LurkingTerrorEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.JERRY.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, JerryEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.TERMITE.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.ROLLY_POLLY.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.RollyPollyEntity::canSpawn, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.CHEEP.get(), net.minecraft.world.entity.SpawnPlacements.Type.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, AbstractFish::checkSurfaceWaterAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.DORRIE.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.OURANWOOD_DEER.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.GLIMMER.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, com.craisinlord.antarchy.content.entity.glimmer.GlimmerEntity::checkGlimmerSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
event.register(AntarchyForgeEntites.ELKA.get(), net.minecraft.world.entity.SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, net.minecraft.world.entity.animal.Animal::checkAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.OR);
}
}
@@ -0,0 +1,59 @@
package com.craisinlord.antarchy.forge.registry;
import com.craisinlord.antarchy.content.client.AntarchyGeoItem;
import com.craisinlord.antarchy.content.client.AntarchyGeoItemRenderer;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.client.extensions.common.IClientItemExtensions;
public final class AntarchyGeoItemExtensions {
private AntarchyGeoItemExtensions() {}
private static BlockEntityWithoutLevelRenderer geoRendererOf(Item item) {
return ((AntarchyGeoItemRenderer) ((AntarchyGeoItem) item).getRenderProvider().get()).getCustomRenderer();
}
public static IClientItemExtensions plain(Item item) {
return new IClientItemExtensions() {
@Override
public BlockEntityWithoutLevelRenderer getCustomRenderer() {
return geoRendererOf(item);
}
};
}
public static IClientItemExtensions crossbowHold(Item item) {
return new IClientItemExtensions() {
@Override
public BlockEntityWithoutLevelRenderer getCustomRenderer() {
return geoRendererOf(item);
}
@Override
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
return HumanoidModel.ArmPose.CROSSBOW_HOLD;
}
};
}
public static IClientItemExtensions sizeRay(Item item) {
return new IClientItemExtensions() {
@Override
public BlockEntityWithoutLevelRenderer getCustomRenderer() {
return geoRendererOf(item);
}
@Override
public HumanoidModel.ArmPose getArmPose(LivingEntity entityLiving, InteractionHand hand, ItemStack itemStack) {
if (entityLiving.isUsingItem() && entityLiving.getUsedItemHand() == hand) {
return HumanoidModel.ArmPose.CROSSBOW_HOLD;
}
return null;
}
};
}
}
@@ -0,0 +1,78 @@
package com.craisinlord.antarchy.forge.registry;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.RegistryObject;
import java.util.Collection;
import java.util.function.Supplier;
public class DeferredRegister<T> {
private final net.minecraftforge.registries.DeferredRegister<T> delegate;
protected DeferredRegister(net.minecraftforge.registries.DeferredRegister<T> delegate) {
this.delegate = delegate;
}
public static <T> DeferredRegister<T> create(ResourceKey<? extends Registry<T>> registryKey, String modId) {
return new DeferredRegister<>(net.minecraftforge.registries.DeferredRegister.create(registryKey, modId));
}
public static Items createItems(String modId) {
return new Items(net.minecraftforge.registries.DeferredRegister.create(Registries.ITEM, modId));
}
public static Blocks createBlocks(String modId) {
return new Blocks(net.minecraftforge.registries.DeferredRegister.create(Registries.BLOCK, modId));
}
public <I extends T> RegistryObject<I> register(String name, Supplier<? extends I> supplier) {
return this.delegate.register(name, supplier);
}
public void register(IEventBus modEventBus) {
this.delegate.register(modEventBus);
}
public Collection<RegistryObject<T>> getEntries() {
return this.delegate.getEntries();
}
public TagKey<T> createTagKey(String name) {
return this.delegate.createTagKey(name);
}
public static final class Items extends DeferredRegister<Item> {
private Items(net.minecraftforge.registries.DeferredRegister<Item> delegate) {
super(delegate);
}
public RegistryObject<Item> registerSimpleItem(String name) {
return this.registerSimpleItem(name, new Item.Properties());
}
public RegistryObject<Item> registerSimpleItem(String name, Item.Properties properties) {
return this.register(name, () -> new Item(properties));
}
public RegistryObject<BlockItem> registerSimpleBlockItem(RegistryObject<? extends Block> block) {
return this.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties()));
}
public RegistryObject<BlockItem> registerSimpleBlockItem(RegistryObject<? extends Block> block, Item.Properties properties) {
return this.register(block.getId().getPath(), () -> new BlockItem(block.get(), properties));
}
}
public static final class Blocks extends DeferredRegister<Block> {
private Blocks(net.minecraftforge.registries.DeferredRegister<Block> delegate) {
super(delegate);
}
}
}
@@ -0,0 +1,62 @@
package com.craisinlord.antarchy.forge.worldgen;
import com.craisinlord.antarchy.content.block.CornCropBlock;
import com.craisinlord.antarchy.forge.registry.AntarchyForgeBlocks;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
public final class CornPatchFeature extends Feature<NoneFeatureConfiguration> {
public CornPatchFeature(Codec<NoneFeatureConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
WorldGenLevel level = context.level();
RandomSource random = context.random();
BlockPos origin = context.origin();
Block wildCorn = AntarchyForgeBlocks.WILD_CORN.get();
int radius = 4 + random.nextInt(3);
int targetPlacements = 10 + random.nextInt(11);
int attempts = targetPlacements * 4;
int placed = 0;
for (int i = 0; i < attempts && placed < targetPlacements; i++) {
int x = origin.getX() + random.nextInt(radius * 2 + 1) - radius;
int z = origin.getZ() + random.nextInt(radius * 2 + 1) - radius;
int surfaceY = level.getHeight(Heightmap.Types.WORLD_SURFACE_WG, x, z);
BlockPos lowerPos = new BlockPos(x, surfaceY, z);
BlockPos upperPos = lowerPos.above();
if (!level.getBlockState(lowerPos.below()).is(Blocks.GRASS_BLOCK)) {
continue;
}
if (!level.getBlockState(lowerPos).canBeReplaced() || !level.getBlockState(upperPos).canBeReplaced()) {
continue;
}
BlockState lowerState = wildCorn.defaultBlockState()
.setValue(CornCropBlock.AGE, 3)
.setValue(CornCropBlock.HALF, DoubleBlockHalf.LOWER);
BlockState upperState = wildCorn.defaultBlockState()
.setValue(CornCropBlock.AGE, 3)
.setValue(CornCropBlock.HALF, DoubleBlockHalf.UPPER);
level.setBlock(lowerPos, lowerState, 2);
level.setBlock(upperPos, upperState, 2);
placed++;
}
return placed > 0;
}
}
@@ -0,0 +1,52 @@
package com.craisinlord.antarchy.forge.worldgen;
import com.craisinlord.antarchy.content.AntarchyTags;
import com.mojang.serialization.Codec;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
public final class LumenLilyPadFeature extends Feature<NoneFeatureConfiguration> {
public LumenLilyPadFeature(Codec<NoneFeatureConfiguration> codec) {
super(codec);
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
WorldGenLevel level = context.level();
RandomSource random = context.random();
BlockPos origin = context.origin();
boolean placedAny = false;
for (int i = 0; i < 24; i++) {
int x = origin.getX() + random.nextInt(17) - 8;
int z = origin.getZ() + random.nextInt(17) - 8;
int surfaceY = level.getHeight(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, x, z) - 1;
BlockPos fluidPos = new BlockPos(x, surfaceY, z);
if (!level.getFluidState(fluidPos).is(AntarchyTags.Fluids.LUMEN) || !level.getFluidState(fluidPos).isSource()) {
continue;
}
BlockPos padPos = fluidPos.above();
if (!level.isEmptyBlock(padPos)) {
continue;
}
BlockState lilyPad = Blocks.LILY_PAD.defaultBlockState();
if (!lilyPad.canSurvive(level, padPos)) {
continue;
}
level.setBlock(padPos, lilyPad, 2);
placedAny = true;
}
return placedAny;
}
}
@@ -0,0 +1,30 @@
modLoader="javafml"
loaderVersion="${loader_version_range}"
license="${mod_license}"
[[mods]]
modId="${mod_id}"
version="${version}"
displayName="${mod_name}"
authors="${mod_authors}"
description='''${mod_description}'''
displayTest="MATCH_VERSION"
[[dependencies.${mod_id}]]
modId="forge"
mandatory=true
versionRange="${forge_version_range}"
ordering="NONE"
side="BOTH"
[[dependencies.${mod_id}]]
modId="minecraft"
mandatory=true
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"
[[mixins]]
config="antarchy-common.mixins.json"
[[mixins]]
config="antarchy-forge.mixins.json"
@@ -0,0 +1,23 @@
{
"required": true,
"package": "com.craisinlord.antarchy.forge.mixins",
"refmap": "antarchy-forge.mixins.refmap.json",
"compatibilityLevel": "JAVA_17",
"mixins": [
"entity.MultipartEntityBridgeMixin",
"entity.MultipartEntityLevelRegistryMixin",
"entity.ParalyzedMobFreezeMixin",
"infinity.ConfigGenInvocationMixin",
"item.BucketItemThoraxisWaterMixin",
"level.ClientLevelPartEntitiesAccessor",
"level.LevelStemDiagnosticMixin",
"level.ServerLevelPartEntitiesAccessor"
],
"client": [
"client.LiquidBlockRendererMixin"
],
"injectors": {
"defaultRequire": 1
},
"minVersion": "0.8"
}