diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index 07d636336..e13cba07b 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -2,11 +2,19 @@ name: Qodana on: workflow_dispatch: + pull_request: + push: + branches: + - next + - release jobs: qodana: runs-on: ubuntu-latest - + permissions: + contents: write + pull-requests: write + checks: write steps: - name: Qodana Composite uses: Red-Studio-Ragnarok/Qodana-Composite@main diff --git a/.gitignore b/.gitignore index 20dca0d94..ea50304ca 100644 --- a/.gitignore +++ b/.gitignore @@ -21,25 +21,11 @@ build # Forge run -# Dependencies -node_modules - -# Production -build - -# Generated files -.docusaurus -.cache-loader +# Windows +desktop.ini -# Misc +# macOS .DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* -desktop.ini +# other +*.log diff --git a/Changelog.md b/Changelog.md index 8db2e1a02..a500ad1d1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -62,21 +62,19 @@ like knowing which weapon is better or whether an attachment will be useful to y - Updated the url in the mod menu - Updated dependencies: - Requires Red Core 0.6 and up - - Requires MixinBooter 8.8 and up + - Requires MixinBooter 9.4 and up - Updated Korean translation - Reworked weapons tooltips - Reworked magazines tooltips - Reworked vests tooltips - Updated Chinese translation - Reworked how reloading works in creative so that it aligns with vanilla behavior -- Overhauled the textures and models of: - - EOTech 512 A65 Holographic (Black) - - EOTech EXPS3-0 Holographic (Tan) ### Fixed - Fixed the default craftingmappings.json - Fixed the position of the RPG-7 and M202 projectiles +- Fixed compatiblity with GroovyScript 1.2+ ### Removed @@ -94,14 +92,18 @@ like knowing which weapon is better or whether an attachment will be useful to y - Set a minimum Gradle Daemon JVM version requirement - Updated the `gradle.properties` to the new Red Studio standard one - Cleaned up the buildscript -- Updated [GroovyScript](https://www.curseforge.com/minecraft/mc-mods/groovyscript) dependency to 1.1.2 -- Updated to [gradle-buildconfig-plugin](https://github.com/gmazzo/gradle-buildconfig-plugin) 5.4.0 -- Updated to [RetroFuturaGradle](https://github.com/GTNewHorizons/RetroFuturaGradle) 1.4.0 +- Updated [GroovyScript](https://www.curseforge.com/minecraft/mc-mods/groovyscript) dependency to 1.2 +- Updated to [gradle-buildconfig-plugin](https://github.com/gmazzo/gradle-buildconfig-plugin) 5.5.0 - Switched to the new standard `gradle.properties` - General cleanup - Updated to [io.freefair.lombok](https://plugins.gradle.org/plugin/io.freefair.lombok) 8.7.1 - Remade the build script - Switched from [RetroFuturaGradle](https://github.com/GTNewHorizons/RetroFuturaGradle) tags to [gradle-buildconfig-plugin](https://github.com/gmazzo/gradle-buildconfig-plugin) +- Updated [MixinBooter](https://www.curseforge.com/minecraft/mc-mods/mixin-booter) dependency to 9.4 +- Updated to [org.jetbrains.gradle.plugin.idea-ext](https://github.com/JetBrains/gradle-idea-ext-plugin) 1.1.9 +- Props now use Red Core `AABBUtil` +- Updated [Red Core](https://www.curseforge.com/minecraft/mc-mods/red-core) dependency to 0.6-Dev-8 +- Lombokified most of the codebase ## Modern Warfare Cubed Version 0.1.8 Changelog - 2024-08-16 diff --git a/build.gradle.kts b/build.gradle.kts index 354173f0a..2fdcfb775 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,21 +5,21 @@ import org.jetbrains.gradle.ext.Gradle plugins { id("com.gtnewhorizons.retrofuturagradle") version "1.4.1" - id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8" - id("com.github.gmazzo.buildconfig") version "5.4.0" + id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.9" + id("com.github.gmazzo.buildconfig") version "5.5.0" id("io.freefair.lombok") version "8.7.1" } group = "com.paneedah" -version = "0.2-Dev-2" // Versioning must follow Ragnarök versioning convention: https://github.com/Red-Studio-Ragnarok/Commons/blob/main/Ragnar%C3%B6k%20Versioning%20Convention.md +version = "0.2-Dev-3" // Versioning must follow Ragnarök versioning convention: https://github.com/Red-Studio-Ragnarok/Commons/blob/main/Ragnar%C3%B6k%20Versioning%20Convention.md val id = "mwc" val plugin = "${project.group}.${id}.asm.MWCPlugin" -val redCoreVersion = "MC-1.8-1.12-" + "0.6-Dev-7" +val redCoreVersion = "MC-1.8-1.12-" + "0.6-Dev-8" -val groovyScriptVersion = "1.1.2" -val mixinBooterVersion = "8.8" +val groovyScriptVersion = "1.2.0-hotfix1" +val mixinBooterVersion = "9.4" minecraft { mcVersion = "1.12.2" @@ -57,7 +57,7 @@ dependencies { implementation("dev.redstudio", "Red-Core", redCoreVersion) compileOnly(rfg.deobf("curse.maven:techguns-244201:2958103")) - compileOnly("com.cleanroommc:groovyscript:1.1.2") { + compileOnly("com.cleanroommc", "groovyscript", groovyScriptVersion) { isTransitive = false } @@ -80,9 +80,9 @@ buildConfig { documentation.set("This class defines constants for ${project.name}.\n

\nThey are automatically updated by Gradle.") useJavaOutput() - buildConfigField("String", "ID", provider { """"$id"""" }) - buildConfigField("String", "NAME", provider { """"${project.name}"""" }) - buildConfigField("String", "VERSION", provider { """"${project.version}"""" }) + buildConfigField("ID", id) + buildConfigField("NAME", project.name) + buildConfigField("VERSION", project.version.toString()) buildConfigField("org.apache.logging.log4j.Logger", "LOGGER", "org.apache.logging.log4j.LogManager.getLogger(NAME)") buildConfigField("dev.redstudio.redcore.logging.RedLogger", "RED_LOGGER", """new RedLogger(NAME, "https://linkify.cz/MWCBugReport", LOGGER)""") } @@ -113,7 +113,7 @@ tasks { inputs.properties(expandProperties) filesMatching("**/*.*") { - val exclusions = listOf(".png", ".obj", ".frag", ".ogg", "craftingmappings.json") + val exclusions = listOf(".png", "_at.cfg", ".refmap.json", ".obj", ".frag", ".ogg", "craftingmappings.json") if (!exclusions.any { path.endsWith(it) }) expand(expandProperties) } diff --git a/gradlew b/gradlew new file mode 100644 index 000000000..1b6c78733 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/qodana.yaml b/qodana.yaml index 78801ca92..dfa703a30 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -1,8 +1,12 @@ version: "1.0" -linter: jetbrains/qodana-jvm-community:2023.3 +linter: jetbrains/qodana-jvm:2024.2 profile: name: qodana.recommended -fixesStrategy: cleanup +fixesStrategy: none +bootstrap: |+ + set -eu + bash gradlew setupDecompWorkspace + bash gradlew generateBuildConfig include: - name: VulnerableLibrariesGlobal - name: CheckDependencyLicenses @@ -33,6 +37,28 @@ include: - name: DanglingJavadoc - name: ManualMinMaxCalculation - name: FinalStaticMethod + - name: TodoComment + - name: RedundantSuppression + - name: ConfigurationAvoidance + - name: DeprecatedConfigurations + - name: ObjectEqualsCanBeEquality + - name: MapReplaceableByEnumMap + - name: SetReplaceableByEnumSet + - name: AutoBoxing + - name: AutoUnboxing + - name: BulkFileAttributesRead + - name: DynamicRegexReplaceableByCompiledPattern + - name: ExplicitArgumentCanBeLambda + - name: QuestionableName + - name: UpperCaseFieldNameNotConstant + - name: EqualsCalledOnEnumConstant + - name: SimplifiableIfStatement + - name: UnnecessaryThis + - name: UnnecessarySuperQualifier + - name: SimplifiableEqualsExpression + - name: UnnecessaryBlockStatement + - name: UnnecessaryFullyQualifiedName + - name: UnnecessaryQualifierForThis exclude: - name: QodanaSanity - name: JavadocReference diff --git a/src/main/java/com/paneedah/mwc/MWC.java b/src/main/java/com/paneedah/mwc/MWC.java index 58720a64a..138e62002 100644 --- a/src/main/java/com/paneedah/mwc/MWC.java +++ b/src/main/java/com/paneedah/mwc/MWC.java @@ -42,7 +42,7 @@ // | $$\ $ | $$| $$ | $$| $$ | $$| $$_____/| $$ | $$ | $$ | $$$/ \ $$$ /$$__ $$| $$ | $$ /$$__ $$| $$ | $$_____/ | $$ $$| $$ | $$| $$ | $$| $$_____/| $$ | $$ // | $$ \/ | $$| $$$$$$/| $$$$$$$| $$$$$$$| $$ | $$ | $$ | $$/ \ $$| $$$$$$$| $$ | $$ | $$$$$$$| $$ | $$$$$$$ | $$$$$$/| $$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$ // |__/ |__/ \______/ \_______/ \_______/|__/ |__/ |__/ |__/ \__/ \_______/|__/ |__/ \_______/|__/ \_______/ \______/ \______/ |_______/ \_______/ \_______/ -@Mod(modid = ID, name = NAME, version = VERSION, dependencies = "required-after:mixinbooter@[8.8,);required-after:redcore@[0.6,)", guiFactory = "com.paneedah.weaponlib.config.ConfigGUIFactory", updateJSON = "https://forge.curseupdate.com/836353/mwc") +@Mod(modid = ID, name = NAME, version = VERSION, dependencies = "required-after:mixinbooter@[9.4,);required-after:redcore@[0.6,)", guiFactory = "com.paneedah.weaponlib.config.ConfigGUIFactory", updateJSON = "https://forge.curseupdate.com/836353/mwc") public final class MWC { public static final SimpleNetworkWrapper CHANNEL = NetworkRegistry.INSTANCE.newSimpleChannel(ID); diff --git a/src/main/java/com/paneedah/mwc/WorldGeneratorEventHandler.java b/src/main/java/com/paneedah/mwc/ModernWorldGenerator.java similarity index 94% rename from src/main/java/com/paneedah/mwc/WorldGeneratorEventHandler.java rename to src/main/java/com/paneedah/mwc/ModernWorldGenerator.java index d3a2cd325..4030e4276 100644 --- a/src/main/java/com/paneedah/mwc/WorldGeneratorEventHandler.java +++ b/src/main/java/com/paneedah/mwc/ModernWorldGenerator.java @@ -2,6 +2,7 @@ import com.paneedah.mwc.init.MWCBlocks; import com.paneedah.weaponlib.config.ModernConfigManager; +import lombok.NoArgsConstructor; import net.minecraft.block.Block; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -12,11 +13,9 @@ import java.util.Random; -public class WorldGeneratorEventHandler implements IWorldGenerator { +@NoArgsConstructor +public class ModernWorldGenerator implements IWorldGenerator { - public WorldGeneratorEventHandler() { - - } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { diff --git a/src/main/java/com/paneedah/mwc/UniversalSoundRegistry.java b/src/main/java/com/paneedah/mwc/UniversalSoundRegistry.java index 9ecb8f1d3..57c302a8a 100644 --- a/src/main/java/com/paneedah/mwc/UniversalSoundRegistry.java +++ b/src/main/java/com/paneedah/mwc/UniversalSoundRegistry.java @@ -6,12 +6,13 @@ * Creates a sound registry for WeaponLib to access in order to play * reloading noises. * + * Example: UniversalSoundLookup.registerSoundToLookup("test_sound"); + * * @author Jim Holden, 2022 */ public class UniversalSoundRegistry { public static void init() { - // Example: UniversalSoundLookup.registerSoundToLookup("test_sound"); UniversalSoundLookup.registerSoundToLookup("bolt_press"); UniversalSoundLookup.registerSoundToLookup("bolt_slap"); UniversalSoundLookup.registerSoundToLookup("chargehandle_back"); diff --git a/src/main/java/com/paneedah/mwc/equipment/Armors.java b/src/main/java/com/paneedah/mwc/equipment/Armors.java index 874603ea4..dfa7d5708 100644 --- a/src/main/java/com/paneedah/mwc/equipment/Armors.java +++ b/src/main/java/com/paneedah/mwc/equipment/Armors.java @@ -65,7 +65,7 @@ public class Armors { static ArmorMaterial Juggernaut = EnumHelper.addArmorMaterial("Juggernaut", "Juggernaut", 20, new int[]{5, 6, 2, 5}, 20, null, 0); static ArmorMaterial Marine = EnumHelper.addArmorMaterial("Marine", "Marine", 60, new int[]{2, 3, 3, 3}, 15, null, 0); - public static void init(Object mod, ModContext modContext) { + public static void createEquipment(ModContext modContext) { Builder marineArmorBuilder = new CustomArmor.Builder() .withMaterial(Armors.Marine) .withUnlocalizedName("Marine") diff --git a/src/main/java/com/paneedah/mwc/equipment/Backpacks.java b/src/main/java/com/paneedah/mwc/equipment/Backpacks.java index 228f422f2..fa5f2fe50 100644 --- a/src/main/java/com/paneedah/mwc/equipment/Backpacks.java +++ b/src/main/java/com/paneedah/mwc/equipment/Backpacks.java @@ -1,6 +1,7 @@ package com.paneedah.mwc.equipment; import com.paneedah.mwc.items.equipment.carryable.ItemBackpack; +import com.paneedah.weaponlib.ModContext; import com.paneedah.weaponlib.animation.Transform; import net.minecraft.item.Item; @@ -22,7 +23,7 @@ public class Backpacks { public static Item duffleBag; - public static void init() { + public static void createEquipment(ModContext modContext) { combatSustainmentBackpackTan = new ItemBackpack.Builder() .withName("combat_sustainment_backpack_tan") diff --git a/src/main/java/com/paneedah/mwc/equipment/Belts.java b/src/main/java/com/paneedah/mwc/equipment/Belts.java index 237fd61a3..69025467f 100644 --- a/src/main/java/com/paneedah/mwc/equipment/Belts.java +++ b/src/main/java/com/paneedah/mwc/equipment/Belts.java @@ -1,13 +1,13 @@ package com.paneedah.mwc.equipment; +import com.paneedah.weaponlib.ModContext; import net.minecraft.item.Item; public class Belts { public static Item magazineBelt; - public static void init() { - + public static void createEquipment(ModContext modContext) { // TODO: Finish implementing belts // magazineBelt = new ItemBelt.Builder() // .withName("magazine_belt") diff --git a/src/main/java/com/paneedah/mwc/equipment/Electronics.java b/src/main/java/com/paneedah/mwc/equipment/Electronics.java index d8f631d93..da62b8b93 100644 --- a/src/main/java/com/paneedah/mwc/equipment/Electronics.java +++ b/src/main/java/com/paneedah/mwc/equipment/Electronics.java @@ -3,6 +3,7 @@ import com.paneedah.mwc.MWC; import com.paneedah.mwc.models.GasDetector; import com.paneedah.weaponlib.ItemAttachment; +import com.paneedah.weaponlib.ModContext; import com.paneedah.weaponlib.electronics.ItemHandheld; import com.paneedah.weaponlib.electronics.ItemTablet; import com.paneedah.weaponlib.electronics.ItemWirelessCamera; @@ -15,11 +16,11 @@ public class Electronics { public static ItemAttachment Tablet; - public static void init() { + public static void createEquipment(ModContext modContext) { Tablet = new ItemTablet.Builder<>() .withViewfinderPositioning(() -> { float scale = 5.9f; - GL11.glScalef(scale, scale / MWC.modContext.getAspectRatio(), scale); + GL11.glScalef(scale, scale / modContext.getAspectRatio(), scale); GL11.glTranslatef(-0.12f, 0.56f, 0.01f); }) .withCreativeTab(MWC.EQUIPMENT_TAB) @@ -77,7 +78,7 @@ public static void init() { .withName("tablet") .withTextureName("Dummy.png") - .build(MWC.modContext); + .build(modContext); new ItemWirelessCamera.Builder() @@ -135,14 +136,14 @@ public static void init() { } ) - .build(MWC.modContext); + .build(modContext); new ItemHandheld.Builder<>() .withScreenPerspectiveType(GasDetectorScreenPerspective.class) .withScreenPositioning(() -> { float scale = 1.9f; - GL11.glScalef(scale, scale / MWC.modContext.getAspectRatio(), scale); + GL11.glScalef(scale, scale / modContext.getAspectRatio(), scale); GL11.glTranslatef(0.017f, 0.16f, 0.17f); }) .withCreativeTab(MWC.EQUIPMENT_TAB) @@ -205,6 +206,6 @@ public static void init() { .withName("gas-detector") .withTextureName("Dummy.png") - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/equipment/Vests.java b/src/main/java/com/paneedah/mwc/equipment/Vests.java index 2f936f80d..b24774f47 100644 --- a/src/main/java/com/paneedah/mwc/equipment/Vests.java +++ b/src/main/java/com/paneedah/mwc/equipment/Vests.java @@ -2,12 +2,13 @@ import com.paneedah.mwc.MWC; import com.paneedah.weaponlib.ItemVest; +import com.paneedah.weaponlib.ModContext; import com.paneedah.weaponlib.animation.Transform; import org.lwjgl.opengl.GL11; public class Vests { - public static void init(Object mod) { + public static void createEquipment(ModContext modContext) { new ItemVest.Builder() .withName("m43a_chest_harness") @@ -27,7 +28,7 @@ public static void init(Object mod) { .withScale(3, 3, 3) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("flyye_field_compact_plate_carrier") @@ -67,7 +68,7 @@ public static void init(Object mod) { .withScale(3, 3, 3) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("molle_green") @@ -87,7 +88,7 @@ public static void init(Object mod) { .withScale(3, 3, 3) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("molle_urban") @@ -107,7 +108,7 @@ public static void init(Object mod) { .withScale(3, 3, 3) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("swat_vest") @@ -127,7 +128,7 @@ public static void init(Object mod) { .withScale(3, 3, 3) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("usMC_vest") @@ -152,7 +153,7 @@ public static void init(Object mod) { .withScale(2.6, 2.6, 2.6) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("usMC_vest_black") @@ -178,7 +179,7 @@ public static void init(Object mod) { .withScale(2.6, 2.6, 2.6) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("usMC_vest_green") @@ -204,7 +205,7 @@ public static void init(Object mod) { .withScale(2.6, 2.6, 2.6) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); new ItemVest.Builder() .withName("usMC_vest_urban") @@ -230,6 +231,6 @@ public static void init(Object mod) { .withScale(2.6, 2.6, 2.6) .doGLDirect(); }) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/groovyscript/MWCGroovyPlugin.java b/src/main/java/com/paneedah/mwc/groovyscript/MWCGroovyPlugin.java index e1358ddc8..f1b8a5d26 100644 --- a/src/main/java/com/paneedah/mwc/groovyscript/MWCGroovyPlugin.java +++ b/src/main/java/com/paneedah/mwc/groovyscript/MWCGroovyPlugin.java @@ -23,6 +23,6 @@ public String getContainerName() { @Override public void onCompatLoaded(GroovyContainer groovyContainer) { - groovyContainer.getRegistrar().addRegistry(craftingStation); + groovyContainer.addProperty(craftingStation); } } diff --git a/src/main/java/com/paneedah/mwc/items/guns/AK47Factory.java b/src/main/java/com/paneedah/mwc/items/guns/AK47Factory.java index 644f5e72b..1bb906c26 100644 --- a/src/main/java/com/paneedah/mwc/items/guns/AK47Factory.java +++ b/src/main/java/com/paneedah/mwc/items/guns/AK47Factory.java @@ -18,7 +18,7 @@ import net.minecraft.util.math.Vec3d; import org.lwjgl.opengl.GL11; -public class AK47Factory { +public class AK47Factory implements GunFactory { public Item createGun(CommonProxy commonProxy) { return new Weapon.Builder() diff --git a/src/main/java/com/paneedah/mwc/models/Holographic.java b/src/main/java/com/paneedah/mwc/models/Holographic.java index b74a3e883..45ca08884 100644 --- a/src/main/java/com/paneedah/mwc/models/Holographic.java +++ b/src/main/java/com/paneedah/mwc/models/Holographic.java @@ -5,335 +5,263 @@ import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -// Made with Blockbench 4.10.4 +// Made with Blockbench 4.7.4 // Exported for Minecraft version 1.7 - 1.12 // Paste this class into your mod and generate all required imports public class Holographic extends ModelBase { - private final ModelRenderer Holografics; - private final ModelRenderer gun103_r1_r1_r1; - private final ModelRenderer gun86_r1_r2_r1; - private final ModelRenderer gun89_r1_r1_r1; - private final ModelRenderer gun88_r1_r1_r1; - private final ModelRenderer gun86_r1_r1_r1; - private final ModelRenderer gun86_r1_r1_r2; - private final ModelRenderer gun86_r1_r1_r3; - private final ModelRenderer gun86_r1_r1_r4; - private final ModelRenderer gun83_r1_r1_r1; - private final ModelRenderer gun83_r1_r1_r2; - private final ModelRenderer gun75_r1_r1_r1; - private final ModelRenderer gun74_r1_r1_r1; - private final ModelRenderer gun73_r1_r1_r1; - private final ModelRenderer gun72_r1_r1_r1; - private final ModelRenderer gun71_r1_r1_r1; - private final ModelRenderer gun70_r1_r1_r1; - private final ModelRenderer gun65_r1_r1_r1; - private final ModelRenderer gun60_r1_r1_r1; - private final ModelRenderer gun59_r1_r1_r1; - private final ModelRenderer gun55_r1_r1_r1; - private final ModelRenderer gun54_r1_r1_r1; - private final ModelRenderer gun45_r1_r1_r1; - private final ModelRenderer gun43_r1_r1_r1; - private final ModelRenderer gun33_r1_r1_r1; - private final ModelRenderer gun33_r1_r1_r2; - private final ModelRenderer gun28_r1_r1_r1; - private final ModelRenderer gun26_r1_r1_r1; - private final ModelRenderer gun23_r1_r1_r1; - private final ModelRenderer gun3_r1_r1_r1; - private final ModelRenderer Holografics_r1; - private final ModelRenderer Holografics_r2; - private final ModelRenderer Holografics_r3; - private final ModelRenderer Holografics_r4; - private final ModelRenderer Holografics_r5; - private final ModelRenderer Holografics_r6; - private final ModelRenderer Holografics_r7; - - public Holographic() { - textureWidth = 80; - textureHeight = 80; - - Holografics = new ModelRenderer(this); - Holografics.setRotationPoint(-1.3299F, -3.8086F, 2.6645F); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 18, -3.1701F, -0.0914F, -14.6645F, 6, 3, 12, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 0, -3.1701F, 2.8086F, -12.3645F, 6, 1, 17, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 48, 49, 2.3099F, -1.1914F, -3.1645F, 1, 5, 8, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 34, 56, -3.6701F, -5.1714F, -2.6645F, 1, 4, 6, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 15, 39, 2.3299F, 1.8086F, -6.1645F, 1, 2, 4, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 8, 0, -3.6701F, 1.8086F, -6.1645F, 1, 2, 3, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 56, 0, -2.6701F, -6.1914F, -2.6645F, 5, 1, 6, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 43, 14, -3.6701F, 0.8086F, -3.9645F, 1, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 0, 2.3299F, -5.1914F, -2.6645F, 1, 4, 6, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 27, -2.6701F, -6.1914F, 2.8355F, 5, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 32, 49, -3.1701F, -1.1914F, -1.8645F, 6, 1, 6, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 45, 28, -2.1701F, -1.0014F, -14.6645F, 1, 1, 13, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 7, 33, 3.0299F, 1.3086F, -3.1645F, 1, 2, 2, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 42, 14, 0.8299F, -0.9814F, -14.6645F, 1, 1, 13, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 47, 0.3299F, -0.9714F, -14.6645F, 1, 1, 10, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 44, 0, -1.6701F, -0.9914F, -14.6645F, 1, 1, 10, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 23, 20, -1.6701F, -0.7914F, -14.4645F, 3, 1, 13, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 24, 18, -3.3701F, -5.1914F, -1.8645F, 1, 4, 5, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 18, 2.0299F, -5.1914F, -1.8645F, 1, 4, 5, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 45, 42, -2.6701F, -5.8914F, -1.8645F, 5, 1, 5, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 31, 18, -3.1701F, 2.8086F, -12.8645F, 6, 1, 1, -0.001F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 31, 20, -3.6601F, 1.8086F, 4.3355F, 1, 2, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 29, 6, 2.3299F, 1.8086F, 4.3355F, 1, 2, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 24, 27, -2.4701F, 2.1086F, 4.0355F, 4, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 42, 22, 1.1299F, 2.6086F, 4.0355F, 1, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 21, 41, -2.4701F, 2.6086F, 4.0355F, 1, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 15, 41, 1.1299F, 2.1086F, 4.0355F, 1, 1, 1, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 6, 41, 3.0299F, 1.1086F, -2.6645F, 1, 1, 1, -0.001F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 0, 41, 3.0299F, 2.5086F, -2.6645F, 1, 1, 1, -0.001F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 24, 40, 3.0299F, 1.8086F, -3.3645F, 1, 1, 1, -0.001F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 9, 40, 3.0299F, 1.8086F, -1.9645F, 1, 1, 1, -0.001F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 42, 18, 2.3499F, 0.6086F, 1.8355F, 1, 1, 3, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 35, 41, 2.3399F, 0.1086F, 1.8355F, 1, 1, 3, 0.0F, false)); - Holografics.cubeList.add(new ModelBox(Holografics, 22, 49, -3.6701F, -1.1914F, -3.1645F, 1, 5, 8, 0.0F, false)); - - gun103_r1_r1_r1 = new ModelRenderer(this); - gun103_r1_r1_r1.setRotationPoint(-1.4201F, 1.1186F, 4.5757F); - Holografics.addChild(gun103_r1_r1_r1); - setRotationAngle(gun103_r1_r1_r1, -1.5615F, 0.0F, 0.0F); - gun103_r1_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1_r1, 0, 14, -1.25F, -0.6001F, -0.8123F, 2, 1, 1, -0.38F, false)); - gun103_r1_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1_r1, 0, 4, -0.75F, -0.6001F, -0.8123F, 2, 1, 1, -0.38F, false)); - gun103_r1_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1_r1, 36, 0, 1.75F, -0.6001F, -0.8123F, 2, 1, 1, -0.38F, false)); - gun103_r1_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1_r1, 8, 14, 1.25F, -0.6001F, -0.8123F, 2, 1, 1, -0.38F, false)); - - gun86_r1_r2_r1 = new ModelRenderer(this); - gun86_r1_r2_r1.setRotationPoint(-1.4201F, 1.1186F, 4.5757F); - Holografics.addChild(gun86_r1_r2_r1); - setRotationAngle(gun86_r1_r2_r1, -1.3384F, 0.0F, 0.0F); - gun86_r1_r2_r1.cubeList.add(new ModelBox(gun86_r1_r2_r1, 0, 33, -0.75F, -0.3333F, -0.2176F, 1, 1, 1, 0.0F, false)); - gun86_r1_r2_r1.cubeList.add(new ModelBox(gun86_r1_r2_r1, 29, 9, -0.45F, -0.3345F, -0.2176F, 1, 1, 1, 0.0F, false)); - gun86_r1_r2_r1.cubeList.add(new ModelBox(gun86_r1_r2_r1, 30, 36, 1.95F, -0.3345F, -0.2176F, 1, 1, 1, 0.0F, false)); - gun86_r1_r2_r1.cubeList.add(new ModelBox(gun86_r1_r2_r1, 36, 8, 2.25F, -0.3333F, -0.2176F, 1, 1, 1, 0.0F, false)); - - gun89_r1_r1_r1 = new ModelRenderer(this); - gun89_r1_r1_r1.setRotationPoint(1.9158F, 28.109F, -2.6645F); - Holografics.addChild(gun89_r1_r1_r1); - setRotationAngle(gun89_r1_r1_r1, 0.0F, 0.0F, 0.2974F); - gun89_r1_r1_r1.cubeList.add(new ModelBox(gun89_r1_r1_r1, 15, 35, -8.3933F, -24.5101F, 7.0F, 1, 1, 1, -0.07F, false)); - - gun88_r1_r1_r1 = new ModelRenderer(this); - gun88_r1_r1_r1.setRotationPoint(-1.7448F, 2.8398F, 4.8355F); - Holografics.addChild(gun88_r1_r1_r1); - setRotationAngle(gun88_r1_r1_r1, 0.0F, 0.0F, -0.4719F); - gun88_r1_r1_r1.cubeList.add(new ModelBox(gun88_r1_r1_r1, 36, 6, -0.5F, -0.5F, -0.5F, 1, 1, 1, -0.07F, false)); - - gun86_r1_r1_r1 = new ModelRenderer(this); - gun86_r1_r1_r1.setRotationPoint(1.3299F, 71.6484F, -37.8887F); - Holografics.addChild(gun86_r1_r1_r1); - setRotationAngle(gun86_r1_r1_r1, -1.3384F, 0.0F, 0.0F); - gun86_r1_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1_r1, 8, 10, -0.2F, -57.7771F, -60.7687F, 1, 1, 3, 0.0F, false)); - gun86_r1_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1_r1, 42, 28, -3.8F, -57.7729F, -60.7687F, 4, 1, 3, 0.0F, false)); - - gun86_r1_r1_r2 = new ModelRenderer(this); - gun86_r1_r1_r2.setRotationPoint(1.3299F, 71.6254F, -37.7914F); - Holografics.addChild(gun86_r1_r1_r2); - setRotationAngle(gun86_r1_r1_r2, -1.3384F, 0.0F, 0.0F); - gun86_r1_r1_r2.cubeList.add(new ModelBox(gun86_r1_r1_r2, 36, 36, -0.11F, -57.7729F, -60.9687F, 1, 1, 1, -0.1F, false)); - gun86_r1_r1_r2.cubeList.add(new ModelBox(gun86_r1_r1_r2, 36, 34, -3.89F, -57.76F, -60.9687F, 1, 1, 1, -0.1F, false)); - - gun86_r1_r1_r3 = new ModelRenderer(this); - gun86_r1_r1_r3.setRotationPoint(-1.9701F, -0.357F, 4.233F); - Holografics.addChild(gun86_r1_r1_r3); - setRotationAngle(gun86_r1_r1_r3, -1.3686F, -0.1154F, 0.5119F); - gun86_r1_r1_r3.cubeList.add(new ModelBox(gun86_r1_r1_r3, 24, 21, -0.5F, -0.5F, -0.5F, 1, 1, 1, -0.2F, false)); - - gun86_r1_r1_r4 = new ModelRenderer(this); - gun86_r1_r1_r4.setRotationPoint(1.7299F, -0.357F, 4.233F); - Holografics.addChild(gun86_r1_r1_r4); - setRotationAngle(gun86_r1_r1_r4, -1.3686F, -0.1154F, 0.5119F); - gun86_r1_r1_r4.cubeList.add(new ModelBox(gun86_r1_r1_r4, 7, 21, -0.5F, -0.5F, -0.5F, 1, 1, 1, -0.2F, false)); - - gun83_r1_r1_r1 = new ModelRenderer(this); - gun83_r1_r1_r1.setRotationPoint(-0.1701F, 0.0262F, 4.2473F); - Holografics.addChild(gun83_r1_r1_r1); - setRotationAngle(gun83_r1_r1_r1, -1.5485F, 0.2307F, -1.3983F); - gun83_r1_r1_r1.cubeList.add(new ModelBox(gun83_r1_r1_r1, 15, 33, -0.5F, -0.3741F, -0.5F, 1, 1, 1, 0.0F, false)); - - gun83_r1_r1_r2 = new ModelRenderer(this); - gun83_r1_r1_r2.setRotationPoint(-0.1716F, 0.0217F, 4.3623F); - Holografics.addChild(gun83_r1_r1_r2); - setRotationAngle(gun83_r1_r1_r2, -1.5241F, 0.2271F, -1.2908F); - gun83_r1_r1_r2.cubeList.add(new ModelBox(gun83_r1_r1_r2, 29, 3, -0.4685F, -0.5031F, -0.5F, 1, 1, 1, -0.12F, false)); - - gun75_r1_r1_r1 = new ModelRenderer(this); - gun75_r1_r1_r1.setRotationPoint(192.644F, -49.3887F, -2.6645F); - Holografics.addChild(gun75_r1_r1_r1); - setRotationAngle(gun75_r1_r1_r1, 0.0F, 0.0F, -2.3562F); - gun75_r1_r1_r1.cubeList.add(new ModelBox(gun75_r1_r1_r1, 29, 0, 102.6037F, -166.5311F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun74_r1_r1_r1 = new ModelRenderer(this); - gun74_r1_r1_r1.setRotationPoint(-197.2268F, -31.9038F, -2.6645F); - Holografics.addChild(gun74_r1_r1_r1); - setRotationAngle(gun74_r1_r1_r1, 0.0F, 0.0F, 2.3562F); - gun74_r1_r1_r1.cubeList.add(new ModelBox(gun74_r1_r1_r1, 29, 6, -118.9674F, -157.1673F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun73_r1_r1_r1 = new ModelRenderer(this); - gun73_r1_r1_r1.setRotationPoint(-164.0731F, -50.9476F, -2.6645F); - Holografics.addChild(gun73_r1_r1_r1); - setRotationAngle(gun73_r1_r1_r1, 0.0F, 0.0F, 2.3562F); - gun73_r1_r1_r1.cubeList.add(new ModelBox(gun73_r1_r1_r1, 0, 33, -82.8361F, -153.2007F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun72_r1_r1_r1 = new ModelRenderer(this); - gun72_r1_r1_r1.setRotationPoint(-175.1786F, -24.1368F, -2.6645F); - Holografics.addChild(gun72_r1_r1_r1); - setRotationAngle(gun72_r1_r1_r1, 0.0F, 0.0F, 2.3562F); - gun72_r1_r1_r1.cubeList.add(new ModelBox(gun72_r1_r1_r1, 15, 33, -106.3942F, -138.8426F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun71_r1_r1_r1 = new ModelRenderer(this); - gun71_r1_r1_r1.setRotationPoint(-140.2009F, -29.4507F, -2.6645F); - Holografics.addChild(gun71_r1_r1_r1); - setRotationAngle(gun71_r1_r1_r1, 0.0F, 0.0F, 2.3562F); - gun71_r1_r1_r1.cubeList.add(new ModelBox(gun71_r1_r1_r1, 0, 39, -77.5601F, -123.312F, 6.68F, 1, 1, 1, 0.0F, false)); - - gun70_r1_r1_r1 = new ModelRenderer(this); - gun70_r1_r1_r1.setRotationPoint(135.618F, -46.9359F, -2.6645F); - Holografics.addChild(gun70_r1_r1_r1); - setRotationAngle(gun70_r1_r1_r1, 0.0F, 0.0F, -2.3562F); - gun70_r1_r1_r1.cubeList.add(new ModelBox(gun70_r1_r1_r1, 6, 39, 61.1962F, -132.6759F, 6.68F, 1, 1, 1, 0.0F, false)); - - gun65_r1_r1_r1 = new ModelRenderer(this); - gun65_r1_r1_r1.setRotationPoint(1.3299F, -187.3722F, 16.5576F); - Holografics.addChild(gun65_r1_r1_r1); - setRotationAngle(gun65_r1_r1_r1, -3.002F, 0.0F, 0.0F); - gun65_r1_r1_r1.cubeList.add(new ModelBox(gun65_r1_r1_r1, 0, 18, 1.0F, -185.7789F, 37.4364F, 1, 3, 1, 0.0F, false)); - gun65_r1_r1_r1.cubeList.add(new ModelBox(gun65_r1_r1_r1, 13, 9, -4.99F, -185.7789F, 37.4364F, 1, 3, 1, 0.0F, false)); - - gun60_r1_r1_r1 = new ModelRenderer(this); - gun60_r1_r1_r1.setRotationPoint(1.3299F, 74.4726F, -54.1527F); - Holografics.addChild(gun60_r1_r1_r1); - setRotationAngle(gun60_r1_r1_r1, -1.45F, 0.0F, 0.0F); - gun60_r1_r1_r1.cubeList.add(new ModelBox(gun60_r1_r1_r1, 57, 11, -4.5F, -66.981F, -68.0878F, 6, 1, 4, 0.0F, false)); - - gun59_r1_r1_r1 = new ModelRenderer(this); - gun59_r1_r1_r1.setRotationPoint(1.3299F, -66.668F, -158.0232F); - Holografics.addChild(gun59_r1_r1_r1); - setRotationAngle(gun59_r1_r1_r1, -2.3051F, 0.0F, 0.0F); - gun59_r1_r1_r1.cubeList.add(new ModelBox(gun59_r1_r1_r1, 7, 18, 0.7F, -164.2438F, -60.054F, 1, 2, 1, -0.001F, false)); - gun59_r1_r1_r1.cubeList.add(new ModelBox(gun59_r1_r1_r1, 13, 0, -4.7F, -164.2438F, -60.054F, 1, 2, 1, -0.001F, false)); - - gun55_r1_r1_r1 = new ModelRenderer(this); - gun55_r1_r1_r1.setRotationPoint(6.7491F, 42.0635F, -2.6645F); - Holografics.addChild(gun55_r1_r1_r1); - setRotationAngle(gun55_r1_r1_r1, 0.0F, 0.0F, 0.7854F); - gun55_r1_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1_r1, 15, 39, -37.2462F, -30.9965F, 5.49F, 1, 1, 1, 0.0F, false)); - gun55_r1_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1_r1, 12, 48, -36.8362F, -30.997F, 0.0F, 1, 1, 6, -0.001F, false)); - gun55_r1_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1_r1, 0, 10, -37.2462F, -30.997F, 0.0F, 1, 1, 6, 0.0F, false)); - - gun54_r1_r1_r1 = new ModelRenderer(this); - gun54_r1_r1_r1.setRotationPoint(8.8202F, 41.2057F, -2.6645F); - Holografics.addChild(gun54_r1_r1_r1); - setRotationAngle(gun54_r1_r1_r1, 0.0F, 0.0F, 0.7854F); - gun54_r1_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1_r1, 21, 39, -41.6397F, -25.3899F, 5.5F, 1, 1, 1, 0.0F, false)); - gun54_r1_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1_r1, 0, 58, -41.6265F, -24.8899F, 0.0F, 1, 1, 6, 0.0F, false)); - gun54_r1_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1_r1, 57, 16, -41.6397F, -25.3899F, 0.0F, 1, 1, 6, 0.0F, false)); - - gun45_r1_r1_r1 = new ModelRenderer(this); - gun45_r1_r1_r1.setRotationPoint(154.3302F, -55.8283F, -2.6645F); - Holografics.addChild(gun45_r1_r1_r1); - setRotationAngle(gun45_r1_r1_r1, 0.0F, 0.0F, -2.3213F); - gun45_r1_r1_r1.cubeList.add(new ModelBox(gun45_r1_r1_r1, 0, 33, 65.6531F, -152.85F, -12.0F, 1, 1, 13, 0.0F, false)); - gun45_r1_r1_r1.cubeList.add(new ModelBox(gun45_r1_r1_r1, 29, 0, 65.66F, -153.2F, -12.0F, 1, 1, 13, -0.001F, false)); - - gun43_r1_r1_r1 = new ModelRenderer(this); - gun43_r1_r1_r1.setRotationPoint(-157.8492F, -38.3803F, -2.6645F); - Holografics.addChild(gun43_r1_r1_r1); - setRotationAngle(gun43_r1_r1_r1, 0.0F, 0.0F, 2.3213F); - gun43_r1_r1_r1.cubeList.add(new ModelBox(gun43_r1_r1_r1, 30, 35, -81.57F, -143.2752F, -12.0F, 1, 1, 13, 0.0F, false)); - gun43_r1_r1_r1.cubeList.add(new ModelBox(gun43_r1_r1_r1, 15, 34, -81.5816F, -143.6252F, -12.0F, 1, 1, 13, -0.001F, false)); - - gun33_r1_r1_r1 = new ModelRenderer(this); - gun33_r1_r1_r1.setRotationPoint(1.3299F, -59.6688F, -157.875F); - Holografics.addChild(gun33_r1_r1_r1); - setRotationAngle(gun33_r1_r1_r1, -2.2679F, 0.0F, 0.0F); - gun33_r1_r1_r1.cubeList.add(new ModelBox(gun33_r1_r1_r1, 29, 0, -4.99F, -162.3934F, -59.625F, 1, 2, 1, -0.001F, false)); - - gun33_r1_r1_r2 = new ModelRenderer(this); - gun33_r1_r1_r2.setRotationPoint(1.3299F, -59.733F, -157.9516F); - Holografics.addChild(gun33_r1_r1_r2); - setRotationAngle(gun33_r1_r1_r2, -2.2679F, 0.0F, 0.0F); - gun33_r1_r1_r2.cubeList.add(new ModelBox(gun33_r1_r1_r2, 24, 18, 0.99F, -162.4484F, -59.625F, 1, 2, 1, 0.0F, false)); - - gun28_r1_r1_r1 = new ModelRenderer(this); - gun28_r1_r1_r1.setRotationPoint(1.3299F, 70.9784F, -24.0925F); - Holografics.addChild(gun28_r1_r1_r1); - setRotationAngle(gun28_r1_r1_r1, -1.2269F, 0.0F, 0.0F); - gun28_r1_r1_r1.cubeList.add(new ModelBox(gun28_r1_r1_r1, 22, 34, -5.0F, -50.829F, -60.5793F, 1, 1, 2, -0.002F, false)); - gun28_r1_r1_r1.cubeList.add(new ModelBox(gun28_r1_r1_r1, 30, 40, 1.0F, -50.829F, -60.5793F, 1, 1, 3, -0.001F, false)); - - gun26_r1_r1_r1 = new ModelRenderer(this); - gun26_r1_r1_r1.setRotationPoint(1.3299F, 27.8667F, -2.4616F); - Holografics.addChild(gun26_r1_r1_r1); - setRotationAngle(gun26_r1_r1_r1, -0.1859F, 0.0F, 0.0F); - gun26_r1_r1_r1.cubeList.add(new ModelBox(gun26_r1_r1_r1, 45, 34, 0.98F, -32.4511F, -6.3094F, 1, 5, 1, -0.001F, false)); - gun26_r1_r1_r1.cubeList.add(new ModelBox(gun26_r1_r1_r1, 44, 0, -4.98F, -32.4511F, -6.3094F, 1, 5, 1, 0.0F, false)); - - gun23_r1_r1_r1 = new ModelRenderer(this); - gun23_r1_r1_r1.setRotationPoint(1.3299F, 40.7152F, -5.417F); - Holografics.addChild(gun23_r1_r1_r1); - setRotationAngle(gun23_r1_r1_r1, 0.8179F, 0.0F, 0.0F); - gun23_r1_r1_r1.cubeList.add(new ModelBox(gun23_r1_r1_r1, 0, 39, -4.98F, -27.1481F, 27.8803F, 1, 2, 4, 0.0F, false)); - gun23_r1_r1_r1.cubeList.add(new ModelBox(gun23_r1_r1_r1, 30, 34, 0.99F, -27.1481F, 27.8803F, 1, 2, 4, 0.0F, false)); - - gun3_r1_r1_r1 = new ModelRenderer(this); - gun3_r1_r1_r1.setRotationPoint(1.3299F, 55.7286F, 14.506F); - Holografics.addChild(gun3_r1_r1_r1); - setRotationAngle(gun3_r1_r1_r1, 1.1154F, 0.0F, 0.0F); - gun3_r1_r1_r1.cubeList.add(new ModelBox(gun3_r1_r1_r1, 56, 7, -4.5F, -49.4283F, 34.6062F, 6, 2, 1, -0.001F, false)); - - Holografics_r1 = new ModelRenderer(this); - Holografics_r1.setRotationPoint(-3.2701F, 3.0086F, -5.3645F); - Holografics.addChild(Holografics_r1); - setRotationAngle(Holografics_r1, -0.2182F, 0.0F, 0.0F); - Holografics_r1.cubeList.add(new ModelBox(Holografics_r1, 0, 35, -0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F, false)); - - Holografics_r2 = new ModelRenderer(this); - Holografics_r2.setRotationPoint(-3.1701F, 0.922F, -1.5503F); - Holografics.addChild(Holografics_r2); - setRotationAngle(Holografics_r2, -1.9111F, 0.0F, 0.0F); - Holografics_r2.cubeList.add(new ModelBox(Holografics_r2, 0, 0, -0.5F, -1.0F, -1.0F, 1, 2, 2, 0.05F, false)); - - Holografics_r3 = new ModelRenderer(this); - Holografics_r3.setRotationPoint(-3.1701F, 0.2086F, 3.9355F); - Holografics.addChild(Holografics_r3); - setRotationAngle(Holografics_r3, -0.9774F, 0.0F, 0.0F); - Holografics_r3.cubeList.add(new ModelBox(Holografics_r3, 0, 10, -0.5F, 0.5F, -2.5F, 1, 2, 2, 0.05F, false)); - - Holografics_r4 = new ModelRenderer(this); - Holografics_r4.setRotationPoint(-3.2701F, 3.0086F, 2.5355F); - Holografics.addChild(Holografics_r4); - setRotationAngle(Holografics_r4, -1.0908F, 0.0F, 0.0F); - Holografics_r4.cubeList.add(new ModelBox(Holografics_r4, 30, 34, -0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F, false)); - - Holografics_r5 = new ModelRenderer(this); - Holografics_r5.setRotationPoint(2.9299F, 3.0086F, -5.3645F); - Holografics.addChild(Holografics_r5); - setRotationAngle(Holografics_r5, -0.5236F, 0.0F, 0.0F); - Holografics_r5.cubeList.add(new ModelBox(Holografics_r5, 39, 35, -0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F, false)); - - Holografics_r6 = new ModelRenderer(this); - Holografics_r6.setRotationPoint(2.9299F, 3.0086F, 2.5355F); - Holografics.addChild(Holografics_r6); - setRotationAngle(Holografics_r6, -0.192F, 0.0F, 0.0F); - Holografics_r6.cubeList.add(new ModelBox(Holografics_r6, 39, 39, -0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F, false)); - - Holografics_r7 = new ModelRenderer(this); - Holografics_r7.setRotationPoint(-0.1701F, -0.4931F, -2.1257F); - Holografics.addChild(Holografics_r7); - setRotationAngle(Holografics_r7, 0.4276F, 0.0F, 0.0F); - Holografics_r7.cubeList.add(new ModelBox(Holografics_r7, 36, 2, -1.0F, -0.5F, -0.5F, 2, 1, 1, 0.0F, false)); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - Holografics.render(f5); - } - - public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } -} \ No newline at end of file + private final ModelRenderer Holografics; + private final ModelRenderer gun3_r1_r1; + private final ModelRenderer gun23_r1_r1; + private final ModelRenderer gun26_r1_r1; + private final ModelRenderer gun28_r1_r1; + private final ModelRenderer gun33_r1_r1; + private final ModelRenderer gun43_r1_r1; + private final ModelRenderer gun45_r1_r1; + private final ModelRenderer gun54_r1_r1; + private final ModelRenderer gun55_r1_r1; + private final ModelRenderer gun59_r1_r1; + private final ModelRenderer gun60_r1_r1; + private final ModelRenderer gun65_r1_r1; + private final ModelRenderer gun70_r1_r1; + private final ModelRenderer gun71_r1_r1; + private final ModelRenderer gun72_r1_r1; + private final ModelRenderer gun73_r1_r1; + private final ModelRenderer gun74_r1_r1; + private final ModelRenderer gun75_r1_r1; + private final ModelRenderer gun83_r1_r1; + private final ModelRenderer gun86_r1_r1; + private final ModelRenderer gun86_r1_r2; + private final ModelRenderer gun88_r1_r1; + private final ModelRenderer gun89_r1_r1; + private final ModelRenderer gun103_r1_r1; + + public Holographic() { + textureWidth = 100; + textureHeight = 100; + + Holografics = new ModelRenderer(this); + Holografics.setRotationPoint(-1.3299F, -3.8086F, 2.6645F); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 0, -3.1701F, -0.0914F, -14.6645F, 6, 3, 18, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 21, -3.1701F, 2.8086F, -12.3645F, 6, 1, 17, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 53, -3.6701F, -1.1914F, -3.1645F, 1, 5, 8, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 0, 2.3099F, -1.1914F, -3.1645F, 1, 5, 8, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 59, 7, -3.6701F, -5.1914F, -2.6645F, 1, 4, 6, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 48, 42, 2.3299F, 1.8086F, -6.1645F, 1, 2, 4, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 15, 45, -3.6701F, 1.8086F, -6.1645F, 1, 2, 4, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 10, 54, -2.6701F, -6.1914F, -2.6645F, 5, 1, 6, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 45, 0, -3.6701F, 0.8086F, -4.1645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 45, 2.3299F, 0.8086F, -4.1645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 21, 2.3299F, -5.1914F, -2.6645F, 1, 4, 6, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 30, 9, -2.6701F, -6.1914F, 2.8355F, 5, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 45, 0, -3.1701F, -1.1914F, -1.8645F, 6, 1, 6, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 30, 49, -2.1701F, -1.0014F, -14.6645F, 1, 1, 13, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 44, 22, -1.1701F, -1.2914F, -5.6645F, 2, 1, 4, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 29, 30, 3.0299F, 1.3086F, -3.1645F, 1, 2, 2, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 21, -4.3701F, 1.3086F, -3.1645F, 1, 2, 2, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 39, 0.8299F, -0.9814F, -14.6645F, 1, 1, 13, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 33, 35, 0.3299F, -0.9914F, -14.6645F, 1, 1, 13, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 30, 0, -1.6701F, -0.9914F, -14.6645F, 1, 1, 13, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 29, 21, -0.6701F, -0.7914F, -14.4645F, 1, 1, 13, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 30, 0, -3.3701F, -5.1914F, -1.8645F, 1, 4, 5, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 29, 21, 2.0299F, -5.1914F, -1.8645F, 1, 4, 5, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 45, 7, -2.6701F, -5.8914F, -1.8645F, 5, 1, 5, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 29, 35, -3.1701F, 2.8086F, -12.8645F, 6, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 13, 21, -3.6601F, 1.8086F, 4.3355F, 1, 2, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 14, 15, 2.3299F, 1.8086F, 4.3355F, 1, 2, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 30, 11, -2.4701F, 2.1086F, 4.0355F, 4, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 44, 24, 1.1299F, 2.6086F, 4.0355F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 44, 22, -2.4701F, 2.6086F, 4.0355F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 41, 1.1299F, 2.1086F, 4.0355F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 22, 39, -4.3501F, 1.1086F, -2.6645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 15, 39, -4.3501F, 2.5086F, -2.6645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 7, 39, -4.3501F, 1.8086F, -3.3645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 39, -4.3501F, 1.8086F, -1.9645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 38, 32, 3.0199F, 1.1086F, -2.6645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 37, 2, 3.0199F, 2.5086F, -2.6645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 37, 0, 3.0199F, 1.8086F, -3.3645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 36, 24, 3.0199F, 1.8086F, -1.9645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 12, 25, 2.4299F, 2.6086F, 2.0355F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 8, 25, 2.4299F, 2.6086F, -5.9645F, 1, 1, 1, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 4, 2.3499F, 0.6086F, 1.8355F, 1, 1, 3, 0.0F, false)); + Holografics.cubeList.add(new ModelBox(Holografics, 0, 0, 2.3399F, 0.1086F, 1.8355F, 1, 1, 3, 0.0F, false)); + + gun3_r1_r1 = new ModelRenderer(this); + gun3_r1_r1.setRotationPoint(1.3299F, 28.0047F, 28.3015F); + Holografics.addChild(gun3_r1_r1); + setRotationAngle(gun3_r1_r1, 1.1154F, 0.0F, 0.0F); + gun3_r1_r1.cubeList.add(new ModelBox(gun3_r1_r1, 30, 14, -4.5F, -49.6244F, 3.6402F, 6, 2, 1, 0.0F, false)); + + gun23_r1_r1 = new ModelRenderer(this); + gun23_r1_r1.setRotationPoint(1.3299F, 37.4375F, 10.8497F); + Holografics.addChild(gun23_r1_r1); + setRotationAngle(gun23_r1_r1, 0.8179F, 0.0F, 0.0F); + gun23_r1_r1.cubeList.add(new ModelBox(gun23_r1_r1, 0, 45, -4.98F, -36.777F, 14.3661F, 1, 2, 4, 0.0F, false)); + gun23_r1_r1.cubeList.add(new ModelBox(gun23_r1_r1, 48, 35, 0.99F, -36.777F, 14.3661F, 1, 2, 4, 0.0F, false)); + + gun26_r1_r1 = new ModelRenderer(this); + gun26_r1_r1.setRotationPoint(1.3299F, 28.9261F, -2.8747F); + Holografics.addChild(gun26_r1_r1); + setRotationAngle(gun26_r1_r1, -0.1859F, 0.0F, 0.0F); + gun26_r1_r1.cubeList.add(new ModelBox(gun26_r1_r1, 13, 30, 0.98F, -33.5686F, -6.0992F, 1, 5, 1, 0.0F, false)); + gun26_r1_r1.cubeList.add(new ModelBox(gun26_r1_r1, 0, 31, -4.98F, -33.5686F, -6.0992F, 1, 5, 1, 0.0F, false)); + + gun28_r1_r1 = new ModelRenderer(this); + gun28_r1_r1.setRotationPoint(1.3299F, 34.1762F, -44.036F); + Holografics.addChild(gun28_r1_r1); + setRotationAngle(gun28_r1_r1, -1.2269F, 0.0F, 0.0F); + gun28_r1_r1.cubeList.add(new ModelBox(gun28_r1_r1, 10, 4, -5.0F, -57.1966F, -19.2078F, 1, 1, 3, 0.0F, false)); + gun28_r1_r1.cubeList.add(new ModelBox(gun28_r1_r1, 8, 21, 1.0F, -57.1966F, -19.2078F, 1, 1, 3, 0.0F, false)); + + gun33_r1_r1 = new ModelRenderer(this); + gun33_r1_r1.setRotationPoint(1.3299F, -52.2166F, -59.87F); + Holografics.addChild(gun33_r1_r1); + setRotationAngle(gun33_r1_r1, -2.2679F, 0.0F, 0.0F); + gun33_r1_r1.cubeList.add(new ModelBox(gun33_r1_r1, 35, 30, -4.98F, -82.3682F, -2.4195F, 1, 2, 1, 0.0F, false)); + gun33_r1_r1.cubeList.add(new ModelBox(gun33_r1_r1, 36, 21, 0.99F, -82.3682F, -2.4195F, 1, 2, 1, 0.0F, false)); + + gun43_r1_r1 = new ModelRenderer(this); + gun43_r1_r1.setRotationPoint(-63.87F, -39.8918F, -2.6645F); + Holografics.addChild(gun43_r1_r1); + setRotationAngle(gun43_r1_r1, 0.0F, 0.0F, 2.3213F); + gun43_r1_r1.cubeList.add(new ModelBox(gun43_r1_r1, 48, 28, -16.3701F, -75.5748F, -12.0F, 1, 1, 13, 0.0F, false)); + gun43_r1_r1.cubeList.add(new ModelBox(gun43_r1_r1, 48, 42, -16.3817F, -75.9248F, -12.0F, 1, 1, 13, 0.0F, false)); + + gun45_r1_r1 = new ModelRenderer(this); + gun45_r1_r1.setRotationPoint(59.6472F, -47.2725F, -2.6645F); + Holografics.addChild(gun45_r1_r1); + setRotationAngle(gun45_r1_r1, 0.0F, 0.0F, -2.3213F); + gun45_r1_r1.cubeList.add(new ModelBox(gun45_r1_r1, 15, 40, 7.3358F, -77.7689F, -12.0F, 1, 1, 13, 0.0F, false)); + gun45_r1_r1.cubeList.add(new ModelBox(gun45_r1_r1, 44, 14, 7.3427F, -78.1189F, -12.0F, 1, 1, 13, 0.0F, false)); + + gun54_r1_r1 = new ModelRenderer(this); + gun54_r1_r1.setRotationPoint(-11.0966F, 43.5487F, -2.6645F); + Holografics.addChild(gun54_r1_r1); + setRotationAngle(gun54_r1_r1, 0.0F, 0.0F, 0.7854F); + gun54_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1, 44, 30, -29.2132F, -41.13F, 5.5F, 1, 1, 1, 0.0F, false)); + gun54_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1, 0, 31, -29.2F, -40.63F, 0.0F, 1, 1, 6, 0.0F, false)); + gun54_r1_r1.cubeList.add(new ModelBox(gun54_r1_r1, 59, 17, -29.2132F, -41.13F, 0.0F, 1, 1, 6, 0.0F, false)); + + gun55_r1_r1 = new ModelRenderer(this); + gun55_r1_r1.setRotationPoint(-13.1676F, 41.4776F, -2.6645F); + Holografics.addChild(gun55_r1_r1); + setRotationAngle(gun55_r1_r1, 0.0F, 0.0F, 0.7854F); + gun55_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1, 44, 28, -22.7487F, -44.6655F, 5.49F, 1, 1, 1, 0.0F, false)); + gun55_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1, 30, 39, -22.3487F, -44.658F, 0.0F, 1, 1, 6, 0.0F, false)); + gun55_r1_r1.cubeList.add(new ModelBox(gun55_r1_r1, 26, 55, -22.7487F, -44.666F, 0.0F, 1, 1, 6, 0.0F, false)); + + gun59_r1_r1 = new ModelRenderer(this); + gun59_r1_r1.setRotationPoint(1.3299F, -53.9559F, -59.3478F); + Holografics.addChild(gun59_r1_r1); + setRotationAngle(gun59_r1_r1, -2.3051F, 0.0F, 0.0F); + gun59_r1_r1.cubeList.add(new ModelBox(gun59_r1_r1, 8, 31, 0.7F, -82.4793F, -3.3707F, 1, 2, 1, 0.0F, false)); + gun59_r1_r1.cubeList.add(new ModelBox(gun59_r1_r1, 8, 34, -4.7F, -82.4793F, -3.3707F, 1, 2, 1, 0.0F, false)); + + gun60_r1_r1 = new ModelRenderer(this); + gun60_r1_r1.setRotationPoint(1.3299F, 22.0825F, -54.7441F); + Holografics.addChild(gun60_r1_r1); + setRotationAngle(gun60_r1_r1, -1.45F, 0.0F, 0.0F); + gun60_r1_r1.cubeList.add(new ModelBox(gun60_r1_r1, 45, 56, -4.5F, -61.2549F, -16.0082F, 6, 1, 4, 0.0F, false)); + + gun65_r1_r1 = new ModelRenderer(this); + gun65_r1_r1.setRotationPoint(1.3299F, -79.1099F, 14.4682F); + Holografics.addChild(gun65_r1_r1); + setRotationAngle(gun65_r1_r1, -3.002F, 0.0F, 0.0F); + gun65_r1_r1.cubeList.add(new ModelBox(gun65_r1_r1, 29, 21, 1.0F, -78.8604F, 20.3037F, 1, 3, 1, 0.0F, false)); + gun65_r1_r1.cubeList.add(new ModelBox(gun65_r1_r1, 30, 0, -4.99F, -78.8604F, 20.3037F, 1, 3, 1, 0.0F, false)); + + gun70_r1_r1 = new ModelRenderer(this); + gun70_r1_r1.setRotationPoint(52.994F, -37.3754F, -2.6645F); + Holografics.addChild(gun70_r1_r1); + setRotationAngle(gun70_r1_r1, 0.0F, 0.0F, -2.3562F); + gun70_r1_r1.cubeList.add(new ModelBox(gun70_r1_r1, 44, 14, 9.5321F, -67.4919F, 6.68F, 1, 1, 1, 0.0F, false)); + + gun71_r1_r1 = new ModelRenderer(this); + gun71_r1_r1.setRotationPoint(-57.5768F, -30.1328F, -2.6645F); + Holografics.addChild(gun71_r1_r1); + setRotationAngle(gun71_r1_r1, 0.0F, 0.0F, 2.3562F); + gun71_r1_r1.cubeList.add(new ModelBox(gun71_r1_r1, 38, 43, -18.6534F, -65.3706F, 6.68F, 1, 1, 1, 0.0F, false)); + + gun72_r1_r1 = new ModelRenderer(this); + gun72_r1_r1.setRotationPoint(-76.1662F, -34.7199F, -2.6645F); + Holografics.addChild(gun72_r1_r1); + setRotationAngle(gun72_r1_r1, 0.0F, 0.0F, 2.3562F); + gun72_r1_r1.cubeList.add(new ModelBox(gun72_r1_r1, 44, 28, -28.8981F, -76.3141F, 0.8F, 1, 1, 5, 0.0F, false)); + + gun73_r1_r1 = new ModelRenderer(this); + gun73_r1_r1.setRotationPoint(-65.0608F, -45.8253F, -2.6645F); + Holografics.addChild(gun73_r1_r1); + setRotationAngle(gun73_r1_r1, 0.0F, 0.0F, 2.3562F); + gun73_r1_r1.cubeList.add(new ModelBox(gun73_r1_r1, 44, 16, -16.4454F, -79.5668F, 0.8F, 1, 1, 5, 0.0F, false)); + + gun74_r1_r1 = new ModelRenderer(this); + gun74_r1_r1.setRotationPoint(-85.5817F, -43.1697F, -2.6645F); + Holografics.addChild(gun74_r1_r1); + setRotationAngle(gun74_r1_r1, 0.0F, 0.0F, 2.3562F); + gun74_r1_r1.cubeList.add(new ModelBox(gun74_r1_r1, 15, 39, -32.0558F, -86.189F, 0.8F, 1, 1, 5, 0.0F, false)); + + gun75_r1_r1 = new ModelRenderer(this); + gun75_r1_r1.setRotationPoint(80.999F, -50.4122F, -2.6645F); + Holografics.addChild(gun75_r1_r1); + setRotationAngle(gun75_r1_r1, 0.0F, 0.0F, -2.3562F); + gun75_r1_r1.cubeList.add(new ModelBox(gun75_r1_r1, 0, 39, 22.9346F, -88.3103F, 0.8F, 1, 1, 5, 0.0F, false)); + + gun83_r1_r1 = new ModelRenderer(this); + gun83_r1_r1.setRotationPoint(1.3299F, 21.6485F, -54.088F); + Holografics.addChild(gun83_r1_r1); + setRotationAngle(gun83_r1_r1, -1.45F, 0.0F, 0.0F); + gun83_r1_r1.cubeList.add(new ModelBox(gun83_r1_r1, 22, 41, -2.0F, -61.11F, -14.9352F, 1, 1, 1, 0.0F, false)); + gun83_r1_r1.cubeList.add(new ModelBox(gun83_r1_r1, 30, 41, -2.1F, -61.1016F, -15.0352F, 1, 1, 1, 0.0F, false)); + gun83_r1_r1.cubeList.add(new ModelBox(gun83_r1_r1, 38, 41, -1.9F, -61.1016F, -15.0352F, 1, 1, 1, 0.0F, false)); + gun83_r1_r1.cubeList.add(new ModelBox(gun83_r1_r1, 30, 43, -2.0F, -61.11F, -15.1352F, 1, 1, 1, 0.0F, false)); + + gun86_r1_r1 = new ModelRenderer(this); + gun86_r1_r1.setRotationPoint(1.3299F, 27.4616F, -47.9899F); + Holografics.addChild(gun86_r1_r1); + setRotationAngle(gun86_r1_r1, -1.3384F, 0.0F, 0.0F); + gun86_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1, 10, 0, -0.2F, -57.4301F, -15.4433F, 1, 1, 3, 0.0F, false)); + gun86_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1, 7, 41, -0.2F, -57.4259F, -15.6433F, 1, 1, 1, 0.0F, false)); + gun86_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1, 15, 41, -3.8F, -57.4101F, -15.6433F, 1, 1, 1, 0.0F, false)); + gun86_r1_r1.cubeList.add(new ModelBox(gun86_r1_r1, 0, 13, -3.8F, -57.4259F, -15.4433F, 4, 1, 3, 0.0F, false)); + + gun86_r1_r2 = new ModelRenderer(this); + gun86_r1_r2.setRotationPoint(1.3299F, 27.5616F, -47.9899F); + Holografics.addChild(gun86_r1_r2); + setRotationAngle(gun86_r1_r2, -1.3384F, 0.0F, 0.0F); + gun86_r1_r2.cubeList.add(new ModelBox(gun86_r1_r2, 41, 40, -3.2F, -57.5759F, -13.8433F, 1, 1, 1, 0.0F, false)); + gun86_r1_r2.cubeList.add(new ModelBox(gun86_r1_r2, 42, 36, -0.8F, -57.5771F, -13.8433F, 1, 1, 1, 0.0F, false)); + gun86_r1_r2.cubeList.add(new ModelBox(gun86_r1_r2, 41, 42, -0.4F, -57.5759F, -13.8433F, 1, 1, 1, 0.0F, false)); + gun86_r1_r2.cubeList.add(new ModelBox(gun86_r1_r2, 43, 16, -3.6F, -57.5771F, -13.8433F, 1, 1, 1, 0.0F, false)); + + gun88_r1_r1 = new ModelRenderer(this); + gun88_r1_r1.setRotationPoint(2.2915F, 29.8374F, -2.6645F); + Holografics.addChild(gun88_r1_r1); + setRotationAngle(gun88_r1_r1, 0.0F, 0.0F, -0.2974F); + gun88_r1_r1.cubeList.add(new ModelBox(gun88_r1_r1, 38, 39, 3.5521F, -27.4952F, 6.9F, 1, 1, 1, 0.0F, false)); + + gun89_r1_r1 = new ModelRenderer(this); + gun89_r1_r1.setRotationPoint(0.6201F, 29.9145F, -2.6645F); + Holografics.addChild(gun89_r1_r1); + setRotationAngle(gun89_r1_r1, 0.0F, 0.0F, 0.2974F); + gun89_r1_r1.cubeList.add(new ModelBox(gun89_r1_r1, 30, 39, -7.6835F, -26.616F, 6.9F, 1, 1, 1, 0.0F, false)); + + gun103_r1_r1 = new ModelRenderer(this); + gun103_r1_r1.setRotationPoint(1.3299F, 14.566F, -59.4593F); + Holografics.addChild(gun103_r1_r1); + setRotationAngle(gun103_r1_r1, -1.5615F, 0.0F, 0.0F); + gun103_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1, 11, 13, -1.3F, -64.3339F, -13.3638F, 2, 1, 1, 0.0F, false)); + gun103_r1_r1.cubeList.add(new ModelBox(gun103_r1_r1, 0, 25, -3.7F, -64.3339F, -13.3638F, 2, 1, 1, 0.0F, false)); + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + Holografics.render(f5); + } + + public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { + modelRenderer.rotateAngleX = x; + modelRenderer.rotateAngleY = y; + modelRenderer.rotateAngleZ = z; + } +} diff --git a/src/main/java/com/paneedah/mwc/models/Holographic2.java b/src/main/java/com/paneedah/mwc/models/Holographic2.java index 72aaf4e8c..41a6e4ce6 100644 --- a/src/main/java/com/paneedah/mwc/models/Holographic2.java +++ b/src/main/java/com/paneedah/mwc/models/Holographic2.java @@ -1,353 +1,958 @@ +// Date: 7/30/2019 8:50:27 PM +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + + package com.paneedah.mwc.models; import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; -// Made with Blockbench 4.8.1 -// Exported for Minecraft version 1.7 - 1.12 -// Paste this class into your mod and generate all required imports - - public class Holographic2 extends ModelBase { - private final ModelRenderer holo; - private final ModelRenderer gun152_r1; - private final ModelRenderer gun151_r1; - private final ModelRenderer gun150_r1; - private final ModelRenderer gun149_r1; - private final ModelRenderer gun143_r1; - private final ModelRenderer gun142_r1; - private final ModelRenderer gun141_r1; - private final ModelRenderer gun133_r1; - private final ModelRenderer gun131_r1; - private final ModelRenderer gun129_r1; - private final ModelRenderer gun124_r1; - private final ModelRenderer gun122_r1; - private final ModelRenderer gun115_r1; - private final ModelRenderer gun112_r1; - private final ModelRenderer gun108_r1; - private final ModelRenderer gun107_r1; - private final ModelRenderer gun106_r1; - private final ModelRenderer gun105_r1; - private final ModelRenderer gun89_r1; - private final ModelRenderer gun88_r1; - private final ModelRenderer gun86_r1; - private final ModelRenderer gun75_r1; - private final ModelRenderer gun74_r1; - private final ModelRenderer gun73_r1; - private final ModelRenderer gun72_r1; - private final ModelRenderer gun71_r1; - private final ModelRenderer gun70_r1; - private final ModelRenderer gun65_r1; - private final ModelRenderer gun60_r1; - private final ModelRenderer gun59_r1; - private final ModelRenderer gun55_r1; - private final ModelRenderer gun54_r1; - private final ModelRenderer gun28_r1; - private final ModelRenderer gun26_r1; - - public Holographic2() { - textureWidth = 64; - textureHeight = 64; - - holo = new ModelRenderer(this); - holo.setRotationPoint(0.0F, -22.0425F, 9.0714F); - holo.cubeList.add(new ModelBox(holo, 23, 0, -5.0F, 18.3425F, -14.0714F, 1, 2, 2, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 10, -4.5F, 18.1425F, -15.0714F, 6, 2, 7, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 0, -4.5F, 20.9425F, -10.7714F, 7, 1, 9, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 18, 11, -5.0F, 17.0425F, -9.5714F, 1, 4, 8, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 17, 47, 1.7F, 17.0425F, -9.5714F, 1, 4, 4, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 32, -5.0F, 13.0425F, -9.0714F, 1, 4, 6, -0.001F, false)); - holo.cubeList.add(new ModelBox(holo, 51, 32, 1.7F, 19.0425F, -11.5714F, 1, 2, 2, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 51, 3, -5.0F, 19.0425F, -11.5714F, 1, 2, 2, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 18, 23, -4.0F, 12.0425F, -9.0714F, 5, 1, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 4, 54, -5.0F, 19.0425F, -10.5714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 54, 1.0F, 19.0425F, -10.5714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 29, 30, 1.0F, 13.0425F, -9.0714F, 1, 4, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 49, 48, -4.0F, 12.0425F, -3.5714F, 5, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 19, -4.5F, 17.0425F, -8.2714F, 6, 1, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 28, 41, -4.5F, 17.2425F, -14.1714F, 1, 1, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 41, 12, 0.5F, 17.2425F, -14.1714F, 1, 1, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 23, 0, -4.0F, 17.4425F, -14.2714F, 5, 1, 6, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 22, 38, -4.7F, 13.0425F, -8.2714F, 1, 4, 5, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 34, 18, 0.7F, 13.0425F, -8.2714F, 1, 4, 5, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 26, -4.0F, 12.3425F, -8.2714F, 5, 1, 5, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 22, 38, -5.0F, 20.0425F, -2.0714F, 1, 2, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 16, 38, 1.7F, 20.0425F, -2.0714F, 1, 2, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 28, 17, -3.8F, 20.3425F, -2.1714F, 4, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 53, 0, -0.2F, 20.8425F, -2.1714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 52, 24, -3.8F, 20.8425F, -2.1714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 15, -0.5F, 20.3425F, -2.1714F, 2, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 33, 50, 1.8F, 19.8425F, -7.3714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 6, 50, 1.8F, 19.8425F, -11.0714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 23, 47, 1.71F, 17.8425F, -7.5714F, 1, 1, 3, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 4, 1.71F, 17.3425F, -7.5714F, 1, 1, 3, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 8, 32, 1.7F, 17.0425F, -10.0714F, 1, 2, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 36, 41, -5.0F, 21.0425F, -7.0714F, 1, 1, 5, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 22, 30, 1.7F, 21.0425F, -7.0714F, 1, 1, 5, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 39, 0, -4.5F, 20.1425F, -14.0714F, 6, 1, 2, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 28, 12, -4.0F, 19.9425F, -11.7714F, 5, 2, 3, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 29, 30, 1.0F, 18.1425F, -15.0714F, 1, 2, 2, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 8, 45, 1.0F, 20.1425F, -14.0714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 44, 6, 1.0F, 17.2425F, -14.1714F, 1, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 43, 43, 1.0F, 17.2425F, -14.0714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 8, 42, -5.0F, 18.1425F, -13.5714F, 1, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 36, 41, -5.0F, 19.5425F, -13.5714F, 1, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 38, 27, -5.0F, 18.8425F, -14.2714F, 1, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 37, 34, -5.0F, 18.8425F, -12.8714F, 1, 1, 1, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 36, -5.1F, 19.8425F, -7.3714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 34, 27, -5.1F, 19.8425F, -2.2714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 15, 29, 1.0F, 19.8425F, -2.3714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 27, 7, 1.0F, 20.4425F, -2.3714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 0, 49, 1.7F, 18.5425F, -6.0714F, 1, 1, 4, -0.002F, false)); - holo.cubeList.add(new ModelBox(holo, 27, 48, 1.7F, 17.0425F, -5.5714F, 1, 2, 4, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 45, 34, 1.5F, 19.5425F, -6.0714F, 1, 2, 4, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 19, 26, 1.6F, 19.8425F, -5.3714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 18, 23, 1.6F, 19.8425F, -3.2714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 23, 7, 1.6F, 19.8425F, -5.0714F, 1, 1, 1, 0.0F, false)); - holo.cubeList.add(new ModelBox(holo, 23, 4, 1.6F, 19.8425F, -3.5714F, 1, 1, 1, 0.0F, false)); - - gun152_r1 = new ModelRenderer(this); - gun152_r1.setRotationPoint(7.0841F, 46.0425F, -5.0058F); - holo.addChild(gun152_r1); - setRotationAngle(gun152_r1, -3.1416F, -0.7854F, 3.1416F); - gun152_r1.cubeList.add(new ModelBox(gun152_r1, 5, 0, 2.7F, -26.5F, 3.5F, 1, 2, 1, 0.0F, false)); - - gun151_r1 = new ModelRenderer(this); - gun151_r1.setRotationPoint(9.5589F, 46.0425F, 0.9691F); - holo.addChild(gun151_r1); - setRotationAngle(gun151_r1, -3.1416F, -0.7854F, 3.1416F); - gun151_r1.cubeList.add(new ModelBox(gun151_r1, 5, 4, 2.7F, -26.5F, 7.0F, 1, 2, 1, 0.0F, false)); - - gun150_r1 = new ModelRenderer(this); - gun150_r1.setRotationPoint(-14.1292F, -1.105F, -9.0714F); - holo.addChild(gun150_r1); - setRotationAngle(gun150_r1, 0.0F, 0.0F, 2.3562F); - gun150_r1.cubeList.add(new ModelBox(gun150_r1, 8, 32, 2.7F, -26.5F, 3.0F, 1, 1, 4, 0.0F, false)); - - gun149_r1 = new ModelRenderer(this); - gun149_r1.setRotationPoint(-13.0685F, 1.4556F, -9.0714F); - holo.addChild(gun149_r1); - setRotationAngle(gun149_r1, 0.0F, 0.0F, 2.3562F); - gun149_r1.cubeList.add(new ModelBox(gun149_r1, 16, 38, 2.7F, -25.0F, 3.0F, 1, 1, 4, 0.0F, false)); - - gun143_r1 = new ModelRenderer(this); - gun143_r1.setRotationPoint(0.0F, 17.1193F, -31.4378F); - holo.addChild(gun143_r1); - setRotationAngle(gun143_r1, -1.3384F, 0.0F, 0.0F); - gun143_r1.cubeList.add(new ModelBox(gun143_r1, 0, 0, 1.0F, -28.6F, 6.6F, 1, 1, 3, 0.0F, false)); - - gun142_r1 = new ModelRenderer(this); - gun142_r1.setRotationPoint(0.0F, 43.7469F, 5.549F); - holo.addChild(gun142_r1); - setRotationAngle(gun142_r1, 0.5205F, 0.0F, 0.0F); - gun142_r1.cubeList.add(new ModelBox(gun142_r1, 0, 19, -5.1F, -28.6F, 3.0F, 1, 2, 2, 0.0F, false)); - - gun141_r1 = new ModelRenderer(this); - gun141_r1.setRotationPoint(0.0F, 41.4458F, 4.1907F); - holo.addChild(gun141_r1); - setRotationAngle(gun141_r1, 0.5205F, 0.0F, 0.0F); - gun141_r1.cubeList.add(new ModelBox(gun141_r1, 19, 10, -5.1F, -27.2F, -2.0F, 1, 2, 2, 0.0F, false)); - - gun133_r1 = new ModelRenderer(this); - gun133_r1.setRotationPoint(0.0F, 0.0F, 0.0F); - holo.addChild(gun133_r1); - setRotationAngle(gun133_r1, 2.3562F, 0.0F, 0.0F); - gun133_r1.cubeList.add(new ModelBox(gun133_r1, 43, 3, 1.0F, -24.9F, -5.0F, 1, 1, 1, 0.0F, false)); - gun133_r1.cubeList.add(new ModelBox(gun133_r1, 43, 16, 1.0F, -24.9F, -4.6F, 1, 1, 1, -0.002F, false)); - gun133_r1.cubeList.add(new ModelBox(gun133_r1, 44, 9, -4.5F, -24.9F, -4.6F, 6, 1, 1, -0.001F, false)); - gun133_r1.cubeList.add(new ModelBox(gun133_r1, 33, 48, -4.5F, -24.9F, -5.0F, 6, 1, 1, 0.0F, false)); - - gun131_r1 = new ModelRenderer(this); - gun131_r1.setRotationPoint(0.0F, 33.6281F, 8.8995F); - holo.addChild(gun131_r1); - setRotationAngle(gun131_r1, 0.7854F, 0.0F, 0.0F); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 36, 43, 1.0F, -27.9F, -6.0F, 1, 1, 1, -0.002F, false)); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 43, 41, 1.0F, -27.9F, -5.7F, 1, 1, 1, -0.002F, false)); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 16, 45, 0.5F, -27.9F, -5.7F, 1, 1, 1, 0.0F, false)); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 45, 34, -4.5F, -27.9F, -5.7F, 1, 1, 1, 0.0F, false)); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 45, 36, 0.5F, -27.9F, -6.0F, 1, 1, 1, 0.0F, false)); - gun131_r1.cubeList.add(new ModelBox(gun131_r1, 46, 22, -4.5F, -27.9F, -6.0F, 1, 1, 1, -0.001F, false)); - - gun129_r1 = new ModelRenderer(this); - gun129_r1.setRotationPoint(-1.2239F, 46.0425F, -16.1709F); - holo.addChild(gun129_r1); - setRotationAngle(gun129_r1, -3.1416F, -1.2687F, 3.1416F); - gun129_r1.cubeList.add(new ModelBox(gun129_r1, 0, 10, 2.0F, -28.8F, -4.0F, 2, 4, 1, -0.002F, false)); - - gun124_r1 = new ModelRenderer(this); - gun124_r1.setRotationPoint(0.0F, 34.2487F, -32.1288F); - holo.addChild(gun124_r1); - setRotationAngle(gun124_r1, -0.8923F, 0.0F, 0.0F); - gun124_r1.cubeList.add(new ModelBox(gun124_r1, 0, 32, 0.7F, -30.0F, 0.8F, 1, 2, 2, 0.0F, false)); - gun124_r1.cubeList.add(new ModelBox(gun124_r1, 14, 32, -4.7F, -30.0F, 0.8F, 1, 2, 2, 0.0F, false)); - - gun122_r1 = new ModelRenderer(this); - gun122_r1.setRotationPoint(0.0F, 40.1321F, -32.4423F); - holo.addChild(gun122_r1); - setRotationAngle(gun122_r1, -0.8551F, 0.0F, 0.0F); - gun122_r1.cubeList.add(new ModelBox(gun122_r1, 49, 11, -4.0F, -28.6F, -5.2F, 5, 1, 1, 0.0F, false)); - - gun115_r1 = new ModelRenderer(this); - gun115_r1.setRotationPoint(0.0F, 1.4142F, 3.4142F); - holo.addChild(gun115_r1); - setRotationAngle(gun115_r1, 2.3562F, 0.0F, 0.0F); - gun115_r1.cubeList.add(new ModelBox(gun115_r1, 41, 19, -4.5F, -24.9F, -3.0F, 6, 2, 1, 0.0F, false)); - - gun112_r1 = new ModelRenderer(this); - gun112_r1.setRotationPoint(0.0F, 6.4861F, 11.3133F); - holo.addChild(gun112_r1); - setRotationAngle(gun112_r1, 2.3562F, 0.0F, 0.0F); - gun112_r1.cubeList.add(new ModelBox(gun112_r1, 19, 14, -5.0F, -24.0F, 2.0F, 1, 1, 2, -0.002F, false)); - gun112_r1.cubeList.add(new ModelBox(gun112_r1, 15, 26, 1.7F, -24.0F, 2.0F, 1, 1, 2, -0.001F, false)); - - gun108_r1 = new ModelRenderer(this); - gun108_r1.setRotationPoint(-15.7463F, 4.1648F, -9.0714F); - holo.addChild(gun108_r1); - setRotationAngle(gun108_r1, 0.0F, 0.0F, 2.3562F); - gun108_r1.cubeList.add(new ModelBox(gun108_r1, 46, 24, -0.2F, -24.2F, 6.9F, 1, 1, 1, -0.002F, false)); - - gun107_r1 = new ModelRenderer(this); - gun107_r1.setRotationPoint(0.0F, -7.3257F, -18.991F); - holo.addChild(gun107_r1); - setRotationAngle(gun107_r1, -2.2679F, 0.0F, 0.0F); - gun107_r1.cubeList.add(new ModelBox(gun107_r1, 16, 47, 1.0F, -28.3F, 7.5F, 1, 1, 1, 0.0F, false)); - gun107_r1.cubeList.add(new ModelBox(gun107_r1, 41, 12, -5.0F, -29.0F, 7.5F, 1, 2, 1, -0.002F, false)); - gun107_r1.cubeList.add(new ModelBox(gun107_r1, 52, 53, 1.3F, -29.0F, 7.5F, 1, 1, 1, 0.0F, false)); - - gun106_r1 = new ModelRenderer(this); - gun106_r1.setRotationPoint(-15.8969F, -5.3728F, -9.0714F); - holo.addChild(gun106_r1); - setRotationAngle(gun106_r1, 0.0F, 0.0F, 2.3562F); - gun106_r1.cubeList.add(new ModelBox(gun106_r1, 13, 30, 2.7F, -29.0F, -0.5F, 1, 1, 7, 0.0F, false)); - - gun105_r1 = new ModelRenderer(this); - gun105_r1.setRotationPoint(0.0F, 33.1923F, 11.5593F); - holo.addChild(gun105_r1); - setRotationAngle(gun105_r1, 0.9295F, 0.0F, 0.0F); - gun105_r1.cubeList.add(new ModelBox(gun105_r1, 0, 49, 1.7F, -27.0F, -1.0F, 1, 1, 1, -0.001F, false)); - gun105_r1.cubeList.add(new ModelBox(gun105_r1, 43, 48, -5.0F, -27.0F, -2.5F, 1, 2, 4, -0.002F, false)); - gun105_r1.cubeList.add(new ModelBox(gun105_r1, 10, 51, 1.7F, -27.0F, -2.5F, 1, 2, 2, -0.002F, false)); - - gun89_r1 = new ModelRenderer(this); - gun89_r1.setRotationPoint(-7.3836F, 44.7266F, -9.0714F); - holo.addChild(gun89_r1); - setRotationAngle(gun89_r1, 0.0F, 0.0F, 0.2974F); - gun89_r1.cubeList.add(new ModelBox(gun89_r1, 54, 18, -0.3F, -25.3F, 7.1F, 1, 1, 1, 0.0F, false)); - - gun88_r1 = new ModelRenderer(this); - gun88_r1.setRotationPoint(7.252F, 43.8473F, -9.0714F); - holo.addChild(gun88_r1); - setRotationAngle(gun88_r1, 0.0F, 0.0F, -0.2974F); - gun88_r1.cubeList.add(new ModelBox(gun88_r1, 0, 23, -3.7F, -25.3F, 7.1F, 1, 1, 1, 0.0F, false)); - - gun86_r1 = new ModelRenderer(this); - gun86_r1.setRotationPoint(0.0F, 17.022F, -31.3608F); - holo.addChild(gun86_r1); - setRotationAngle(gun86_r1, -1.3384F, 0.0F, 0.0F); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 49, 13, -0.5F, -28.6F, 7.2F, 2, 1, 3, -0.001F, false)); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 41, 50, -0.2F, -28.6F, 7.0F, 1, 1, 1, -0.002F, false)); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 50, 44, -3.8F, -28.6F, 7.0F, 1, 1, 1, -0.002F, false)); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 49, 50, -0.4F, -28.7F, 7.4F, 1, 1, 1, 0.0F, false)); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 0, 51, -3.6F, -28.7F, 7.4F, 1, 1, 1, 0.0F, false)); - gun86_r1.cubeList.add(new ModelBox(gun86_r1, 45, 28, -3.8F, -28.6F, 7.2F, 4, 1, 3, 0.0F, false)); - - gun75_r1 = new ModelRenderer(this); - gun75_r1.setRotationPoint(23.6345F, -9.5678F, -9.0714F); - holo.addChild(gun75_r1); - setRotationAngle(gun75_r1, 0.0F, 0.0F, -2.3562F); - gun75_r1.cubeList.add(new ModelBox(gun75_r1, 43, 42, -0.7F, -32.7F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun74_r1 = new ModelRenderer(this); - gun74_r1.setRotationPoint(-28.7559F, -7.4464F, -9.0714F); - holo.addChild(gun74_r1); - setRotationAngle(gun74_r1, 0.0F, 0.0F, 2.3562F); - gun74_r1.cubeList.add(new ModelBox(gun74_r1, 44, 3, -3.3F, -32.7F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun73_r1 = new ModelRenderer(this); - gun73_r1.setRotationPoint(-17.9454F, -4.5243F, -9.0714F); - holo.addChild(gun73_r1); - setRotationAngle(gun73_r1, 0.0F, 0.0F, 2.3562F); - gun73_r1.cubeList.add(new ModelBox(gun73_r1, 9, 45, 1.5F, -29.0F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun72_r1 = new ModelRenderer(this); - gun72_r1.setRotationPoint(-25.7981F, -1.2716F, -9.0714F); - holo.addChild(gun72_r1); - setRotationAngle(gun72_r1, 0.0F, 0.0F, 2.3562F); - gun72_r1.cubeList.add(new ModelBox(gun72_r1, 45, 22, -3.1F, -29.0F, 0.8F, 1, 1, 5, 0.0F, false)); - - gun71_r1 = new ModelRenderer(this); - gun71_r1.setRotationPoint(-17.4534F, 4.8719F, -9.0714F); - holo.addChild(gun71_r1); - setRotationAngle(gun71_r1, 0.0F, 0.0F, 2.3562F); - gun71_r1.cubeList.add(new ModelBox(gun71_r1, 51, 36, -1.2F, -24.2F, 6.9F, 1, 1, 1, -0.002F, false)); - - gun70_r1 = new ModelRenderer(this); - gun70_r1.setRotationPoint(12.3321F, 2.7506F, -9.0714F); - holo.addChild(gun70_r1); - setRotationAngle(gun70_r1, 0.0F, 0.0F, -2.3562F); - gun70_r1.cubeList.add(new ModelBox(gun70_r1, 52, 22, -2.8F, -24.2F, 6.9F, 1, 1, 1, -0.002F, false)); - - gun65_r1 = new ModelRenderer(this); - gun65_r1.setRotationPoint(0.0F, -6.8179F, 3.2322F); - holo.addChild(gun65_r1); - setRotationAngle(gun65_r1, -3.002F, 0.0F, 0.0F); - gun65_r1.cubeList.add(new ModelBox(gun65_r1, 0, 26, 1.7F, -26.0F, 8.0F, 1, 3, 1, -0.002F, false)); - gun65_r1.cubeList.add(new ModelBox(gun65_r1, 22, 30, -5.0F, -26.0F, 8.0F, 1, 3, 1, -0.002F, false)); - - gun60_r1 = new ModelRenderer(this); - gun60_r1.setRotationPoint(0.0F, 13.7876F, -31.8796F); - holo.addChild(gun60_r1); - setRotationAngle(gun60_r1, -1.45F, 0.0F, 0.0F); - gun60_r1.cubeList.add(new ModelBox(gun60_r1, 28, 7, -4.0F, -29.0F, 6.8F, 6, 1, 4, 0.0F, false)); - - gun59_r1 = new ModelRenderer(this); - gun59_r1.setRotationPoint(0.0F, -7.4367F, -19.2422F); - holo.addChild(gun59_r1); - setRotationAngle(gun59_r1, -2.3051F, 0.0F, 0.0F); - gun59_r1.cubeList.add(new ModelBox(gun59_r1, 39, 3, 0.7F, -29.0F, 6.8F, 1, 2, 1, 0.0F, false)); - gun59_r1.cubeList.add(new ModelBox(gun59_r1, 29, 40, -4.7F, -29.0F, 6.8F, 1, 2, 1, 0.0F, false)); - - gun55_r1 = new ModelRenderer(this); - gun55_r1.setRotationPoint(-23.7487F, 35.377F, -9.0714F); - holo.addChild(gun55_r1); - setRotationAngle(gun55_r1, 0.0F, 0.0F, 0.7854F); - gun55_r1.cubeList.add(new ModelBox(gun55_r1, 53, 45, 1.0F, -34.0F, 5.5F, 1, 1, 1, -0.001F, false)); - gun55_r1.cubeList.add(new ModelBox(gun55_r1, 37, 34, 1.4F, -34.0F, 0.0F, 1, 1, 6, 0.0F, false)); - gun55_r1.cubeList.add(new ModelBox(gun55_r1, 8, 38, 1.0F, -34.0F, 0.0F, 1, 1, 6, -0.002F, false)); - - gun54_r1 = new ModelRenderer(this); - gun54_r1.setRotationPoint(-25.2132F, 38.9125F, -9.0714F); - holo.addChild(gun54_r1); - setRotationAngle(gun54_r1, 0.0F, 0.0F, 0.7854F); - gun54_r1.cubeList.add(new ModelBox(gun54_r1, 53, 50, -4.0F, -34.0F, 5.5F, 1, 1, 1, -0.002F, false)); - gun54_r1.cubeList.add(new ModelBox(gun54_r1, 37, 27, -4.0F, -33.5F, 0.0F, 1, 1, 6, 0.0F, false)); - gun54_r1.cubeList.add(new ModelBox(gun54_r1, 0, 42, -4.0F, -34.0F, 0.0F, 1, 1, 6, -0.002F, false)); - - gun28_r1 = new ModelRenderer(this); - gun28_r1.setRotationPoint(0.0F, 19.8459F, -34.2792F); - holo.addChild(gun28_r1); - setRotationAngle(gun28_r1, -1.2269F, 0.0F, 0.0F); - gun28_r1.cubeList.add(new ModelBox(gun28_r1, 50, 40, -5.0F, -31.0F, 6.0F, 1, 1, 3, -0.002F, false)); - gun28_r1.cubeList.add(new ModelBox(gun28_r1, 37, 30, 1.0F, -31.0F, 6.0F, 1, 1, 2, -0.002F, false)); - - gun26_r1 = new ModelRenderer(this); - gun26_r1.setRotationPoint(0.0F, 45.4739F, -15.1706F); - holo.addChild(gun26_r1); - setRotationAngle(gun26_r1, -0.1859F, 0.0F, 0.0F); - gun26_r1.cubeList.add(new ModelBox(gun26_r1, 0, 42, 1.0F, -33.0F, 0.0F, 1, 5, 1, 0.0015F, false)); - gun26_r1.cubeList.add(new ModelBox(gun26_r1, 37, 50, -5.0F, -33.0F, 0.0F, 1, 5, 1, 0.0F, false)); - } - - @Override - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { - holo.render(f5); - } + //fields + ModelRenderer gun1; + ModelRenderer gun2; + ModelRenderer gun4; + ModelRenderer gun5; + ModelRenderer gun7; + ModelRenderer gun8; + ModelRenderer gun9; + ModelRenderer gun11; + ModelRenderer gun12; + ModelRenderer gun13; + ModelRenderer gun21; + ModelRenderer gun22; + ModelRenderer gun23; + ModelRenderer gun24; + ModelRenderer gun25; + ModelRenderer gun26; + ModelRenderer gun27; + ModelRenderer gun28; + ModelRenderer gun31; + ModelRenderer gun32; + ModelRenderer gun33; + ModelRenderer gun36; + ModelRenderer gun37; + ModelRenderer gun46; + ModelRenderer gun49; + ModelRenderer gun50; + ModelRenderer gun51; + ModelRenderer gun52; + ModelRenderer gun53; + ModelRenderer gun54; + ModelRenderer gun55; + ModelRenderer gun56; + ModelRenderer gun57; + ModelRenderer gun58; + ModelRenderer gun59; + ModelRenderer gun60; + ModelRenderer gun62; + ModelRenderer gun63; + ModelRenderer gun64; + ModelRenderer gun65; + ModelRenderer gun66; + ModelRenderer gun67; + ModelRenderer gun68; + ModelRenderer gun69; + ModelRenderer gun70; + ModelRenderer gun71; + ModelRenderer gun72; + ModelRenderer gun73; + ModelRenderer gun74; + ModelRenderer gun75; + ModelRenderer gun77; + ModelRenderer gun78; + ModelRenderer gun84; + ModelRenderer gun85; + ModelRenderer gun86; + ModelRenderer gun87; + ModelRenderer gun88; + ModelRenderer gun89; + ModelRenderer gun98; + ModelRenderer gun99; + ModelRenderer gun100; + ModelRenderer gun101; + ModelRenderer gun104; + ModelRenderer gun105; + ModelRenderer gun106; + ModelRenderer gun107; + ModelRenderer gun108; + ModelRenderer gun109; + ModelRenderer gun110; + ModelRenderer gun111; + ModelRenderer gun112; + ModelRenderer gun113; + ModelRenderer gun114; + ModelRenderer gun115; + ModelRenderer gun116; + ModelRenderer gun117; + ModelRenderer gun118; + ModelRenderer gun119; + ModelRenderer gun120; + ModelRenderer gun121; + ModelRenderer gun122; + ModelRenderer gun123; + ModelRenderer gun124; + ModelRenderer gun125; + ModelRenderer gun126; + ModelRenderer gun127; + ModelRenderer gun128; + ModelRenderer gun129; + ModelRenderer gun130; + ModelRenderer gun131; + ModelRenderer gun132; + ModelRenderer gun133; + ModelRenderer gun134; + ModelRenderer gun135; + ModelRenderer gun136; + ModelRenderer gun137; + ModelRenderer gun138; + ModelRenderer gun139; + ModelRenderer gun140; + ModelRenderer gun141; + ModelRenderer gun142; + ModelRenderer gun143; + ModelRenderer gun144; + ModelRenderer gun145; + ModelRenderer gun146; + ModelRenderer gun147; + ModelRenderer gun148; + ModelRenderer gun149; + ModelRenderer gun150; + ModelRenderer gun151; + ModelRenderer gun152; + ModelRenderer gun153; + ModelRenderer gun154; + ModelRenderer gun155; + ModelRenderer gun156; + + public Holographic2() { + textureWidth = 256; + textureHeight = 128; + + gun1 = new ModelRenderer(this, 0, 0); + gun1.addBox(0F, 0F, 0F, 6, 2, 7); + gun1.setRotationPoint(-4.5F, -3.9F, -6F); + gun1.setTextureSize(64, 32); + gun1.mirror = true; + setRotation(gun1, 0F, 0F, 0F); + gun2 = new ModelRenderer(this, 0, 0); + gun2.addBox(0F, 0F, 0F, 7, 1, 9); + gun2.setRotationPoint(-4.5F, -1.1F, -1.7F); + gun2.setTextureSize(64, 32); + gun2.mirror = true; + setRotation(gun2, 0F, 0F, 0F); + gun4 = new ModelRenderer(this, 0, 0); + gun4.addBox(0F, 0F, 0F, 1, 4, 8); + gun4.setRotationPoint(-5F, -5F, -0.5F); + gun4.setTextureSize(64, 32); + gun4.mirror = true; + setRotation(gun4, 0F, 0F, 0F); + gun5 = new ModelRenderer(this, 0, 0); + gun5.addBox(0F, 0F, 0F, 1, 4, 4); + gun5.setRotationPoint(1.7F, -5F, -0.5F); + gun5.setTextureSize(64, 32); + gun5.mirror = true; + setRotation(gun5, 0F, 0F, 0F); + gun7 = new ModelRenderer(this, 0, 0); + gun7.addBox(0F, 0F, 0F, 1, 4, 6); + gun7.setRotationPoint(-5F, -9F, 0F); + gun7.setTextureSize(64, 32); + gun7.mirror = true; + setRotation(gun7, 0F, 0F, 0F); + gun8 = new ModelRenderer(this, 0, 0); + gun8.addBox(0F, 0F, 0F, 1, 2, 2); + gun8.setRotationPoint(1.7F, -3F, -2.5F); + gun8.setTextureSize(64, 32); + gun8.mirror = true; + setRotation(gun8, 0F, 0F, 0F); + gun9 = new ModelRenderer(this, 0, 0); + gun9.addBox(0F, 0F, 0F, 1, 2, 2); + gun9.setRotationPoint(1.7F, -3F, -2.5F); + gun9.setTextureSize(64, 32); + gun9.mirror = true; + setRotation(gun9, 0.9294653F, 0F, 0F); + gun11 = new ModelRenderer(this, 0, 0); + gun11.addBox(0F, 0F, 0F, 1, 2, 2); + gun11.setRotationPoint(-5F, -3F, -2.5F); + gun11.setTextureSize(64, 32); + gun11.mirror = true; + setRotation(gun11, 0F, 0F, 0F); + gun12 = new ModelRenderer(this, 0, 0); + gun12.addBox(0F, 0F, 0F, 5, 1, 6); + gun12.setRotationPoint(-4F, -10F, 0F); + gun12.setTextureSize(64, 32); + gun12.mirror = true; + setRotation(gun12, 0F, 0F, 0F); + gun13 = new ModelRenderer(this, 0, 0); + gun13.addBox(0F, 0F, 0F, 1, 1, 6); + gun13.setRotationPoint(-4F, -10F, 0F); + gun13.setTextureSize(64, 32); + gun13.mirror = true; + setRotation(gun13, 0F, 0F, 0.7853982F); + gun21 = new ModelRenderer(this, 0, 0); + gun21.addBox(0F, 0F, 0F, 1, 1, 1); + gun21.setRotationPoint(-5F, -3F, -1.5F); + gun21.setTextureSize(64, 32); + gun21.mirror = true; + setRotation(gun21, 0F, 0F, 0F); + gun22 = new ModelRenderer(this, 0, 0); + gun22.addBox(0F, 0F, 0F, 1, 1, 1); + gun22.setRotationPoint(1F, -3F, -1.5F); + gun22.setTextureSize(64, 32); + gun22.mirror = true; + setRotation(gun22, 0F, 0F, 0F); + gun23 = new ModelRenderer(this, 0, 0); + gun23.addBox(0F, 0F, 0F, 1, 2, 4); + gun23.setRotationPoint(-5F, -3F, -2.5F); + gun23.setTextureSize(64, 32); + gun23.mirror = true; + setRotation(gun23, 0.9294653F, 0F, 0F); + gun24 = new ModelRenderer(this, 0, 0); + gun24.addBox(0F, 0F, 0F, 1, 4, 6); + gun24.setRotationPoint(1F, -9F, 0F); + gun24.setTextureSize(64, 32); + gun24.mirror = true; + setRotation(gun24, 0F, 0F, 0F); + gun25 = new ModelRenderer(this, 0, 0); + gun25.addBox(0F, 0F, 0F, 1, 5, 1); + gun25.setRotationPoint(-5F, -9F, 0F); + gun25.setTextureSize(64, 32); + gun25.mirror = true; + setRotation(gun25, -0.1858931F, 0F, 0F); + gun26 = new ModelRenderer(this, 0, 0); + gun26.addBox(0F, 0F, 0F, 1, 5, 1); + gun26.setRotationPoint(1F, -9F, 0F); + gun26.setTextureSize(64, 32); + gun26.mirror = true; + setRotation(gun26, -0.1858931F, 0F, 0F); + gun27 = new ModelRenderer(this, 0, 0); + gun27.addBox(0F, 0F, 0F, 1, 1, 2); + gun27.setRotationPoint(1F, -7F, 6F); + gun27.setTextureSize(64, 32); + gun27.mirror = true; + setRotation(gun27, -1.226894F, 0F, 0F); + gun28 = new ModelRenderer(this, 0, 0); + gun28.addBox(0F, 0F, 0F, 1, 1, 3); + gun28.setRotationPoint(-5F, -7F, 6F); + gun28.setTextureSize(64, 32); + gun28.mirror = true; + setRotation(gun28, -1.226894F, 0F, 0F); + gun31 = new ModelRenderer(this, 0, 0); + gun31.addBox(0F, 0F, 0F, 5, 1, 1); + gun31.setRotationPoint(-4F, -10F, 5.5F); + gun31.setTextureSize(64, 32); + gun31.mirror = true; + setRotation(gun31, 0F, 0F, 0F); + gun32 = new ModelRenderer(this, 0, 0); + gun32.addBox(0F, 0F, 0F, 1, 1, 1); + gun32.setRotationPoint(1.3F, -5F, 7.5F); + gun32.setTextureSize(64, 32); + gun32.mirror = true; + setRotation(gun32, -2.267895F, 0F, 0F); + gun33 = new ModelRenderer(this, 0, 0); + gun33.addBox(0F, 0F, 0F, 1, 2, 1); + gun33.setRotationPoint(-5F, -5F, 7.5F); + gun33.setTextureSize(64, 32); + gun33.mirror = true; + setRotation(gun33, -2.267895F, 0F, 0F); + gun36 = new ModelRenderer(this, 0, 0); + gun36.addBox(0F, 0F, 0F, 6, 1, 6); + gun36.setRotationPoint(-4.5F, -5F, 0.8F); + gun36.setTextureSize(64, 32); + gun36.mirror = true; + setRotation(gun36, 0F, 0F, 0F); + gun37 = new ModelRenderer(this, 0, 0); + gun37.addBox(0F, 0F, 0F, 1, 1, 6); + gun37.setRotationPoint(-4.5F, -4.8F, -5.1F); + gun37.setTextureSize(64, 32); + gun37.mirror = true; + setRotation(gun37, 0F, 0F, 0F); + gun46 = new ModelRenderer(this, 0, 0); + gun46.addBox(0F, 0F, 0F, 1, 1, 6); + gun46.setRotationPoint(0.5F, -4.8F, -5.1F); + gun46.setTextureSize(64, 32); + gun46.mirror = true; + setRotation(gun46, 0F, 0F, 0F); + gun49 = new ModelRenderer(this, 0, 0); + gun49.addBox(0F, 0F, 0F, 5, 1, 6); + gun49.setRotationPoint(-4F, -4.6F, -5.2F); + gun49.setTextureSize(64, 32); + gun49.mirror = true; + setRotation(gun49, 0F, 0F, 0F); + gun50 = new ModelRenderer(this, 0, 0); + gun50.addBox(0F, 0F, 0F, 1, 4, 5); + gun50.setRotationPoint(-4.7F, -9F, 0.8F); + gun50.setTextureSize(64, 32); + gun50.mirror = true; + setRotation(gun50, 0F, 0F, 0F); + gun51 = new ModelRenderer(this, 0, 0); + gun51.addBox(0F, 0F, 0F, 1, 1, 6); + gun51.setRotationPoint(1F, -10F, 0F); + gun51.setTextureSize(64, 32); + gun51.mirror = true; + setRotation(gun51, 0F, 0F, 0.7853982F); + gun52 = new ModelRenderer(this, 0, 0); + gun52.addBox(0.4F, 0F, 0F, 1, 1, 6); + gun52.setRotationPoint(1F, -10F, 0F); + gun52.setTextureSize(64, 32); + gun52.mirror = true; + setRotation(gun52, 0F, 0F, 0.7853982F); + gun53 = new ModelRenderer(this, 0, 0); + gun53.addBox(0F, 0.5F, 0F, 1, 1, 6); + gun53.setRotationPoint(-4F, -10F, 0F); + gun53.setTextureSize(64, 32); + gun53.mirror = true; + setRotation(gun53, 0F, 0F, 0.7853982F); + gun54 = new ModelRenderer(this, 0, 0); + gun54.addBox(0F, 0F, 0F, 1, 1, 1); + gun54.setRotationPoint(-4F, -10F, 5.5F); + gun54.setTextureSize(64, 32); + gun54.mirror = true; + setRotation(gun54, 0F, 0F, 0.7853982F); + gun55 = new ModelRenderer(this, 0, 0); + gun55.addBox(0F, 0F, 0F, 1, 1, 1); + gun55.setRotationPoint(1F, -10F, 5.5F); + gun55.setTextureSize(64, 32); + gun55.mirror = true; + setRotation(gun55, 0F, 0F, 0.7853982F); + gun56 = new ModelRenderer(this, 0, 0); + gun56.addBox(0F, 0F, 0F, 1, 4, 5); + gun56.setRotationPoint(0.7F, -9F, 0.8F); + gun56.setTextureSize(64, 32); + gun56.mirror = true; + setRotation(gun56, 0F, 0F, 0F); + gun57 = new ModelRenderer(this, 0, 0); + gun57.addBox(0F, 0F, 0F, 5, 1, 5); + gun57.setRotationPoint(-4F, -9.7F, 0.8F); + gun57.setTextureSize(64, 32); + gun57.mirror = true; + setRotation(gun57, 0F, 0F, 0F); + gun58 = new ModelRenderer(this, 0, 0); + gun58.addBox(0F, 0F, 0F, 1, 2, 1); + gun58.setRotationPoint(-4.7F, -5F, 6.8F); + gun58.setTextureSize(64, 32); + gun58.mirror = true; + setRotation(gun58, -2.305074F, 0F, 0F); + gun59 = new ModelRenderer(this, 0, 0); + gun59.addBox(0F, 0F, 0F, 1, 2, 1); + gun59.setRotationPoint(0.7F, -5F, 6.8F); + gun59.setTextureSize(64, 32); + gun59.mirror = true; + setRotation(gun59, -2.305074F, 0F, 0F); + gun60 = new ModelRenderer(this, 0, 0); + gun60.addBox(0F, 0F, 0F, 6, 1, 4); + gun60.setRotationPoint(-4F, -5F, 6.8F); + gun60.setTextureSize(64, 32); + gun60.mirror = true; + setRotation(gun60, -1.449966F, 0F, 0F); + gun62 = new ModelRenderer(this, 0, 0); + gun62.addBox(0F, 0F, 0F, 1, 2, 1); + gun62.setRotationPoint(-5F, -2F, 7F); + gun62.setTextureSize(64, 32); + gun62.mirror = true; + setRotation(gun62, 0F, 0F, 0F); + gun63 = new ModelRenderer(this, 0, 0); + gun63.addBox(0F, 0F, 0F, 1, 2, 1); + gun63.setRotationPoint(1.7F, -2F, 7F); + gun63.setTextureSize(64, 32); + gun63.mirror = true; + setRotation(gun63, 0F, 0F, 0F); + gun64 = new ModelRenderer(this, 0, 0); + gun64.addBox(0F, 0F, 0F, 1, 3, 1); + gun64.setRotationPoint(-5F, -2F, 8F); + gun64.setTextureSize(64, 32); + gun64.mirror = true; + setRotation(gun64, -3.001966F, 0F, 0F); + gun65 = new ModelRenderer(this, 0, 0); + gun65.addBox(0F, 0F, 0F, 1, 3, 1); + gun65.setRotationPoint(1.7F, -2F, 8F); + gun65.setTextureSize(64, 32); + gun65.mirror = true; + setRotation(gun65, -3.001966F, 0F, 0F); + gun66 = new ModelRenderer(this, 50, 0); + gun66.addBox(0F, 0F, 0F, 4, 1, 3); + gun66.setRotationPoint(-3.8F, -4.6F, 7.2F); + gun66.setTextureSize(64, 32); + gun66.mirror = true; + setRotation(gun66, -1.33843F, 0F, 0F); + gun67 = new ModelRenderer(this, 50, 0); + gun67.addBox(0F, 0F, 0F, 4, 1, 1); + gun67.setRotationPoint(-3.8F, -1.7F, 6.9F); + gun67.setTextureSize(64, 32); + gun67.mirror = true; + setRotation(gun67, 0F, 0F, 0F); + gun68 = new ModelRenderer(this, 50, 0); + gun68.addBox(0F, 0F, 0F, 1, 1, 1); + gun68.setRotationPoint(-0.2F, -1.2F, 6.9F); + gun68.setTextureSize(64, 32); + gun68.mirror = true; + setRotation(gun68, 0F, 0F, 0F); + gun69 = new ModelRenderer(this, 50, 0); + gun69.addBox(0F, 0F, 0F, 1, 1, 1); + gun69.setRotationPoint(-3.8F, -1.2F, 6.9F); + gun69.setTextureSize(64, 32); + gun69.mirror = true; + setRotation(gun69, 0F, 0F, 0F); + gun70 = new ModelRenderer(this, 50, 0); + gun70.addBox(0F, 0F, 0F, 1, 1, 1); + gun70.setRotationPoint(-2.8F, -0.2F, 6.9F); + gun70.setTextureSize(64, 32); + gun70.mirror = true; + setRotation(gun70, 0F, 0F, -2.356194F); + gun71 = new ModelRenderer(this, 50, 0); + gun71.addBox(-1F, 0F, 0F, 1, 1, 1); + gun71.setRotationPoint(-0.2F, -0.2F, 6.9F); + gun71.setTextureSize(64, 32); + gun71.mirror = true; + setRotation(gun71, 0F, 0F, 2.356194F); + gun72 = new ModelRenderer(this, 0, 0); + gun72.addBox(0F, 0F, 0F, 1, 1, 5); + gun72.setRotationPoint(-3.1F, -5F, 0.8F); + gun72.setTextureSize(64, 32); + gun72.mirror = true; + setRotation(gun72, 0F, 0F, 2.356194F); + gun73 = new ModelRenderer(this, 0, 0); + gun73.addBox(0F, 0F, 0F, 1, 1, 5); + gun73.setRotationPoint(1.5F, -5F, 0.8F); + gun73.setTextureSize(64, 32); + gun73.mirror = true; + setRotation(gun73, 0F, 0F, 2.356194F); + gun74 = new ModelRenderer(this, 0, 0); + gun74.addBox(0F, 0F, 0F, 1, 1, 5); + gun74.setRotationPoint(-3.3F, -8.7F, 0.8F); + gun74.setTextureSize(64, 32); + gun74.mirror = true; + setRotation(gun74, 0F, 0F, 2.356194F); + gun75 = new ModelRenderer(this, 0, 0); + gun75.addBox(-1F, 0F, 0F, 1, 1, 5); + gun75.setRotationPoint(0.3F, -8.7F, 0.8F); + gun75.setTextureSize(64, 32); + gun75.mirror = true; + setRotation(gun75, 0F, 0F, -2.356194F); + gun77 = new ModelRenderer(this, 50, 0); + gun77.addBox(0F, -0.1F, 0.2F, 1, 1, 1); + gun77.setRotationPoint(-3.6F, -4.6F, 7.2F); + gun77.setTextureSize(64, 32); + gun77.mirror = true; + setRotation(gun77, -1.33843F, 0F, 0F); + gun78 = new ModelRenderer(this, 50, 0); + gun78.addBox(0F, -0.1F, 0.2F, 1, 1, 1); + gun78.setRotationPoint(-0.4F, -4.6F, 7.2F); + gun78.setTextureSize(64, 32); + gun78.mirror = true; + setRotation(gun78, -1.33843F, 0F, 0F); + gun84 = new ModelRenderer(this, 50, 0); + gun84.addBox(0F, 0F, -0.2F, 1, 1, 1); + gun84.setRotationPoint(-3.8F, -4.6F, 7.2F); + gun84.setTextureSize(64, 32); + gun84.mirror = true; + setRotation(gun84, -1.33843F, 0F, 0F); + gun85 = new ModelRenderer(this, 50, 0); + gun85.addBox(0F, 0F, -0.2F, 1, 1, 1); + gun85.setRotationPoint(-0.2F, -4.6F, 7.2F); + gun85.setTextureSize(64, 32); + gun85.mirror = true; + setRotation(gun85, -1.33843F, 0F, 0F); + gun86 = new ModelRenderer(this, 50, 0); + gun86.addBox(0F, 0F, 0F, 2, 1, 3); + gun86.setRotationPoint(-0.5F, -4.6F, 7.2F); + gun86.setTextureSize(64, 32); + gun86.mirror = true; + setRotation(gun86, -1.33843F, 0F, 0F); + gun87 = new ModelRenderer(this, 50, 0); + gun87.addBox(0F, 0F, 0F, 2, 1, 1); + gun87.setRotationPoint(-0.5F, -1.7F, 6.9F); + gun87.setTextureSize(64, 32); + gun87.mirror = true; + setRotation(gun87, 0F, 0F, 0F); + gun88 = new ModelRenderer(this, 50, 0); + gun88.addBox(0F, 0F, 0F, 1, 1, 1); + gun88.setRotationPoint(-3.7F, -1.3F, 7.1F); + gun88.setTextureSize(64, 32); + gun88.mirror = true; + setRotation(gun88, 0F, 0F, -0.2974289F); + gun89 = new ModelRenderer(this, 50, 0); + gun89.addBox(-1F, 0F, 0F, 1, 1, 1); + gun89.setRotationPoint(0.7F, -1.3F, 7.1F); + gun89.setTextureSize(64, 32); + gun89.mirror = true; + setRotation(gun89, 0F, 0F, 0.2974216F); + gun98 = new ModelRenderer(this, 50, 0); + gun98.addBox(0F, 0F, 0F, 1, 1, 1); + gun98.setRotationPoint(1.8F, -2.2F, 1.7F); + gun98.setTextureSize(64, 32); + gun98.mirror = true; + setRotation(gun98, 0F, 0F, 0F); + gun99 = new ModelRenderer(this, 50, 0); + gun99.addBox(0F, 0F, 0F, 1, 1, 1); + gun99.setRotationPoint(1.8F, -2.2F, -2F); + gun99.setTextureSize(64, 32); + gun99.mirror = true; + setRotation(gun99, 0F, 0F, 0F); + gun100 = new ModelRenderer(this, 100, 0); + gun100.addBox(0F, 0F, 0F, 1, 1, 3); + gun100.setRotationPoint(1.71F, -4.2F, 1.5F); + gun100.setTextureSize(64, 32); + gun100.mirror = true; + setRotation(gun100, 0F, 0F, 0F); + gun101 = new ModelRenderer(this, 100, 0); + gun101.addBox(0F, 0F, 0F, 1, 1, 3); + gun101.setRotationPoint(1.71F, -4.7F, 1.5F); + gun101.setTextureSize(64, 32); + gun101.mirror = true; + setRotation(gun101, 0F, 0F, 0F); + gun104 = new ModelRenderer(this, 0, 0); + gun104.addBox(0F, 0F, -0.2F, 1, 2, 1); + gun104.setRotationPoint(1.7F, -5F, -0.8F); + gun104.setTextureSize(64, 32); + gun104.mirror = true; + setRotation(gun104, 0F, 0F, 0F); + gun105 = new ModelRenderer(this, 0, 0); + gun105.addBox(0F, 0F, 1.5F, 1, 1, 1); + gun105.setRotationPoint(1.7F, -3F, -2.5F); + gun105.setTextureSize(64, 32); + gun105.mirror = true; + setRotation(gun105, 0.9294653F, 0F, 0F); + gun106 = new ModelRenderer(this, 0, 0); + gun106.addBox(0F, 0F, 0F, 1, 1, 7); + gun106.setRotationPoint(2.7F, -5F, -0.5F); + gun106.setTextureSize(64, 32); + gun106.mirror = true; + setRotation(gun106, 0F, 0F, 2.356194F); + gun107 = new ModelRenderer(this, 0, 0); + gun107.addBox(0F, 0.7F, 0F, 1, 1, 1); + gun107.setRotationPoint(1F, -5F, 7.5F); + gun107.setTextureSize(64, 32); + gun107.mirror = true; + setRotation(gun107, -2.267895F, 0F, 0F); + gun108 = new ModelRenderer(this, 50, 0); + gun108.addBox(-1F, 0F, 0F, 1, 1, 1); + gun108.setRotationPoint(0.8F, -0.2F, 6.9F); + gun108.setTextureSize(64, 32); + gun108.mirror = true; + setRotation(gun108, 0F, 0F, 2.356194F); + gun109 = new ModelRenderer(this, 0, 0); + gun109.addBox(0F, 0F, 0F, 1, 1, 5); + gun109.setRotationPoint(-5F, -1F, 2F); + gun109.setTextureSize(64, 32); + gun109.mirror = true; + setRotation(gun109, 0F, 0F, 0F); + gun110 = new ModelRenderer(this, 0, 0); + gun110.addBox(0F, 0F, 0F, 1, 1, 5); + gun110.setRotationPoint(1.7F, -1F, 2F); + gun110.setTextureSize(64, 32); + gun110.mirror = true; + setRotation(gun110, 0F, 0F, 0F); + gun111 = new ModelRenderer(this, 0, 0); + gun111.addBox(0F, 0F, 0F, 1, 1, 2); + gun111.setRotationPoint(1.7F, 0F, 2F); + gun111.setTextureSize(64, 32); + gun111.mirror = true; + setRotation(gun111, 2.356194F, 0F, 0F); + gun112 = new ModelRenderer(this, 0, 0); + gun112.addBox(0F, 0F, 0F, 1, 1, 2); + gun112.setRotationPoint(-5F, 0F, 2F); + gun112.setTextureSize(64, 32); + gun112.mirror = true; + setRotation(gun112, 2.356194F, 0F, 0F); + gun113 = new ModelRenderer(this, 0, 0); + gun113.addBox(0F, 0F, 0F, 6, 1, 2); + gun113.setRotationPoint(-4.5F, -1.9F, -5F); + gun113.setTextureSize(64, 32); + gun113.mirror = true; + setRotation(gun113, 0F, 0F, 0F); + gun114 = new ModelRenderer(this, 0, 0); + gun114.addBox(0F, 0F, 0F, 5, 2, 3); + gun114.setRotationPoint(-4F, -2.1F, -2.7F); + gun114.setTextureSize(64, 32); + gun114.mirror = true; + setRotation(gun114, 0F, 0F, 0F); + gun115 = new ModelRenderer(this, 0, 0); + gun115.addBox(0F, 0F, 0F, 6, 2, 1); + gun115.setRotationPoint(-4.5F, -0.9F, -3F); + gun115.setTextureSize(64, 32); + gun115.mirror = true; + setRotation(gun115, 2.356194F, 0F, 0F); + gun116 = new ModelRenderer(this, 0, 0); + gun116.addBox(0F, 0F, 0F, 6, 1, 1); + gun116.setRotationPoint(-4.5F, -0.9F, -5F); + gun116.setTextureSize(64, 32); + gun116.mirror = true; + setRotation(gun116, 2.356194F, 0F, 0F); + gun117 = new ModelRenderer(this, 0, 0); + gun117.addBox(0F, 0F, 0.4F, 6, 1, 1); + gun117.setRotationPoint(-4.5F, -0.9F, -5F); + gun117.setTextureSize(64, 32); + gun117.mirror = true; + setRotation(gun117, 2.356194F, 0F, 0F); + gun118 = new ModelRenderer(this, 0, 0); + gun118.addBox(0F, 0F, 0F, 1, 1, 1); + gun118.setRotationPoint(-4.5F, -3.9F, -6F); + gun118.setTextureSize(64, 32); + gun118.mirror = true; + setRotation(gun118, 0.7853982F, 0F, 0F); + gun119 = new ModelRenderer(this, 0, 0); + gun119.addBox(0F, 0F, 0F, 1, 1, 1); + gun119.setRotationPoint(0.5F, -3.9F, -6F); + gun119.setTextureSize(64, 32); + gun119.mirror = true; + setRotation(gun119, 0.7853982F, 0F, 0F); + gun120 = new ModelRenderer(this, 0, 0); + gun120.addBox(0F, 0F, 0.3F, 1, 1, 1); + gun120.setRotationPoint(-4.5F, -3.9F, -6F); + gun120.setTextureSize(64, 32); + gun120.mirror = true; + setRotation(gun120, 0.7853982F, 0F, 0F); + gun121 = new ModelRenderer(this, 0, 0); + gun121.addBox(0F, 0F, 0.3F, 1, 1, 1); + gun121.setRotationPoint(0.5F, -3.9F, -6F); + gun121.setTextureSize(64, 32); + gun121.mirror = true; + setRotation(gun121, 0.7853982F, 0F, 0F); + gun122 = new ModelRenderer(this, 0, 0); + gun122.addBox(0F, 0F, 0F, 5, 1, 1); + gun122.setRotationPoint(-4F, -4.6F, -5.2F); + gun122.setTextureSize(64, 32); + gun122.mirror = true; + setRotation(gun122, -0.8551081F, 0F, 0F); + gun123 = new ModelRenderer(this, 0, 0); + gun123.addBox(0F, 0F, 0F, 1, 2, 2); + gun123.setRotationPoint(-4.7F, -6F, 0.8F); + gun123.setTextureSize(64, 32); + gun123.mirror = true; + setRotation(gun123, -0.8922867F, 0F, 0F); + gun124 = new ModelRenderer(this, 0, 0); + gun124.addBox(0F, 0F, 0F, 1, 2, 2); + gun124.setRotationPoint(0.7F, -6F, 0.8F); + gun124.setTextureSize(64, 32); + gun124.mirror = true; + setRotation(gun124, -0.8922867F, 0F, 0F); + gun125 = new ModelRenderer(this, 0, 0); + gun125.addBox(0F, 0F, 0F, 1, 2, 2); + gun125.setRotationPoint(1F, -3.9F, -6F); + gun125.setTextureSize(64, 32); + gun125.mirror = true; + setRotation(gun125, 0F, 0F, 0F); + gun126 = new ModelRenderer(this, 0, 0); + gun126.addBox(0F, 0F, 0F, 1, 1, 1); + gun126.setRotationPoint(1F, -1.9F, -5F); + gun126.setTextureSize(64, 32); + gun126.mirror = true; + setRotation(gun126, 0F, 0F, 0F); + gun127 = new ModelRenderer(this, 0, 0); + gun127.addBox(0F, 0F, 0F, 1, 1, 1); + gun127.setRotationPoint(1F, -4.8F, -5.1F); + gun127.setTextureSize(64, 32); + gun127.mirror = true; + setRotation(gun127, 0F, 0F, 0F); + gun128 = new ModelRenderer(this, 0, 0); + gun128.addBox(0F, 0F, 0F, 1, 1, 1); + gun128.setRotationPoint(1F, -4.8F, -5F); + gun128.setTextureSize(64, 32); + gun128.mirror = true; + setRotation(gun128, 0F, 0F, 0F); + gun129 = new ModelRenderer(this, 0, 0); + gun129.addBox(0F, 0F, 0F, 2, 4, 1); + gun129.setRotationPoint(2F, -4.8F, -4F); + gun129.setTextureSize(64, 32); + gun129.mirror = true; + setRotation(gun129, 0F, -1.872872F, 0F); + gun130 = new ModelRenderer(this, 0, 0); + gun130.addBox(0F, 0F, 0.3F, 1, 1, 1); + gun130.setRotationPoint(1F, -3.9F, -6F); + gun130.setTextureSize(64, 32); + gun130.mirror = true; + setRotation(gun130, 0.7853982F, 0F, 0F); + gun131 = new ModelRenderer(this, 0, 0); + gun131.addBox(0F, 0F, 0F, 1, 1, 1); + gun131.setRotationPoint(1F, -3.9F, -6F); + gun131.setTextureSize(64, 32); + gun131.mirror = true; + setRotation(gun131, 0.7853982F, 0F, 0F); + gun132 = new ModelRenderer(this, 0, 0); + gun132.addBox(0F, 0F, 0.4F, 1, 1, 1); + gun132.setRotationPoint(1F, -0.9F, -5F); + gun132.setTextureSize(64, 32); + gun132.mirror = true; + setRotation(gun132, 2.356194F, 0F, 0F); + gun133 = new ModelRenderer(this, 0, 0); + gun133.addBox(0F, 0F, 0F, 1, 1, 1); + gun133.setRotationPoint(1F, -0.9F, -5F); + gun133.setTextureSize(64, 32); + gun133.mirror = true; + setRotation(gun133, 2.356194F, 0F, 0F); + gun134 = new ModelRenderer(this, 0, 0); + gun134.addBox(0F, 0F, 0F, 1, 2, 2); + gun134.setRotationPoint(-5F, -3.7F, -5F); + gun134.setTextureSize(64, 32); + gun134.mirror = true; + setRotation(gun134, 0F, 0F, 0F); + gun135 = new ModelRenderer(this, 0, 0); + gun135.addBox(0F, 0F, 0F, 1, 1, 1); + gun135.setRotationPoint(-5F, -3.9F, -4.5F); + gun135.setTextureSize(64, 32); + gun135.mirror = true; + setRotation(gun135, 0F, 0F, 0F); + gun136 = new ModelRenderer(this, 0, 0); + gun136.addBox(0F, 0F, 0F, 1, 1, 1); + gun136.setRotationPoint(-5F, -2.5F, -4.5F); + gun136.setTextureSize(64, 32); + gun136.mirror = true; + setRotation(gun136, 0F, 0F, 0F); + gun137 = new ModelRenderer(this, 0, 0); + gun137.addBox(0F, 0F, 0F, 1, 1, 1); + gun137.setRotationPoint(-5F, -3.2F, -5.2F); + gun137.setTextureSize(64, 32); + gun137.mirror = true; + setRotation(gun137, 0F, 0F, 0F); + gun138 = new ModelRenderer(this, 0, 0); + gun138.addBox(0F, 0F, 0F, 1, 1, 1); + gun138.setRotationPoint(-5F, -3.2F, -3.8F); + gun138.setTextureSize(64, 32); + gun138.mirror = true; + setRotation(gun138, 0F, 0F, 0F); + gun139 = new ModelRenderer(this, 50, 0); + gun139.addBox(0F, 0F, 0F, 1, 1, 1); + gun139.setRotationPoint(-5.1F, -2.2F, 1.7F); + gun139.setTextureSize(64, 32); + gun139.mirror = true; + setRotation(gun139, 0F, 0F, 0F); + gun140 = new ModelRenderer(this, 50, 0); + gun140.addBox(0F, 0F, 0F, 1, 1, 1); + gun140.setRotationPoint(-5.1F, -2.2F, 6.8F); + gun140.setTextureSize(64, 32); + gun140.mirror = true; + setRotation(gun140, 0F, 0F, 0F); + gun141 = new ModelRenderer(this, 50, 0); + gun141.addBox(0F, 0F, 0F, 1, 2, 2); + gun141.setRotationPoint(-5.1F, -3.2F, -2F); + gun141.setTextureSize(64, 32); + gun141.mirror = true; + setRotation(gun141, 0.5205006F, 0F, 0F); + gun142 = new ModelRenderer(this, 50, 0); + gun142.addBox(0F, 0F, 0F, 1, 2, 2); + gun142.setRotationPoint(-5.1F, -4.6F, 3F); + gun142.setTextureSize(64, 32); + gun142.mirror = true; + setRotation(gun142, 0.5205006F, 0F, 0F); + gun143 = new ModelRenderer(this, 50, 0); + gun143.addBox(0F, 0F, -0.5F, 1, 1, 3); + gun143.setRotationPoint(1F, -4.6F, 7.1F); + gun143.setTextureSize(64, 32); + gun143.mirror = true; + setRotation(gun143, -1.33843F, 0F, 0F); + gun144 = new ModelRenderer(this, 50, 0); + gun144.addBox(0F, 2.4F, -0.4F, 1, 1, 1); + gun144.setRotationPoint(1F, -4.6F, 7.1F); + gun144.setTextureSize(64, 32); + gun144.mirror = true; + setRotation(gun144, 0F, 0F, 0F); + gun145 = new ModelRenderer(this, 50, 0); + gun145.addBox(0F, 3F, -0.4F, 1, 1, 1); + gun145.setRotationPoint(1F, -4.6F, 7.1F); + gun145.setTextureSize(64, 32); + gun145.mirror = true; + setRotation(gun145, 0F, 0F, 0F); + gun146 = new ModelRenderer(this, 0, 0); + gun146.addBox(0F, 0F, 0F, 1, 1, 4); + gun146.setRotationPoint(1.7F, -3.5F, 3F); + gun146.setTextureSize(64, 32); + gun146.mirror = true; + setRotation(gun146, 0F, 0F, 0F); + gun147 = new ModelRenderer(this, 0, 0); + gun147.addBox(0F, 0F, 0F, 1, 2, 4); + gun147.setRotationPoint(1.7F, -5F, 3.5F); + gun147.setTextureSize(64, 32); + gun147.mirror = true; + setRotation(gun147, 0F, 0F, 0F); + gun148 = new ModelRenderer(this, 0, 0); + gun148.addBox(0F, 0F, 0F, 1, 2, 4); + gun148.setRotationPoint(1.5F, -2.5F, 3F); + gun148.setTextureSize(64, 32); + gun148.mirror = true; + setRotation(gun148, 0F, 0F, 0F); + gun149 = new ModelRenderer(this, 0, 0); + gun149.addBox(0F, 0F, 0F, 1, 1, 4); + gun149.setRotationPoint(2.7F, -1F, 3F); + gun149.setTextureSize(64, 32); + gun149.mirror = true; + setRotation(gun149, 0F, 0F, 2.356194F); + gun150 = new ModelRenderer(this, 0, 0); + gun150.addBox(0F, 0F, 0F, 1, 1, 4); + gun150.setRotationPoint(2.7F, -2.5F, 3F); + gun150.setTextureSize(64, 32); + gun150.mirror = true; + setRotation(gun150, 0F, 0F, 2.356194F); + gun151 = new ModelRenderer(this, 0, 0); + gun151.addBox(0F, 0F, 0F, 1, 2, 1); + gun151.setRotationPoint(2.7F, -2.5F, 7F); + gun151.setTextureSize(64, 32); + gun151.mirror = true; + setRotation(gun151, 0F, -2.356194F, 0F); + gun152 = new ModelRenderer(this, 0, 0); + gun152.addBox(0F, 0F, 0F, 1, 2, 1); + gun152.setRotationPoint(2.7F, -2.5F, 3.5F); + gun152.setTextureSize(64, 32); + gun152.mirror = true; + setRotation(gun152, 0F, -2.356194F, 0F); + gun153 = new ModelRenderer(this, 50, 0); + gun153.addBox(0F, 0F, 0F, 1, 1, 1); + gun153.setRotationPoint(1.6F, -2.2F, 3.7F); + gun153.setTextureSize(64, 32); + gun153.mirror = true; + setRotation(gun153, 0F, 0F, 0F); + gun154 = new ModelRenderer(this, 50, 0); + gun154.addBox(0F, 0F, 0F, 1, 1, 1); + gun154.setRotationPoint(1.6F, -2.2F, 5.8F); + gun154.setTextureSize(64, 32); + gun154.mirror = true; + setRotation(gun154, 0F, 0F, 0F); + gun155 = new ModelRenderer(this, 50, 0); + gun155.addBox(0F, 0F, 0F, 1, 1, 1); + gun155.setRotationPoint(1.6F, -2.2F, 4F); + gun155.setTextureSize(64, 32); + gun155.mirror = true; + setRotation(gun155, 0F, 0F, 0F); + gun156 = new ModelRenderer(this, 50, 0); + gun156.addBox(0F, 0F, 0F, 1, 1, 1); + gun156.setRotationPoint(1.6F, -2.2F, 5.5F); + gun156.setTextureSize(64, 32); + gun156.mirror = true; + setRotation(gun156, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + gun1.render(f5); + gun2.render(f5); + gun4.render(f5); + gun5.render(f5); + gun7.render(f5); + gun8.render(f5); + gun9.render(f5); + gun11.render(f5); + gun12.render(f5); + gun13.render(f5); + gun21.render(f5); + gun22.render(f5); + gun23.render(f5); + gun24.render(f5); + gun25.render(f5); + gun26.render(f5); + gun27.render(f5); + gun28.render(f5); + gun31.render(f5); + gun32.render(f5); + gun33.render(f5); + gun36.render(f5); + gun37.render(f5); + gun46.render(f5); + gun49.render(f5); + gun50.render(f5); + gun51.render(f5); + gun52.render(f5); + gun53.render(f5); + gun54.render(f5); + gun55.render(f5); + gun56.render(f5); + gun57.render(f5); + gun58.render(f5); + gun59.render(f5); + gun60.render(f5); + gun62.render(f5); + gun63.render(f5); + gun64.render(f5); + gun65.render(f5); + gun66.render(f5); + gun67.render(f5); + gun68.render(f5); + gun69.render(f5); + gun70.render(f5); + gun71.render(f5); + gun72.render(f5); + gun73.render(f5); + gun74.render(f5); + gun75.render(f5); + gun77.render(f5); + gun78.render(f5); + gun84.render(f5); + gun85.render(f5); + gun86.render(f5); + gun87.render(f5); + gun88.render(f5); + gun89.render(f5); + gun98.render(f5); + gun99.render(f5); + gun100.render(f5); + gun101.render(f5); + gun104.render(f5); + gun105.render(f5); + gun106.render(f5); + gun107.render(f5); + gun108.render(f5); + gun109.render(f5); + gun110.render(f5); + gun111.render(f5); + gun112.render(f5); + gun113.render(f5); + gun114.render(f5); + gun115.render(f5); + gun116.render(f5); + gun117.render(f5); + gun118.render(f5); + gun119.render(f5); + gun120.render(f5); + gun121.render(f5); + gun122.render(f5); + gun123.render(f5); + gun124.render(f5); + gun125.render(f5); + gun126.render(f5); + gun127.render(f5); + gun128.render(f5); + gun129.render(f5); + gun130.render(f5); + gun131.render(f5); + gun132.render(f5); + gun133.render(f5); + gun134.render(f5); + gun135.render(f5); + gun136.render(f5); + gun137.render(f5); + gun138.render(f5); + gun139.render(f5); + gun140.render(f5); + gun141.render(f5); + gun142.render(f5); + gun143.render(f5); + gun144.render(f5); + gun145.render(f5); + gun146.render(f5); + gun147.render(f5); + gun148.render(f5); + gun149.render(f5); + gun150.render(f5); + gun151.render(f5); + gun152.render(f5); + gun153.render(f5); + gun154.render(f5); + gun155.render(f5); + gun156.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } - public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { - modelRenderer.rotateAngleX = x; - modelRenderer.rotateAngleY = y; - modelRenderer.rotateAngleZ = z; - } } diff --git a/src/main/java/com/paneedah/mwc/proxies/CommonProxy.java b/src/main/java/com/paneedah/mwc/proxies/CommonProxy.java index 66401fbcd..b8459fc78 100644 --- a/src/main/java/com/paneedah/mwc/proxies/CommonProxy.java +++ b/src/main/java/com/paneedah/mwc/proxies/CommonProxy.java @@ -10,6 +10,7 @@ import com.paneedah.mwc.items.melee.TacticalTomahawkFactory; import com.paneedah.mwc.skins.GunSkins; import com.paneedah.mwc.tileentities.TileEntities; +import com.paneedah.mwc.tileentities.TurretBaseFactory; import com.paneedah.mwc.vehicle.Vehicles; import com.paneedah.mwc.weapons.*; import com.paneedah.weaponlib.UniversalSoundLookup; @@ -62,20 +63,24 @@ public void preInit(final MWC mod) { // Special object initialization SpecialAttachments.init(mod, MWC.modContext); - Backpacks.init(); - Belts.init(); - Vests.init(mod); - Armors.init(mod, MWC.modContext); + + Backpacks.createEquipment(MWC.modContext); + Belts.createEquipment(MWC.modContext); + Vests.createEquipment(MWC.modContext); + Armors.createEquipment(MWC.modContext); + Attachments.init(mod); AuxiliaryAttachments.init(mod); GunSkins.init(mod); Bullets.init(mod); Magazines.init(mod); Guns.init(mod, this); - Electronics.init(); + Electronics.createEquipment(MWC.modContext); Grenades.init(mod, this); CustomSpawnEggs.init(mod, this); - TileEntities.init(this); + + TurretBaseFactory.createTileEntity(MWC.modContext); + TileEntities.createTileEntity(MWC.modContext); new TacticalTomahawkFactory().createMelee(this); new BaseballBatFactory().createMelee(this); @@ -91,7 +96,7 @@ public void init(final MWC mod) { Entities.init(this); Vehicles.init(this); - GameRegistry.registerWorldGenerator(new WorldGeneratorEventHandler(), 0); + GameRegistry.registerWorldGenerator(new ModernWorldGenerator(), 0); } public void postInit(final MWC mod, final FMLPostInitializationEvent initializationEvent) { diff --git a/src/main/java/com/paneedah/mwc/rendering/Transform.java b/src/main/java/com/paneedah/mwc/rendering/Transform.java new file mode 100644 index 000000000..37d04579d --- /dev/null +++ b/src/main/java/com/paneedah/mwc/rendering/Transform.java @@ -0,0 +1,217 @@ +package com.paneedah.mwc.rendering; + +import com.paneedah.weaponlib.RenderContext; +import com.paneedah.weaponlib.RenderableState; +import org.lwjgl.opengl.GL11; + +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class Transform { + + public static final Transform NULL = new Transform().withPosition(0, 0, 0).withRotation(0, 0, 0).withRotationPoint(0, 0, 0).withScale(1, 1, 1); + + private double[] scale = new double[3]; + private double[] rotation = new double[3]; + private double[] position = new double[3]; + private double[] rotationPoint = new double[3]; + + public Transform() { + + + } + + public Transform withScale(double x, double y, double z) { + scale[0] = x; + scale[1] = y; + scale[2] = z; + return this; + } + + public Transform withPosition(double x, double y, double z) { + position[0] = x; + position[1] = y; + position[2] = z; + return this; + } + + /** + * When going from BB edit mode to the game, the X and Y rotations are inverted. This method will automatically do + * that for you. + * + * @param x + * @param y + * @param z + * + * @return + */ + public Transform withBBRotation(double x, double y, double z) { + rotation[0] = -x; + rotation[1] = -y; + rotation[2] = z; + return this; + } + + public Transform withRotation(double x, double y, double z) { + rotation[0] = x; + rotation[1] = y; + rotation[2] = z; + return this; + } + + public Transform addTransformConditional(Supplier condition, double x, double y, double z) { + if (!condition.get()) { + return this; + } + return addTransform(x, y, z); + } + + public Transform addTransform(double x, double y, double z) { + position[0] += x; + position[1] += y; + position[2] += z; + return this; + } + + + public Transform withRotationPoint(double x, double y, double z) { + rotationPoint[0] = x; + rotationPoint[1] = y; + rotationPoint[2] = z; + return this; + } + + /* + * Transforms + */ + + + public double getPositionX() { + return position[0]; + } + + public double getPositionY() { + return position[1]; + } + + public double getPositionZ() { + return position[2]; + } + + /* + * Rotations + */ + + public double getRotationX() { + return rotation[0]; + } + + public double getRotationY() { + return rotation[1]; + } + + public double getRotationZ() { + return rotation[2]; + } + + /* + * Scale + */ + + public double getScaleX() { + return scale[0]; + } + + public double getScaleY() { + return scale[1]; + } + + public double getScaleZ() { + return scale[2]; + } + + /* + * Rotation Point + */ + + public double getRotationPointX() { + return rotationPoint[0]; + } + + public double getRotationPointY() { + return rotationPoint[1]; + } + + public double getRotationPointZ() { + return rotationPoint[2]; + } + + + private double[] copyArray(double[] array) { + double[] newArray = new double[array.length]; + System.arraycopy(array, 0, newArray, 0, array.length); + return newArray; + } + + public void set(Transform t) { + this.position = copyArray(t.position); + this.rotation = copyArray(t.rotation); + this.rotationPoint = copyArray(t.rotationPoint); + this.scale = copyArray(t.scale); + } + + public Transform copy() { + Transform nT = new Transform(); + nT.position = copyArray(position); + nT.rotation = copyArray(rotation); + nT.rotationPoint = copyArray(rotationPoint); + nT.scale = copyArray(scale); + return nT; + } + + /* + * Export to VMW + */ + + public Consumer> getAsPosition() { + return (renderContext) -> { + doGLDirect(); + /* + GL11.glTranslated(getPositionX(), getPositionY(), getPositionZ()); + GL11.glTranslated(getRotationPointX(), getRotationPointY(), getRotationPointZ()); + GL11.glRotated(getRotationZ(), 0, 0, 1); + GL11.glRotated(getRotationY(), 0, 1, 0); + GL11.glRotated(getRotationX(), 1, 0, 0); + GL11.glTranslated(-getRotationPointX(), -getRotationPointY(), -getRotationPointZ()); + GL11.glScaled(getScaleX(), getScaleY(), getScaleZ()); + */ + }; + + } + + public void doGLDirect() { + GL11.glTranslated(getPositionX(), getPositionY(), getPositionZ()); + GL11.glTranslated(getRotationPointX(), getRotationPointY(), getRotationPointZ()); + GL11.glRotated(getRotationZ(), 0, 0, 1); + GL11.glRotated(getRotationY(), 0, 1, 0); + GL11.glRotated(getRotationX(), 1, 0, 0); + GL11.glTranslated(-getRotationPointX(), -getRotationPointY(), -getRotationPointZ()); + GL11.glScaled(getScaleX(), getScaleY(), getScaleZ()); + } + + public void printTransform() { + + + String result = "new Transform()" + + String.format("\n.withPosition(%ff, %ff, %ff)", getPositionX(), getPositionY(), + getPositionZ()) + + String.format("\n.withRotation(%ff, %ff, %ff)", getRotationX(), getRotationY(), + getRotationZ()) + + String.format("\n.withRotationPoint(%ff, %ff, %ff)", getRotationPointX(), getRotationPointY(), getRotationPointZ()) + + String.format("\n.withScale(%ff, %ff, %ff)", getScaleX(), getScaleY(), getScaleZ()); + + System.out.println("\n" + result); + } + + +} diff --git a/src/main/java/com/paneedah/mwc/tileentities/TileEntities.java b/src/main/java/com/paneedah/mwc/tileentities/TileEntities.java index 2e361efbb..e930fb9cc 100644 --- a/src/main/java/com/paneedah/mwc/tileentities/TileEntities.java +++ b/src/main/java/com/paneedah/mwc/tileentities/TileEntities.java @@ -1,7 +1,8 @@ package com.paneedah.mwc.tileentities; +import dev.redstudio.redcore.utils.AABBUtil; import com.paneedah.mwc.MWC; -import com.paneedah.mwc.proxies.CommonProxy; +import com.paneedah.weaponlib.ModContext; import com.paneedah.weaponlib.tile.CustomTileEntityBlock; import com.paneedah.weaponlib.tile.LootBoxConfiguration; import net.minecraft.block.material.Material; @@ -11,9 +12,7 @@ public class TileEntities { - public static void init(CommonProxy commonProxy) { - new TurretBaseFactory().createTileEntity(MWC.modContext); - + public static void createTileEntity(ModContext modContext) { new LootBoxConfiguration() .withMaterial(Material.ROCK) .withName("weapons_case") @@ -23,24 +22,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(3.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0.82, 0, -0.65, 0.18, 0.3, 1.6); - break; - case EAST: - boundingBox = new AxisAlignedBB(0.81, 0, -0.6, 0.18, 0.3, 1.65); - break; - case NORTH: - boundingBox = new AxisAlignedBB(-0.58, 0, 0.2, 1.63, 0.3, 0.8); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(-0.65, 0, 0.2, 1.6, 0.3, 0.8); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(-0.58, 0, 0.2, 1.63, 0.3, 0.8)); } ) .withPositioning(tileEntity -> { @@ -58,24 +41,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(3.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0.09, 0, 0.09, 0.77, 0.33, 0.93); - break; - case EAST: - boundingBox = new AxisAlignedBB(0.22, 0, 0.05, 0.92, 0.33, 0.9); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0.05, 0, 0.1, 0.9, 0.33, 0.77); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0.1, 0, 0.23, 0.95, 0.33, 0.92); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0.05, 0, 0.1, 0.9, 0.33, 0.77)); } ) .withPositioning(tileEntity -> { @@ -93,24 +60,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0.03, 0, -0.43, 0.97, 0.54, 1.47); - break; - case EAST: - boundingBox = new AxisAlignedBB(0.03, 0, -0.43, 0.97, 0.54, 1.47); - break; - case NORTH: - boundingBox = new AxisAlignedBB(-0.47, 0, 0.03, 1.44, 0.54, 0.98); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(-0.43, 0, 0.03, 1.46, 0.54, 0.98); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(-0.47, 0, 0.03, 1.44, 0.54, 0.98)); } ) .withPositioning(tileEntity -> { @@ -128,24 +79,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0.35, 0, 0.15, 0.7, 0.5, 0.85); - break; - case EAST: - boundingBox = new AxisAlignedBB(0.35, 0, 0.15, 0.7, 0.5, 0.85); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0.15, 0, 0.35, 0.83, 0.5, 0.7); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0.15, 0, 0.35, 0.83, 0.5, 0.7); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0.15, 0, 0.35, 0.83, 0.5, 0.7)); } ) .withPositioning(tileEntity -> { @@ -177,24 +112,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(22.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -212,24 +131,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(22.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -275,24 +178,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(3.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.5, 1)); } ) .withPositioning(tileEntity -> { @@ -310,24 +197,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(22.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -345,24 +216,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(22.5f) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -421,24 +276,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(5) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.5, 1)); } ) .withPositioning(tileEntity -> { @@ -525,24 +364,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(2) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.2, 1)); } ) .withPositioning(tileEntity -> { @@ -561,24 +384,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(5) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -624,24 +431,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(2) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.7, 1)); } ) .withPositioning(tileEntity -> { @@ -660,24 +451,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(2) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.7, 1)); } ) .withPositioning(tileEntity -> { @@ -799,24 +574,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.6, 1)); } ) .withPositioning(tileEntity -> { @@ -847,24 +606,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, .6, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.6, 1)); } ) .withPositioning(tileEntity -> { @@ -933,24 +676,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, -1, 0, 1, 1, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, -1, 0, 1, 1, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, -1, 0, 1, 1, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, -1, 0, 1, 1, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, -1, 0, 1, 1, 1)); } ) .withPositioning(tileEntity -> { @@ -968,24 +695,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 3, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 3, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 3, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 3, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 3, 1)); } ) .withPositioning(tileEntity -> { @@ -1004,24 +715,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1, 2); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, -1, 1, 1, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(-1, 0, 0, 1, 1, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 2, 1, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(-1, 0, 0, 1, 1, 1)); } ) .withPositioning(tileEntity -> { @@ -1260,24 +955,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, .5, 0, 1, 1, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, .5, 0, 1, 1, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, .5, 0, 1, 1, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, .5, 0, 1, 1, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0.5, 0, 1, 1, 1)); } ) .withPositioning(tileEntity -> { @@ -1360,24 +1039,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.7, 1)); } ) .withPositioning(tileEntity -> { @@ -1434,24 +1097,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 2, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 2, 1)); } ) .withPositioning(tileEntity -> { @@ -1573,24 +1220,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.5, 1)); } ) .withPositioning(tileEntity -> { @@ -1608,24 +1239,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.5, 1)); } ) .withPositioning(tileEntity -> { @@ -1643,24 +1258,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1.7, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1.7, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1.7, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1.7, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 1.7, 1)); } ) .withPositioning(tileEntity -> { @@ -1677,24 +1276,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.75, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.75, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.75, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.75, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.75, 1)); } ) .withPositioning(tileEntity -> { @@ -1724,24 +1307,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0.09, 0, 0.09, 0.77, 0.33, 0.93); - break; - case EAST: - boundingBox = new AxisAlignedBB(0.22, 0, 0.05, 0.92, 0.33, 0.9); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0.05, 0, 0.1, 0.9, 0.33, 0.77); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0.1, 0, 0.23, 0.95, 0.33, 0.92); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0.05, 0, 0.1, 0.9, 0.33, 0.77)); } ) .withPositioning(tileEntity -> { @@ -1772,24 +1339,8 @@ public static void init(CommonProxy commonProxy) { .withCreativeTab(MWC.PROPS_TAB) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.9, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.9, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.9, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.9, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.9, 1)); } ) .withPositioning(tileEntity -> { @@ -1805,28 +1356,6 @@ public static void init(CommonProxy commonProxy) { .withModelClassName("com.paneedah.mwc.models.TowableFloodLight") .withTextureName("textures/models/towablefloodlight.png") .withCreativeTab(MWC.PROPS_TAB) - .withBoundingBox( - blockState -> { - AxisAlignedBB boundingBox = null; - EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 1, 1); - break; - default: - } - return boundingBox; - } - ) .withPositioning(tileEntity -> { GL11.glScalef(1f, 1f, 1f); GL11.glTranslatef(0.3f, 0f, 0.5f); @@ -1843,24 +1372,8 @@ public static void init(CommonProxy commonProxy) { .withHardness(1) .withBoundingBox( blockState -> { - AxisAlignedBB boundingBox = null; EnumFacing facing = blockState.getValue(CustomTileEntityBlock.FACING); - switch (facing) { - case WEST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.4, 1); - break; - case EAST: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.4, 1); - break; - case NORTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.4, 1); - break; - case SOUTH: - boundingBox = new AxisAlignedBB(0, 0, 0, 1, 0.4, 1); - break; - default: - } - return boundingBox; + return AABBUtil.orientAABB(facing, new AxisAlignedBB(0, 0, 0, 1, 0.4, 1)); } ) .withPositioning(tileEntity -> { diff --git a/src/main/java/com/paneedah/mwc/tileentities/TileEntityFactory.java b/src/main/java/com/paneedah/mwc/tileentities/TileEntityFactory.java deleted file mode 100644 index 3dab721b2..000000000 --- a/src/main/java/com/paneedah/mwc/tileentities/TileEntityFactory.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.paneedah.mwc.tileentities; - -import com.paneedah.weaponlib.ModContext; - -public interface TileEntityFactory { - - void createTileEntity(ModContext modContext); - -} diff --git a/src/main/java/com/paneedah/mwc/tileentities/TurretBaseFactory.java b/src/main/java/com/paneedah/mwc/tileentities/TurretBaseFactory.java index b93e028a1..874bdbae2 100644 --- a/src/main/java/com/paneedah/mwc/tileentities/TurretBaseFactory.java +++ b/src/main/java/com/paneedah/mwc/tileentities/TurretBaseFactory.java @@ -4,14 +4,11 @@ import com.paneedah.weaponlib.ModContext; import com.paneedah.weaponlib.tile.LootBoxConfiguration; import net.minecraft.block.material.Material; -import net.minecraftforge.event.LootTableLoadEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import org.lwjgl.opengl.GL11; -public class TurretBaseFactory implements TileEntityFactory { +public class TurretBaseFactory { - @Override - public void createTileEntity(ModContext modContext) { + public static void createTileEntity(ModContext modContext) { new LootBoxConfiguration() .withMaterial(Material.ROCK) .withName("turret_base") @@ -24,11 +21,6 @@ public void createTileEntity(ModContext modContext) { GL11.glTranslatef(0.5f, 0f, 0.5f); // GL11.glRotatef(-45F, 0f, 1f, 0f); }) - .build(MWC.modContext); + .build(modContext); } - - @SubscribeEvent - public void lootLoad(LootTableLoadEvent evt) { - } - } diff --git a/src/main/java/com/paneedah/mwc/utils/MWCUtil.java b/src/main/java/com/paneedah/mwc/utils/MWCUtil.java index 4d958df2b..c8b0c92a7 100644 --- a/src/main/java/com/paneedah/mwc/utils/MWCUtil.java +++ b/src/main/java/com/paneedah/mwc/utils/MWCUtil.java @@ -1,6 +1,7 @@ package com.paneedah.mwc.utils; import com.paneedah.weaponlib.ItemMagazine; +import com.paneedah.weaponlib.Tags; import com.paneedah.weaponlib.config.ModernConfigManager; import io.redstudioragnarok.redcore.vectors.Vector3D; import net.jafama.FastMath; @@ -85,7 +86,7 @@ public static int consumeItemsFromPlayerInventory(final List ite return 0; } - if (player.isCreative() && !player.isSneaking()) { + if (player.isCreative()) { return amount; } @@ -129,20 +130,25 @@ public static int consumeItemsFromPlayerInventory(final List ite public static ItemStack consumeItemsFromPlayerInventory(final List items, final Comparator comparator, final EntityPlayer player) { ItemStack maxStack = null; - if (player.isCreative() && !player.isSneaking()) { - return items.stream().map(ItemMagazine::create).max(comparator).orElse(null); - } - for (final ItemStack currentStack : player.inventory.mainInventory) if (items.contains(currentStack.getItem()) && (maxStack == null || comparator.compare(currentStack, maxStack) > 0)) { maxStack = currentStack; } if (maxStack == null || maxStack.isEmpty()) { + if (player.isCreative()) + return items.stream().map(ItemMagazine::create).max(comparator).orElse(null); + return null; } - return maxStack.splitStack(1); + if (!player.isCreative()) { + maxStack = maxStack.splitStack(1); + } else { + Tags.setAmmo(maxStack, ((ItemMagazine) maxStack.getItem()).getCapacity()); + } + + return maxStack; } /** diff --git a/src/main/java/com/paneedah/mwc/vehicle/AE86TruenoFactory.java b/src/main/java/com/paneedah/mwc/vehicle/AE86TruenoFactory.java index 344ab7ab4..90b1e658a 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/AE86TruenoFactory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/AE86TruenoFactory.java @@ -15,10 +15,8 @@ public class AE86TruenoFactory implements VehicleFactory { - + @Override public void createVehicle(ModContext modContext) { - - StatefulRenderer renderer = null; if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { @@ -282,7 +280,7 @@ public void createVehicle(ModContext modContext) { .withOBBDimensions(3.3, 2.5, 1.75) .withSeat(new Vec3d(-0.89, -0.2, 0.0)) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/vehicle/ATVFactory.java b/src/main/java/com/paneedah/mwc/vehicle/ATVFactory.java index 884eac66a..9fe6b53df 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/ATVFactory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/ATVFactory.java @@ -21,10 +21,8 @@ public class ATVFactory implements VehicleFactory { - + @Override public void createVehicle(ModContext modContext) { - - StatefulRenderer renderer = null; if (FMLCommonHandler.instance().getSide() == Side.CLIENT) { @@ -263,7 +261,7 @@ public void createVehicle(ModContext modContext) { .withOBBDimensions(1, 1, 1) .withSeat(new Vec3d(-0.5, 0.2, -0.3)) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/vehicle/AudiS4Factory.java b/src/main/java/com/paneedah/mwc/vehicle/AudiS4Factory.java index bdc66eb06..012df0a4a 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/AudiS4Factory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/AudiS4Factory.java @@ -14,6 +14,7 @@ public class AudiS4Factory implements VehicleFactory { + @Override public void createVehicle(ModContext modContext) { StatefulRenderer renderer = null; @@ -241,7 +242,7 @@ public void createVehicle(ModContext modContext) { .withSeat(new Vec3d(0.0, -0.2, 0.0)) .withSeat(new Vec3d(0.5, -0.2, 0.0)) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/vehicle/JLTVM1280Factory.java b/src/main/java/com/paneedah/mwc/vehicle/JLTVM1280Factory.java index 2239bd7a8..070fbc892 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/JLTVM1280Factory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/JLTVM1280Factory.java @@ -9,6 +9,7 @@ public class JLTVM1280Factory implements VehicleFactory { + @Override public void createVehicle(ModContext modContext) { StatefulRenderer renderer = new VehicleRendererBuilder() @@ -204,7 +205,7 @@ public void createVehicle(ModContext modContext) { // .withAccelerationIncrement(0.015) // .withForwardDeccelerationFactor(0.97) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/vehicle/McLarenSennaFactory.java b/src/main/java/com/paneedah/mwc/vehicle/McLarenSennaFactory.java index 11816b39c..0fa488dff 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/McLarenSennaFactory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/McLarenSennaFactory.java @@ -19,6 +19,7 @@ public class McLarenSennaFactory implements VehicleFactory { + @Override public void createVehicle(ModContext modContext) { StatefulRenderer renderer = null; @@ -235,7 +236,7 @@ public void createVehicle(ModContext modContext) { .withOBBDimensions(3.5, 2.5, 1.75) .withSeat(new Vec3d(-0.15, -0.4, 0.5)) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/mwc/vehicle/PartInit.java b/src/main/java/com/paneedah/mwc/vehicle/PartInit.java index fe62e262a..19f2c9ab3 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/PartInit.java +++ b/src/main/java/com/paneedah/mwc/vehicle/PartInit.java @@ -12,21 +12,16 @@ public class PartInit { // .withEcoShift(2500, 1200); public static final Transmission audiS4B7Transmission = new Transmission(3.889f, 3.4f, 4500, 1800) - .quickSixSpeed(3.667f, 2.050f, 1.462f, 1.133f, 0.919f, 0.778f) - .withEcoShift(2500, 1200); + .quickSixSpeed(3.667f, 2.050f, 1.462f, 1.133f, 0.919f, 0.778f); public static final Transmission McLarenSennaTransmission = new Transmission(3.31f, 2.8f, 8450, 4000) - .quickSpeed(3.98f, 2.61f, 1.9f, 1.48f, 1.16f, 0.91f, 0.69f) - .withEcoShift(2500, 1200); + .quickSpeed(3.98f, 2.61f, 1.9f, 1.48f, 1.16f, 0.91f, 0.69f); public static final Transmission AE86TruenoTransmission = new Transmission(4.3f, 4.2f, 5300, 3000) - .quickSixSpeed(3.587f, 2.022f, 1.384f, 1.00f, 0.861f, 0.778f) - .withEcoShift(2500, 1200); + .quickSixSpeed(3.587f, 2.022f, 1.384f, 1.00f, 0.861f, 0.778f); public static final Transmission ATVTransmission = new Transmission(3.937f, 3.544f, 2462, 2738) - .quickSixSpeed(3.525f, 2.218f, 1.433f, 1f, 0.861f, 0.778f) - .withEcoShift(2500, 1200); - + .quickSixSpeed(3.525f, 2.218f, 1.433f, 1f, 0.861f, 0.778f); //Gear shift patterns public static final GearShiftPattern STANDARD_SIX_SHIFT = new GearShiftPattern() diff --git a/src/main/java/com/paneedah/mwc/vehicle/SampleVehicleFactory.java b/src/main/java/com/paneedah/mwc/vehicle/SampleVehicleFactory.java index 2e6c12402..94c4dbcc7 100644 --- a/src/main/java/com/paneedah/mwc/vehicle/SampleVehicleFactory.java +++ b/src/main/java/com/paneedah/mwc/vehicle/SampleVehicleFactory.java @@ -10,6 +10,7 @@ public class SampleVehicleFactory implements VehicleFactory { + @Override public void createVehicle(ModContext modContext) { StatefulRenderer renderer = new VehicleRendererBuilder() @@ -208,7 +209,7 @@ public void createVehicle(ModContext modContext) { // .withAccelerationIncrement(0.015) // .withForwardDeccelerationFactor(0.97) .withRenderer(renderer) - .build(MWC.modContext); + .build(modContext); } } diff --git a/src/main/java/com/paneedah/weaponlib/ClientEventHandler.java b/src/main/java/com/paneedah/weaponlib/ClientEventHandler.java index 3d20ee9ed..655d985e2 100644 --- a/src/main/java/com/paneedah/weaponlib/ClientEventHandler.java +++ b/src/main/java/com/paneedah/weaponlib/ClientEventHandler.java @@ -244,7 +244,7 @@ private void update() { PlayerUtil.restorePlayerSpeed(player, SLOW_DOWN_WHILE_ZOOMING_ATTRIBUTE_MODIFIER); } - if (mainHandHeldWeaponInstance != null && mainHandHeldWeaponInstance.getState() == WeaponState.READY && mainHandHeldWeaponInstance.getStateUpdateTimestamp() + DEFAULT_RECONCILE_TIMEOUT_MILLIS < System.currentTimeMillis() && mainHandHeldWeaponInstance.getSyncStartTimestamp() == 0 && mainHandHeldWeaponInstance.getUpdateTimestamp() + DEFAULT_RECONCILE_TIMEOUT_MILLIS < System.currentTimeMillis()) { + if (mainHandHeldWeaponInstance.getState() == WeaponState.READY && mainHandHeldWeaponInstance.getStateUpdateTimestamp() + DEFAULT_RECONCILE_TIMEOUT_MILLIS < System.currentTimeMillis() && mainHandHeldWeaponInstance.getSyncStartTimestamp() == 0 && mainHandHeldWeaponInstance.getUpdateTimestamp() + DEFAULT_RECONCILE_TIMEOUT_MILLIS < System.currentTimeMillis()) { mainHandHeldWeaponInstance.reconcile(); } } else { @@ -439,56 +439,42 @@ public final void onPostRenderPlayer(RenderPlayerEvent.Post event) { @SubscribeEvent public void onRightHandEmpty(PlayerInteractEvent.RightClickEmpty event) { - final EntityPlayer player = MC.player; - - final List entityVehicleList = player.world.getEntitiesWithinAABB(EntityVehicle.class, new AxisAlignedBB(player.getPosition()).grow(10)); - if (entityVehicleList.isEmpty()) { - return; - } - - for (EntityVehicle entityVehicle : entityVehicleList) { - OreintedBB boundingBox = entityVehicle.getOreintedBoundingBox(); - - //boundingBox.move(entityVehicle.posX, entityVehicle.posY, entityVehicle.posZ); - Vec3d start = player.getPositionEyes(MC.getRenderPartialTicks()); - Vec3d endVec = start.add(player.getLookVec().scale(7)); - - boundingBox.updateInverse(); - - if (boundingBox.doRayTrace(start, endVec) != null) { - CHANNEL.sendToServer(new VehicleInteractMessage(true, entityVehicle.getEntityId(), player.getEntityId())); - return; - } - } + handleVehicleInteraction(event, true, 10, 7); } @SubscribeEvent public void onLeftHandEmpty(PlayerInteractEvent.LeftClickEmpty event) { + handleVehicleInteraction(event, false, 3, 4); + } + + private void handleVehicleInteraction(PlayerInteractEvent event, boolean isRightClick, int range, int rayLength) { final EntityPlayer player = MC.player; + if (player == null || player.world == null) { + return; // Early exit if player or world is null + } + + final List entityVehicleList = player.world.getEntitiesWithinAABB( + EntityVehicle.class, + new AxisAlignedBB(player.getPosition()).grow(range) + ); - final List entityVehicleList = player.world.getEntitiesWithinAABB(EntityVehicle.class, new AxisAlignedBB(player.getPosition()).grow(3)); if (entityVehicleList.isEmpty()) { return; } + Vec3d start = player.getPositionEyes(MC.getRenderPartialTicks()); + Vec3d endVec = start.add(player.getLookVec().scale(rayLength)); + for (EntityVehicle entityVehicle : entityVehicleList) { OreintedBB boundingBox = entityVehicle.getOreintedBoundingBox(); - - //boundingBox.move(entityVehicle.posX, entityVehicle.posY, entityVehicle.posZ); - Vec3d start = player.getPositionEyes(MC.getRenderPartialTicks()); - Vec3d endVec = start.add(player.getLookVec().scale(4)); - - //boundingBox.updateInverse(); - if (boundingBox.doRayTrace(start, endVec) != null) { - CHANNEL.sendToServer(new VehicleInteractMessage(false, entityVehicle.getEntityId(), player.getEntityId())); - //entityVehicle.onKillCommand(); - //entityVehicle.setDead(); - return; + CHANNEL.sendToServer(new VehicleInteractMessage(isRightClick, entityVehicle.getEntityId(), player.getEntityId())); + return; // Exit after the first valid interaction } } } + public static TextureAtlasSprite carParticles; @SubscribeEvent diff --git a/src/main/java/com/paneedah/weaponlib/ClientModContext.java b/src/main/java/com/paneedah/weaponlib/ClientModContext.java index cb1af279c..81ee2af07 100644 --- a/src/main/java/com/paneedah/weaponlib/ClientModContext.java +++ b/src/main/java/com/paneedah/weaponlib/ClientModContext.java @@ -125,10 +125,6 @@ public boolean isClient() { return true; } - @Override - public void registerServerSideOnly() { - } - public PerspectiveManager getViewManager() { return viewManager; } @@ -157,11 +153,6 @@ protected EntityPlayer getPlayer(MessageContext ctx) { return MC.player; } - @Override - public PlayerItemInstanceRegistry getPlayerItemInstanceRegistry() { - return playerItemInstanceRegistry; - } - protected SyncManager getSyncManager() { return syncManager; } diff --git a/src/main/java/com/paneedah/weaponlib/CustomArmor.java b/src/main/java/com/paneedah/weaponlib/CustomArmor.java index bbeab1c27..dc4a4a51e 100644 --- a/src/main/java/com/paneedah/weaponlib/CustomArmor.java +++ b/src/main/java/com/paneedah/weaponlib/CustomArmor.java @@ -6,6 +6,7 @@ import com.paneedah.weaponlib.crafting.IModernCraftingRecipe; import com.paneedah.weaponlib.model.ModelBaseRendererWrapper; import com.paneedah.weaponlib.model.WrappableModel; +import lombok.Getter; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; @@ -197,8 +198,8 @@ public Builder withModelSupplier(Function modelFactory) { public Builder withCompatibleAttachment(AttachmentCategory category, ModelBase attachmentModel, String textureName, Consumer positioner) { - ItemAttachment item = new ItemAttachment(category, attachmentModel, textureName, null); - compatibleAttachments.put(item, new CompatibleAttachment(item, positioner)); + ItemAttachment item = new ItemAttachment<>(category, attachmentModel, textureName, null); + compatibleAttachments.put(item, new CompatibleAttachment<>(item, positioner)); return this; } @@ -420,7 +421,7 @@ public CustomArmor buildBoots(boolean isClient) { //private EntityEquipmentSlot slot; private boolean hasNightVision; - private boolean vignetteEnabled; + @Getter private boolean vignetteEnabled; private float exposureReductionFactor; private SoundEvent breathingSound; @@ -429,12 +430,12 @@ public CustomArmor buildBoots(boolean isClient) { //private boolean shieldEnabled; private long shieldRegenerationTimeout = 1000; private double shieldRegenerationRate = 1.0; // restored shield capacity per sec - private double maxShieldCapacity; + @Getter private double maxShieldCapacity; private final String unlocalizedArmorSetName; - private double shieldIndicatorPositionX; - private double shieldIndicatorPositionY; - private double shieldIndicatorWidth; - private double shieldIndicatorHeight; + @Getter private double shieldIndicatorPositionX; + @Getter private double shieldIndicatorPositionY; + @Getter private double shieldIndicatorWidth; + @Getter private double shieldIndicatorHeight; private String shieldIndicatorMaskTextureName; private String shieldIndicatorProgressBarTextureName; @@ -645,10 +646,6 @@ public boolean hasNightVision() { return hasNightVision; } - public boolean isVignetteEnabled() { - return vignetteEnabled; - } - @Override public Function getAbsorbFunction(Spreadable spreadable) { return dose -> dose * (1f - exposureReductionFactor); @@ -784,26 +781,6 @@ public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource s } } - public double getMaxShieldCapacity() { - return maxShieldCapacity; - } - - public double getShieldIndicatorPositionX() { - return shieldIndicatorPositionX; - } - - public double getShieldIndicatorPositionY() { - return shieldIndicatorPositionY; - } - - public double getShieldIndicatorWidth() { - return shieldIndicatorWidth; - } - - public double getShieldIndicatorHeight() { - return shieldIndicatorHeight; - } - @Override public CraftingEntry[] getModernRecipe() { return this.modernRecipe; diff --git a/src/main/java/com/paneedah/weaponlib/CustomGui.java b/src/main/java/com/paneedah/weaponlib/CustomGui.java index b61d607ab..39f5281dd 100644 --- a/src/main/java/com/paneedah/weaponlib/CustomGui.java +++ b/src/main/java/com/paneedah/weaponlib/CustomGui.java @@ -6,7 +6,6 @@ import com.paneedah.weaponlib.config.ModernConfigManager; import com.paneedah.weaponlib.debug.DebugRenderer; import com.paneedah.weaponlib.jim.util.LangTools; -import com.paneedah.weaponlib.jim.util.color.FlatUIColors; import com.paneedah.weaponlib.render.ModificationGUI; import com.paneedah.weaponlib.render.gui.GUIRenderHelper; import com.paneedah.weaponlib.vehicle.EntityVehicle; @@ -43,6 +42,7 @@ import static com.paneedah.mwc.proxies.ClientProxy.MC; import static com.paneedah.mwc.ProjectConstants.ID; import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*; +import static com.paneedah.weaponlib.render.gui.ColorPalette.*; public class CustomGui extends Gui { @@ -268,8 +268,8 @@ public void handleOpenDoorHUD(RenderGameOverlayEvent.Pre event, double scaledWid int openDoorX = (int) (scaledWidth * OPEN_DOOR_PERCENT_WIDTH_POS); int openDoorY = (int) (scaledHeight * OPEN_DOOR_PERCENT_HEIGHT_POS); - drawCenteredString(FONT_RENDERER, String.format(BRACKET_FORMATTER, KeyBindings.openDoor.getDisplayName()), openDoorX, openDoorY, FlatUIColors.SUN_FLOWER); - drawCenteredString(FONT_RENDERER, LangTools.formatName(OPENDOOR_TEXT_LANG_KEY), openDoorX, openDoorY + OPEN_DOOR_KEY_Y_OFFSET, FlatUIColors.WHITE); + drawCenteredString(FONT_RENDERER, String.format(BRACKET_FORMATTER, KeyBindings.openDoor.getDisplayName()), openDoorX, openDoorY, SUN_FLOWER); + drawCenteredString(FONT_RENDERER, LangTools.formatName(OPENDOOR_TEXT_LANG_KEY), openDoorX, openDoorY + OPEN_DOOR_KEY_Y_OFFSET, WHITE); } if (cachedPlayerPosition.equals(player.getPositionVector()) && cachedPlayerEyeHeight == player.getEyeHeight() && cachedLookVector.equals(player.getLookVec())) { @@ -415,7 +415,7 @@ public void drawAmmoCounter(FontRenderer fr, int width, int height, Item item) { GlStateManager.popMatrix(); if (((Weapon) item).builder.getMaxShots().size() > 1) { - drawScaledString(FONT_RENDERER, keyNameString, FIREMODE_KEY_X_STRING_OFFSET - keyNameOffset, FIREMODE_KEY_Y_STRING_OFFSET, FIREMODE_KEY_SCALE, FlatUIColors.BRIGHT_YARROW); + drawScaledString(FONT_RENDERER, keyNameString, FIREMODE_KEY_X_STRING_OFFSET - keyNameOffset, FIREMODE_KEY_Y_STRING_OFFSET, FIREMODE_KEY_SCALE, BRIGHT_YARROW); } } @@ -436,13 +436,13 @@ public void drawAmmoCounter(FontRenderer fr, int width, int height, Item item) { totalLength = adjLength * WEAPON_NAME_DOWNSCALE_MULTIPLIER; } - drawScaledString(FONT_RENDERER, weaponName, WEAPON_STRING_X_OFFSET - FONT_RENDERER.getStringWidth(weaponName), -FONT_RENDERER.FONT_HEIGHT, WEAPON_STRING_SCALE, FlatUIColors.BRIGHT_YARROW); + drawScaledString(FONT_RENDERER, weaponName, WEAPON_STRING_X_OFFSET - FONT_RENDERER.getStringWidth(weaponName), -FONT_RENDERER.FONT_HEIGHT, WEAPON_STRING_SCALE, BRIGHT_YARROW); if (item instanceof Weapon && BalancePackManager.isWeaponDisabled((Weapon) item)) { - GUIRenderHelper.drawScaledString("Disabled", DISABLED_STRING_X_OFFSET - totalLength, DISABLED_STRING_Y_OFFSET, DISABLED_STRING_SCALE, FlatUIColors.POMEGRANATE); + GUIRenderHelper.drawScaledString("Disabled", DISABLED_STRING_X_OFFSET - totalLength, DISABLED_STRING_Y_OFFSET, DISABLED_STRING_SCALE, POMEGRANATE); } else { - drawScaledString(fr, weaponName, WEAPON_STRING_X_OFFSET - fr.getStringWidth(weaponName), -fr.FONT_HEIGHT, WEAPON_STRING_SCALE, FlatUIColors.BRIGHT_YARROW); - drawScaledString(fr, currentAmmoString, TOTAL_AMMO_COUNT_STRING_X_OFFSET - fr.getStringWidth(currentAmmoString) * CURRENT_AMMO_WIDTH_MULTIPLIER, CURRENT_AMMO_STRING_Y_OFFSET, CURRENT_AMMO_STRING_SCALE, FlatUIColors.BRIGHT_YARROW); + drawScaledString(fr, weaponName, WEAPON_STRING_X_OFFSET - fr.getStringWidth(weaponName), -fr.FONT_HEIGHT, WEAPON_STRING_SCALE, BRIGHT_YARROW); + drawScaledString(fr, currentAmmoString, TOTAL_AMMO_COUNT_STRING_X_OFFSET - fr.getStringWidth(currentAmmoString) * CURRENT_AMMO_WIDTH_MULTIPLIER, CURRENT_AMMO_STRING_Y_OFFSET, CURRENT_AMMO_STRING_SCALE, BRIGHT_YARROW); drawScaledString(fr, bottomString, CURRENT_AMMO_COUNT_STRING_X_OFFSET, TOTAL_AMMO_STRING_SCALE, AMMO_TOTAL_STRING_SCALE); } diff --git a/src/main/java/com/paneedah/weaponlib/ItemMagazine.java b/src/main/java/com/paneedah/weaponlib/ItemMagazine.java index 0f314d0a1..6e30dc90e 100644 --- a/src/main/java/com/paneedah/weaponlib/ItemMagazine.java +++ b/src/main/java/com/paneedah/weaponlib/ItemMagazine.java @@ -1,5 +1,6 @@ package com.paneedah.weaponlib; +import lombok.Getter; import net.minecraft.client.model.ModelBase; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -64,10 +65,10 @@ protected ItemAttachment createAttachment(ModContext modContext) { private ModContext modContext; - private final int capacity; - private List compatibleBullets; - private SoundEvent reloadSound; - private SoundEvent unloadSound; + @Getter private final int capacity; + @Getter private List compatibleBullets; + @Getter private SoundEvent reloadSound; + @Getter private SoundEvent unloadSound; ItemMagazine(ModelBase model, String textureName, int capacity) { this(model, textureName, capacity, null, null); @@ -103,22 +104,6 @@ public void onCreated(ItemStack stack, World world, EntityPlayer player) { initializeTag(stack, 0); } - public List getCompatibleBullets() { - return compatibleBullets; - } - - public int getCapacity() { - return capacity; - } - - public SoundEvent getReloadSound() { - return reloadSound; - } - - public SoundEvent getUnloadSound() { - return unloadSound; - } - @Override public Part getRenderablePart() { return this; diff --git a/src/main/java/com/paneedah/weaponlib/ItemVest.java b/src/main/java/com/paneedah/weaponlib/ItemVest.java index 8bba6f22f..2cebb0848 100644 --- a/src/main/java/com/paneedah/weaponlib/ItemVest.java +++ b/src/main/java/com/paneedah/weaponlib/ItemVest.java @@ -1,5 +1,6 @@ package com.paneedah.weaponlib; +import com.paneedah.mwc.ProjectConstants; import com.paneedah.mwc.renderer.ModelSourceTransforms; import com.paneedah.mwc.renderer.StaticModelSourceRenderer; import com.paneedah.weaponlib.animation.Transform; @@ -167,73 +168,50 @@ public Builder withFirstPersonHandPositioning(Runnable leftHand, Runnable rightH public ItemVest build(ModContext modContext) { if (name == null) { - throw new IllegalStateException("ItemBackpack name not set"); + throw new IllegalStateException("ItemVest name not set"); } -// if(size <= 0) { -// throw new IllegalStateException("ItemBackpack size must be greater than 0"); -// } - -// if(guiTextureName == null) { -// throw new IllegalStateException("ItemBackpack gui texture not set"); -// } -// -// if(!guiTextureName.startsWith("textures/gui/")) { -// guiTextureName = "textures/gui/" + guiTextureName; -// } -// ResourceLocation guiTextureLocation = new ResourceLocation(addFileExtension(guiTextureName, ".png")); - - ItemVest item = new ItemVest(modContext, percentDamageBlocked, durability); - + // Register model and texture for the item ServerGearModelHookRegistry.modelArray.add(this.modelFileString); - item.modelFileString = this.modelFileString; item.textureName = this.properTextureName; item.setTranslationKey(ID + "_" + name); - // Register hook + // Register crafting hook for the item CraftingRegistry.registerHook(item); - + // Register the model for the client side, if applicable if (this.modelFileString != null && !FMLCommonHandler.instance().getSide().isServer()) { - try { - //System.out.println("FOR ITEM: " + item.getRegistryName() + " | "); - ModelBase base = (ModelBase) Class.forName(this.modelFileString).newInstance(); - item.texturedModels.add(new Tuple<>(base, addFileExtension(this.properTextureName, ".png"))); - - - } catch (InstantiationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block + ModelBase baseModel = (ModelBase) Class.forName(this.modelFileString).newInstance(); + item.texturedModels.add(new Tuple<>(baseModel, addFileExtension(this.properTextureName, ".png"))); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { + ProjectConstants.LOGGER.info("Error loading model for: " + this.modelFileString); e.printStackTrace(); } - - } + // Add additional model if specified if (model != null) { item.texturedModels.add(new Tuple<>(model, addFileExtension(textureName, ".png"))); } + // Set creative tab if provided if (tab != null) { item.setCreativeTab(tab); - - } - // lientEventHandler.ITEM_REG.add(item); - - modContext.registerRenderableItem(name, item, FMLCommonHandler.instance().getSide() == Side.CLIENT ? new StaticModelSourceRenderer(transforms) : null); + // Register the item with the mod context as renderable + modContext.registerRenderableItem( + name, + item, + FMLCommonHandler.instance().getSide() == Side.CLIENT ? new StaticModelSourceRenderer(transforms) : null + ); + // Queue item for client-side processing if on client side if (FMLCommonHandler.instance().getSide().isClient()) { COOKING_QUEUE.add(item); } diff --git a/src/main/java/com/paneedah/weaponlib/Tuple.java b/src/main/java/com/paneedah/weaponlib/Tuple.java index 14ecf4232..22fcea833 100644 --- a/src/main/java/com/paneedah/weaponlib/Tuple.java +++ b/src/main/java/com/paneedah/weaponlib/Tuple.java @@ -1,5 +1,9 @@ package com.paneedah.weaponlib; +import lombok.Getter; +import lombok.Setter; + +@Setter @Getter public final class Tuple { private U u; @@ -11,20 +15,4 @@ public Tuple(U u, V v) { this.v = v; } - public U getU() { - return u; - } - - public void setU(U u) { - this.u = u; - } - - public V getV() { - return v; - } - - public void setV(V v) { - this.v = v; - } - } diff --git a/src/main/java/com/paneedah/weaponlib/Weapon.java b/src/main/java/com/paneedah/weaponlib/Weapon.java index 92011972d..2dec3671b 100644 --- a/src/main/java/com/paneedah/weaponlib/Weapon.java +++ b/src/main/java/com/paneedah/weaponlib/Weapon.java @@ -14,6 +14,7 @@ import com.paneedah.weaponlib.render.shells.ShellParticleSimulator.Shell.Type; import dev.redstudio.redcore.utils.DecimalUtils; import io.redstudioragnarok.redcore.vectors.Vector3F; +import lombok.Getter; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.model.ModelBase; @@ -114,7 +115,7 @@ public static class Builder { private CreativeTabs creativeTab; private WeaponRenderer renderer; //float zoom = Weapon.DEFAULT_ZOOM; - List maxShots = new ArrayList<>(); + @Getter List maxShots = new ArrayList<>(); String crosshair; String crosshairRunning; String crosshairZoomed; @@ -149,7 +150,7 @@ public static class Builder { long pumpTimeoutMilliseconds; long burstTimeoutMilliseconds = Weapon.DEFAULT_BURST_TIMEOUT_MILLISECONDS; - private float inaccuracy = DEFAULT_INACCURACY; + @Getter private float inaccuracy = DEFAULT_INACCURACY; int pellets = 1; @@ -222,7 +223,7 @@ public static class Builder { private boolean newSys = false; - private int[][] guiPositions = new int[][]{{-43, 86}, {97, 96}, {92, 34}, {14, -55}, {164, -26}, {145, 67}, {60, 110}, {0, -50}, {-100, -50}, {-29, 44}, {50, 100}}; + @Getter private int[][] guiPositions = new int[][]{{-43, 86}, {97, 96}, {92, 34}, {14, -55}, {164, -26}, {145, 67}, {60, 110}, {0, -50}, {-100, -50}, {-29, 44}, {50, 100}}; public Builder() { @@ -256,22 +257,10 @@ public Builder hasGUIPositions(int[][] gp) { return this; } - public List getMaxShots() { - return this.maxShots; - } - - public int[][] getGUIPositions() { - return this.guiPositions; - } - public float getFirerate() { return this.fireRate; } - public float getInaccuracy() { - return this.inaccuracy; - } - public Builder hasFlashPedals() { this.hasFlashPedals = true; return this; @@ -1022,24 +1011,24 @@ public Weapon build(ModContext modContext) { public Builder builder; - private final ModContext modContext; + @Getter private final ModContext modContext; - private Vec3d muzzlePosition; + @Getter private Vec3d muzzlePosition; private CraftingEntry[] modernRecipe; - private SoundEvent shootSound; - private SoundEvent endOfShootSound; - private SoundEvent silencedShootSound; - private SoundEvent reloadSound; - private SoundEvent reloadIterationSound; - private SoundEvent inspectSound; - private SoundEvent drawSound; - private SoundEvent allReloadIterationsCompletedSound; - private SoundEvent unloadSound; - private SoundEvent ejectSpentRoundSound; - private SoundEvent burstShootSound; - private SoundEvent silencedBurstShootSound; + @Getter private SoundEvent shootSound; + @Getter private SoundEvent endOfShootSound; + @Getter private SoundEvent silencedShootSound; + @Getter private SoundEvent reloadSound; + @Getter private SoundEvent reloadIterationSound; + @Getter private SoundEvent inspectSound; + @Getter private SoundEvent drawSound; + @Getter private SoundEvent allReloadIterationsCompletedSound; + @Getter private SoundEvent unloadSound; + @Getter private SoundEvent ejectSpentRoundSound; + @Getter private SoundEvent burstShootSound; + @Getter private SoundEvent silencedBurstShootSound; public enum State {READY, SHOOTING, RELOAD_REQUESTED, RELOAD_CONFIRMED, UNLOAD_STARTED, UNLOAD_REQUESTED_FROM_SERVER, UNLOAD_CONFIRMED, PAUSED, MODIFYING, EJECT_SPENT_ROUND} @@ -1071,59 +1060,6 @@ public CraftingEntry[] getModernRecipe() { } - public SoundEvent getShootSound() { - return shootSound; - } - - public SoundEvent getBurstShootSound() { - return burstShootSound; - } - - public SoundEvent getSilencedBurstShootSound() { - return silencedBurstShootSound; - } - - public SoundEvent getEndOfShootSound() { - return endOfShootSound; - } - - public SoundEvent getSilencedShootSound() { - return silencedShootSound; - } - - public SoundEvent getReloadSound() { - return reloadSound; - } - - - public SoundEvent getReloadIterationSound() { - return reloadIterationSound; - } - - public SoundEvent getInspectSound() { - return inspectSound; - } - - public SoundEvent getDrawSound() { - return drawSound; - } - - public SoundEvent getAllReloadIterationsCompletedSound() { - return allReloadIterationsCompletedSound; - } - - public SoundEvent getUnloadSound() { - return unloadSound; - } - - public SoundEvent getEjectSpentRoundSound() { - return ejectSpentRoundSound; - } - - public Vec3d getMuzzlePosition() { - return this.muzzlePosition; - } - @Override public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack itemStack) { return true; @@ -1601,10 +1537,6 @@ public float getRecoil() { return BalancePackManager.shouldChangeWeaponRecoil(this) ? (float) BalancePackManager.getNewWeaponRecoil(this) : builder.recoil; } - public ModContext getModContext() { - return modContext; - } - public float getShellCasingVerticalOffset() { return builder.shellCasingVerticalOffset; } diff --git a/src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java b/src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java index 14588fa1c..33e996b40 100644 --- a/src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java +++ b/src/main/java/com/paneedah/weaponlib/WeaponReloadAspect.java @@ -504,10 +504,6 @@ private ItemAttachment getNextMagazine(PlayerWeaponInstance weaponInstan Comparator comparator; comparator = (stack1, stack2) -> Integer.compare(Tags.getAmmo(stack1), Tags.getAmmo(stack2)); - if (player.isCreative() && !player.isSneaking()) { - return (ItemAttachment) compatibleMagazines.stream().map(ItemMagazine::create).max(comparator).orElse(null).getItem(); - } - int maxItemIndex = -1; ItemStack maxStack = null; @@ -537,6 +533,9 @@ private ItemAttachment getNextMagazine(PlayerWeaponInstance weaponInstan int i = maxItemIndex; if (i < 0) { + if (player.isCreative()) + return (ItemAttachment) compatibleMagazines.stream().map(ItemMagazine::create).max(comparator).orElse(null).getItem(); + return null; } @@ -558,10 +557,6 @@ private ItemStack getNextBestMagazineStack(PlayerWeaponInstance weaponInstance) Comparator comparator; comparator = (stack1, stack2) -> Integer.compare(Tags.getAmmo(stack1), Tags.getAmmo(stack2)); - if (player.isCreative() && !player.isSneaking()) { - return compatibleMagazines.stream().map(ItemMagazine::create).max(comparator).orElse(null); - } - int maxItemIndex = -1; ItemStack maxStack = null; @@ -591,10 +586,19 @@ private ItemStack getNextBestMagazineStack(PlayerWeaponInstance weaponInstance) int i = maxItemIndex; if (i < 0) { + if (player.isCreative()) + return compatibleMagazines.stream().map(ItemMagazine::create).max(comparator).orElse(null); + return null; } - ItemStack magazineItemStack = player.inventory.getStackInSlot(i).copy().splitStack(Math.min(player.inventory.getStackInSlot(i).copy().getCount(), 1)); + ItemStack magazineItemStack = player.inventory.getStackInSlot(i).copy(); + + if (!player.isCreative()){ + magazineItemStack = magazineItemStack.splitStack(Math.min(player.inventory.getStackInSlot(i).copy().getCount(), 1)); + } else { + Tags.setAmmo(magazineItemStack, ((ItemMagazine) magazineItemStack.getItem()).getCapacity()); + } return magazineItemStack; } diff --git a/src/main/java/com/paneedah/weaponlib/WeaponRenderer.java b/src/main/java/com/paneedah/weaponlib/WeaponRenderer.java index 405ff30db..2398464c4 100644 --- a/src/main/java/com/paneedah/weaponlib/WeaponRenderer.java +++ b/src/main/java/com/paneedah/weaponlib/WeaponRenderer.java @@ -17,6 +17,8 @@ import com.paneedah.weaponlib.config.ModernConfigManager; import com.paneedah.weaponlib.render.*; import com.paneedah.weaponlib.shader.jim.Shader; +import lombok.Getter; +import lombok.Setter; import net.minecraft.block.state.IBlockState; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.gui.ScaledResolution; @@ -99,6 +101,8 @@ public class WeaponRenderer extends ModelSource implements IBakedModel { private static final int INVENTORY_TEXTURE_WIDTH = 128; private static final int INVENTORY_TEXTURE_HEIGHT = 128; + private static final ResourceLocation GUN_ICON_SHEET = new ResourceLocation(ID + ":textures/gui/guniconsheet.png"); + private static final Map ARMOR_TEXTURE_RES_MAP = Maps.newHashMap(); private final org.apache.commons.lang3.tuple.Pair pair; @@ -130,8 +134,6 @@ public MultipartRenderStateManager 1) { + if (compound.getBone(BBLoader.KEY_MAGIC_MAGAZINE).getBbTransition().size() > 1) { compoundReloadUsesTactical = true; } } @@ -1252,7 +1181,7 @@ public Builder setupModernAnimations(String animationFile, ItemAttachment 1) { + if (compoundEmpty.getBone(BBLoader.KEY_MAGIC_MAGAZINE).getBbTransition().size() > 1) { compoundReloadEmptyUsesTactical = true; } } @@ -2737,7 +2666,7 @@ private List>> getCompl .withPartPositionFunction(Part.RIGHT_HAND, createWeaponPartPositionFunction(r)); - t.sound = p.getSound(); + t.sound = p.getSoundEvent(); for (Entry>>> e : custom.entrySet()) { @@ -4575,7 +4504,7 @@ private void renderCachedInventoryTexture(RenderContext renderC GL11.glScalef(1.0F, -1.0F, 1F); GlStateManager.translate(-8.0F, -8.0F, 0.0F); - MC.getTextureManager().bindTexture(ResourceManager.GUN_ICON_SHEET); + MC.getTextureManager().bindTexture(GUN_ICON_SHEET); // Checks to see if the gun icon sheet has already @@ -4585,7 +4514,7 @@ private void renderCachedInventoryTexture(RenderContext renderC try { - InputStream inputStream = MC.getResourceManager().getResource(ResourceManager.GUN_ICON_SHEET).getInputStream(); + InputStream inputStream = MC.getResourceManager().getResource(GUN_ICON_SHEET).getInputStream(); BufferedImage bf = ImageIO.read(inputStream); gunIconSheetWidth = bf.getWidth(); @@ -4662,17 +4591,6 @@ private void renderCachedInventoryTexture(RenderContext renderC t.draw(); GlStateManager.enableTexture2D(); } - - - - - - - /* - - */ - - } private static void drawTexturedQuadFit(double x, double y, double width, double height, double zLevel) { @@ -4852,159 +4770,86 @@ static void renderSpecialLeftArm(EntityLivingBase player, RenderContext r public static void renderLeftArm(EntityLivingBase player, RenderContext renderContext, Positioner> positioner) { - //if(true) return; - - Render entityRenderObject = MC.getRenderManager() - .getEntityRenderObject(player); + Render entityRenderObject = MC.getRenderManager().getEntityRenderObject(player); RenderPlayer render = (RenderPlayer) entityRenderObject; + + // Bind the player skin texture MC.getTextureManager().bindTexture(((AbstractClientPlayer) player).getLocationSkin()); GL11.glPushMatrix(); - if (AnimationModeProcessor.getInstance().isLegacyMode()) { + // Apply transformations based on the animation mode + if (AnimationModeProcessor.getInstance().isLegacyMode()) { GL11.glTranslatef(0f, -1f, 0f); GL11.glRotatef(-10F, 1f, 0f, 0f); GL11.glRotatef(0F, 0f, 1f, 0f); GL11.glRotatef(10F, 0f, 0f, 1f); } - float MCt = 45f * ((MC.player.ticksExisted % 45) / 45f); - - + // Position the left hand positioner.position(Part.LEFT_HAND, renderContext); + if (DebugPositioner.isDebugModeEnabled()) { DebugPositioner.position(Part.LEFT_HAND, renderContext); } - /* - AnimationData anm = BBLoader.getAnimation("real", "reload", "lefthand"); - //AnimationData anm = BBLoader.loadAnimationData("m16.animation.json", "animation.M16.reload", "lefthand"); - FuckMyLife.instance.bbMap.clear(); - for(Entry tranny : anm.bbTransition.entrySet()) { - FuckMyLife.instance.bbMap.put(tranny.getKey(), tranny.getValue()); - } - - // System.out.println(anm.bbTransition.get(1.5).directTransform()); - FuckMyLife.instance.timer = 0f; - try { - //FuckMyLife.instance.position(FuckMyLife.instance.timer, 4.0f, true); - } catch(Exception e) { - e.printStackTrace(); - }*/ - // System.out.println(anm.bbTransition); - - - /* - FuckMyLife.instance.timer += 0.01f; - FuckMyLife.instance.timer = 0f; - */ - - - //AnimationModeProcessor.getInstance().renderCross(); - - /* - DebugRenderer.setupBasicRender(); - DebugRenderer.renderPoint(Vec3d.ZERO, new Vec3d(1, 0, 0)); - DebugRenderer.destructBasicRender(); - GlStateManager.color(1, 1, 1); - */ - /* - GlStateManager.rotate(57.7232f, 0, 0, 1); - GlStateManager.rotate(26.1991f, 0, 1, 0); - GlStateManager.rotate(-17.5f, 1, 0, 0); - */ - - - /* - if (!OpenGLSelectionHelper.isInSelectionPass && AnimationModeProcessor.getInstance().getFPSMode()) { - - if (OpenGLSelectionHelper.selectID == 1) { - - AnimationModeProcessor.getInstance().renderTransformIndicator(0.2f); - } - }*/ - renderContext.capturePartPosition(Part.LEFT_HAND); - //GL11.glTranslated(1, 0, 0); - //GlStateManager.rotate(0f, 0, 1, 0); - if (!AnimationModeProcessor.getInstance().isLegacyMode()) { - -// GL11.glTranslatef(-0.38f, -0.12f, -0.13f); + // Additional transformations can be applied here if needed } - - // armModel = new ArmModel(); - + // Render the left arm renderLeftArm(render.getMainModel(), (AbstractClientPlayer) player); + // Check for armor on the chest slot ItemStack itemstack = getItemStackFromSlot(player, EntityEquipmentSlot.CHEST); if (itemstack.getItem() instanceof ItemArmor) { render.bindTexture(getArmorResource(player, itemstack, EntityEquipmentSlot.CHEST, null)); ModelBiped armorModel = getArmorModelHook(player, itemstack, EntityEquipmentSlot.CHEST, null); + if (armorModel != null) { renderLeftArm(armorModel, (AbstractClientPlayer) player); } } - /* - * ItemStack itemstack = getItemStackFromSlot(player, EntityEquipmentSlot.CHEST); - - if ( && itemstack.getItem() instanceof ItemArmor) { - // ItemArmor itemarmor = (ItemArmor)itemstack.getItem(); - renderer.bindTexture(getArmorResource(player, itemstack, EntityEquipmentSlot.CHEST, null)); - - ModelBiped armorModel = getArmorModelHook(player, itemstack, EntityEquipmentSlot.CHEST, null); - if (armorModel != null) { - renderRightArm(armorModel, (AbstractClientPlayer) player); - } - } - */ - - // GlStateManager.enableTexture2D(); - GL11.glPopMatrix(); - } - public static void renderRightArm(ModelBiped modelplayer, AbstractClientPlayer clientPlayer) { + public static void renderRightArm(ModelBiped modelPlayer, AbstractClientPlayer clientPlayer) { float f = 1.0F; - GlStateManager.color(f, f, f); - // ModelPlayer modelplayer = renderPlayer.getMainModel(); - // Can ignore private method setModelVisibilities since it was already called - // earlier for left hand - setModelVisibilities(modelplayer, clientPlayer); + // Set the model visibilities + setModelVisibilities(modelPlayer, clientPlayer); GlStateManager.enableBlend(); - modelplayer.swingProgress = 0.0F; - modelplayer.isSneak = false; - modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); + modelPlayer.swingProgress = 0.0F; + modelPlayer.isSneak = false; + modelPlayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer); + + // Set right arm rotation angles based on the animation mode if (AnimationModeProcessor.getInstance().isLegacyMode()) { - modelplayer.bipedRightArm.rotateAngleX = -0.3F; - modelplayer.bipedRightArm.rotateAngleY = 0.0F; + modelPlayer.bipedRightArm.rotateAngleX = -0.3F; + modelPlayer.bipedRightArm.rotateAngleY = 0.0F; } else { - modelplayer.bipedRightArm.rotateAngleX = (float) Math.toRadians(-90); - modelplayer.bipedRightArm.rotateAngleY = 0f; - modelplayer.bipedRightArm.rotateAngleZ = 0f; + modelPlayer.bipedRightArm.rotateAngleX = (float) Math.toRadians(-90); + modelPlayer.bipedRightArm.rotateAngleY = 0f; + modelPlayer.bipedRightArm.rotateAngleZ = 0f; } + // Render the right arm + modelPlayer.bipedRightArm.render(0.0625F); - modelplayer.bipedRightArm.render(0.0625F); - - if (modelplayer instanceof ModelPlayer) { + if (modelPlayer instanceof ModelPlayer) { if (AnimationModeProcessor.getInstance().isLegacyMode()) { - ((ModelPlayer) modelplayer).bipedRightArmwear.rotateAngleX = 0.0F; - ((ModelPlayer) modelplayer).bipedRightArmwear.rotateAngleX = -0.3F; + ((ModelPlayer) modelPlayer).bipedRightArmwear.rotateAngleX = -0.3F; } else { - modelplayer.bipedRightArm.rotateAngleX = 0f; - modelplayer.bipedRightArm.rotateAngleY = 0f; - modelplayer.bipedRightArm.rotateAngleZ = 0f; + modelPlayer.bipedRightArm.rotateAngleX = 0f; + modelPlayer.bipedRightArm.rotateAngleY = 0f; + modelPlayer.bipedRightArm.rotateAngleZ = 0f; } - // ((ModelPlayer) modelplayer).bipedRightArmwear.renderer(0.0625F); } GlStateManager.disableBlend(); diff --git a/src/main/java/com/paneedah/weaponlib/WeaponResourcePack.java b/src/main/java/com/paneedah/weaponlib/WeaponResourcePack.java index 81a20ffa2..62a466346 100644 --- a/src/main/java/com/paneedah/weaponlib/WeaponResourcePack.java +++ b/src/main/java/com/paneedah/weaponlib/WeaponResourcePack.java @@ -39,9 +39,8 @@ private String modifyResourcePath(ResourceLocation resourceLocation) { @Override public boolean resourceExists(ResourceLocation resourceLocation) { String resourcePath = modifyResourcePath(resourceLocation); - boolean value = WEAPONLIB_RESOURCE_DOMAIN.equals(resourceLocation.getNamespace()) + return WEAPONLIB_RESOURCE_DOMAIN.equals(resourceLocation.getNamespace()) && getClass().getResource(resourcePath) != null; - return value; } diff --git a/src/main/java/com/paneedah/weaponlib/animation/AnimationModeProcessor.java b/src/main/java/com/paneedah/weaponlib/animation/AnimationModeProcessor.java index 2e227df6c..e50e73ec8 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/AnimationModeProcessor.java +++ b/src/main/java/com/paneedah/weaponlib/animation/AnimationModeProcessor.java @@ -5,6 +5,8 @@ import com.paneedah.weaponlib.animation.gui.AnimationGUI; import com.paneedah.weaponlib.debug.DebugRenderer; import com.paneedah.weaponlib.render.Shaders; +import lombok.Getter; +import lombok.Setter; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.GlStateManager; @@ -37,12 +39,12 @@ public class AnimationModeProcessor { private final HashMap shouldRender = new HashMap<>(); - private AttachmentCategory activeCategory; + @Setter private AttachmentCategory activeCategory; private AttachmentCategory exclusionCategory; - private static final AnimationModeProcessor instance = new AnimationModeProcessor(); + @Getter private static final AnimationModeProcessor instance = new AnimationModeProcessor(); - public boolean legacyMode = false; + @Getter public boolean legacyMode = false; public Vec3d pan = Vec3d.ZERO; @@ -69,10 +71,6 @@ public AttachmentCategory getExcludedCategory() { return this.exclusionCategory; } - public void setActiveCategory(AttachmentCategory category) { - this.activeCategory = category; - } - public boolean shouldIsolateCategory() { return this.activeCategory != null; } @@ -106,14 +104,6 @@ public void setFPSMode(boolean state) { this.fpsMode = state; } - public static AnimationModeProcessor getInstance() { - return instance; - } - - public boolean isLegacyMode() { - return this.legacyMode; - } - public void captureDeferral() { deferredMatrix.rewind(); GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, deferredMatrix); @@ -215,321 +205,149 @@ public Transform getTransformFromSelected() { } public void onTick() { - - //this.transformMode = 1; - - //MC.player.world.setWorldTime(6000); - + // Check for valid context and main held weapon if (ClientModContext.getContext() != null && ClientModContext.getContext().getMainHeldWeapon() != null) { if (this.pwi == null || pwi != ClientModContext.getContext().getMainHeldWeapon()) { Builder builder = getCurrentWeaponRenderBuilder(); pwi = ClientModContext.getContext().getMainHeldWeapon(); - //System.out.println("BUILDER: " + builder + " | PWI: " + pwi); backupFP = builder.firstPersonTransform.copy(); backupFPL = builder.firstPersonLeftHandTransform.copy(); backupFPR = builder.firstPersonRightHandTransform.copy(); } } + // Handle muzzle positioner if (ClientEventHandler.muzzlePositioner) { DebugPositioner.setDebugPart(Part.NONE); OpenGLSelectionHelper.selectID = 4; transformMode = 1; } - if (AnimationGUI.getInstance().editRotButton.isState()) { + // Manage rotation point editing state + editRotationPointMode = AnimationGUI.getInstance().editRotButton.isState(); + if (editRotationPointMode) { transformMode = 1; - editRotationPointMode = true; - } else { - editRotationPointMode = false; } + // Handle mouse input if (Mouse.isButtonDown(0) && !mouseStatus) { mouseStatus = true; onMouseClick(); leftClickLast = System.currentTimeMillis(); - } else if ((mouseStatus && !Mouse.isButtonDown(0))) { + } else if (mouseStatus && !Mouse.isButtonDown(0)) { mouseStatus = false; permissionToDrag = false; leftLock = false; } - if (!Mouse.isButtonDown(0)) { - AnimationModeProcessor.getInstance().atGrab = null; } - + // Handle dragging double dx = Mouse.getDX(); double dy = Mouse.getDY(); - if (permissionToDrag && colorSelected == -1) { - - if (Mouse.isButtonDown(0)) { - // System.out.println(MC.mouseHelper.deltaX); - // double x = MC.mouseHelper.deltaX/1.0; - // double y = MC.mouseHelper.deltaY/300.0; - - - double x = dx / 2f; - double y = dy / 2f; - rot = rot.add(-y, x, 0); - } + if (permissionToDrag && colorSelected == -1 && Mouse.isButtonDown(0)) { + double x = dx / 2f; + double y = dy / 2f; + rot = rot.add(-y, x, 0); } - if (colorSelected != -1 && Mouse.isButtonDown(0)) { - // transformMode = 2; - if (transformMode == 1) { - float m = 0.2f; - - if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - m /= 10; - } - - Vec3d vec = Vec3d.ZERO; - switch (colorSelected) { - case 1: - vec = new Vec3d(-dx * m, 0, 0); - // DebugPositioner.incrementXPosition((float) -dx, false); - break; - case 2: - vec = new Vec3d(0, -dy * m, 0); - // DebugPositioner.incrementYPosition((float) -dy, false); - - break; - case 3: - vec = new Vec3d(0, 0, dx * m); - // DebugPositioner.incrementZPosition((float) dx, false); - - break; - } - - - boolean modernMode = true; - - if (ClientEventHandler.muzzlePositioner) { - ClientEventHandler.debugmuzzlePosition = ClientEventHandler.debugmuzzlePosition.add(-vec.x * m * 0.1, vec.y * m * 0.1, vec.z * m * 0.1); - } else if (!modernMode) { - DebugPositioner.incrementXPosition((float) vec.x * m, false); - DebugPositioner.incrementYPosition((float) vec.y * m, false); - DebugPositioner.incrementZPosition((float) vec.z * m, false); - } else if (AnimationGUI.getInstance().magEdit.isState()) { - - - ClientEventHandler.magRotPositioner = ClientEventHandler.magRotPositioner.add(vec.x * m, vec.y * m, vec.z * m); - - } else { - - if (!editRotationPointMode) { - Transform t = getTransformFromSelected(); - - - t.withPosition(t.getPositionX() + vec.x * m, t.getPositionY() + vec.y * m, t.getPositionZ() + vec.z * m); - - if (AnimationGUI.getInstance().leftDrag.isState()) { - t.withRotation(t.getRotationX(), t.getRotationY() - vec.x * 0.4, t.getRotationZ()); - } - - } else { - Transform t = getTransformFromSelected(); - - - t.withRotationPoint(t.getRotationPointX() + vec.x * m, t.getRotationPointY() + vec.y * m, t.getRotationPointZ() + vec.z * m); - - } + // Handle color selection adjustments + if (colorSelected != -1 && Mouse.isButtonDown(0)) { + float m = 0.2f; + if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + m /= 10; + } - } + Vec3d vec = Vec3d.ZERO; + switch (colorSelected) { + case 1: + vec = new Vec3d(-dx * m, 0, 0); + break; + case 2: + vec = new Vec3d(0, -dy * m, 0); + break; + case 3: + vec = new Vec3d(0, 0, dx * m); + break; + } + boolean modernMode = true; + if (ClientEventHandler.muzzlePositioner) { + ClientEventHandler.debugmuzzlePosition = ClientEventHandler.debugmuzzlePosition.add(-vec.x * m * 0.1, vec.y * m * 0.1, vec.z * m * 0.1); + } else if (!modernMode) { + DebugPositioner.incrementXPosition((float) vec.x * m, false); + DebugPositioner.incrementYPosition((float) vec.y * m, false); + DebugPositioner.incrementZPosition((float) vec.z * m, false); + } else if (AnimationGUI.getInstance().magEdit.isState()) { + ClientEventHandler.magRotPositioner = ClientEventHandler.magRotPositioner.add(vec.x * m, vec.y * m, vec.z * m); } else { - - - Vec3d vec = Vec3d.ZERO; - switch (colorSelected) { - case 1: - - vec = new Vec3d(0, 1, 0); - // DebugPositioner.incrementYRotation((float) ((float) -dx)); - - // DebugPositioner.incrementXPosition((float) -dx, false); - break; - case 2: - - vec = new Vec3d(1, 0, 0); - // DebugPositioner.incrementXRotation((float) -dy); - break; - case 3: - vec = new Vec3d(0, 0, 1); - // DebugPositioner.incrementZRotation((float) dy); - - break; + Transform t = getTransformFromSelected(); + if (!editRotationPointMode) { + t.withPosition(t.getPositionX() + vec.x * m, t.getPositionY() + vec.y * m, t.getPositionZ() + vec.z * m); + if (AnimationGUI.getInstance().leftDrag.isState()) { + t.withRotation(t.getRotationX(), t.getRotationY() - vec.x * 0.4, t.getRotationZ()); + } + } else { + t.withRotationPoint(t.getRotationPointX() + vec.x * m, t.getRotationPointY() + vec.y * m, t.getRotationPointZ() + vec.z * m); } + } + } - // DebugPositioner.setAutorotate(0, 0, 0); - // Matrix4f rotte = DebugPositioner.rotationMatrix(); - // System.out.println(currentPartMatrix); - /* - * Matrix4f rotte = new Matrix4f(DebugPositioner.rotationMatrix()); - * //rotte.invert(); rotte.transpose(); float m = (float) -dy*0.5f; - * - * - * - * - * double[] angles = MatrixHelper.MatrixToYawPitchRoll(rotte); Position i = - * DebugPositioner.getCurrentPartPosition(); i.xRotation = (float) - * Math.toDegrees(angles[0]); i.yRotation = (float) Math.toDegrees(angles[1]); - * i.zRotation = (float) Math.toDegrees(angles[2]); - * - */ - - // DebugPositioner.setAdjustRotPoint(false); - - float m = (float) -dy * 0.35f; - - - boolean modernMode = true; - - - ScaledResolution scaledresolution = new ScaledResolution(MC); - final int scaledWidth = scaledresolution.getScaledWidth(); - final int scaledHeight = scaledresolution.getScaledHeight(); - int mouseX = Mouse.getX() * scaledWidth / MC.displayWidth; - int mouseY = scaledHeight - Mouse.getY() * scaledHeight / MC.displayHeight - 1; - - Quaternion quat = Arcball.runArcBall(mouseX, mouseY); - double[] quangles = MatrixHelper.toEulerAngles(quat); - - - if (!modernMode) { - DebugPositioner.incrementXRotation((float) (vec.x * m)); - DebugPositioner.incrementYRotation((float) (vec.y * m)); - DebugPositioner.incrementZRotation((float) (vec.z * m)); + // Handle rotation adjustments + if (colorSelected != -1) { + Vec3d vec = Vec3d.ZERO; + switch (colorSelected) { + case 1: + vec = new Vec3d(0, 1, 0); + break; + case 2: + vec = new Vec3d(1, 0, 0); + break; + case 3: + vec = new Vec3d(0, 0, 1); + break; + } - } else { - Builder i = ClientModContext.getContext().getMainHeldWeapon().getWeapon().getRenderer().getWeaponRendererBuilder(); - Transform t = getTransformFromSelected(); + float m = (float) -dy * 0.35f; + boolean modernMode = true; + ScaledResolution scaledResolution = new ScaledResolution(MC); + final int scaledWidth = scaledResolution.getScaledWidth(); + final int scaledHeight = scaledResolution.getScaledHeight(); + int mouseX = Mouse.getX() * scaledWidth / MC.displayWidth; + int mouseY = scaledHeight - Mouse.getY() * scaledHeight / MC.displayHeight - 1; - if (atGrab != null) { - t.withRotation(atGrab.getRotationX() + Math.toDegrees(quangles[0]) * vec.x, atGrab.getRotationY() + Math.toDegrees(quangles[1]) * vec.y, atGrab.getRotationZ() + -Math.toDegrees(quangles[2]) * vec.z); - } - t.printTransform(); - //t.withRotation(t.getRotationX() + vec.x*m*0.1, t.getRotationY() + vec.y*m*0.1, t.getRotationZ() + vec.z*m*0.1); + Quaternion quat = Arcball.runArcBall(mouseX, mouseY); + double[] quangles = MatrixHelper.toEulerAngles(quat); + if (!modernMode) { + DebugPositioner.incrementXRotation((float) (vec.x * m)); + DebugPositioner.incrementYRotation((float) (vec.y * m)); + DebugPositioner.incrementZRotation((float) (vec.z * m)); + } else { + Transform t = getTransformFromSelected(); + if (atGrab != null) { + t.withRotation( + atGrab.getRotationX() + Math.toDegrees(quangles[0]) * vec.x, + atGrab.getRotationY() + Math.toDegrees(quangles[1]) * vec.y, + atGrab.getRotationZ() - Math.toDegrees(quangles[2]) * vec.z + ); } - - - // System.out.println(currentPartMatrix); - - // System.out.println(axis); - - /* - * Matrix4f rotte = new Matrix4f(DebugPositioner.rotationMatrix()); - * - * - * Matrix4f axisM = currentPartMatrix; Vector3f axis = new Vector3f(axisM.m10, - * axisM.m11, axisM.m12); - * - * //rotte.setIdentity(); - * - * //Matrix4f testMa = MatrixHelper.yawPitchRollToMatrix(vec.x*m, vec.y*m, - * vec.z*m); // axis = (Vector3f) axis.scale(-1); axis.normalise(); - * System.out.println(axis); - * - * Matrix4f rot = new Matrix4f(); rot.rotate((float) Math.toRadians(2), axis); - * - * - * - * //rot.invert(); - * - * Matrix4f.mul(rotte, rot, rotte); - * - * double[] angles = MatrixHelper.MatrixToYawPitchRoll(rotte); Position i = - * DebugPositioner.getCurrentPartPosition(); i.yRotation = (float) - * Math.toDegrees(angles[0]); i.xRotation = (float) Math.toDegrees(angles[1]); - * i.zRotation = (float) Math.toDegrees(angles[2]); - * - */ - - // i.zRotation = 45f; - - /* - * i.x = rotte.m30; i.y = rotte.m31; i.z = rotte.m32; - */ - - /* - * i.xRotation = 0; i.yRotation = 0; i.zRotation = 0; - * - * i.x = 0; i.y = 0; i.z = 0; - */ - // Position i = DebugPositioner.getCurrentPartPosition(); - - /* - * i.rOffsetY = 0f; i.rOffsetZ = 0f; i.rOffsetX = 0f; - */ - - /* - * float m = (float) -dy*0.5f; Position i = - * DebugPositioner.getCurrentPartPosition(); Quaternion quat = - * MatrixHelper.fromEulerAngles(i.z, i.x, i.y); - * - * Quaternion q2 = new Quaternion(); q2.setFromAxisAngle(new Vector4f((float) - * Math.toRadians(120), 1, 120, 0)); - * - * Quaternion.mul(quat, q2, quat); - * - * double[] angle = MatrixHelper.toEulerAngles(quat); i.zRotation = (float) - * Math.toDegrees(angle[0]); i.xRotation = (float) Math.toDegrees(angle[1]); - * i.yRotation = (float) Math.toDegrees(angle[2]); - */ - - /* - * Matrix4f test = new Matrix4f(); test.m10 = -69; System.out.println(test); - */ - // System.out.println("yo"); - // vec = new Vec3d(1, 0, 0); - - /* - * vec = ModelRenderTool.transformViaMatrix(vec, rotte); - * - * - * double[] angles = MatrixHelper.MatrixToYawPitchRoll(rotte); Position i = - * DebugPositioner.getCurrentPartPosition(); i.yRotation = (float) - * Math.toDegrees(angles[0]); i.xRotation = (float) Math.toDegrees(angles[1]); - * i.zRotation = (float) Math.toDegrees(angles[2]); - * - * if(1+1==3) { i.yRotation = 0; i.xRotation = 0; i.zRotation = 0; } - */ - /* - * Position i = DebugPositioner.getCurrentPartPosition(); - * - * if(1+1==2) { i.yRotation = 0; i.xRotation = 0; i.zRotation = 0; } - */ - - // DebugPositioner.incrementXRotation((float) (m)); - - /* - * DebugPositioner.incrementXRotation((float) (vec.x*m)); - * DebugPositioner.incrementYRotation((float) (vec.y*m)); - * DebugPositioner.incrementZRotation((float) (vec.z*m)); - */ - + t.printTransform(); } - } + + // Handle right mouse button for panning if (Mouse.isButtonDown(1)) { - // System.out.println(Mouse.getDX()); double x = dx / 10f; double y = dy / 10f; - - // double x = MC.mouseHelper.deltaX/120.0; - // double y = MC.mouseHelper.deltaY/120.0; pan = pan.add(-x, -y, 0); } - - // rot = Vec3d.ZERO; } public int colorSelected = -1; diff --git a/src/main/java/com/paneedah/weaponlib/animation/DebugPositioner.java b/src/main/java/com/paneedah/weaponlib/animation/DebugPositioner.java index d1ea74678..60f49c3f7 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/DebugPositioner.java +++ b/src/main/java/com/paneedah/weaponlib/animation/DebugPositioner.java @@ -2,6 +2,8 @@ import com.paneedah.weaponlib.KeyBindings; import com.paneedah.weaponlib.tracking.LivingEntityTracker; +import lombok.Getter; +import lombok.Setter; import net.minecraft.entity.Entity; import net.minecraft.util.text.TextComponentString; import org.lwjgl.opengl.GL11; @@ -25,24 +27,14 @@ public class DebugPositioner { private static final Set debugParts = new HashSet<>(); - private static Entity watchableEntity; + @Getter private static Entity watchableEntity; - private static boolean isAdjustRotationMode; - - public static void setAdjustRotPoint(boolean status) { - isAdjustRotationMode = status; - } + @Setter private static boolean isAdjustRotationMode; + @Setter @Getter public static final class TransitionConfiguration { private long pause; - public long getPause() { - return pause; - } - - public void setPause(long pause) { - this.pause = pause; - } } public static class Position { @@ -399,10 +391,6 @@ public static void watch() { System.out.println("Trackable entities: " + tracker.getTrackableEntitites()); } - public static Entity getWatchableEntity() { - return watchableEntity; - } - public static void showCurrentMatrix(String message) { showCurrentMatrix(null, message); } diff --git a/src/main/java/com/paneedah/weaponlib/animation/Interpolation.java b/src/main/java/com/paneedah/weaponlib/animation/Interpolation.java index 09e2067e1..ac550272b 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/Interpolation.java +++ b/src/main/java/com/paneedah/weaponlib/animation/Interpolation.java @@ -11,14 +11,13 @@ public enum Interpolation { public double interpolate(double input) { switch (this) { - case LINEAR: - return input; case ACCELERATION: return input * input; case DECELERATION: return 1 - ((1 - input) * (1 - input)); case SMOOTHSTEP: return input * input * (3 - (2 * input)); + case LINEAR: default: return input; } diff --git a/src/main/java/com/paneedah/weaponlib/animation/ModernAnimator.java b/src/main/java/com/paneedah/weaponlib/animation/ModernAnimator.java deleted file mode 100644 index efa8b941c..000000000 --- a/src/main/java/com/paneedah/weaponlib/animation/ModernAnimator.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.paneedah.weaponlib.animation; - -import com.paneedah.weaponlib.animation.jim.AnimationData; - -public class ModernAnimator { - - - public static ModernAnimator instance = new ModernAnimator(); - - public static ModernAnimator getInstance() { - return instance; - } - - public void position(AnimationData data) { - - } - -} diff --git a/src/main/java/com/paneedah/weaponlib/animation/MultipartTransition.java b/src/main/java/com/paneedah/weaponlib/animation/MultipartTransition.java index fcfa01400..c680b06b9 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/MultipartTransition.java +++ b/src/main/java/com/paneedah/weaponlib/animation/MultipartTransition.java @@ -1,5 +1,6 @@ package com.paneedah.weaponlib.animation; +import lombok.Getter; import net.minecraft.util.SoundEvent; import net.minecraft.util.math.Vec3d; @@ -16,12 +17,12 @@ public static Consumer anchoredPosition() { return (Consumer) DEFAULT_POSITION; } - public Context cont; + @Getter public Context context; private final Map> multipartPositionFunctions = new HashMap<>(); private final Map attachedTo = new HashMap<>(); - private final long duration; - private final long pause; + @Getter private final long duration; + @Getter private final long pause; public SoundEvent sound; @@ -91,18 +92,6 @@ public Consumer getPositioning(Part part) { return multipartPositionFunctions.get(part); } - public Context getContext() { - return this.cont; - } - - public long getDuration() { - return duration; - } - - public long getPause() { - return pause; - } - public Part getAttachedTo(Part part) { return attachedTo.get(part); } diff --git a/src/main/java/com/paneedah/weaponlib/animation/OpenGLSelectionHelper.java b/src/main/java/com/paneedah/weaponlib/animation/OpenGLSelectionHelper.java index bbb357f83..951ffbdab 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/OpenGLSelectionHelper.java +++ b/src/main/java/com/paneedah/weaponlib/animation/OpenGLSelectionHelper.java @@ -32,19 +32,13 @@ public class OpenGLSelectionHelper { public static Framebuffer ballBuf; - public static boolean mouseClick = false; - /** * Allows you to select obj behind * - * @return + * @return true */ public static boolean shouldRender(int id) { - return true; - } - - public static void setupSelectionBuffer() { - + return true; //TODO This always returns true } public static void bindBallBuf() { diff --git a/src/main/java/com/paneedah/weaponlib/animation/Transition.java b/src/main/java/com/paneedah/weaponlib/animation/Transition.java index c6d22e52b..80743e2ce 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/Transition.java +++ b/src/main/java/com/paneedah/weaponlib/animation/Transition.java @@ -1,6 +1,8 @@ package com.paneedah.weaponlib.animation; import com.paneedah.weaponlib.Part; +import lombok.Getter; +import lombok.Setter; import net.minecraft.util.SoundEvent; import java.util.function.Consumer; @@ -14,13 +16,12 @@ public static Consumer anchoredPosition() { return (Consumer) ANCHORED_POSITION; } - private final Consumer itemPositioning; - private long duration; - private final long pause; - private final Part attachedTo; - private boolean animated; - - private SoundEvent evt; + @Getter private final Consumer itemPositioning; + @Getter @Setter private long duration; + @Getter private final long pause; + @Getter private final Part attachedTo; + @Getter private boolean animated; + @Getter @Setter private SoundEvent soundEvent; public Transition(Consumer itemPositioning, Part attachedTo, boolean animated) { this(itemPositioning, 0, 0); @@ -35,42 +36,10 @@ public Transition(Consumer itemPositioning, long duration, long pause) this(itemPositioning, duration, pause, null); } - public void setSound(SoundEvent event) { - this.evt = event; - } - public Transition(Consumer itemPositioning, long duration, long pause, Part attachedTo) { this.itemPositioning = itemPositioning; this.duration = duration; this.pause = pause; this.attachedTo = attachedTo; } - - public Consumer getItemPositioning() { - return itemPositioning; - } - - public void setDuration(long newDuration) { - this.duration = newDuration; - } - - public long getDuration() { - return duration; - } - - public SoundEvent getSound() { - return this.evt; - } - - public long getPause() { - return pause; - } - - public Part getAttachedTo() { - return attachedTo; - } - - public boolean isAnimated() { - return animated; - } } diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/AnimGUIRenderable.java b/src/main/java/com/paneedah/weaponlib/animation/gui/AnimGUIRenderable.java deleted file mode 100644 index 6af272d79..000000000 --- a/src/main/java/com/paneedah/weaponlib/animation/gui/AnimGUIRenderable.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.paneedah.weaponlib.animation.gui; - -public abstract class AnimGUIRenderable { - - public abstract void render(int mouseX, int mouseY); - -} diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/AnimationGUI.java b/src/main/java/com/paneedah/weaponlib/animation/gui/AnimationGUI.java index 994816262..6a689eb36 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/gui/AnimationGUI.java +++ b/src/main/java/com/paneedah/weaponlib/animation/gui/AnimationGUI.java @@ -8,6 +8,7 @@ import com.paneedah.weaponlib.animation.DebugPositioner.Position; import com.paneedah.weaponlib.animation.OpenGLSelectionHelper; import com.paneedah.weaponlib.compatibility.RecoilParam; +import lombok.Getter; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.gui.ScaledResolution; @@ -35,11 +36,7 @@ public class AnimationGUI { - private static final AnimationGUI instance = new AnimationGUI(); - - - public static final ResourceLocation TEXTURES = new ResourceLocation(ID + ":textures/hud/animguio.png"); - + @Getter private static final AnimationGUI instance = new AnimationGUI(); public ArrayList panels = new ArrayList<>(); @@ -80,11 +77,6 @@ public class AnimationGUI { public Slider debugFireRate = new Slider("Debug Fire Rate", false, 1, 25); - public static AnimationGUI getInstance() { - //instance = new AnimationGUI(); - return instance; - } - public boolean isPanelClosed(String name) { for (Panel panel : this.panels) { if (panel.getTitle().equals(name)) { @@ -111,8 +103,6 @@ public RecoilParam getRecoilParams() { } public AnimationGUI() { - - Panel cameraPanel = new Panel(this, "Functionality", 10, 10, 20); // cam reset 0 @@ -196,8 +186,6 @@ public void render() { public Textbar rotation = new Textbar("Rotation", 10, 75, 90, 15); public void extraRender() { - - ScaledResolution sr = new ScaledResolution(MC); position.x = (int) (sr.getScaledWidth_double() - 100); rotation.x = (int) (sr.getScaledWidth_double() - 100); diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/Button.java b/src/main/java/com/paneedah/weaponlib/animation/gui/Button.java index 1d4ff4ce9..6fb422d2d 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/gui/Button.java +++ b/src/main/java/com/paneedah/weaponlib/animation/gui/Button.java @@ -1,19 +1,20 @@ package com.paneedah.weaponlib.animation.gui; +import lombok.Getter; +import lombok.Setter; import net.minecraft.client.renderer.GlStateManager; import java.awt.*; +@Getter +@Setter public class Button { - public double x = 0; - public double y = 0; + public double x, y; public String tooltip; - public int id; - - public int size = 0; + public int size; public boolean state = false; public boolean isToggle = false; @@ -72,54 +73,6 @@ public boolean isMouseOver(int mouseX, int mouseY) { } - public double getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public double getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public int getSize() { - return size; - } - - public void setSize(int size) { - this.size = size; - } - - public boolean isState() { - return state; - } - - public void setState(boolean state) { - this.state = state; - } - - public boolean isToggle() { - return isToggle; - } - - public void setToggle(boolean isToggle) { - this.isToggle = isToggle; - } - public void onMouseClick() { if (isToggle) { diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/Panel.java b/src/main/java/com/paneedah/weaponlib/animation/gui/Panel.java index 1256da38d..2f3ab8394 100644 --- a/src/main/java/com/paneedah/weaponlib/animation/gui/Panel.java +++ b/src/main/java/com/paneedah/weaponlib/animation/gui/Panel.java @@ -2,11 +2,15 @@ import com.paneedah.weaponlib.animation.AnimationModeProcessor; import io.redstudioragnarok.redcore.vectors.Vector2D; +import lombok.Getter; +import lombok.Setter; import net.minecraft.client.renderer.GlStateManager; import java.awt.*; import java.util.ArrayList; +@Getter +@Setter public class Panel { @@ -40,14 +44,6 @@ public Panel(AnimationGUI gui, String title, double x, double y, double buttonSi this.buttonSize = buttonSize; } - public boolean isClosed() { - return this.closed; - } - - public void setClosed(boolean bool) { - this.closed = bool; - } - public void handleButtonClicks(int mouseX, int mouseY) { @@ -184,111 +180,12 @@ public void render(int mouseX, int mouseY) { } - public String getTitle() { - return this.title; - } - - public ArrayList