diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..6d82baa --- /dev/null +++ b/build.gradle @@ -0,0 +1,185 @@ +plugins { + id 'eclipse' + id 'maven-publish' + id 'net.minecraftforge.gradle' version '5.1.+' +} + +version = '1.19.2-1.3.1' +group = 'es.yoshibv.amodgus' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = 'amodgus' + +// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + +println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" +minecraft { + // The mappings can be changed at any time and must be in the following format. + // Channel: Version: + // official MCVersion Official field/method names from Mojang mapping files + // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official + // + // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. + // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md + // + // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge + // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started + // + // Use non-default mappings at your own risk. They may not always work. + // Simply re-run your setup task after changing the mappings to update your workspace. + mappings channel: 'official', version: '1.19.2' + + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. + + // Default run configurations. + // These can be tweaked, removed, or duplicated as needed. + runs { + client { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + // The markers can be added/remove as needed separated by commas. + // "SCAN": For mods scan. + // "REGISTRIES": For firing of registry events. + // "REGISTRYDUMP": For getting the contents of all registries. + property 'forge.logging.markers', 'REGISTRIES' + + // Recommended logging level for the console + // You can set various levels here. + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'examplemod' + + mods { + examplemod { + source sourceSets.main + } + } + } + + server { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + property 'forge.enabledGameTestNamespaces', 'examplemod' + + mods { + examplemod { + source sourceSets.main + } + } + } + + // This run config launches GameTestServer and runs all registered gametests, then exits. + // By default, the server will crash when no gametests are provided. + // The gametest system is also enabled by default for other run configs under the /test command. + gameTestServer { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + property 'forge.enabledGameTestNamespaces', 'examplemod' + + mods { + examplemod { + source sourceSets.main + } + } + } + + data { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. + args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + + mods { + examplemod { + source sourceSets.main + } + } + } + } +} + +// Include resources generated by data generators. +sourceSets.main.resources { srcDir 'src/generated/resources' } + +repositories { + // Put repositories for dependencies here + // ForgeGradle automatically adds the Forge maven and Maven Central for you + + // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: + // flatDir { + // dir 'libs' + // } + maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' } +} + +dependencies { + // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed + // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. + // The userdev artifact is a special name and will get all sorts of transformations applied to it. + minecraft 'net.minecraftforge:forge:1.19.2-43.2.6' + implementation fg.deobf('software.bernie.geckolib:geckolib-forge-1.19:3.1.40') + + // Real mod deobf dependency examples - these get remapped to your current mappings + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency + // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency + // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency + + // Examples using mod jars from ./libs + // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") + + // For more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html +} + +// Example for how to get properties into the manifest for reading at runtime. +jar { + manifest { + attributes([ + "Specification-Title" : "amodgus", + "Specification-Vendor" : "amodgus", + "Specification-Version" : "1.19.2-1.3.1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : project.jar.archiveVersion, + "Implementation-Vendor" : "amodgus", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +// Example configuration to allow publishing using the maven-publish plugin +// This is the preferred method to reobfuscate your jar file +jar.finalizedBy('reobfJar') +// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing +// publish.dependsOn('reobfJar') + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + } + } + repositories { + maven { + url "file://${project.projectDir}/mcmodsrepo" + } + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..878bf1f --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ae04661 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..a69d9cb --- /dev/null +++ b/gradlew @@ -0,0 +1,240 @@ +#!/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 \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..f127cfd --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,91 @@ +@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% equ 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% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..3703f36 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,6 @@ +pluginManagement { + repositories { + gradlePluginPortal() + maven { url = 'https://maven.minecraftforge.net/' } + } +} \ No newline at end of file diff --git a/src/main/java/dev/galliard/amodgus/Amodgus.java b/src/main/java/dev/galliard/amodgus/Amodgus.java new file mode 100644 index 0000000..b722182 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/Amodgus.java @@ -0,0 +1,34 @@ +package dev.galliard.amodgus; + +import dev.galliard.amodgus.events.MobsAttrsEvent; +import dev.galliard.amodgus.events.MobsRendererEvents; +import dev.galliard.amodgus.init.InitItems; +import dev.galliard.amodgus.init.MobsInit; +import dev.galliard.amodgus.painting.ModPaintings; +import dev.galliard.amodgus.sound.ModSounds; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import software.bernie.geckolib3.GeckoLib; + +import static net.minecraftforge.common.MinecraftForge.EVENT_BUS; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +@Mod(Amodgus.MODID) +public class Amodgus { + public static final String MODID = "amodgus"; + public static final Logger LOGGER = LogManager.getLogger(); + + public Amodgus() { + IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); + InitItems.ITEMS.register(bus); + EVENT_BUS.register(new MobsAttrsEvent()); + EVENT_BUS.register(new MobsRendererEvents()); + MobsInit.register(bus); + GeckoLib.initialize(); + ModSounds.register(bus); + ModPaintings.register(bus); + } +} diff --git a/src/main/java/dev/galliard/amodgus/client/models/AmongusModel.java b/src/main/java/dev/galliard/amodgus/client/models/AmongusModel.java new file mode 100644 index 0000000..ba49983 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/client/models/AmongusModel.java @@ -0,0 +1,29 @@ +package dev.galliard.amodgus.client.models; + +import dev.galliard.amodgus.entities.AmongusEntity; +import dev.galliard.amodgus.Amodgus; +import dev.galliard.amodgus.client.renderer.AmongusRenderer; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib3.model.AnimatedGeoModel; + +public class AmongusModel extends AnimatedGeoModel { + + @Override + public ResourceLocation getModelResource(AmongusEntity object) { + // TODO Apéndice de método generado automáticamente + return new ResourceLocation(Amodgus.MODID, "geo/amongus.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(AmongusEntity object) { + // TODO Apéndice de método generado automáticamente + return AmongusRenderer.LOCATION_BY_VARIANT.get(object.getVariant()); + } + + @Override + public ResourceLocation getAnimationResource(AmongusEntity animatable) { + // TODO Apéndice de método generado automáticamente + return new ResourceLocation(Amodgus.MODID, "animations/amongus.animation.json"); + } + +} \ No newline at end of file diff --git a/src/main/java/dev/galliard/amodgus/client/models/ImpostorModel.java b/src/main/java/dev/galliard/amodgus/client/models/ImpostorModel.java new file mode 100644 index 0000000..b0ca421 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/client/models/ImpostorModel.java @@ -0,0 +1,29 @@ +package dev.galliard.amodgus.client.models; + +import dev.galliard.amodgus.client.renderer.AmongusRenderer; +import dev.galliard.amodgus.entities.ImpostorEntity; +import dev.galliard.amodgus.Amodgus; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib3.model.AnimatedGeoModel; + +public class ImpostorModel extends AnimatedGeoModel { + + @Override + public ResourceLocation getModelResource(ImpostorEntity object) { + // TODO Apéndice de método generado automáticamente + return new ResourceLocation(Amodgus.MODID, "geo/amongus.geo.json"); + } + + @Override + public ResourceLocation getTextureResource(ImpostorEntity object) { + // TODO Apéndice de método generado automáticamente + return AmongusRenderer.LOCATION_BY_VARIANT.get(object.getVariant()); + } + + @Override + public ResourceLocation getAnimationResource(ImpostorEntity animatable) { + // TODO Apéndice de método generado automáticamente + return new ResourceLocation(Amodgus.MODID, "animations/amongus.animation.json"); + } + +} \ No newline at end of file diff --git a/src/main/java/dev/galliard/amodgus/client/renderer/AmongusRenderer.java b/src/main/java/dev/galliard/amodgus/client/renderer/AmongusRenderer.java new file mode 100644 index 0000000..1a13c6b --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/client/renderer/AmongusRenderer.java @@ -0,0 +1,80 @@ +package dev.galliard.amodgus.client.renderer; + +import java.util.Map; + +import dev.galliard.amodgus.client.models.AmongusModel; +import dev.galliard.amodgus.entities.AmongusEntity; +import dev.galliard.amodgus.entities.variant.AmongusVariant; +import org.jetbrains.annotations.Nullable; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; + +import dev.galliard.amodgus.Amodgus; + +import com.google.common.collect.Maps; + +import net.minecraft.Util; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer; + +public class AmongusRenderer extends GeoEntityRenderer { + + public static final Map LOCATION_BY_VARIANT = + Util.make(Maps.newEnumMap(AmongusVariant.class), (p_114874_) -> { + p_114874_.put(AmongusVariant.RED, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_red.png")); + p_114874_.put(AmongusVariant.YELLOW, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_yellow.png")); + p_114874_.put(AmongusVariant.ORANGE, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_orange.png")); + p_114874_.put(AmongusVariant.GREEN, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_green.png")); + p_114874_.put(AmongusVariant.LIME, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_lime.png")); + p_114874_.put(AmongusVariant.PURPLE, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_purple.png")); + p_114874_.put(AmongusVariant.MAGENTA, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_magenta.png")); + p_114874_.put(AmongusVariant.PINK, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_pink.png")); + p_114874_.put(AmongusVariant.WHITE, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_white.png")); + p_114874_.put(AmongusVariant.BLACK, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_black.png")); + p_114874_.put(AmongusVariant.BROWN, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_brown.png")); + p_114874_.put(AmongusVariant.BLUE, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_blue.png")); + p_114874_.put(AmongusVariant.CYAN, + new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_cyan.png")); + + }); + + public AmongusRenderer(Context renderManager) { + super(renderManager, new AmongusModel()); + // TODO Apéndice de constructor generado automáticamente + this.shadowRadius = 0.5f; + } + + + + @Override + public ResourceLocation getTextureLocation(AmongusEntity object) { + // TODO Apéndice de método generado automáticamente + return LOCATION_BY_VARIANT.get(object.getVariant()); + } + + @Override + public RenderType getRenderType(AmongusEntity animatable, float partialTicks, PoseStack stack, + @Nullable MultiBufferSource renderTypeBuffer, + @Nullable VertexConsumer vertexBuilder, int packedLightIn, + ResourceLocation textureLocation) { + stack.scale(1.0f, 1.0f, 1.0f); + return super.getRenderType(animatable, partialTicks, stack, renderTypeBuffer, vertexBuilder, packedLightIn, textureLocation); + } + +} \ No newline at end of file diff --git a/src/main/java/dev/galliard/amodgus/client/renderer/ImpostorRenderer.java b/src/main/java/dev/galliard/amodgus/client/renderer/ImpostorRenderer.java new file mode 100644 index 0000000..c868738 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/client/renderer/ImpostorRenderer.java @@ -0,0 +1,40 @@ +package dev.galliard.amodgus.client.renderer; + +import dev.galliard.amodgus.entities.ImpostorEntity; +import org.jetbrains.annotations.Nullable; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; + +import dev.galliard.amodgus.Amodgus; +import dev.galliard.amodgus.client.models.ImpostorModel; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.EntityRendererProvider.Context; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer; + +public class ImpostorRenderer extends GeoEntityRenderer { + + public ImpostorRenderer(Context renderManager) { + super(renderManager, new ImpostorModel()); + // TODO Auto-generated constructor stub + this.shadowRadius = 0.5f; + } + + @Override + public ResourceLocation getTextureLocation(ImpostorEntity object) { + // TODO Apéndice de método generado automáticamente + return new ResourceLocation(Amodgus.MODID, "textures/entities/amongus_black.png"); + } + + @Override + public RenderType getRenderType(ImpostorEntity animatable, float partialTicks, PoseStack stack, + @Nullable MultiBufferSource renderTypeBuffer, + @Nullable VertexConsumer vertexBuilder, int packedLightIn, + ResourceLocation textureLocation) { + stack.scale(1.0f, 1.0f, 1.0f); + return super.getRenderType(animatable, partialTicks, stack, renderTypeBuffer, vertexBuilder, packedLightIn, textureLocation); + } + +} \ No newline at end of file diff --git a/src/main/java/dev/galliard/amodgus/entities/AmongusEntity.java b/src/main/java/dev/galliard/amodgus/entities/AmongusEntity.java new file mode 100644 index 0000000..0940310 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/entities/AmongusEntity.java @@ -0,0 +1,376 @@ +package dev.galliard.amodgus.entities; + +import java.util.Random; +import java.util.UUID; + +import dev.galliard.amodgus.entities.variant.AmongusVariant; +import org.jetbrains.annotations.Nullable; + +import dev.galliard.amodgus.Amodgus; +import dev.galliard.amodgus.init.MobsInit; +import dev.galliard.amodgus.sound.ModSounds; +import net.minecraft.Util; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.util.RandomSource; +import net.minecraft.world.DifficultyInstance; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.AgeableMob; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobSpawnType; +import net.minecraft.world.entity.NeutralMob; +import net.minecraft.world.entity.SpawnGroupData; +import net.minecraft.world.entity.TamableAnimal; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.goal.FloatGoal; +import net.minecraft.world.entity.ai.goal.FollowOwnerGoal; +import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; +import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; +import net.minecraft.world.entity.ai.goal.SitWhenOrderedToGoal; +import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.target.OwnerHurtByTargetGoal; +import net.minecraft.world.entity.ai.goal.target.OwnerHurtTargetGoal; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.scores.Team; +import net.minecraftforge.event.ForgeEventFactory; +import net.minecraftforge.registries.ForgeRegistries; +import software.bernie.geckolib3.core.IAnimatable; +import software.bernie.geckolib3.core.PlayState; +import software.bernie.geckolib3.core.builder.AnimationBuilder; +import software.bernie.geckolib3.core.builder.ILoopType; +import software.bernie.geckolib3.core.controller.AnimationController; +import software.bernie.geckolib3.core.event.predicate.AnimationEvent; +import software.bernie.geckolib3.core.manager.AnimationData; +import software.bernie.geckolib3.core.manager.AnimationFactory; + +public class AmongusEntity extends TamableAnimal implements IAnimatable, NeutralMob { + @SuppressWarnings("removal") + private AnimationFactory factory = new AnimationFactory(this); + + private static final EntityDataAccessor SITTING = + SynchedEntityData.defineId(AmongusEntity.class, EntityDataSerializers.BOOLEAN); + + private static final EntityDataAccessor DATA_ID_TYPE_VARIANT = + SynchedEntityData.defineId(AmongusEntity.class, EntityDataSerializers.INT); + + public AmongusEntity(EntityType entityType, Level world) { + super(entityType, world); + // TODO Apéndice de constructor generado automáticamente + } + + public static AttributeSupplier setAttributes() { + return TamableAnimal.createMobAttributes() + .add(Attributes.MAX_HEALTH, 14.00) + .add(Attributes.ATTACK_DAMAGE,6.0f) + .add(Attributes.ATTACK_SPEED,1.8f) + .add(Attributes.MOVEMENT_SPEED, 0.3f).build(); + } + + @Override + protected void registerGoals() { + this.goalSelector.addGoal(1, new FloatGoal(this)); + this.targetSelector.addGoal(4, new OwnerHurtByTargetGoal(this)); + this.targetSelector.addGoal(5, new OwnerHurtTargetGoal(this)); + this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this)); + this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true)); + this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.2D, 8.0F, 2.0F, false)); + this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 6.0f)); + this.goalSelector.addGoal(10, new RandomLookAroundGoal(this)); + this.goalSelector.addGoal(8, new WaterAvoidingRandomStrollGoal(this, 1.0D)); + } + + @Nullable + @Override + public AgeableMob getBreedOffspring(ServerLevel p_146743_, AgeableMob p_146744_) { + return MobsInit.AMONGUS.get().create(p_146743_); + } + + private PlayState predicate(AnimationEvent event) { + if (event.isMoving()) { + event.getController().setAnimation(new AnimationBuilder().addAnimation("walk", (ILoopType)ILoopType.EDefaultLoopTypes.LOOP)); + return PlayState.CONTINUE; + } + + if (this.isSitting()) { + event.getController().setAnimation(new AnimationBuilder().addAnimation("sitting", (ILoopType)ILoopType.EDefaultLoopTypes.LOOP)); + return PlayState.CONTINUE; + } + + event.getController().setAnimation(new AnimationBuilder().addAnimation("idle", (ILoopType)ILoopType.EDefaultLoopTypes.LOOP)); + return PlayState.CONTINUE; + } + + private PlayState deathPredicate(AnimationEvent event) { + if (this.isDeadOrDying()) { + this.setHealth(0.5f); + event.getController().setAnimation(new AnimationBuilder().addAnimation("death", (ILoopType)ILoopType.EDefaultLoopTypes.PLAY_ONCE)); + this.die(getLastDamageSource()); + return PlayState.CONTINUE; + } + return PlayState.CONTINUE; + } + + @Override + public void registerControllers(AnimationData data) { + data.addAnimationController(new AnimationController((IAnimatable)this, "controller", 0.0f, this::predicate)); + data.addAnimationController(new AnimationController((IAnimatable)this, "deathController", 0.0f, this::deathPredicate)); + } + + @Override + public AnimationFactory getFactory() { + return this.factory; + } + + protected void playStepSound(BlockPos pos, BlockState blockIn) { + this.playSound(SoundEvents.NETHERITE_BLOCK_PLACE, 0.15F, 1.0F); + } + + protected SoundEvent getHurtSound(DamageSource damageSourceIn) { + return SoundEvents.DOLPHIN_HURT; + } + + protected SoundEvent getDeathSound() { + return ModSounds.AMONGUS_DEATH.get(); + } + + protected float getSoundVolume() { + return 0.4F; + } + + @Override + public InteractionResult mobInteract(Player player, InteractionHand hand) { + ItemStack itemstack = player.getItemInHand(hand); + Item item = itemstack.getItem(); + + Item healItem = ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"flask")); + + Item[] itemsForTaming = { + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"red_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"blue_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"cyan_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"green_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"lime_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"yellow_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"orange_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"pink_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"purple_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"magenta_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"black_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"white_toy")), + ForgeRegistries.ITEMS.getValue(new ResourceLocation(Amodgus.MODID,"brown_toy")) + }; + + if (!isTame()) { + if (this.level.isClientSide) { + return InteractionResult.CONSUME; + } else { + if (!player.getAbilities().instabuild) { + itemstack.shrink(1); + } + + if (!ForgeEventFactory.onAnimalTame(this, player)) { + if (!this.level.isClientSide) { + if((getVariant() == AmongusVariant.RED && item == itemsForTaming[0]) || + (getVariant() == AmongusVariant.BLUE && item == itemsForTaming[1]) || + (getVariant() == AmongusVariant.CYAN && item == itemsForTaming[2]) || + (getVariant() == AmongusVariant.GREEN && item == itemsForTaming[3]) || + (getVariant() == AmongusVariant.LIME && item == itemsForTaming[4]) || + (getVariant() == AmongusVariant.YELLOW && item == itemsForTaming[5]) || + (getVariant() == AmongusVariant.ORANGE && item == itemsForTaming[6]) || + (getVariant() == AmongusVariant.PINK && item == itemsForTaming[7]) || + (getVariant() == AmongusVariant.PURPLE && item == itemsForTaming[8]) || + (getVariant() == AmongusVariant.MAGENTA && item == itemsForTaming[9]) || + (getVariant() == AmongusVariant.BLACK && item == itemsForTaming[10]) || + (getVariant() == AmongusVariant.WHITE && item == itemsForTaming[11]) || + (getVariant() == AmongusVariant.BROWN && item == itemsForTaming[12])) { + super.tame(player); + this.navigation.recomputePath(); + this.setTarget(null); + this.level.broadcastEntityEvent(this, (byte)7); + setSitting(true); + } + } + } + + return InteractionResult.SUCCESS; + } + } + + if(player == this.getOwner()) { + if(isTame() && this.getHealth() < this.getMaxHealth() && item == healItem) { + this.setSitting(false); + this.setOrderedToSit(false); + this.setHealth(this.getHealth() + 5.0f); + this.summonParticles(ParticleTypes.HAPPY_VILLAGER); + return InteractionResult.SUCCESS; + } + + if(isTame() && !this.level.isClientSide && hand == InteractionHand.MAIN_HAND) { + setSitting(!isSitting()); + return InteractionResult.SUCCESS; + } + } + + return super.mobInteract(player, hand); + } + + private void summonParticles(ParticleOptions particleoptions) { + + for(int i = 0; i < 7; ++i) { + double d0 = this.random.nextGaussian() * 0.02D; + double d1 = this.random.nextGaussian() * 0.02D; + double d2 = this.random.nextGaussian() * 0.02D; + this.level.addParticle(particleoptions, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), d0, d1, d2); + } + } + + public static boolean canSpawn(EntityType entity, LevelAccessor levelAccess, + MobSpawnType spawnType, BlockPos pos, RandomSource random) { + return checkAnimalSpawnRules(entity, levelAccess, spawnType, pos, random); + } + + @Override + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + setSitting(tag.getBoolean("isSitting")); + this.entityData.set(DATA_ID_TYPE_VARIANT, tag.getInt("Variant")); + } + + @Override + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putBoolean("isSitting", this.isSitting()); + tag.putInt("Variant", this.getTypeVariant()); + } + + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + this.entityData.define(SITTING, false); + this.entityData.define(DATA_ID_TYPE_VARIANT, 0); + } + + public void setSitting(boolean sitting) { + this.entityData.set(SITTING, sitting); + this.setOrderedToSit(sitting); + } + + public boolean isSitting() { + return this.entityData.get(SITTING); + } + + @Override + public Team getTeam() { + return super.getTeam(); + } + + public boolean canBeLeashed(Player player) { + return false; + } + + @Override + public void setTame(boolean tamed) { + super.setTame(tamed); + if (tamed) { + getAttribute(Attributes.MAX_HEALTH).setBaseValue(20.0D); + getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(6.0D); + getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue((double)0.3f); + } else { + getAttribute(Attributes.MAX_HEALTH).setBaseValue(14.0D); + getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(3.0D); + getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue((double)0.3f); + } + } + + /* VARIANTS */ + public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_146746_, DifficultyInstance p_146747_, + MobSpawnType p_146748_, @Nullable SpawnGroupData p_146749_, + @Nullable CompoundTag p_146750_) { + AmongusVariant variant = Util.getRandom(AmongusVariant.values(), this.random); + System.out.println("\n\nVariant:" + variant); + Level level = this.getLevel(); + ServerLevel srvLevel = p_146746_.getLevel(); + ImpostorEntity ie = new ImpostorEntity(MobsInit.IMPOSTOR.get(), level); + Random random = new Random(); + double n = random.nextDouble(); + System.out.println("Random number:" + n); + + setVariant(variant); + + if (n < 0.5 && variant.equals(AmongusVariant.BLACK)) { + System.out.println("Se cumple la probabilidad del 50%"); + this.remove(Entity.RemovalReason.DISCARDED); + ie.setPos(new Vec3(this.getX()+1, this.getY(), this.getZ()+1)); + srvLevel.addFreshEntity(ie); + } else { + System.out.println("No se cumple la probabilidad del 50%"); + } + + return super.finalizeSpawn(p_146746_, p_146747_, p_146748_, p_146749_, p_146750_); + } + + public AmongusVariant getVariant() { + return AmongusVariant.byId(this.getTypeVariant() & 255); + } + + private int getTypeVariant() { + return this.entityData.get(DATA_ID_TYPE_VARIANT); + } + + private void setVariant(AmongusVariant variant) { + this.entityData.set(DATA_ID_TYPE_VARIANT, variant.getId() & 255); + } + + + @Override + public int getRemainingPersistentAngerTime() { + // TODO Apéndice de método generado automáticamente + return 0; + } + + @Override + public void setRemainingPersistentAngerTime(int p_21673_) { + // TODO Apéndice de método generado automáticamente + + } + + @Override + public UUID getPersistentAngerTarget() { + // TODO Apéndice de método generado automáticamente + return null; + } + + @Override + public void setPersistentAngerTarget(UUID p_21672_) { + // TODO Apéndice de método generado automáticamente + + } + + @Override + public void startPersistentAngerTimer() { + // TODO Apéndice de método generado automáticamente + + } + +} diff --git a/src/main/java/dev/galliard/amodgus/entities/ImpostorEntity.java b/src/main/java/dev/galliard/amodgus/entities/ImpostorEntity.java new file mode 100644 index 0000000..d4016f5 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/entities/ImpostorEntity.java @@ -0,0 +1,161 @@ +package dev.galliard.amodgus.entities; + +import dev.galliard.amodgus.entities.variant.AmongusVariant; +import org.jetbrains.annotations.Nullable; + +import dev.galliard.amodgus.sound.ModSounds; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.DifficultyInstance; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobSpawnType; +import net.minecraft.world.entity.SpawnGroupData; +import net.minecraft.world.entity.TamableAnimal; +import net.minecraft.world.entity.ai.attributes.AttributeSupplier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.ai.goal.FloatGoal; +import net.minecraft.world.entity.ai.goal.LookAtPlayerGoal; +import net.minecraft.world.entity.ai.goal.MeleeAttackGoal; +import net.minecraft.world.entity.ai.goal.RandomLookAroundGoal; +import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal; +import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; +import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; +import net.minecraft.world.entity.monster.Monster; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.block.state.BlockState; +import software.bernie.geckolib3.core.IAnimatable; +import software.bernie.geckolib3.core.PlayState; +import software.bernie.geckolib3.core.builder.AnimationBuilder; +import software.bernie.geckolib3.core.builder.ILoopType; +import software.bernie.geckolib3.core.controller.AnimationController; +import software.bernie.geckolib3.core.event.predicate.AnimationEvent; +import software.bernie.geckolib3.core.manager.AnimationData; +import software.bernie.geckolib3.core.manager.AnimationFactory; + +public class ImpostorEntity extends Monster implements IAnimatable { + @SuppressWarnings("removal") + private AnimationFactory factory = new AnimationFactory(this); + + private static final EntityDataAccessor DATA_ID_TYPE_VARIANT = + SynchedEntityData.defineId(ImpostorEntity.class, EntityDataSerializers.INT); + + public ImpostorEntity(EntityType entityType, Level world) { + super(entityType, world); + // TODO Apéndice de constructor generado automáticamente + } + + public static AttributeSupplier setAttributes() { + return TamableAnimal.createMobAttributes() + .add(Attributes.MAX_HEALTH, 14.00) + .add(Attributes.ATTACK_DAMAGE,7.0f) + .add(Attributes.ATTACK_SPEED,2.2f) + .add(Attributes.MOVEMENT_SPEED, 0.5f).build(); + } + + @Override + protected void registerGoals() { + this.goalSelector.addGoal(1, new FloatGoal(this)); + this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0D, true)); + this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 6.0f)); + this.goalSelector.addGoal(10, new RandomLookAroundGoal(this)); + this.goalSelector.addGoal(8, new WaterAvoidingRandomStrollGoal(this, 1.0D)); + this.targetSelector.addGoal(1, (new HurtByTargetGoal(this)).setAlertOthers(ImpostorEntity.class)); + this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Player.class, true)); + this.targetSelector.addGoal(6, new NearestAttackableTargetGoal<>(this, AmongusEntity.class, false)); + } + + private PlayState predicate(AnimationEvent event) { + if (event.isMoving()) { + event.getController().setAnimation(new AnimationBuilder().addAnimation("walk", (ILoopType)ILoopType.EDefaultLoopTypes.LOOP)); + return PlayState.CONTINUE; + } + + event.getController().setAnimation(new AnimationBuilder().addAnimation("idle", (ILoopType)ILoopType.EDefaultLoopTypes.LOOP)); + return PlayState.CONTINUE; + } + + private PlayState deathPredicate(AnimationEvent event) { + if (this.isDeadOrDying()) { + this.setHealth(0.5f); + event.getController().setAnimation(new AnimationBuilder().addAnimation("death", (ILoopType)ILoopType.EDefaultLoopTypes.PLAY_ONCE)); + this.die(getLastDamageSource()); + return PlayState.CONTINUE; + } + return PlayState.CONTINUE; + } + + @Override + public void registerControllers(AnimationData data) { + data.addAnimationController(new AnimationController((IAnimatable)this, "controller", 0.0f, this::predicate)); + data.addAnimationController(new AnimationController((IAnimatable)this, "deathController", 0.0f, this::deathPredicate)); + } + + @Override + public AnimationFactory getFactory() { + return this.factory; + } + + protected void playStepSound(BlockPos pos, BlockState blockIn) { + this.playSound(SoundEvents.NETHERITE_BLOCK_PLACE, 0.15F, 1.0F); + } + + protected SoundEvent getHurtSound(DamageSource damageSourceIn) { + return SoundEvents.SHULKER_HURT; + } + + protected SoundEvent getDeathSound() { + return ModSounds.AMONGUS_DEATH.get(); + } + + protected float getSoundVolume() { + return 0.4F; + } + + @Override + public void readAdditionalSaveData(CompoundTag tag) { + super.readAdditionalSaveData(tag); + this.entityData.set(DATA_ID_TYPE_VARIANT, tag.getInt("Variant")); + } + + @Override + public void addAdditionalSaveData(CompoundTag tag) { + super.addAdditionalSaveData(tag); + tag.putInt("Variant", this.getTypeVariant()); + } + + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + this.entityData.define(DATA_ID_TYPE_VARIANT, 0); + } + + /* VARIANTS */ + public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_146746_, DifficultyInstance p_146747_, + MobSpawnType p_146748_, @Nullable SpawnGroupData p_146749_, + @Nullable CompoundTag p_146750_) { + AmongusVariant variant = AmongusVariant.BLACK; + setVariant(variant); + return super.finalizeSpawn(p_146746_, p_146747_, p_146748_, p_146749_, p_146750_); + } + + public AmongusVariant getVariant() { + return AmongusVariant.byId(this.getTypeVariant() & 255); + } + + private int getTypeVariant() { + return this.entityData.get(DATA_ID_TYPE_VARIANT); + } + + private void setVariant(AmongusVariant variant) { + this.entityData.set(DATA_ID_TYPE_VARIANT, variant.getId() & 255); + } + +} diff --git a/src/main/java/dev/galliard/amodgus/entities/variant/AmongusVariant.java b/src/main/java/dev/galliard/amodgus/entities/variant/AmongusVariant.java new file mode 100644 index 0000000..8ed2316 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/entities/variant/AmongusVariant.java @@ -0,0 +1,36 @@ +package dev.galliard.amodgus.entities.variant; + +import java.util.Arrays; +import java.util.Comparator; + +public enum AmongusVariant { + RED(0), + YELLOW(1), + ORANGE(2), + GREEN(3), + LIME(4), + PURPLE(5), + MAGENTA(6), + PINK(7), + WHITE(8), + BLACK(9), + BROWN(10), + BLUE(11), + CYAN(12); + + private static final AmongusVariant[] BY_ID = Arrays.stream(values()).sorted(Comparator. + comparingInt(AmongusVariant::getId)).toArray(AmongusVariant[]::new); + private final int id; + + AmongusVariant(int id) { + this.id = id; + } + + public int getId() { + return this.id; + } + + public static AmongusVariant byId(int id) { + return BY_ID[id % BY_ID.length]; + } +} diff --git a/src/main/java/dev/galliard/amodgus/events/MobsAttrsEvent.java b/src/main/java/dev/galliard/amodgus/events/MobsAttrsEvent.java new file mode 100644 index 0000000..72030b9 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/events/MobsAttrsEvent.java @@ -0,0 +1,32 @@ +package dev.galliard.amodgus.events; + +import dev.galliard.amodgus.entities.AmongusEntity; +import dev.galliard.amodgus.entities.ImpostorEntity; +import dev.galliard.amodgus.Amodgus; +import dev.galliard.amodgus.init.MobsInit; +import net.minecraft.world.entity.SpawnPlacements; +import net.minecraft.world.entity.monster.Monster; +import net.minecraft.world.level.levelgen.Heightmap; +import net.minecraftforge.event.entity.EntityAttributeCreationEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; + +@Mod.EventBusSubscriber(modid = Amodgus.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class MobsAttrsEvent { + @SuppressWarnings("deprecation") + @SubscribeEvent + public static void commonSetup(FMLCommonSetupEvent event) { + event.enqueueWork(() -> SpawnPlacements.register(MobsInit.AMONGUS.get(), + SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE, AmongusEntity::canSpawn)); + event.enqueueWork(() -> SpawnPlacements.register(MobsInit.IMPOSTOR.get(), + SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE, Monster::checkMonsterSpawnRules)); + } + + @SubscribeEvent + public static void entityAttributes(EntityAttributeCreationEvent event) { + event.put(MobsInit.AMONGUS.get(), AmongusEntity.setAttributes()); + event.put(MobsInit.IMPOSTOR.get(), ImpostorEntity.setAttributes()); + } + +} diff --git a/src/main/java/dev/galliard/amodgus/events/MobsRendererEvents.java b/src/main/java/dev/galliard/amodgus/events/MobsRendererEvents.java new file mode 100644 index 0000000..b200b33 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/events/MobsRendererEvents.java @@ -0,0 +1,20 @@ +package dev.galliard.amodgus.events; + +import dev.galliard.amodgus.Amodgus; +import dev.galliard.amodgus.client.renderer.AmongusRenderer; +import dev.galliard.amodgus.client.renderer.ImpostorRenderer; +import dev.galliard.amodgus.init.MobsInit; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.EntityRenderersEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid=Amodgus.MODID,bus=Mod.EventBusSubscriber.Bus.MOD, value=Dist.CLIENT) +public class MobsRendererEvents { + + @SubscribeEvent + public static void entityRenders(EntityRenderersEvent.RegisterRenderers event) { + event.registerEntityRenderer(MobsInit.AMONGUS.get(),AmongusRenderer::new); + event.registerEntityRenderer(MobsInit.IMPOSTOR.get(),ImpostorRenderer::new); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/AmodgusTab.java b/src/main/java/dev/galliard/amodgus/init/AmodgusTab.java new file mode 100644 index 0000000..dea1e28 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/AmodgusTab.java @@ -0,0 +1,17 @@ +package dev.galliard.amodgus.init; + +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; + +public class AmodgusTab extends CreativeModeTab{ + public static final AmodgusTab AMODGUS_TAB = new AmodgusTab(CreativeModeTab.TABS.length, "Amodgus"); + + private AmodgusTab(int index, String label) { + super(index, label); + } + + @Override + public ItemStack makeIcon() { + return new ItemStack(InitItems.KNIFE.get()); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/InitItems.java b/src/main/java/dev/galliard/amodgus/init/InitItems.java new file mode 100644 index 0000000..b356322 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/InitItems.java @@ -0,0 +1,102 @@ +package dev.galliard.amodgus.init; + +import dev.galliard.amodgus.sound.ModSounds; +import dev.galliard.amodgus.Amodgus; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.RecordItem; +import net.minecraft.world.item.SwordItem; +import net.minecraft.world.item.Tiers; +import net.minecraftforge.common.ForgeSpawnEggItem; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class InitItems { + public static final DeferredRegister ITEMS = DeferredRegister.create( + ForgeRegistries.ITEMS, Amodgus.MODID + ); + public static final RegistryObject KNIFE = ITEMS.register( + "knife", () -> new SwordItem( + Tiers.IRON, + 2, + -2.0f, + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB)) + ); + + public static final RegistryObject EGGHAT = ITEMS.register( + "egghat", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + + public static final RegistryObject AMONGUS_SPAWN_EGG = ITEMS.register( + "amongus_spawn_egg", () -> new ForgeSpawnEggItem( + MobsInit.AMONGUS, 0xb4202a, 0xb9bffb, new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + + public static final RegistryObject IMPOSTOR_SPAWN_EGG = ITEMS.register( + "impostor_spawn_egg", () -> new ForgeSpawnEggItem( + MobsInit.IMPOSTOR, 0x3f474e, 0x1e1f26, new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + + public static final RegistryObject RED_TOY = ITEMS.register( + "red_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject BLACK_TOY = ITEMS.register( + "black_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject WHITE_TOY = ITEMS.register( + "white_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject CYAN_TOY = ITEMS.register( + "cyan_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject PINK_TOY = ITEMS.register( + "pink_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject PURPLE_TOY = ITEMS.register( + "purple_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject MAGENTA_TOY = ITEMS.register( + "magenta_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject BLUE_TOY = ITEMS.register( + "blue_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject BROWN_TOY = ITEMS.register( + "brown_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject GREEN_TOY = ITEMS.register( + "green_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject LIME_TOY = ITEMS.register( + "lime_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject YELLOW_TOY = ITEMS.register( + "yellow_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + public static final RegistryObject ORANGE_TOY = ITEMS.register( + "orange_toy", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + + public static final RegistryObject FLASK = ITEMS.register( + "flask", () -> new Item( + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1)) + ); + + public static final RegistryObject AMONGUS_DRIP_SONG_MUSIC_DISC = ITEMS.register("music_disc_amongus_drip", + () -> new RecordItem(4, ModSounds.AMONGUS_DRIP, + new Item.Properties().tab(AmodgusTab.AMODGUS_TAB).stacksTo(1), 0)); +} diff --git a/src/main/java/dev/galliard/amodgus/init/MobsInit.java b/src/main/java/dev/galliard/amodgus/init/MobsInit.java new file mode 100644 index 0000000..69733ba --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/MobsInit.java @@ -0,0 +1,33 @@ +package dev.galliard.amodgus.init; + +import dev.galliard.amodgus.entities.AmongusEntity; +import dev.galliard.amodgus.entities.ImpostorEntity; +import dev.galliard.amodgus.Amodgus; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobCategory; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class MobsInit { + public static final DeferredRegister> MOBS = + DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, Amodgus.MODID); + + public static final RegistryObject> AMONGUS = + MOBS.register("amongus", + () -> EntityType.Builder.of(AmongusEntity::new, MobCategory.CREATURE) + .sized(0.4f, 1.0f) + .build(new ResourceLocation(Amodgus.MODID,"amongus").toString())); + + public static final RegistryObject> IMPOSTOR = + MOBS.register("impostor", + () -> EntityType.Builder.of(ImpostorEntity::new, MobCategory.MONSTER) + .sized(0.4f, 1.0f) + .build(new ResourceLocation(Amodgus.MODID,"impostor").toString())); + + public static void register(IEventBus eventBus) { + MOBS.register(eventBus); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/BlackToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/BlackToyItem.java new file mode 100644 index 0000000..0f40d5e --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/BlackToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class BlackToyItem extends Item{ + public BlackToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/BlueToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/BlueToyItem.java new file mode 100644 index 0000000..acc4047 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/BlueToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class BlueToyItem extends Item{ + public BlueToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/BrownToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/BrownToyItem.java new file mode 100644 index 0000000..ce4c488 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/BrownToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class BrownToyItem extends Item{ + public BrownToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/CyanToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/CyanToyItem.java new file mode 100644 index 0000000..9e88b18 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/CyanToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class CyanToyItem extends Item{ + public CyanToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/EggHatItem.java b/src/main/java/dev/galliard/amodgus/init/custom/EggHatItem.java new file mode 100644 index 0000000..dc6754e --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/EggHatItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class EggHatItem extends Item{ + public EggHatItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/Flask.java b/src/main/java/dev/galliard/amodgus/init/custom/Flask.java new file mode 100644 index 0000000..860c368 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/Flask.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class Flask extends Item{ + public Flask(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/GreenToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/GreenToyItem.java new file mode 100644 index 0000000..c84b810 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/GreenToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class GreenToyItem extends Item{ + public GreenToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/ImpostorKnifeItem.java b/src/main/java/dev/galliard/amodgus/init/custom/ImpostorKnifeItem.java new file mode 100644 index 0000000..29dff4e --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/ImpostorKnifeItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class ImpostorKnifeItem extends Item { + public ImpostorKnifeItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/LimeToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/LimeToyItem.java new file mode 100644 index 0000000..9fc28c6 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/LimeToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class LimeToyItem extends Item{ + public LimeToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/MagentaToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/MagentaToyItem.java new file mode 100644 index 0000000..3333a27 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/MagentaToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class MagentaToyItem extends Item{ + public MagentaToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/OrangeToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/OrangeToyItem.java new file mode 100644 index 0000000..99c6d76 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/OrangeToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class OrangeToyItem extends Item{ + public OrangeToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/PinkToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/PinkToyItem.java new file mode 100644 index 0000000..ae081c2 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/PinkToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class PinkToyItem extends Item{ + public PinkToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/PurpleToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/PurpleToyItem.java new file mode 100644 index 0000000..5091c2b --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/PurpleToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class PurpleToyItem extends Item{ + public PurpleToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/RedToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/RedToyItem.java new file mode 100644 index 0000000..6eff37e --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/RedToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class RedToyItem extends Item{ + public RedToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/WhiteToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/WhiteToyItem.java new file mode 100644 index 0000000..c8c2a6d --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/WhiteToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class WhiteToyItem extends Item{ + public WhiteToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/init/custom/YellowToyItem.java b/src/main/java/dev/galliard/amodgus/init/custom/YellowToyItem.java new file mode 100644 index 0000000..83d321f --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/init/custom/YellowToyItem.java @@ -0,0 +1,16 @@ +package dev.galliard.amodgus.init.custom; + +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; + +public class YellowToyItem extends Item{ + public YellowToyItem(Properties pProperties) { + super(pProperties); + } + + @Override + public InteractionResult useOn(UseOnContext pContext) { + return super.useOn(pContext); + } +} diff --git a/src/main/java/dev/galliard/amodgus/painting/ModPaintings.java b/src/main/java/dev/galliard/amodgus/painting/ModPaintings.java new file mode 100644 index 0000000..f18cb65 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/painting/ModPaintings.java @@ -0,0 +1,20 @@ +package dev.galliard.amodgus.painting; + +import dev.galliard.amodgus.Amodgus; +import net.minecraft.world.entity.decoration.PaintingVariant; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModPaintings { + public static final DeferredRegister PAINTING_VARIANTS = + DeferredRegister.create(ForgeRegistries.PAINTING_VARIANTS, Amodgus.MODID); + + public static final RegistryObject IMPOSTOR = PAINTING_VARIANTS.register("impostor", + () -> new PaintingVariant(64,32)); + + public static void register(IEventBus bus) { + PAINTING_VARIANTS.register(bus); + } +} diff --git a/src/main/java/dev/galliard/amodgus/sound/ModSounds.java b/src/main/java/dev/galliard/amodgus/sound/ModSounds.java new file mode 100644 index 0000000..e329594 --- /dev/null +++ b/src/main/java/dev/galliard/amodgus/sound/ModSounds.java @@ -0,0 +1,28 @@ +package dev.galliard.amodgus.sound; + +import dev.galliard.amodgus.Amodgus; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModSounds { + public static final DeferredRegister SOUND_EVENTS = + DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, Amodgus.MODID); + + public static final RegistryObject AMONGUS_DRIP = + registerSoundEvent("amongus_drip"); + + public static final RegistryObject AMONGUS_DEATH = + registerSoundEvent("amongus_death"); + + private static RegistryObject registerSoundEvent(String name){ + return SOUND_EVENTS.register(name, () -> new SoundEvent(new ResourceLocation(Amodgus.MODID, name))); + } + + public static void register(IEventBus eventBus) { + SOUND_EVENTS.register(eventBus); + } +} diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..bcc5a33 --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,37 @@ +# This is an example mods.toml file. It contains the data relating to the loading mods. +# There are several mandatory fields (#mandatory), and many more that are optional (#optional). +# The overall format is standard TOML format, v0.5.0. +# Note that there are a couple of TOML lists in this file. +# Find more information on toml format here: https://github.com/toml-lang/toml +# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +modLoader="javafml" #mandatory +# A version range to match for said mod loader - for regular FML @Mod it will be the forge version +loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. +# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. +license="GNU General Public License v3.0" +# A URL to refer people to when problems occur with this mod +#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional +# A list of mods - how many allowed here is determined by the individual mod loader +[[mods]] #mandatory +# The modid of the mod +modId="amodgus" #mandatory +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata +# see the associated build.gradle script for how to populate this completely automatically during a build +version="1.19.2-1.3.0-BETA" #mandatory + # A display name for the mod +displayName="Amodgus" #mandatory +# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ +#updateJSONURL="https://change.me.example.invalid/updates.json" #optional +# A URL for the "homepage" for this mod, displayed in the mod UI +#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="logo.png" #optional +# A text field displayed in the mod UI +authors="yoshibv" #optional +# The description text for the mod (multi line!) (#mandatory) +description=''' +This is +a sus mod! +''' diff --git a/src/main/resources/assets/amodgus/animations/amongus.animation.json b/src/main/resources/assets/amodgus/animations/amongus.animation.json new file mode 100644 index 0000000..aa1b01f --- /dev/null +++ b/src/main/resources/assets/amodgus/animations/amongus.animation.json @@ -0,0 +1,733 @@ +{ + "format_version": "1.8.0", + "animations": { + "idle": { + "loop": true, + "animation_length": 4, + "bones": { + "h_lower_body": { + "rotation": { + "0.0": [0, 0, 0], + "0.05": [-0.24375, 0, 0], + "0.1": [-0.475, 0, 0], + "0.15": [-0.69375, 0, 0], + "0.2": [-0.9, 0, 0], + "0.25": [-1.09375, 0, 0], + "0.3": [-1.275, 0, 0], + "0.35": [-1.44375, 0, 0], + "0.4": [-1.6, 0, 0], + "0.45": [-1.74375, 0, 0], + "0.5": [-1.875, 0, 0], + "0.55": [-1.99375, 0, 0], + "0.6": [-2.1, 0, 0], + "0.65": [-2.19375, 0, 0], + "0.7": [-2.275, 0, 0], + "0.75": [-2.34375, 0, 0], + "0.8": [-2.4, 0, 0], + "0.85": [-2.44375, 0, 0], + "0.9": [-2.475, 0, 0], + "0.95": [-2.49375, 0, 0], + "1.0": [-2.5, 0, 0], + "1.05": [-2.49375, 0, 0], + "1.1": [-2.475, 0, 0], + "1.15": [-2.44375, 0, 0], + "1.2": [-2.4, 0, 0], + "1.25": [-2.34375, 0, 0], + "1.3": [-2.275, 0, 0], + "1.35": [-2.19375, 0, 0], + "1.4": [-2.1, 0, 0], + "1.45": [-1.99375, 0, 0], + "1.5": [-1.875, 0, 0], + "1.55": [-1.74375, 0, 0], + "1.6": [-1.6, 0, 0], + "1.65": [-1.44375, 0, 0], + "1.7": [-1.275, 0, 0], + "1.75": [-1.09375, 0, 0], + "1.8": [-0.9, 0, 0], + "1.85": [-0.69375, 0, 0], + "1.9": [-0.475, 0, 0], + "1.95": [-0.24375, 0, 0], + "2.0": [0, 0, 0], + "2.05": [0.24375, 0, 0], + "2.1": [0.475, 0, 0], + "2.15": [0.69375, 0, 0], + "2.2": [0.9, 0, 0], + "2.25": [1.09375, 0, 0], + "2.3": [1.275, 0, 0], + "2.35": [1.44375, 0, 0], + "2.4": [1.6, 0, 0], + "2.45": [1.74375, 0, 0], + "2.5": [1.875, 0, 0], + "2.55": [1.99375, 0, 0], + "2.6": [2.1, 0, 0], + "2.65": [2.19375, 0, 0], + "2.7": [2.275, 0, 0], + "2.75": [2.34375, 0, 0], + "2.8": [2.4, 0, 0], + "2.85": [2.44375, 0, 0], + "2.9": [2.475, 0, 0], + "2.95": [2.49375, 0, 0], + "3.0": [2.5, 0, 0], + "3.05": [2.49375, 0, 0], + "3.1": [2.475, 0, 0], + "3.15": [2.44375, 0, 0], + "3.2": [2.4, 0, 0], + "3.25": [2.34375, 0, 0], + "3.3": [2.275, 0, 0], + "3.35": [2.19375, 0, 0], + "3.4": [2.1, 0, 0], + "3.45": [1.99375, 0, 0], + "3.5": [1.875, 0, 0], + "3.55": [1.74375, 0, 0], + "3.6": [1.6, 0, 0], + "3.65": [1.44375, 0, 0], + "3.7": [1.275, 0, 0], + "3.75": [1.09375, 0, 0], + "3.8": [0.9, 0, 0], + "3.85": [0.69375, 0, 0], + "3.9": [0.475, 0, 0], + "3.95": [0.24375, 0, 0], + "4.0": [0, 0, 0] + }, + "position": { + "0.0": [0, -0.1, 0], + "0.05": [0, -0.09925, 0], + "0.1": [0, -0.097, 0], + "0.15": [0, -0.09325, 0], + "0.2": [0, -0.088, 0], + "0.25": [0, -0.08125, 0], + "0.3": [0, -0.073, 0], + "0.35": [0, -0.06325, 0], + "0.4": [0, -0.052, 0], + "0.45": [0, -0.03925, 0], + "0.5": [0, -0.025, 0], + "0.55": [0, -0.00925, 0], + "0.6": [0, 0.008, 0], + "0.65": [0, 0.02675, 0], + "0.7": [0, 0.047, 0], + "0.75": [0, 0.06875, 0], + "0.8": [0, 0.092, 0], + "0.85": [0, 0.11675, 0], + "0.9": [0, 0.143, 0], + "0.95": [0, 0.17075, 0], + "1.0": [0, 0.2, 0], + "1.05": [0, 0.22925, 0], + "1.1": [0, 0.257, 0], + "1.15": [0, 0.28325, 0], + "1.2": [0, 0.308, 0], + "1.25": [0, 0.33125, 0], + "1.3": [0, 0.353, 0], + "1.35": [0, 0.37325, 0], + "1.4": [0, 0.392, 0], + "1.45": [0, 0.40925, 0], + "1.5": [0, 0.425, 0], + "1.55": [0, 0.43925, 0], + "1.6": [0, 0.452, 0], + "1.65": [0, 0.46325, 0], + "1.7": [0, 0.473, 0], + "1.75": [0, 0.48125, 0], + "1.8": [0, 0.488, 0], + "1.85": [0, 0.49325, 0], + "1.9": [0, 0.497, 0], + "1.95": [0, 0.49925, 0], + "2.0": [0, 0.5, 0], + "2.05": [0, 0.49925, 0], + "2.1": [0, 0.497, 0], + "2.15": [0, 0.49325, 0], + "2.2": [0, 0.488, 0], + "2.25": [0, 0.48125, 0], + "2.3": [0, 0.473, 0], + "2.35": [0, 0.46325, 0], + "2.4": [0, 0.452, 0], + "2.45": [0, 0.43925, 0], + "2.5": [0, 0.425, 0], + "2.55": [0, 0.40925, 0], + "2.6": [0, 0.392, 0], + "2.65": [0, 0.37325, 0], + "2.7": [0, 0.353, 0], + "2.75": [0, 0.33125, 0], + "2.8": [0, 0.308, 0], + "2.85": [0, 0.28325, 0], + "2.9": [0, 0.257, 0], + "2.95": [0, 0.22925, 0], + "3.0": [0, 0.2, 0], + "3.05": [0, 0.17075, 0], + "3.1": [0, 0.143, 0], + "3.15": [0, 0.11675, 0], + "3.2": [0, 0.092, 0], + "3.25": [0, 0.06875, 0], + "3.3": [0, 0.047, 0], + "3.35": [0, 0.02675, 0], + "3.4": [0, 0.008, 0], + "3.45": [0, -0.00925, 0], + "3.5": [0, -0.025, 0], + "3.55": [0, -0.03925, 0], + "3.6": [0, -0.052, 0], + "3.65": [0, -0.06325, 0], + "3.7": [0, -0.073, 0], + "3.75": [0, -0.08125, 0], + "3.8": [0, -0.088, 0], + "3.85": [0, -0.09325, 0], + "3.9": [0, -0.097, 0], + "3.95": [0, -0.09925, 0], + "4.0": [0, -0.1, 0] + } + }, + "upper_body": { + "rotation": [0, 0, 0] + }, + "right_leg": { + "position": [0, 0, 0] + } + } + }, + "spawn": { + "animation_length": 3.7, + "bones": { + "crewmate": { + "rotation": { + "0.0": [0, -2160, 0], + "0.05": [0, -1886.08267, 0], + "0.1": [0, -1639.08267, 0], + "0.15": [0, -1417.176, 0], + "0.2": [0, -1218.60267, 0], + "0.25": [0, -1041.66667, 0], + "0.3": [0, -884.736, 0], + "0.35": [0, -746.24267, 0], + "0.4": [0, -624.68267, 0], + "0.45": [0, -518.616, 0], + "0.5": [0, -426.66667, 0], + "0.55": [0, -347.52267, 0], + "0.6": [0, -279.936, 0], + "0.65": [0, -222.72267, 0], + "0.7": [0, -174.76267, 0], + "0.75": [0, -135, 0], + "0.8": [0, -102.44267, 0], + "0.85": [0, -76.16267, 0], + "0.9": [0, -55.296, 0], + "0.95": [0, -39.04267, 0], + "1.0": [0, -26.66667, 0], + "1.05": [0, -17.496, 0], + "1.1": [0, -10.92267, 0], + "1.15": [0, -6.40267, 0], + "1.2": [0, -3.456, 0], + "1.25": [0, -1.66667, 0], + "1.3": [0, -0.68267, 0], + "1.35": [0, -0.216, 0], + "1.4": [0, -0.04267, 0], + "1.45": [0, -0.00267, 0], + "1.5": [0, 0, 0] + }, + "position": { + "0.0": [0, -19, 0], + "0.05": [0, -16.59054, 0], + "0.1": [0, -14.41786, 0], + "0.15": [0, -12.4659, 0], + "0.2": [0, -10.71919, 0], + "0.25": [0, -9.16281, 0], + "0.3": [0, -7.7824, 0], + "0.35": [0, -6.56417, 0], + "0.4": [0, -5.49489, 0], + "0.45": [0, -4.5619, 0], + "0.5": [0, -3.75309, 0], + "0.55": [0, -3.05691, 0], + "0.6": [0, -2.4624, 0], + "0.65": [0, -1.95913, 0], + "0.7": [0, -1.53726, 0], + "0.75": [0, -1.1875, 0], + "0.8": [0, -0.90112, 0], + "0.85": [0, -0.66995, 0], + "0.9": [0, -0.4864, 0], + "0.95": [0, -0.34343, 0], + "1.0": [0, -0.23457, 0], + "1.05": [0, -0.1539, 0], + "1.1": [0, -0.09608, 0], + "1.15": [0, -0.05632, 0], + "1.2": [0, -0.0304, 0], + "1.25": [0, -0.01466, 0], + "1.3": [0, -0.006, 0], + "1.35": [0, -0.0019, 0], + "1.4": [0, -0.00038, 0], + "1.45": [0, -0.00002, 0], + "1.5": [0, 0, 0] + } + }, + "h_lower_body": { + "rotation": { + "0.0": [0, 0, 0], + "0.8": [-12.5, 7.5, 20], + "0.85": [-12.49202, 7.49999, 19.98664], + "0.9": [-12.43612, 7.4999, 19.89315], + "0.95": [-12.28441, 7.49965, 19.63939], + "1.0": [-11.98896, 7.49916, 19.14523], + "1.05": [-11.50188, 7.49837, 18.33053], + "1.1": [-10.77525, 7.49718, 17.11516], + "1.15": [-9.76116, 7.49552, 15.41897], + "1.2": [-8.41171, 7.49331, 13.16185], + "1.25": [-6.67898, 7.49048, 10.26365], + "1.3": [-4.51506, 7.48694, 6.64424], + "1.35": [-1.87204, 7.48261, 2.22349], + "1.4": [1.29798, 7.47742, -3.07875], + "1.45": [5.04292, 7.4713, -9.3426], + "1.5": [3.94838, 5.8505, -7.31613], + "1.55": [3.28447, 4.8674, -6.08696], + "1.6": [2.94355, 4.36256, -5.45577], + "1.65": [2.81794, 4.17657, -5.22322], + "1.7": [2.8, 4.15, -5.19], + "1.75": [2.84577, 4.21778, -5.27475], + "1.8": [2.9831, 4.42113, -5.52899], + "1.85": [3.21197, 4.76003, -5.95272], + "1.9": [3.53238, 5.23451, -6.54595], + "1.95": [3.94435, 5.84454, -7.30867], + "2.0": [4.44786, 6.59014, -8.24089], + "2.05": [5.04292, 7.4713, -9.3426], + "2.55": [5.04292, 7.4713, -9.3426], + "2.6": [-1.60207, -2.37353, 2.96802], + "2.65": [-0.06284, -0.0931, 0.11642], + "2.7": [0.38327, 0.56783, -0.71005], + "2.75": [-0.23005, -0.34083, 0.4262], + "2.8": [0.06403, 0.09486, -0.11862], + "2.85": [0.00862, 0.01277, -0.01597], + "2.9": [-0.0192, -0.02844, 0.03557], + "2.95": [0.01035, 0.01534, -0.01918], + "3.0": [-0.00246, -0.00365, 0.00456] + }, + "position": { + "0.8": [0, 0, 0], + "1.5": [0, 0, -1], + "2.4": [0, 0, -1], + "2.45": [0, 0, -0.42188], + "2.5": [0, 0, -0.125], + "2.55": [0, 0, -0.01563], + "2.6": [0, 0, 0] + } + }, + "right_leg": { + "rotation": { + "0.0": [-30, 0, 0], + "1.25": [-29.62165, 4.98093, 9.3426], + "1.3": [-29.01713, 4.87927, 9.15193], + "1.35": [-27.20356, 4.57432, 8.57994], + "1.4": [-24.18094, 4.06606, 7.62661], + "1.45": [-19.94928, 3.3545, 6.29196], + "1.5": [-14.50856, 2.43964, 4.57597], + "1.55": [-7.85881, 1.32147, 2.47865], + "1.6": [0, 0, 0], + "2.4": [0, 0, 0], + "2.55": [-5, 0, 0], + "2.8": [0, 0, 0] + }, + "position": { + "0.0": [0, 1, -2], + "1.25": [0, 1, -2], + "1.3": [0, 0.97959, -2], + "1.35": [0, 0.91837, -2], + "1.4": [0, 0.81633, -2], + "1.45": [0, 0.67347, -2], + "1.5": [0, 0.4898, -2], + "1.55": [0, 0.26531, -2], + "1.6": [0, 0, -2], + "2.4": [0, 0, -2], + "2.55": [0, 1, -2], + "2.8": [0, 0, 0] + } + }, + "right_hand": { + "rotation": { + "0.0": [-5.17544, 14.94159, 31.1622], + "0.75": [6.51309, 14.4189, 75.16442], + "1.2": [6.51309, 14.4189, 75.16442], + "1.25": [6.48911, 13.67609, 76.01153], + "1.3": [6.41719, 11.44766, 78.55287], + "1.35": [6.29732, 7.73363, 82.78843], + "1.4": [6.1295, 2.53397, 88.71822], + "1.45": [5.91374, -4.15129, 96.34223], + "1.5": [5.69797, -10.83656, 103.96624], + "1.55": [5.53016, -16.03622, 109.89603], + "1.6": [5.41029, -19.75025, 114.13159], + "1.65": [5.33836, -21.97868, 116.67293], + "1.7": [5.31439, -22.72148, 117.52004], + "2.05": [5.69797, -10.83656, 103.96624], + "2.1": [5.68585, -11.20792, 104.3898], + "2.15": [5.64948, -12.32199, 105.66046], + "2.2": [5.58886, -14.17878, 107.77824], + "2.25": [5.50399, -16.77828, 110.74312], + "2.3": [5.41912, -19.37778, 113.70801], + "2.35": [5.3585, -21.23457, 115.82578], + "2.4": [5.32212, -22.34864, 117.09645], + "2.45": [5.31, -22.72, 117.52], + "2.5": [2.655, -22.72, 83.76], + "2.55": [0, -22.72, 50], + "2.6": [0, -17.67111, 38.88889], + "2.65": [0, -5.04889, 11.11111], + "2.7": [0, 0, 0] + }, + "position": { + "0.0": [-8, 0, 0], + "0.75": [-9.85664, -0.2558, 0.69817], + "1.2": [-9.85664, -0.2558, 0.69817], + "1.25": [-9.79249, -0.15619, 0.70084], + "1.3": [-9.60001, 0.14262, 0.70887], + "1.35": [-9.27921, 0.64064, 0.72224], + "1.4": [-8.8301, 1.33788, 0.74096], + "1.45": [-8.25267, 2.23432, 0.76504], + "1.5": [-7.67524, 3.13076, 0.78911], + "1.55": [-7.22612, 3.82799, 0.80783], + "1.6": [-6.90533, 4.32601, 0.82121], + "1.65": [-6.71285, 4.62482, 0.82923], + "1.7": [-6.64869, 4.72443, 0.83191], + "2.05": [-7.67524, 3.13076, 0.78911], + "2.1": [-7.6432, 3.18042, 0.79039], + "2.15": [-7.54708, 3.32941, 0.79422], + "2.2": [-7.38689, 3.57773, 0.80061], + "2.25": [-7.16262, 3.92538, 0.80955], + "2.3": [-6.93835, 4.27302, 0.8185], + "2.35": [-6.77815, 4.52134, 0.82489], + "2.4": [-6.68204, 4.67034, 0.82872], + "2.45": [-6.65, 4.72, 0.83], + "2.5": [-6.65, 2.72, 0.83], + "2.55": [-6.65, 0.72, 0.83], + "2.6": [-5.17222, 0.56, 0.64556], + "2.65": [-1.47778, 0.16, 0.18444], + "2.7": [0, 0, 0] + } + }, + "left_hand": { + "rotation": { + "0.0": [-5.17544, -14.94159, -31.1622], + "0.75": [6.51309, -14.4189, -75.16442], + "1.2": [6.51309, -14.4189, -75.16442], + "1.25": [6.48911, -13.67609, -76.01153], + "1.3": [6.41719, -11.44766, -78.55287], + "1.35": [6.29732, -7.73363, -82.78843], + "1.4": [6.1295, -2.53397, -88.71822], + "1.45": [5.91374, 4.15129, -96.34223], + "1.5": [5.69797, 10.83656, -103.96624], + "1.55": [5.53016, 16.03622, -109.89603], + "1.6": [5.41029, 19.75025, -114.13159], + "1.65": [5.33836, 21.97868, -116.67293], + "1.7": [5.31439, 22.72148, -117.52004], + "2.05": [5.69797, 10.83656, -103.96624], + "2.1": [5.68585, 11.20792, -104.3898], + "2.15": [5.64948, 12.32199, -105.66046], + "2.2": [5.58886, 14.17878, -107.77824], + "2.25": [5.50399, 16.77828, -110.74312], + "2.3": [5.41912, 19.37778, -113.70801], + "2.35": [5.3585, 21.23457, -115.82578], + "2.4": [5.32212, 22.34864, -117.09645], + "2.45": [5.31, 22.72, -117.52], + "2.5": [2.655, 22.72, -83.76], + "2.55": [0, 22.72, -50], + "2.6": [0, 17.67111, -38.88889], + "2.65": [0, 5.04889, -11.11111], + "2.7": [0, 0, 0] + }, + "position": { + "0.0": [8, 0, 0], + "0.75": [9.85664, -0.2558, 0.69817], + "1.2": [9.85664, -0.2558, 0.69817], + "1.25": [9.79249, -0.15619, 0.70084], + "1.3": [9.60001, 0.14262, 0.70887], + "1.35": [9.27921, 0.64064, 0.72224], + "1.4": [8.8301, 1.33788, 0.74096], + "1.45": [8.25267, 2.23432, 0.76504], + "1.5": [7.67524, 3.13076, 0.78911], + "1.55": [7.22612, 3.82799, 0.80783], + "1.6": [6.90533, 4.32601, 0.82121], + "1.65": [6.71285, 4.62482, 0.82923], + "1.7": [6.64869, 4.72443, 0.83191], + "2.05": [7.67524, 3.13076, 0.78911], + "2.1": [7.6432, 3.18042, 0.79039], + "2.15": [7.54708, 3.32941, 0.79422], + "2.2": [7.38689, 3.57773, 0.80061], + "2.25": [7.16262, 3.92538, 0.80955], + "2.3": [6.93835, 4.27302, 0.8185], + "2.35": [6.77815, 4.52134, 0.82489], + "2.4": [6.68204, 4.67034, 0.82872], + "2.45": [6.65, 4.72, 0.83], + "2.5": [6.65, 2.72, 0.83], + "2.55": [6.65, 0.72, 0.83], + "2.6": [5.17222, 0.56, 0.64556], + "2.65": [1.47778, 0.16, 0.18444], + "2.7": [0, 0, 0] + } + }, + "hands": { + "rotation": { + "0.0": [0, 0, 0], + "1.2": [0, 0, 0], + "1.7": [-37.5, 0, 7.5], + "1.95": [-22.5, 0, 7.5], + "2.25": [-22.19157, -3.81024, -1.75249], + "2.7": [0, 0, 0] + } + } + } + }, + "death": { + "animation_length": 1.3, + "bones": { + "crewmate": { + "rotation": { + "0.0": [0, 0, 0], + "0.05": [0.9, 0, 0], + "0.1": [3.6, 0, 0], + "0.15": [8.1, 0, 0], + "0.2": [14.4, 0, 0], + "0.25": [22.5, 0, 0], + "0.3": [32.4, 0, 0], + "0.35": [44.1, 0, 0], + "0.4": [57.6, 0, 0], + "0.45": [72.9, 0, 0], + "0.5": [90, 0, 0] + }, + "position": { + "0.0": [0, 0, 0], + "0.05": [0, 0.02, -0.025], + "0.1": [0, 0.08, -0.1], + "0.15": [0, 0.18, -0.225], + "0.2": [0, 0.32, -0.4], + "0.25": [0, 0.5, -0.625], + "0.3": [0, 0.72, -0.9], + "0.35": [0, 0.98, -1.225], + "0.4": [0, 1.28, -1.6], + "0.45": [0, 1.62, -2.025], + "0.5": [0, 2, -2.5] + } + }, + "h_lower_body": { + "rotation": { + "0.1": [0, 0, 0], + "0.5": [-90, 0, 0], + "0.55": [-87.34131, 0, 0], + "0.6": [-79.36523, 0, 0], + "0.65": [-66.07178, 0, 0], + "0.7": [-47.46094, 0, 0], + "0.75": [-23.53271, 0, 0], + "0.8": [-2.72461, 0, 0], + "0.85": [-14.56787, 0, 0], + "0.9": [-21.09375, 0, 0], + "0.95": [-22.30225, 0, 0], + "1.0": [-18.19336, 0, 0], + "1.05": [-8.76709, 0, 0], + "1.1": [-2.46094, 0, 0], + "1.15": [-5.60303, 0, 0], + "1.2": [-3.42773, 0, 0], + "1.25": [-1.2085, 0, 0], + "1.3": [0, 0, 0] + }, + "position": { + "0.1": [0, 0, 0], + "0.5": [0, 0, 0], + "0.55": [0, 0, 0], + "0.6": [0, 0, 0], + "0.65": [0, 0, 0], + "0.7": [0, 0, 0], + "0.75": [0, 0, 0], + "0.8": [0, 0, 0], + "0.85": [0, 0, 0], + "0.9": [0, 0, 0], + "0.95": [0, 0, 0], + "1.0": [0, 0, 0], + "1.05": [0, 0, 0], + "1.1": [0, 0, 0], + "1.15": [0, 0, 0], + "1.2": [0, 0, 0], + "1.25": [0, 0, 0], + "1.3": [0, 0, 0] + } + }, + "upper_body": { + "scale": { + "0.0": [1, 1, 1], + "0.05": [0, 0, 0] + } + } + } + }, + "walk": { + "loop": true, + "animation_length": 0.8, + "bones": { + "crewmate": { + "position": { + "0.0": [0, 0, 0], + "0.05": [0, 1.32288, 0], + "0.1": [0, 1.73205, 0], + "0.15": [0, 1.93649, 0], + "0.2": [0, 2, 0], + "0.25": [0, 1.93649, 0], + "0.3": [0, 1.73205, 0], + "0.35": [0, 1.32288, 0], + "0.4": [0, 0, 0], + "0.45": [0, 1.32288, 0], + "0.5": [0, 1.73205, 0], + "0.55": [0, 1.93649, 0], + "0.6": [0, 2, 0], + "0.65": [0, 1.93649, 0], + "0.7": [0, 1.73205, 0], + "0.75": [0, 1.32288, 0], + "0.8": [0, 0, 0] + } + }, + "backpack": { + "rotation": { + "0.0": [0, 0, 0], + "0.05": [-3.75, 0, 0], + "0.1": [-5, 0, 0], + "0.15": [-3.75, 0, 0], + "0.2": [0, 0, 0], + "0.25": [3.75, 0, 0], + "0.3": [5, 0, 0], + "0.35": [3.75, 0, 0], + "0.4": [0, 0, 0], + "0.45": [-3.75, 0, 0], + "0.5": [-5, 0, 0], + "0.55": [-3.75, 0, 0], + "0.6": [0, 0, 0], + "0.65": [3.75, 0, 0], + "0.7": [5, 0, 0], + "0.75": [3.75, 0, 0], + "0.8": [0, 0, 0] + }, + "position": { + "0.0": [0, 0.5, 0], + "0.05": [0, 0.125, 0], + "0.1": [0, 0, 0], + "0.15": [0, 0.125, 0], + "0.2": [0, 0.5, 0], + "0.25": [0, 0.875, 0], + "0.3": [0, 1, 0], + "0.35": [0, 0.875, 0], + "0.4": [0, 0.5, 0], + "0.45": [0, 0.125, 0], + "0.5": [0, 0, 0], + "0.55": [0, 0.125, 0], + "0.6": [0, 0.5, 0], + "0.65": [0, 0.875, 0], + "0.7": [0, 1, 0], + "0.75": [0, 0.875, 0], + "0.8": [0, 0.5, 0] + } + }, + "right_leg": { + "rotation": { + "0.0": [44.91211, 0, 0], + "0.05": [-7.19661, 0, 0], + "0.1": [-29.10563, 0, 0], + "0.15": [-38.31724, 0, 0], + "0.2": [-42.19025, 0, 0], + "0.25": [-43.81864, 0, 0], + "0.3": [-44.5033, 0, 0], + "0.35": [-44.79116, 0, 0], + "0.4": [-45, 0, 0], + "0.45": [7.15966, 0, 0], + "0.5": [29.0901, 0, 0], + "0.55": [38.31071, 0, 0], + "0.6": [42.1875, 0, 0], + "0.65": [43.81749, 0, 0], + "0.7": [44.50282, 0, 0], + "0.75": [44.79096, 0, 0], + "0.8": [44.91211, 0, 0] + }, + "position": { + "0.0": [0, 0, 1.99609], + "0.05": [0, 0, -0.31985], + "0.1": [0, 0, -1.29358], + "0.15": [0, 0, -1.70299], + "0.2": [0, 0, -1.87512], + "0.25": [0, 0, -1.9475], + "0.3": [0, 0, -1.97792], + "0.35": [0, 0, -1.99072], + "0.4": [0, 0, -2], + "0.45": [0, 0, 0.31821], + "0.5": [0, 0, 1.29289], + "0.55": [0, 0, 1.7027], + "0.6": [0, 0, 1.875], + "0.65": [0, 0, 1.94744], + "0.7": [0, 0, 1.9779], + "0.75": [0, 0, 1.99071], + "0.8": [0, 0, 1.99609] + } + }, + "left_leg": { + "rotation": { + "0.0": [-45, 0, 0], + "0.05": [7.15966, 0, 0], + "0.1": [29.0901, 0, 0], + "0.15": [38.31071, 0, 0], + "0.2": [42.1875, 0, 0], + "0.25": [43.81749, 0, 0], + "0.3": [44.50282, 0, 0], + "0.35": [44.79096, 0, 0], + "0.4": [44.91211, 0, 0], + "0.45": [-7.19661, 0, 0], + "0.5": [-29.10563, 0, 0], + "0.55": [-38.31724, 0, 0], + "0.6": [-42.19025, 0, 0], + "0.65": [-43.81864, 0, 0], + "0.7": [-44.5033, 0, 0], + "0.75": [-44.79116, 0, 0], + "0.8": [-45, 0, 0] + }, + "position": { + "0.0": [0, 0, -2], + "0.05": [0, 0, 0.31821], + "0.1": [0, 0, 1.29289], + "0.15": [0, 0, 1.7027], + "0.2": [0, 0, 1.875], + "0.25": [0, 0, 1.94744], + "0.3": [0, 0, 1.9779], + "0.35": [0, 0, 1.99071], + "0.4": [0, 0, 1.99609], + "0.45": [0, 0, -0.31985], + "0.5": [0, 0, -1.29358], + "0.55": [0, 0, -1.70299], + "0.6": [0, 0, -1.87512], + "0.65": [0, 0, -1.9475], + "0.7": [0, 0, -1.97792], + "0.75": [0, 0, -1.99072], + "0.8": [0, 0, -2] + } + } + } + }, + "sitting": { + "loop": "hold_on_last_frame", + "animation_length": 1.91667, + "bones": { + "crewmate": { + "rotation": { + "0.0": [0, 0, 0], + "0.0833": [0, 0, 0] + }, + "position": { + "0.0": [0, 0, 0], + "0.0833": [0, -4, 0] + } + }, + "right_leg": { + "rotation": { + "0.0": [0, 0, 0], + "0.0833": [-90, 15, 0] + }, + "position": { + "0.0": [0, 0, 0], + "0.0833": [0, -1, 0] + } + }, + "left_leg": { + "rotation": { + "0.0": [0, 0, 0], + "0.0833": [-90, -15, 0] + }, + "position": { + "0.0": [0, 0, 0], + "0.0833": [0, -1, 0] + } + } + } + } + }, + "geckolib_format_version": 2 +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/geo/amongus.geo.json b/src/main/resources/assets/amodgus/geo/amongus.geo.json new file mode 100644 index 0000000..3b8adb3 --- /dev/null +++ b/src/main/resources/assets/amodgus/geo/amongus.geo.json @@ -0,0 +1,298 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 64, + "texture_height": 64, + "visible_bounds_width": 2, + "visible_bounds_height": 2.5, + "visible_bounds_offset": [0, 0.75, 0] + }, + "bones": [ + { + "name": "crewmate", + "pivot": [0, 0, -1] + }, + { + "name": "h_lower_body", + "parent": "crewmate", + "pivot": [0, 5.5, -0.5], + "cubes": [ + { + "origin": [-5, 4, -4], + "size": [10, 7, 7], + "uv": { + "north": {"uv": [0, 0], "uv_size": [10, 7]}, + "east": {"uv": [9, 24], "uv_size": [7, 7]}, + "south": {"uv": [0, 8], "uv_size": [10, 7]}, + "west": {"uv": [17, 25], "uv_size": [7, 7]}, + "up": {"uv": [11, 0], "uv_size": [10, 7]}, + "down": {"uv": [11, 15], "uv_size": [10, -7]} + } + }, + { + "origin": [5.3, 11.3, 3.3], + "size": [-10.6, -7.6, -7.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [49, 2], "uv_size": [0, 0]} + } + }, + { + "origin": [-3, 11, -0.5], + "size": [6, 5, 0], + "uv": { + "north": {"uv": [9, 32], "uv_size": [6, 5]}, + "south": {"uv": [15, 32], "uv_size": [-6, 5]} + } + } + ] + }, + { + "name": "upper_body", + "parent": "h_lower_body", + "pivot": [0, 13.9, -0.5], + "cubes": [ + { + "origin": [-5, 11, -4], + "size": [10, 7, 7], + "uv": { + "north": {"uv": [0, 16], "uv_size": [10, 7]}, + "east": {"uv": [25, 25], "uv_size": [7, 7]}, + "south": {"uv": [11, 16], "uv_size": [10, 7]}, + "west": {"uv": [31, 16], "uv_size": [7, 7]}, + "up": {"uv": [22, 0], "uv_size": [10, 7]}, + "down": {"uv": [22, 15], "uv_size": [10, -7]} + } + }, + { + "origin": [5.3, 18.3, 3.3], + "size": [-10.6, -7.6, -7.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [49, 2], "uv_size": [0, 0]}, + "down": {"uv": [43, 2], "uv_size": [0, 0]} + } + }, + { + "origin": [-4, 11.5, -5], + "size": [8, 4, 1], + "uv": { + "north": {"uv": [0, 33], "uv_size": [8, 4]}, + "east": {"uv": [31, 38], "uv_size": [1, 4]}, + "west": {"uv": [33, 38], "uv_size": [1, 4]}, + "up": {"uv": [33, 13], "uv_size": [8, 1]}, + "down": {"uv": [37, 7], "uv_size": [8, -1]} + } + }, + { + "origin": [-4.3, 11.2, -4.05], + "size": [8.6, 4.6, -0.001], + "uv": { + "north": {"uv": [46, 2], "uv_size": [0, 0]} + } + }, + { + "origin": [4.3, 15.8, -3.7], + "size": [-8.6, -4.6, -1.6], + "uv": { + "north": {"uv": [46, 2], "uv_size": [0, 0]}, + "east": {"uv": [46, 2], "uv_size": [0, 0]}, + "south": {"uv": [46, 2], "uv_size": [0, 0]}, + "west": {"uv": [46, 2], "uv_size": [0, 0]}, + "up": {"uv": [46, 2], "uv_size": [0, 0]}, + "down": {"uv": [46, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "backpack", + "parent": "h_lower_body", + "pivot": [0, 9.5, 2.5], + "cubes": [ + { + "origin": [-4, 5.5, 3], + "size": [8, 8, 3], + "uv": { + "north": {"uv": [22, 16], "uv_size": [8, 8]}, + "east": {"uv": [33, 0], "uv_size": [3, 8]}, + "south": {"uv": [0, 24], "uv_size": [8, 8]}, + "west": {"uv": [16, 33], "uv_size": [3, 8]}, + "up": {"uv": [33, 9], "uv_size": [8, 3]}, + "down": {"uv": [20, 36], "uv_size": [8, -3]} + } + }, + { + "origin": [4.3, 13.8, 6.3], + "size": [-8.6, -8.6, -3.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [43, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "hands", + "parent": "h_lower_body", + "pivot": [0, 5.5, -0.5] + }, + { + "name": "left_hand", + "parent": "hands", + "pivot": [2, 9.5, -1.5], + "cubes": [ + { + "origin": [2, 5.5, -3.5], + "size": [2, 4, 5], + "uv": { + "north": {"uv": [15, 38], "uv_size": [-2, 4]}, + "east": {"uv": [34, 33], "uv_size": [-5, 4]}, + "south": {"uv": [30, 38], "uv_size": [-2, 4]}, + "west": {"uv": [38, 24], "uv_size": [-5, 4]}, + "up": {"uv": [27, 37], "uv_size": [-2, 5]}, + "down": {"uv": [12, 43], "uv_size": [-2, -5]} + } + }, + { + "origin": [4.3, 9.8, 1.8], + "size": [-2.6, -4.6, -5.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [43, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "right_hand", + "parent": "hands", + "pivot": [2, 9.5, -1.5], + "cubes": [ + { + "origin": [-4, 5.5, -3.5], + "size": [2, 4, 5], + "uv": { + "north": {"uv": [13, 38], "uv_size": [2, 4]}, + "east": {"uv": [33, 24], "uv_size": [5, 4]}, + "south": {"uv": [28, 38], "uv_size": [2, 4]}, + "west": {"uv": [29, 33], "uv_size": [5, 4]}, + "up": {"uv": [25, 37], "uv_size": [2, 5]}, + "down": {"uv": [10, 43], "uv_size": [2, -5]} + } + }, + { + "origin": [2.3, 9.8, 1.8], + "size": [-2.6, -4.6, -5.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [43, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "right_leg", + "parent": "crewmate", + "pivot": [-3, 4.5, -1], + "cubes": [ + { + "origin": [-5, 0, -3], + "size": [4, 5, 4], + "inflate": -0.025, + "uv": { + "north": {"uv": [35, 29], "uv_size": [4, 5]}, + "east": {"uv": [35, 35], "uv_size": [4, 5]}, + "south": {"uv": [37, 0], "uv_size": [4, 5]}, + "west": {"uv": [20, 37], "uv_size": [4, 5]}, + "up": {"uv": [0, 38], "uv_size": [4, 4]}, + "down": {"uv": [5, 42], "uv_size": [4, -4]} + } + }, + { + "origin": [-0.7, 5.3, 1.3], + "size": [-4.6, -5.6, -4.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [49, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "left_leg", + "parent": "crewmate", + "pivot": [3, 4.5, -1], + "cubes": [ + { + "origin": [1, 0, -3], + "size": [4, 5, 4], + "inflate": -0.025, + "uv": { + "north": {"uv": [39, 29], "uv_size": [-4, 5]}, + "east": {"uv": [24, 37], "uv_size": [-4, 5]}, + "south": {"uv": [41, 0], "uv_size": [-4, 5]}, + "west": {"uv": [39, 35], "uv_size": [-4, 5]}, + "up": {"uv": [4, 38], "uv_size": [-4, 4]}, + "down": {"uv": [9, 42], "uv_size": [-4, -4]} + } + }, + { + "origin": [5.3, 5.3, 1.3], + "size": [-4.6, -5.6, -4.6], + "uv": { + "north": {"uv": [43, 2], "uv_size": [0, 0]}, + "east": {"uv": [43, 2], "uv_size": [0, 0]}, + "south": {"uv": [43, 2], "uv_size": [0, 0]}, + "west": {"uv": [43, 2], "uv_size": [0, 0]}, + "up": {"uv": [43, 2], "uv_size": [0, 0]}, + "down": {"uv": [49, 2], "uv_size": [0, 0]} + } + } + ] + }, + { + "name": "hitbox", + "pivot": [0, 13, -3], + "cubes": [ + { + "origin": [-5.5, 0, -5.5], + "size": [11, 18, 11], + "uv": {} + } + ] + }, + { + "name": "tag_nametag", + "pivot": [0, 23, -1] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/lang/en_us.json b/src/main/resources/assets/amodgus/lang/en_us.json new file mode 100644 index 0000000..ec93895 --- /dev/null +++ b/src/main/resources/assets/amodgus/lang/en_us.json @@ -0,0 +1,25 @@ +{ + "itemGroup.Amodgus": "Amodgus", + "item.amodgus.knife": "§eImpostor Knife", + "item.amodgus.flask": "§aFlask", + "item.amodgus.egghat": "Egg Hat", + "item.amodgus.amongus_spawn_egg": "Amongus Spawn Egg", + "item.amodgus.impostor_spawn_egg": "Impostor Spawn Egg", + "item.amodgus.red_toy": "Red Toy", + "item.amodgus.black_toy": "Black Toy", + "item.amodgus.white_toy": "White Toy", + "item.amodgus.green_toy": "Green Toy", + "item.amodgus.lime_toy": "Lime Toy", + "item.amodgus.yellow_toy": "Yellow Toy", + "item.amodgus.orange_toy": "Orange Toy", + "item.amodgus.pink_toy": "Pink Toy", + "item.amodgus.magenta_toy": "Magenta Toy", + "item.amodgus.purple_toy": "Purple Toy", + "item.amodgus.blue_toy": "Blue Toy", + "item.amodgus.cyan_toy": "Cyan Toy", + "item.amodgus.brown_toy": "Brown Toy", + "entity.amodgus.amongus": "Amongus", + "entity.amodgus.impostor": "Amongus", + "item.amodgus.music_disc_amongus_drip": "§bMusic Disc", + "item.amodgus.music_disc_amongus_drip.desc": "Leonz - Amongus Drip" +} diff --git a/src/main/resources/assets/amodgus/lang/es_es.json b/src/main/resources/assets/amodgus/lang/es_es.json new file mode 100644 index 0000000..6ed7e57 --- /dev/null +++ b/src/main/resources/assets/amodgus/lang/es_es.json @@ -0,0 +1,27 @@ +{ + "itemGroup.Amodgus": "Amodgus", + "item.amodgus.knife": "§eCuchillo de Impostor", + "item.amodgus.flask": "§aFrasco", + "item.amodgus.egghat": "Sombrero de Huevo", + "item.amodgus.amongus_spawn_egg": "Generar Amongus", + "item.amodgus.impostor_spawn_egg": "Generar Impostor", + "item.amodgus.red_toy": "Juguete Rojo", + "item.amodgus.black_toy": "Juguete Negro", + "item.amodgus.white_toy": "Juguete Blanco", + "item.amodgus.green_toy": "Juguete Verde", + "item.amodgus.lime_toy": "Juguete Lima", + "item.amodgus.yellow_toy": "Juguete Amarillo", + "item.amodgus.orange_toy": "Juguete Naranja", + "item.amodgus.pink_toy": "Juguete Rosa", + "item.amodgus.magenta_toy": "Juguete Magenta", + "item.amodgus.purple_toy": "Juguete Morado", + "item.amodgus.blue_toy": "Juguete Azul", + "item.amodgus.cyan_toy": "Juguete Cyan", + "item.amodgus.brown_toy": "Juguete Marrón", + "entity.amodgus.amongus": "Amongus", + "entity.amodgus.impostor": "Amongus", + "item.amodgus.music_disc_amongus_drip": "§bDisco de música", + "item.amodgus.music_disc_amongus_drip.desc": "Leonz - Amongus Drip", + "advancements.amodgus.title": "§dUn tipo sospechoso...", + "advancements.amodgus.description": "§eDomestica un Amongus" +} diff --git a/src/main/resources/assets/amodgus/models/item/amongus_spawn_egg.json b/src/main/resources/assets/amodgus/models/item/amongus_spawn_egg.json new file mode 100644 index 0000000..22252ec --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/amongus_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/black_toy.json b/src/main/resources/assets/amodgus/models/item/black_toy.json new file mode 100644 index 0000000..b02035a --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/black_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/black_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/blue_toy.json b/src/main/resources/assets/amodgus/models/item/blue_toy.json new file mode 100644 index 0000000..66e0ce6 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/blue_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/blue_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/brown_toy.json b/src/main/resources/assets/amodgus/models/item/brown_toy.json new file mode 100644 index 0000000..2f0aacd --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/brown_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/brown_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/cyan_toy.json b/src/main/resources/assets/amodgus/models/item/cyan_toy.json new file mode 100644 index 0000000..d6f1c41 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/cyan_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/cyan_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/egghat.json b/src/main/resources/assets/amodgus/models/item/egghat.json new file mode 100644 index 0000000..3236bbd --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/egghat.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/egghat" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/flask.json b/src/main/resources/assets/amodgus/models/item/flask.json new file mode 100644 index 0000000..bf000e0 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/flask.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/flask" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/green_toy.json b/src/main/resources/assets/amodgus/models/item/green_toy.json new file mode 100644 index 0000000..38f7697 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/green_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/green_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/impostor_spawn_egg.json b/src/main/resources/assets/amodgus/models/item/impostor_spawn_egg.json new file mode 100644 index 0000000..22252ec --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/impostor_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/knife.json b/src/main/resources/assets/amodgus/models/item/knife.json new file mode 100644 index 0000000..ee8f1a6 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/knife.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "amodgus:items/knife" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/lime_toy.json b/src/main/resources/assets/amodgus/models/item/lime_toy.json new file mode 100644 index 0000000..14e6c21 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/lime_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/lime_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/magenta_toy.json b/src/main/resources/assets/amodgus/models/item/magenta_toy.json new file mode 100644 index 0000000..52a8178 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/magenta_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/magenta_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/music_disc_amongus_drip.json b/src/main/resources/assets/amodgus/models/item/music_disc_amongus_drip.json new file mode 100644 index 0000000..150af25 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/music_disc_amongus_drip.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/music_disc_amongus_drip" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/orange_toy.json b/src/main/resources/assets/amodgus/models/item/orange_toy.json new file mode 100644 index 0000000..a8c36bc --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/orange_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/orange_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/pink_toy.json b/src/main/resources/assets/amodgus/models/item/pink_toy.json new file mode 100644 index 0000000..8e79c65 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/pink_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/pink_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/purple_toy.json b/src/main/resources/assets/amodgus/models/item/purple_toy.json new file mode 100644 index 0000000..8b073c6 --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/purple_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/purple_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/red_toy.json b/src/main/resources/assets/amodgus/models/item/red_toy.json new file mode 100644 index 0000000..d5af78c --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/red_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/red_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/white_toy.json b/src/main/resources/assets/amodgus/models/item/white_toy.json new file mode 100644 index 0000000..2aa478a --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/white_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/white_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/models/item/yellow_toy.json b/src/main/resources/assets/amodgus/models/item/yellow_toy.json new file mode 100644 index 0000000..d983cfa --- /dev/null +++ b/src/main/resources/assets/amodgus/models/item/yellow_toy.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "amodgus:items/yellow_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/sounds.json b/src/main/resources/assets/amodgus/sounds.json new file mode 100644 index 0000000..7540d49 --- /dev/null +++ b/src/main/resources/assets/amodgus/sounds.json @@ -0,0 +1,18 @@ +{ + "amongus_drip": { + "sounds": [ + { + "name": "amodgus:amongus_drip", + "stream": true + } + ] + }, + "amongus_death": { + "sounds": [ + { + "name": "amodgus:amongus_death", + "stream": true + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/amodgus/sounds/amongus_death.ogg b/src/main/resources/assets/amodgus/sounds/amongus_death.ogg new file mode 100644 index 0000000..4df0e3e Binary files /dev/null and b/src/main/resources/assets/amodgus/sounds/amongus_death.ogg differ diff --git a/src/main/resources/assets/amodgus/sounds/amongus_drip.ogg b/src/main/resources/assets/amodgus/sounds/amongus_drip.ogg new file mode 100644 index 0000000..e9014d5 Binary files /dev/null and b/src/main/resources/assets/amodgus/sounds/amongus_drip.ogg differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_black.png b/src/main/resources/assets/amodgus/textures/entities/amongus_black.png new file mode 100644 index 0000000..763c57f Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_black.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_blue.png b/src/main/resources/assets/amodgus/textures/entities/amongus_blue.png new file mode 100644 index 0000000..23a39a3 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_blue.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_brown.png b/src/main/resources/assets/amodgus/textures/entities/amongus_brown.png new file mode 100644 index 0000000..cc8e1cc Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_brown.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_cyan.png b/src/main/resources/assets/amodgus/textures/entities/amongus_cyan.png new file mode 100644 index 0000000..287e541 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_cyan.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_green.png b/src/main/resources/assets/amodgus/textures/entities/amongus_green.png new file mode 100644 index 0000000..9141612 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_green.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_lime.png b/src/main/resources/assets/amodgus/textures/entities/amongus_lime.png new file mode 100644 index 0000000..a446946 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_lime.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_magenta.png b/src/main/resources/assets/amodgus/textures/entities/amongus_magenta.png new file mode 100644 index 0000000..90b102a Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_magenta.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_orange.png b/src/main/resources/assets/amodgus/textures/entities/amongus_orange.png new file mode 100644 index 0000000..e7c68e7 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_orange.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_pink.png b/src/main/resources/assets/amodgus/textures/entities/amongus_pink.png new file mode 100644 index 0000000..12a0577 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_pink.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_purple.png b/src/main/resources/assets/amodgus/textures/entities/amongus_purple.png new file mode 100644 index 0000000..b115a97 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_purple.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_red.png b/src/main/resources/assets/amodgus/textures/entities/amongus_red.png new file mode 100644 index 0000000..90377e4 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_red.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_white.png b/src/main/resources/assets/amodgus/textures/entities/amongus_white.png new file mode 100644 index 0000000..b0e68a1 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_white.png differ diff --git a/src/main/resources/assets/amodgus/textures/entities/amongus_yellow.png b/src/main/resources/assets/amodgus/textures/entities/amongus_yellow.png new file mode 100644 index 0000000..09c8d13 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/entities/amongus_yellow.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/black_toy.png b/src/main/resources/assets/amodgus/textures/items/black_toy.png new file mode 100644 index 0000000..fdecb13 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/black_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/blue_toy.png b/src/main/resources/assets/amodgus/textures/items/blue_toy.png new file mode 100644 index 0000000..11e8d7c Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/blue_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/brown_toy.png b/src/main/resources/assets/amodgus/textures/items/brown_toy.png new file mode 100644 index 0000000..b5895c3 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/brown_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/cyan_toy.png b/src/main/resources/assets/amodgus/textures/items/cyan_toy.png new file mode 100644 index 0000000..42c8f61 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/cyan_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/egghat.png b/src/main/resources/assets/amodgus/textures/items/egghat.png new file mode 100644 index 0000000..ad13e7d Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/egghat.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/flask.png b/src/main/resources/assets/amodgus/textures/items/flask.png new file mode 100644 index 0000000..ab1fbc6 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/flask.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/green_toy.png b/src/main/resources/assets/amodgus/textures/items/green_toy.png new file mode 100644 index 0000000..d2c07dc Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/green_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/knife.png b/src/main/resources/assets/amodgus/textures/items/knife.png new file mode 100644 index 0000000..bd95631 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/knife.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/lime_toy.png b/src/main/resources/assets/amodgus/textures/items/lime_toy.png new file mode 100644 index 0000000..485fa46 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/lime_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/magenta_toy.png b/src/main/resources/assets/amodgus/textures/items/magenta_toy.png new file mode 100644 index 0000000..5363a5b Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/magenta_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/music_disc_amongus_drip.png b/src/main/resources/assets/amodgus/textures/items/music_disc_amongus_drip.png new file mode 100644 index 0000000..add856c Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/music_disc_amongus_drip.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/orange_toy.png b/src/main/resources/assets/amodgus/textures/items/orange_toy.png new file mode 100644 index 0000000..efdd787 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/orange_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/pink_toy.png b/src/main/resources/assets/amodgus/textures/items/pink_toy.png new file mode 100644 index 0000000..5d0348c Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/pink_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/purple_toy.png b/src/main/resources/assets/amodgus/textures/items/purple_toy.png new file mode 100644 index 0000000..01ad3d2 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/purple_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/red_toy.png b/src/main/resources/assets/amodgus/textures/items/red_toy.png new file mode 100644 index 0000000..3a15182 Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/red_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/white_toy.png b/src/main/resources/assets/amodgus/textures/items/white_toy.png new file mode 100644 index 0000000..4806c2d Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/white_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/items/yellow_toy.png b/src/main/resources/assets/amodgus/textures/items/yellow_toy.png new file mode 100644 index 0000000..b534e4f Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/items/yellow_toy.png differ diff --git a/src/main/resources/assets/amodgus/textures/painting/impostor.png b/src/main/resources/assets/amodgus/textures/painting/impostor.png new file mode 100644 index 0000000..aa6313e Binary files /dev/null and b/src/main/resources/assets/amodgus/textures/painting/impostor.png differ diff --git a/src/main/resources/data/amodgus/advancements/amodgus.json b/src/main/resources/data/amodgus/advancements/amodgus.json new file mode 100644 index 0000000..3264be7 --- /dev/null +++ b/src/main/resources/data/amodgus/advancements/amodgus.json @@ -0,0 +1,23 @@ +{ + "display": { + "icon": { + "item": "amodgus:red_toy" + }, + "title": "§dA suspicious guy", + "description": "§eTame an Amongus", + "frame": "task", + "show_toast": true, + "announce_to_chat": true, + "hidden": false + }, + "criteria": { + "requirement": { + "trigger": "minecraft:tame_animal", + "conditions": { + "entity": { + "type": "amodgus:amongus" + } + } + } + } +} diff --git a/src/main/resources/data/amodgus/loot_tables/chests/ship.json b/src/main/resources/data/amodgus/loot_tables/chests/ship.json new file mode 100644 index 0000000..f5f5ba5 --- /dev/null +++ b/src/main/resources/data/amodgus/loot_tables/chests/ship.json @@ -0,0 +1,299 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:lead", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "minecraft:golden_apple", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "minecraft:music_disc_13", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "amodgus:music_disc_amongus_drip", + "weight": 3 + }, + { + "type": "minecraft:item", + "name": "minecraft:name_tag", + "weight": 20 + }, + { + "type": "minecraft:item", + "name": "minecraft:chainmail_chestplate", + "weight": 10 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond_hoe", + "weight": 15 + }, + { + "type": "minecraft:item", + "name": "minecraft:diamond_chestplate", + "weight": 5 + }, + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:enchant_randomly" + } + ], + "name": "minecraft:book", + "weight": 10 + } + ], + "rolls": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:iron_ingot", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:gold_ingot", + "weight": 5 + }, + { + "type": "minecraft:item", + "name": "minecraft:bread", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:wheat", + "weight": 20 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 3.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "amodgus:flask", + "weight": 25 + }, + { + "type": "minecraft:item", + "name": "minecraft:bucket", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:redstone", + "weight": 15 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:coal", + "weight": 15 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:melon_seeds", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:pumpkin_seeds", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 2.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:beetroot_seeds", + "weight": 10 + } + ], + "rolls": { + "type": "minecraft:uniform", + "max": 4.0, + "min": 1.0 + } + }, + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:bone", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:gunpowder", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:rotten_flesh", + "weight": 10 + }, + { + "type": "minecraft:item", + "functions": [ + { + "add": false, + "count": { + "type": "minecraft:uniform", + "max": 8.0, + "min": 1.0 + }, + "function": "minecraft:set_count" + } + ], + "name": "minecraft:string", + "weight": 10 + } + ], + "rolls": 3.0 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/loot_tables/entities/impostor.json b/src/main/resources/data/amodgus/loot_tables/entities/impostor.json new file mode 100644 index 0000000..93bb7a7 --- /dev/null +++ b/src/main/resources/data/amodgus/loot_tables/entities/impostor.json @@ -0,0 +1,38 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "amodgus:knife", + "weight": 10, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:air", + "weight": 90, + "functions": [ + { + "function": "set_count", + "count": { + "min": 0, + "max": 0 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/amodgus/recipes/black_toy_recipe.json b/src/main/resources/data/amodgus/recipes/black_toy_recipe.json new file mode 100644 index 0000000..af38486 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/black_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:black_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:black_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/blue_toy_recipe.json b/src/main/resources/data/amodgus/recipes/blue_toy_recipe.json new file mode 100644 index 0000000..9f4e731 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/blue_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:blue_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:blue_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/brown_toy_recipe.json b/src/main/resources/data/amodgus/recipes/brown_toy_recipe.json new file mode 100644 index 0000000..f685fdb --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/brown_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:brown_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:brown_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/cyan_toy_recipe.json b/src/main/resources/data/amodgus/recipes/cyan_toy_recipe.json new file mode 100644 index 0000000..4e17a17 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/cyan_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:cyan_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:cyan_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/egghat_recipe.json b/src/main/resources/data/amodgus/recipes/egghat_recipe.json new file mode 100644 index 0000000..488291c --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/egghat_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "OOO", + " " + ], + "key": { + "#": { + "item": "minecraft:orange_wool" + }, + "O": { + "item": "minecraft:white_wool" + } + }, + "result": { + "item": "amodgus:egghat" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/flask_recipe.json b/src/main/resources/data/amodgus/recipes/flask_recipe.json new file mode 100644 index 0000000..b8e3283 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/flask_recipe.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " W", + " G ", + "B " + ], + "key": { + "B": { + "item": "minecraft:water_bucket" + }, + "G": { + "item": "minecraft:golden_apple" + }, + "W": { + "item": "minecraft:oak_button" + } + }, + "result": { + "item": "amodgus:flask" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/green_toy_recipe.json b/src/main/resources/data/amodgus/recipes/green_toy_recipe.json new file mode 100644 index 0000000..f7860cf --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/green_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:green_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:green_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/lime_toy_recipe.json b/src/main/resources/data/amodgus/recipes/lime_toy_recipe.json new file mode 100644 index 0000000..5d0866c --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/lime_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:lime_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:lime_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/magenta_toy_recipe.json b/src/main/resources/data/amodgus/recipes/magenta_toy_recipe.json new file mode 100644 index 0000000..af38198 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/magenta_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:magenta_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:magenta_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/orange_toy_recipe.json b/src/main/resources/data/amodgus/recipes/orange_toy_recipe.json new file mode 100644 index 0000000..9db64c7 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/orange_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:orange_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:orange_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/pink_toy_recipe.json b/src/main/resources/data/amodgus/recipes/pink_toy_recipe.json new file mode 100644 index 0000000..8b69e45 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/pink_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:pink_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:pink_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/purple_toy_recipe.json b/src/main/resources/data/amodgus/recipes/purple_toy_recipe.json new file mode 100644 index 0000000..5c1caef --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/purple_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:purple_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:purple_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/red_toy_recipe.json b/src/main/resources/data/amodgus/recipes/red_toy_recipe.json new file mode 100644 index 0000000..74ac7e8 --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/red_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:red_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:red_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/white_toy_recipe.json b/src/main/resources/data/amodgus/recipes/white_toy_recipe.json new file mode 100644 index 0000000..887b20d --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/white_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:white_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:white_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/recipes/yellow_toy_recipe.json b/src/main/resources/data/amodgus/recipes/yellow_toy_recipe.json new file mode 100644 index 0000000..a85ae8d --- /dev/null +++ b/src/main/resources/data/amodgus/recipes/yellow_toy_recipe.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#OO", + "# #" + ], + "key": { + "#": { + "item": "minecraft:yellow_concrete" + }, + "O": { + "item": "minecraft:light_blue_stained_glass_pane" + } + }, + "result": { + "item": "amodgus:yellow_toy" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/structures/ship.nbt b/src/main/resources/data/amodgus/structures/ship.nbt new file mode 100644 index 0000000..b461a6d Binary files /dev/null and b/src/main/resources/data/amodgus/structures/ship.nbt differ diff --git a/src/main/resources/data/amodgus/tags/worldgen/biome/has_structure/ship.json b/src/main/resources/data/amodgus/tags/worldgen/biome/has_structure/ship.json new file mode 100644 index 0000000..c72e212 --- /dev/null +++ b/src/main/resources/data/amodgus/tags/worldgen/biome/has_structure/ship.json @@ -0,0 +1,17 @@ +{ + "replace": false, + + "_comment": " This biome tag can specify the biome directly. Or specify another biome tag by starting with # ", + "values": [ + "#minecraft:is_jungle", + "#minecraft:is_forest", + "#minecraft:is_taiga", + "minecraft:desert", + "minecraft:plains", + "minecraft:snowy_plains", + "minecraft:sunflower_plains", + "minecraft:savanna", + "minecraft:savanna_plateau", + "minecraft:windswept_savanna" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/worldgen/structure/ship.json b/src/main/resources/data/amodgus/worldgen/structure/ship.json new file mode 100644 index 0000000..8d5c308 --- /dev/null +++ b/src/main/resources/data/amodgus/worldgen/structure/ship.json @@ -0,0 +1,54 @@ +{ + // The base structure class to use for the behavior of the structure. (Like extra terrain checks and such) + "type": "minecraft:jigsaw", + + // the path to the template pool json file to use + "start_pool": "amodgus:ship/start_pool", + + // This is how many pieces away from the starting piece a piece of the structure can spawn + // Think of it like the length of the branch of the structure + "size": 1, + + // Maximum distance away from center that pieces can spawn. Cannot be greater than 128 + "max_distance_from_center": 80, + + // The biome tag to use for what biomes that this structure can spawn in" + "biomes": "#amodgus:has_structure/ship", + + // The generation step for when to generate the structure. there are 10 stages you can pick from! + // This surface structure stage places the structure before plants and ores are generated + // See GenerationStep.Feature enum for all the stages you can use and what order they are in + "step": "surface_structures", + + // Where to spawn our structure at what y value if project_start_to_heightmap is not present. + // start_height can be used to spawn at a random fixed y value by doing something like: "max_inclusive": { "below_top": 10 }, "min_inclusive": { "above_bottom": 32 } + // If project_start_to_heightmap is present, the y value chosen in start_height will be added to the terrain's y value. + // So a start height that gives -5 will sink the structure 5 blocks into the terrain. Here, we will spawn this structure 60 blocks above the terrain. + "start_height": { + "absolute": 100 + }, + + // Makes our sky fan structure take the terrain's top y value and add it to the start_height y value above. + // The final value is the y value the structures spawn at. + // WORLD_SURFACE_WG will stop at first non-air block so it spawns above oceans always instead of sunken into a deep sea. + "project_start_to_heightmap": "WORLD_SURFACE_WG", + + // Keep this false. This is only for vanilla legacy villages to make it spawn properly. We don't need no hacks here! + "use_expansion_hack": false, + + // What mobs can spawn over time in the structure. + // Make sure you add the mob to the right category (monster, creature, etc) + "spawn_overrides": { + "monster": { + "bounding_box": "piece", + "spawns": [ + { + "type": "amodgus:impostor", + "weight": 30, + "minCount": 1, + "maxCount": 1 + } + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/worldgen/structure_set/ship.json b/src/main/resources/data/amodgus/worldgen/structure_set/ship.json new file mode 100644 index 0000000..fb16ac7 --- /dev/null +++ b/src/main/resources/data/amodgus/worldgen/structure_set/ship.json @@ -0,0 +1,24 @@ +{ + // What structures to pick to try and spawn if a spot passes the placement check. + // If two or more structures in this list can spawn in a biome at a spot, a random one based on weight is chosen to spawn + "structures": [ + { + "structure": "amodgus:ship", + "weight": 1 + } + ], + "placement": { + // Make sure this is unique and does not match any other structure set's salt + "salt": 1534787582, + + // The average distance apart in chunks for spawn attempts + "spacing": 75, + + // Minimum distance apart in chunks for spawn attempts + // MUST ALWAYS BE SMALLER THAN spacing ABOVE + "separation": 25, + + // The kind of placement to use. The other kind is ring based like strongholds use. + "type": "minecraft:random_spread" + } +} \ No newline at end of file diff --git a/src/main/resources/data/amodgus/worldgen/template_pool/ship/start_pool.json b/src/main/resources/data/amodgus/worldgen/template_pool/ship/start_pool.json new file mode 100644 index 0000000..2d67e56 --- /dev/null +++ b/src/main/resources/data/amodgus/worldgen/template_pool/ship/start_pool.json @@ -0,0 +1,41 @@ +{ + // More info on template pools can be found here: https://minecraft.gamepedia.com/Custom_world_generation#JSON_format_8 + // Yes, worldgen json files can have comments. Minecraft does "lenient" parsing of these json files. + + // This is the name of the template pool itself. I tend to just put the file path and file name here with modid. + "name": "amodgus:ship/start_pool", + + // The template pool to refer to if the entries in 'elements' fails to generate. + "fallback": "minecraft:empty", + + // Here you can list as many nbt files or placed features to spawn. + // Do note that placed features needs a special element entry stuff. + "elements": [ + { + + // How likely out of all the element for this one to be chosen. + "weight": 1, + "element": { + + // The Identifier of the nbt file itself of the structure piece. + // Note, this will automatically check into the 'structures' folder for the nbt file. + // The final path would look like 'resources/data/structure_tutorial/structures/run_down_house_left_side.nbt' + // The Jigsaw block in the structure will point to side_pool.json to spawn the other half of the house. + "location": "amodgus:ship", + + // Processor JSON files can be used to randomize or replace blocks dynamically. Here, we don't do any of that. + "processors": "minecraft:empty", + + // If set to 'terrain_matching', the house would be deformed to fit the change in land. + // That's best for roads so lets stay 'rigid' for now. + "projection": "rigid", + + // The kind of element we are spawning. This one is most likely what you want. + // There's 'minecraft:legacy_single_pool_element' but that swaps the behavior of + // Air and Structure Void in your piece as well as change the attachment mechanism. + // It's only for old Vanilla Jigsaw Structures so don't use it. Stick with non-legacy. + "element_type": "minecraft:single_pool_element" + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/painting_variant/placeable.json b/src/main/resources/data/minecraft/tags/painting_variant/placeable.json new file mode 100644 index 0000000..0114cf8 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/painting_variant/placeable.json @@ -0,0 +1,5 @@ +{ + "values": [ + "amodgus:impostor" + ] +} \ No newline at end of file diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png new file mode 100644 index 0000000..ee76b6c Binary files /dev/null and b/src/main/resources/logo.png differ diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..474d503 --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,8 @@ +{ + "pack": { + "description": "examplemod resources", + "pack_format": 9, + "forge:resource_pack_format": 8, + "forge:data_pack_format": 9 + } +} \ No newline at end of file