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 extends Item> ite
return 0;
}
- if (player.isCreative() && !player.isSneaking()) {
+ if (player.isCreative()) {
return amount;
}
@@ -129,20 +130,25 @@ public static int consumeItemsFromPlayerInventory(final List extends Item> ite
public static ItemStack consumeItemsFromPlayerInventory(final List extends ItemMagazine> 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 extends IBakedModel, Matrix4f> 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 getButtonList() {
- return buttonList;
- }
-
-
- public void setButtonList(ArrayList buttonList) {
- this.buttonList = buttonList;
- }
-
-
- public AnimationGUI getGui() {
- return gui;
- }
-
-
- public void setGui(AnimationGUI gui) {
- this.gui = gui;
- }
-
-
- public double getPositionX() {
- return positionX;
- }
-
-
- public void setPositionX(double positionX) {
- this.positionX = positionX;
- }
-
-
- public double getPositionY() {
- return positionY;
- }
-
-
- public void setPositionY(double positionY) {
- this.positionY = positionY;
- }
-
-
- public double getWidth() {
- return width;
- }
-
-
- public void setWidth(double width) {
- this.width = width;
- }
-
-
- public double getHeight() {
- return height;
- }
-
-
public void setHeight(double height) {
actualHeight = height;
this.height = height;
}
- public double getButtonSize() {
- return buttonSize;
- }
-
-
- public void setButtonSize(double buttonSize) {
- this.buttonSize = buttonSize;
- }
-
-
- public boolean isGrabbed() {
- return grabbed;
- }
-
-
- public void setGrabbed(boolean grabbed) {
- this.grabbed = grabbed;
- }
-
-
- public Vector2D getOriginalMouseCoords() {
- return originalMouseCoords;
- }
-
-
- public void setOriginalMouseCoords(Vector2D originalMouseCoords) {
- this.originalMouseCoords = originalMouseCoords;
- }
-
-
- public Vector2D getOriginalPanelCoords() {
- return originalPanelCoords;
- }
-
-
- public void setOriginalPanelCoords(Vector2D originalPanelCoords) {
- this.originalPanelCoords = originalPanelCoords;
- }
-
-
public static int getBuffer() {
return BUFFER;
}
diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/Slider.java b/src/main/java/com/paneedah/weaponlib/animation/gui/Slider.java
index e946fbafe..c765b7c94 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/gui/Slider.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/gui/Slider.java
@@ -1,6 +1,8 @@
package com.paneedah.weaponlib.animation.gui;
import com.paneedah.weaponlib.animation.MatrixHelper;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextFormatting;
@@ -17,7 +19,8 @@ public class Slider implements IElement {
private final double mapStart;
private final double mapEnd;
private final boolean centered;
- private double progress;
+
+ @Getter @Setter private double progress;
private double verticalOffset = 0;
@@ -119,19 +122,11 @@ public double getValue() {
return MatrixHelper.solveLerp(mapStart, mapEnd, progress);
}
- public void setProgress(double progress) {
- this.progress = progress;
- }
-
public void setValue(double value) {
this.progress = value / (mapEnd - mapStart);
}
- public double getProgress() {
- return this.progress;
- }
-
@Override
public boolean cancelGrab(int mouseX, int mouseY) {
return hovered || grabbingSlider;
diff --git a/src/main/java/com/paneedah/weaponlib/animation/gui/Textbar.java b/src/main/java/com/paneedah/weaponlib/animation/gui/Textbar.java
index d3e53d235..9e7d57697 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/gui/Textbar.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/gui/Textbar.java
@@ -12,11 +12,7 @@
public class Textbar {
- public int x = 0;
- public int y = 0;
-
- public int w = 0;
- public int h = 0;
+ public int x, y, w, h;
public String[] strings = new String[3];
diff --git a/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationData.java b/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationData.java
index 7c509e6ff..700558e8f 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationData.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationData.java
@@ -12,6 +12,8 @@
import com.paneedah.weaponlib.animation.Transition;
import com.paneedah.weaponlib.render.bgl.math.AngleKit.EulerAngle;
import com.paneedah.weaponlib.render.bgl.math.AngleKit.Format;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.Vec3d;
@@ -22,11 +24,11 @@
public class AnimationData {
- public TreeMap bbTransition = new TreeMap<>();
+ @Getter @Setter private TreeMap bbTransition = new TreeMap<>();
public static final float PACE = 833f;
- public ArrayList timestamps = new ArrayList<>();
+ @Getter @Setter private ArrayList timestamps = new ArrayList<>();
public TreeMap rotationKeyframes = new TreeMap<>();
public TreeMap translateKeyframes = new TreeMap<>();
@@ -37,7 +39,7 @@ public class AnimationData {
// The **ACTUAL** duration of the animation as designated in the BlockBench file
- private float appointedDuration;
+ @Getter @Setter private float appointedDuration;
protected AnimationData(ArrayList arrayList) {
@@ -46,14 +48,6 @@ protected AnimationData(ArrayList arrayList) {
this.fTLength = (long) (arrayList.get(arrayList.size() - 1) / arrayList.size());
}
- public void setAppointedDuration(float f) {
- this.appointedDuration = f;
- }
-
- public float getAppointedDuration() {
- return this.appointedDuration;
- }
-
public AnimationData(JsonObject obj) {
// initialize a timestamp array and the key arrays
@@ -205,7 +199,7 @@ public void setSounds(HashMap map, ArrayList overflowList)
for (Entry set : this.bbTransition.entrySet()) {
if (map.containsKey(set.getKey())) {
overflowList.remove(set.getKey());
- set.getValue().setSound(UniversalSoundLookup.lookupSound(map.get(set.getKey())));
+ set.getValue().setSoundEvent(UniversalSoundLookup.lookupSound(map.get(set.getKey())));
}
}
}
@@ -464,10 +458,10 @@ public List>> getTransitionList(Transf
public static class BlockbenchTransition {
- private float timestamp;
- private Vec3d rotation;
- private Vec3d translation;
- private SoundEvent sound;
+ @Getter @Setter private float timestamp;
+ @Getter @Setter private Vec3d rotation;
+ @Getter @Setter private Vec3d translation;
+ @Getter @Setter private SoundEvent soundEvent;
public BlockbenchTransition(float timestamp, Vec3d rotation, Vec3d translation) {
this.timestamp = timestamp;
@@ -475,10 +469,6 @@ public BlockbenchTransition(float timestamp, Vec3d rotation, Vec3d translation)
this.translation = translation;
}
- public void setSound(SoundEvent sound) {
- this.sound = sound;
- }
-
public void directTransform() {
GL11.glTranslated(translation.x / 25f, translation.y / 25f, translation.z / 25f);
@@ -521,9 +511,6 @@ public Transition> createVMWTransitionWithADS(Transform normal, Transform ads,
*/
- Transform t = normal;
-
-
double rotXMult = 1.0;
double rotYMult = 1.0;
double rotZMult = 1.0;
@@ -548,31 +535,31 @@ public Transition> createVMWTransitionWithADS(Transform normal, Transform ads,
double mul = 1 / tesla;
// Original object positioning
- GlStateManager.translate(t.getPositionX(), t.getPositionY(), t.getPositionZ());
+ GlStateManager.translate(normal.getPositionX(), normal.getPositionY(), normal.getPositionZ());
// Animation translation
GL11.glTranslated(translation.x * mul, -translation.y * mul, translation.z * mul);
// Offset rotation point
- GlStateManager.translate(t.getRotationPointX(), t.getRotationPointY(), t.getRotationPointZ());
+ GlStateManager.translate(normal.getRotationPointX(), normal.getRotationPointY(), normal.getRotationPointZ());
// Original object rotation (+Z, -Y, -X)
- GL11.glRotated(t.getRotationZ(), 0, 0, 1);
+ GL11.glRotated(normal.getRotationZ(), 0, 0, 1);
GL11.glRotated(rotation.z * rotZMult, 0, 0, 1);
- GL11.glRotated(t.getRotationY(), 0, 1, 0);
+ GL11.glRotated(normal.getRotationY(), 0, 1, 0);
GL11.glRotated(rotation.y * rotYMult, 0, 1, 0);
- GL11.glRotated(t.getRotationX(), 1, 0, 0);
+ GL11.glRotated(normal.getRotationX(), 1, 0, 0);
GL11.glRotated(rotation.x * rotXMult, 1, 0, 0);
- GlStateManager.translate(-t.getRotationPointX(), -t.getRotationPointY(), -t.getRotationPointZ());
- GlStateManager.scale(t.getScaleX(), t.getScaleY(), t.getScaleZ());
+ GlStateManager.translate(-normal.getRotationPointX(), -normal.getRotationPointY(), -normal.getRotationPointZ());
+ GlStateManager.scale(normal.getScaleX(), normal.getScaleY(), normal.getScaleZ());
}, (int) timestamp);
- // System.out.println("Hello?! Brother! " + sound);
- trans.setSound(sound);
+ // System.out.println("Hello?! Brother! " + soundEvent);
+ trans.setSoundEvent(soundEvent);
return trans;
@@ -660,8 +647,8 @@ public Transition> createVMWTransition(Transform t, double divisor) {
}, Math.round(timestamp));
- //System.out.println("Hello?! Brother! " + sound);
- trans.setSound(sound);
+ //System.out.println("Hello?! Brother! " + soundEvent);
+ trans.setSoundEvent(soundEvent);
return trans;
}
@@ -680,46 +667,6 @@ public String toString() {
return "[(" + this.timestamp + ") " + this.rotation + " > " + this.translation + "]";
}
- public float getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(float timestamp) {
- this.timestamp = timestamp;
- }
-
- public Vec3d getRotation() {
- return rotation;
- }
-
- public void setRotation(Vec3d rotation) {
- this.rotation = rotation;
- }
-
- public Vec3d getTranslation() {
- return translation;
- }
-
- public void setTranslation(Vec3d translation) {
- this.translation = translation;
- }
-
- }
-
- public TreeMap getBbTransition() {
- return bbTransition;
- }
-
- public void setBbTransition(TreeMap bbTransition) {
- this.bbTransition = bbTransition;
- }
-
- public ArrayList getTimestamps() {
- return timestamps;
- }
-
- public void setTimestamps(ArrayList timestamps) {
- this.timestamps = timestamps;
}
}
diff --git a/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationSet.java b/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationSet.java
index 3ada43b42..a9a9419b1 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationSet.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/jim/AnimationSet.java
@@ -1,16 +1,15 @@
package com.paneedah.weaponlib.animation.jim;
+import lombok.Getter;
+
import java.util.HashMap;
+@Getter
public class AnimationSet {
private final HashMap animations = new HashMap<>();
- public HashMap getAnimations() {
- return animations;
- }
-
public boolean containsKey(String name) {
return animations.containsKey(name);
}
diff --git a/src/main/java/com/paneedah/weaponlib/animation/jim/KeyedAnimation.java b/src/main/java/com/paneedah/weaponlib/animation/jim/KeyedAnimation.java
index d495dc15c..06b314e50 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/jim/KeyedAnimation.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/jim/KeyedAnimation.java
@@ -25,7 +25,7 @@ public KeyedAnimation(float max) {
public KeyedAnimation(AnimationData data) {
// Copy keys
- for (Entry entry : data.bbTransition.entrySet()) {
+ for (Entry entry : data.getBbTransition().entrySet()) {
bbMap.put(entry.getKey(), entry.getValue());
}
diff --git a/src/main/java/com/paneedah/weaponlib/animation/jim/SingleAnimation.java b/src/main/java/com/paneedah/weaponlib/animation/jim/SingleAnimation.java
index c2b3179b9..79f2f45c3 100644
--- a/src/main/java/com/paneedah/weaponlib/animation/jim/SingleAnimation.java
+++ b/src/main/java/com/paneedah/weaponlib/animation/jim/SingleAnimation.java
@@ -86,12 +86,12 @@ public void bake() {
for (int t = 0; t < getTimestamps().size(); ++t) {
if (t == 0) {
- data.bbTransition.get(getTimestamps().get(t)).setTimestamp(1.0f);
+ data.getBbTransition().get(getTimestamps().get(t)).setTimestamp(1.0f);
} else {
float trueDelta = AnimationData.PACE * (getTimestamps().get(t) - getTimestamps().get(t - 1));
//System.out.println("(" + getTimestamps().get(t-1) + ") -> (" + getTimestamps().get(t) + ") " + trueDelta);
- data.bbTransition.get(getTimestamps().get(t)).setTimestamp(trueDelta);
+ data.getBbTransition().get(getTimestamps().get(t)).setTimestamp(trueDelta);
}
}
diff --git a/src/main/java/com/paneedah/weaponlib/command/DebugCommand.java b/src/main/java/com/paneedah/weaponlib/command/DebugCommand.java
index f608e5157..7e915e856 100644
--- a/src/main/java/com/paneedah/weaponlib/command/DebugCommand.java
+++ b/src/main/java/com/paneedah/weaponlib/command/DebugCommand.java
@@ -9,6 +9,7 @@
import com.paneedah.weaponlib.render.ModificationGUI;
import com.paneedah.weaponlib.render.WeaponSpritesheetBuilder;
import com.paneedah.weaponlib.vehicle.VehiclePart;
+import lombok.Getter;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.item.Item;
@@ -17,8 +18,6 @@
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
-import java.util.ArrayList;
-
import static com.paneedah.mwc.proxies.ClientProxy.MC;
import static com.paneedah.mwc.ProjectConstants.ID;
@@ -114,8 +113,6 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
if (args.length > 0) {
switch (args[0].toLowerCase()) {
case DEBUG_ARG_ON:
- processDebugModeSubCommand(args);
- break;
case DEBUG_ARG_OFF:
processDebugModeSubCommand(args);
break;
@@ -144,8 +141,6 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
processAutorotateSubCommand(args);
break;
case DEBUG_FREECAM:
- processFreecamAndMuzzleSubCommands(args);
- break;
case DEBUG_MUZZLE_POS:
processFreecamAndMuzzleSubCommands(args);
break;
@@ -166,9 +161,7 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
}
}
- public ArrayList compatList = new ArrayList<>();
-
- private static boolean isInfiniteAmmo;
+ @Getter private static boolean isInfiniteAmmo;
private static boolean isDebuggingActionPosition;
private static boolean isWorkingOnScreenShake;
private static boolean isForceLiveRenderGUI = true;
@@ -184,10 +177,6 @@ public static boolean isWorkingOnScreenShake() {
return isWorkingOnScreenShake;
}
- public static boolean isInfiniteAmmo() {
- return isInfiniteAmmo;
- }
-
public static boolean isEditingGUI() {
return isEditingGUI;
}
@@ -229,7 +218,7 @@ private void processWeapon(String[] args) {
} else if (args[2].equals("set")) {
double intensity = Double.parseDouble(args[3]);
double lengthModifier = Double.parseDouble(args[4]);
- screenShakeParam = new Pair(intensity, lengthModifier);
+ screenShakeParam = new Pair<>(intensity, lengthModifier);
}
break;
case "buildsheet":
diff --git a/src/main/java/com/paneedah/weaponlib/config/BalancePackManager.java b/src/main/java/com/paneedah/weaponlib/config/BalancePackManager.java
index ef70aee69..d5679dc43 100644
--- a/src/main/java/com/paneedah/weaponlib/config/BalancePackManager.java
+++ b/src/main/java/com/paneedah/weaponlib/config/BalancePackManager.java
@@ -2,6 +2,8 @@
import com.google.gson.*;
import com.paneedah.weaponlib.Weapon;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
@@ -80,6 +82,7 @@ public static String getPackManagerVersion() {
return PACK_MANAGER_VERSION;
}
+ @Getter @Setter
public static class GunCategoryBalanceConfiguration {
private GunConfigurationGroup group;
private double damageMultiplier = 1.0;
@@ -94,38 +97,10 @@ public GunCategoryBalanceConfiguration(GunConfigurationGroup group, double damag
this.hipFireSpreadMultiplier = hipFireSpread;
}
- public GunConfigurationGroup getGroup() {
- return group;
- }
-
- public void setGroup(GunConfigurationGroup group) {
- this.group = group;
- }
-
- public double getDamageMultiplier() {
- return damageMultiplier;
- }
-
- public void setDamageMultiplier(double damageMultiplier) {
- this.damageMultiplier = damageMultiplier;
- }
-
- public double getRecoilMultiplier() {
- return recoilMultiplier;
- }
-
- public void setRecoilMultiplier(double recoilMultiplier) {
- this.recoilMultiplier = recoilMultiplier;
- }
-
public double getHipFireSpread() {
return hipFireSpreadMultiplier;
}
- public void setHipFireSpread(double hipFireSpread) {
- this.hipFireSpreadMultiplier = hipFireSpread;
- }
-
public JsonObject toJSONObject() {
JsonObject category = new JsonObject();
category.addProperty("group", getGroup().toString());
@@ -148,6 +123,7 @@ public static GunCategoryBalanceConfiguration fromJSONObject(JsonObject obj) {
}
+ @Getter @Setter
public static class GunBalanceConfiguration {
private String weaponName;
private boolean enabled = true;
@@ -182,10 +158,6 @@ public GunBalanceConfiguration(String weaponName, boolean enabled, double damage
this.inaccuracy = inaccuracy;
}
- public String getWeaponName() {
- return weaponName;
- }
-
public void setBurstShots(int shots) {
if (shots != 0) {
fireModeBurstChanged = true;
@@ -218,10 +190,6 @@ public boolean altersFiremodeBurst() {
return this.fireModeBurstChanged;
}
- public int getBurstShots() {
- return burstShots;
- }
-
public boolean getFiremodeAuto() {
return this.autoFireEnabled;
}
@@ -234,34 +202,6 @@ public boolean wereFiremodePropertiesAltered() {
return this.fireModePropertiesChanged;
}
- public void setWeaponName(String weaponName) {
- this.weaponName = weaponName;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public double getDamage() {
- return damage;
- }
-
- public void setDamage(double damage) {
- this.damage = damage;
- }
-
- public double getRecoil() {
- return recoil;
- }
-
- public void setRecoil(double recoil) {
- this.recoil = recoil;
- }
-
public void setFirerate(float firerate) {
this.fireRate = firerate;
}
@@ -270,10 +210,6 @@ public double getFirerate() {
return this.fireRate;
}
- public void setInaccuracy(float inaccuracy) {
- this.inaccuracy = inaccuracy;
- }
-
public double getInaccuracy() {
return this.inaccuracy;
}
@@ -331,6 +267,7 @@ public static GunBalanceConfiguration fromJSONObject(JsonObject obj) {
}
}
+ @Getter @Setter
public static class BalancePack {
private String name;
private String version;
@@ -455,63 +392,6 @@ public JsonObject toJSONObject() {
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public double getGlobalRecoilMultiplier() {
- return globalRecoilMultiplier;
- }
-
- public void setGlobalRecoilMultiplier(double globalRecoilMultiplier) {
- this.globalRecoilMultiplier = globalRecoilMultiplier;
- }
-
- public double getGlobalDamageMultiplier() {
- return globalDamageMultiplier;
- }
-
- public void setGlobalDamageMultiplier(double globalDamageMultiplier) {
- this.globalDamageMultiplier = globalDamageMultiplier;
- }
-
- public double getGlobalHipFireSpread() {
- return globalHipFireSpread;
- }
-
- public void setGlobalHipFireSpread(double globalHipFireSpread) {
- this.globalHipFireSpread = globalHipFireSpread;
- }
-
- public HashMap getGunConfigurations() {
- return gunConfigurations;
- }
-
- public void setGunConfigurations(HashMap gunConfigurations) {
- this.gunConfigurations = gunConfigurations;
- }
-
- public HashMap getGunCategoryConfigurations() {
- return gunCategoryConfigurations;
- }
-
- public void setGunCategoryConfigurations(
- HashMap gunCategoryConfigurations) {
- this.gunCategoryConfigurations = gunCategoryConfigurations;
- }
-
public boolean containsWeapon(String name) {
return gunConfigurations.containsKey(name);
}
@@ -563,7 +443,7 @@ public static void remakeIndexFile() {
} catch (IOException e) {
LOGGER.catching(e);
- LOGGER.error("Failed to create a new index.json");
+ LOGGER.error("Failed to remake index.json");
}
}
@@ -594,7 +474,7 @@ public static JsonObject readJSONFile(File file) throws JsonSyntaxException {
LOGGER.error("Failed to read file {} from the disk!", file.getName());
return null;
}
- JsonObject object = null;
+ JsonObject object;
try {
object = GSON_MANAGER.fromJson(reader, JsonObject.class);
} catch (JsonSyntaxException jse) {
@@ -700,7 +580,7 @@ public static void loadBalancePackFromString(ICommandSender sender, String alled
String header = TextFormatting.GOLD + "(Balance Pack Manager " + BalancePackManager.getPackManagerVersion()
+ ")" + TextFormatting.WHITE;
- JsonObject object = null;
+ JsonObject object;
try {
object = GSON_MANAGER.fromJson(alledgedJson, JsonObject.class);
} catch (JsonSyntaxException e) {
diff --git a/src/main/java/com/paneedah/weaponlib/crafting/base/GUIContainerStation.java b/src/main/java/com/paneedah/weaponlib/crafting/base/GUIContainerStation.java
index 1de802691..3ee141efe 100644
--- a/src/main/java/com/paneedah/weaponlib/crafting/base/GUIContainerStation.java
+++ b/src/main/java/com/paneedah/weaponlib/crafting/base/GUIContainerStation.java
@@ -11,6 +11,8 @@
import com.paneedah.weaponlib.render.gui.GUIRenderHelper;
import com.paneedah.weaponlib.render.gui.GUIRenderHelper.StringAlignment;
import com.paneedah.weaponlib.vehicle.jimphysics.InterpolationKit;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
@@ -72,22 +74,22 @@ public abstract class GUIContainerStation extends G
private final ArrayList tooltipRenderItem = new ArrayList<>();
// Mod context
- protected static ModContext modContext;
+ @Setter protected static ModContext modContext;
// Currently selected crafting piece
- private IModernCraftingRecipe selectedCraftingPiece = null;
+ @Getter @Setter private IModernCraftingRecipe selectedCraftingPiece = null;
// Tells us if we can craft the currently selected item
private boolean hasRequiredItems = false;
protected HashMap hasAvailableMaterials = new HashMap<>();
- private int craftingMode = 1;
+ @Getter private int craftingMode = 1;
// Currently used crafting list.
protected ArrayList filteredCraftingList = new ArrayList<>();
// The page the workbench is on
- private int page = 1;
+ @Getter private int page = 1;
private int minPage, maxPage;
// Scroll bar data
@@ -180,23 +182,11 @@ protected void actionPerformed(GuiButton button) throws IOException {
*/
public abstract void fillFilteredList();
- public int getCraftingMode() {
- return this.craftingMode;
- }
-
public void setCraftingMode(int mode) {
craftButton.setErrored(true);
this.craftingMode = mode;
}
- public IModernCraftingRecipe getSelectedCraftingPiece() {
- return this.selectedCraftingPiece;
- }
-
- public void setSelectedCraftingPiece(IModernCraftingRecipe modernCrafting) {
- this.selectedCraftingPiece = modernCrafting;
- }
-
public boolean hasSelectedCraftingPiece() {
return getSelectedCraftingPiece() != null;
}
@@ -214,8 +204,7 @@ public void onSelectNewCrafting(IModernCraftingRecipe crafting) {
if (!counter.containsKey(stack)) {
counter.put(stack, stack.getCount());
} else {
- int existingcount = counter.get(stack);
- counter.put(stack, existingcount + stack.getCount());
+ counter.compute(stack, (k, existingcount) -> existingcount + stack.getCount());
}
}
@@ -264,19 +253,11 @@ public static boolean notEnoughIngredients(CraftingEntry ingredient, HashMap finalcount;
}
- public static void setModContext(ModContext context) {
- modContext = context;
- }
-
public void setPageRange(int min, int max) {
this.minPage = min;
this.maxPage = max;
}
- public int getPage() {
- return this.page;
- }
-
public String format(String unloc) {
return I18n.format(unloc + ".name");
}
diff --git a/src/main/java/com/paneedah/weaponlib/crafting/workbench/GUIButtonCustom.java b/src/main/java/com/paneedah/weaponlib/crafting/workbench/GUIButtonCustom.java
index f802b0412..33b57e5db 100644
--- a/src/main/java/com/paneedah/weaponlib/crafting/workbench/GUIButtonCustom.java
+++ b/src/main/java/com/paneedah/weaponlib/crafting/workbench/GUIButtonCustom.java
@@ -1,6 +1,7 @@
package com.paneedah.weaponlib.crafting.workbench;
import com.paneedah.weaponlib.render.gui.GUIRenderHelper;
+import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.audio.SoundHandler;
@@ -43,9 +44,10 @@ public class GUIButtonCustom extends GuiButton {
// not be rendered)
private Supplier disabledCheck;
- // The page ID-- buttons have the optionality
- // of being unique to a singular page.
- private int pageID = -1;
+ /**
+ * The page ID for this button, buttons can be unique to a singular page.
+ */
+ @Getter private int pageID = -1;
private boolean isToggleButton = false;
private boolean isToggled = false;
@@ -203,15 +205,6 @@ public void setErrored(boolean disable) {
this.isErrored = disable;
}
- /**
- * The page ID that this button is isolated to.
- *
- * @return this button will renderer only with this page ID, -1 if non-applicable.
- */
- public int getPageID() {
- return this.pageID;
- }
-
/**
* Toggle button stuff
*/
diff --git a/src/main/java/com/paneedah/weaponlib/grenade/GrenadeRenderer.java b/src/main/java/com/paneedah/weaponlib/grenade/GrenadeRenderer.java
index 51cdd2848..0d43cf90d 100644
--- a/src/main/java/com/paneedah/weaponlib/grenade/GrenadeRenderer.java
+++ b/src/main/java/com/paneedah/weaponlib/grenade/GrenadeRenderer.java
@@ -5,6 +5,8 @@
import com.paneedah.weaponlib.animation.*;
import com.paneedah.weaponlib.animation.DebugPositioner.TransitionConfiguration;
import com.paneedah.weaponlib.animation.MultipartPositioning.Positioner;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.BufferBuilder;
@@ -95,13 +97,13 @@ private static class SimplePositioning {
public static class Builder {
- private ModelBase model;
- private String textureName;
+ @Getter private ModelBase model;
+ @Getter private String textureName;
- private Consumer entityPositioning;
+ @Getter private Consumer entityPositioning;
private Runnable thrownEntityPositioning = () -> {};
- private Consumer inventoryPositioning;
- private Consumer> thirdPersonPositioning;
+ @Getter private Consumer inventoryPositioning;
+ @Getter private Consumer> thirdPersonPositioning;
private Consumer> firstPersonPositioning;
private Consumer> firstPersonLeftHandPositioning;
@@ -549,25 +551,6 @@ public GrenadeRenderer build() {
return renderer;
}
- public Consumer getEntityPositioning() {
- return entityPositioning;
- }
-
- public Consumer getInventoryPositioning() {
- return inventoryPositioning;
- }
-
- public Consumer> getThirdPersonPositioning() {
- return thirdPersonPositioning;
- }
-
- public String getTextureName() {
- return textureName;
- }
-
- public ModelBase getModel() {
- return model;
- }
}
private Builder builder;
@@ -576,7 +559,7 @@ public ModelBase getModel() {
private final MultipartTransitionProvider> weaponTransitionProvider;
- protected ClientModContext clientModContext;
+ @Setter protected ClientModContext clientModContext;
private GrenadeRenderer(Builder builder) {
this.builder = builder;
@@ -599,10 +582,6 @@ protected ClientModContext getClientModContext() {
return clientModContext;
}
- public void setClientModContext(ClientModContext clientModContext) {
- this.clientModContext = clientModContext;
- }
-
private static class StateManagerKey {
EntityLivingBase player;
@@ -1119,7 +1098,7 @@ public void renderItem() {
WeaponRenderer.renderLeftArm(player, renderContext, positioner);
- // Randomization is supported for the right hand only only
+ // Randomization is supported for the right hand only
positioner.randomize(stateDescriptor.rate, stateDescriptor.amplitude);
WeaponRenderer.renderRightArm(player, renderContext, positioner);
diff --git a/src/main/java/com/paneedah/weaponlib/jim/util/color/FlatUIColors.java b/src/main/java/com/paneedah/weaponlib/jim/util/color/FlatUIColors.java
deleted file mode 100644
index 5925720c2..000000000
--- a/src/main/java/com/paneedah/weaponlib/jim/util/color/FlatUIColors.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.paneedah.weaponlib.jim.util.color;
-
-// https://flatuicolors.com/palette/defo
-public class FlatUIColors {
-
- // STANDARD
- public static final int WHITE = 0xffffff;
-
- // V1 Pallete
- public static final int TURQUOISE = 0x1abc9c;
- public static final int EMERALD = 0x2ecc71;
- public static final int PETER_RIVER = 0x3498db;
- public static final int AMETHYST = 0x9b59b6;
- public static final int WET_ASPHALT = 0x34495e;
- public static final int GREEN_SEA = 0x16a085;
- public static final int NEPHRITIS = 0x27ae60;
- public static final int BELIZE_HOLE = 0x2980b9;
- public static final int WISTERIA = 0x8e44ad;
- public static final int MIDNIGHT_BLUE = 0x2c3e50;
- public static final int SUN_FLOWER = 0xf1c40f;
- public static final int CARROT = 0xe67e22;
- public static final int ALIZARIN = 0xe74c3c;
- public static final int CLOUDS = 0xecf0f1;
- public static final int CONCRETE = 0x95a5a6;
- public static final int ORANGE = 0xf39c12;
- public static final int PUMPKIN = 0xd35400;
- public static final int POMEGRANATE = 0xc0392b;
- public static final int SILVER = 0xbdc3c7;
- public static final int ASBESTOS = 0x7f8c8d;
-
- // American pallette
- public static final int LIGHT_GREENISH_BLUE = 0x55EFC4;
- public static final int FADED_POSTER = 0x81ECEC;
- public static final int GREEN_DARNER_TAIL = 0x74B9FF;
- public static final int SHY_MOMENT = 0xA29BFE;
- public static final int CITY_LIGHTS = 0xDFE6E9;
- public static final int MINT_LEAF = 0x00B894;
- public static final int ROBINS_EGG_BLUE = 0x00CEC9;
- public static final int ELECTRON_BLUE = 0x0984e3;
- public static final int EXODUS_FRUIT = 0x6C5CE7;
- public static final int SOOTHING_BREEZE = 0xB2BEC3;
- public static final int SOUR_LEMON = 0xFFEAA7;
- public static final int FIRST_DATE = 0xFAB1A0;
- public static final int PINK_GLAMOUR = 0xFF7675;
- public static final int PICO8_PINK = 0xFD79A8;
- public static final int AMERICAN_RIVER = 0x636E72;
- public static final int BRIGHT_YARROW = 0xFDCB6E;
- public static final int ORANGEVILLE = 0xE17055;
- public static final int CHI_GONG = 0xD63031;
- public static final int PRUNUS_AVIUM = 0xE84393;
- public static final int DRACULA_ORCHID = 0x2D3436;
-
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/melee/MeleeRenderer.java b/src/main/java/com/paneedah/weaponlib/melee/MeleeRenderer.java
index cdaf15815..2b9691780 100644
--- a/src/main/java/com/paneedah/weaponlib/melee/MeleeRenderer.java
+++ b/src/main/java/com/paneedah/weaponlib/melee/MeleeRenderer.java
@@ -5,6 +5,8 @@
import com.paneedah.weaponlib.animation.*;
import com.paneedah.weaponlib.animation.DebugPositioner.TransitionConfiguration;
import com.paneedah.weaponlib.animation.MultipartPositioning.Positioner;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.BufferBuilder;
@@ -91,14 +93,14 @@ public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, W
public static class Builder {
- private ModelBase model;
- private String textureName;
+ @Getter private ModelBase model;
+ @Getter private String textureName;
private BiConsumer> partDebugPositioning;
- private Consumer entityPositioning;
- private Consumer inventoryPositioning;
- private Consumer> thirdPersonPositioning;
+ @Getter private Consumer entityPositioning;
+ @Getter private Consumer inventoryPositioning;
+ @Getter private Consumer> thirdPersonPositioning;
private Consumer> firstPersonPositioning;
private Consumer> firstPersonPositioningRunning;
@@ -465,25 +467,6 @@ public MeleeRenderer build() {
return renderer;
}
- public Consumer getEntityPositioning() {
- return entityPositioning;
- }
-
- public Consumer getInventoryPositioning() {
- return inventoryPositioning;
- }
-
- public Consumer> getThirdPersonPositioning() {
- return thirdPersonPositioning;
- }
-
- public String getTextureName() {
- return textureName;
- }
-
- public ModelBase getModel() {
- return model;
- }
}
private final Builder builder;
@@ -492,7 +475,7 @@ public ModelBase getModel() {
private final MultipartTransitionProvider> weaponTransitionProvider;
- protected ClientModContext clientModContext;
+ @Setter protected ClientModContext clientModContext;
private MeleeRenderer(Builder builder) {
this.builder = builder;
@@ -514,10 +497,6 @@ protected ClientModContext getClientModContext() {
return clientModContext;
}
- public void setClientModContext(ClientModContext clientModContext) {
- this.clientModContext = clientModContext;
- }
-
protected StateDescriptor getStateDescriptor(EntityPlayer player, ItemStack itemStack) {
float amplitude = builder.normalRandomizingAmplitude;
float rate = builder.normalRandomizingRate;
diff --git a/src/main/java/com/paneedah/weaponlib/numerical/LerpedValue.java b/src/main/java/com/paneedah/weaponlib/numerical/LerpedValue.java
index 538fe666b..d42664ff4 100644
--- a/src/main/java/com/paneedah/weaponlib/numerical/LerpedValue.java
+++ b/src/main/java/com/paneedah/weaponlib/numerical/LerpedValue.java
@@ -1,20 +1,18 @@
package com.paneedah.weaponlib.numerical;
import com.paneedah.weaponlib.animation.MatrixHelper;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
import static com.paneedah.mwc.proxies.ClientProxy.MC;
+@Getter
+@NoArgsConstructor
public class LerpedValue {
public double previousValue;
public double currentValue;
-
- public LerpedValue() {
-
- }
-
-
/**
* Called before changes are made, sets the previous value to the
* current one.
@@ -40,10 +38,6 @@ public double getValue() {
return this.currentValue;
}
- public double getPreviousValue() {
- return this.previousValue;
- }
-
public double getLerped() {
return MatrixHelper.solveLerp(this.previousValue, this.currentValue, MC.getRenderPartialTicks());
}
diff --git a/src/main/java/com/paneedah/weaponlib/render/GLModelBuilder.java b/src/main/java/com/paneedah/weaponlib/render/GLModelBuilder.java
index e3e5866be..3b3c52c51 100644
--- a/src/main/java/com/paneedah/weaponlib/render/GLModelBuilder.java
+++ b/src/main/java/com/paneedah/weaponlib/render/GLModelBuilder.java
@@ -17,7 +17,7 @@ public class GLModelBuilder {
/**
* Creates a static VBO
*
- * @param How many floats are you storing?
+ * @param floatCount How many floats are you storing?
*
* @return The VBO's identity
*/
diff --git a/src/main/java/com/paneedah/weaponlib/render/ModificationGUI.java b/src/main/java/com/paneedah/weaponlib/render/ModificationGUI.java
index 711129ce4..8600579f8 100644
--- a/src/main/java/com/paneedah/weaponlib/render/ModificationGUI.java
+++ b/src/main/java/com/paneedah/weaponlib/render/ModificationGUI.java
@@ -4,7 +4,7 @@
import com.paneedah.weaponlib.WeaponAttachmentAspect.FlaggedAttachment;
import com.paneedah.weaponlib.command.DebugCommand;
import com.paneedah.weaponlib.config.BalancePackManager;
-import com.paneedah.weaponlib.render.gui.ColorPalette;
+import com.paneedah.weaponlib.jim.util.LangTools;
import com.paneedah.weaponlib.render.gui.GUIRenderHelper;
import com.paneedah.weaponlib.render.gui.GUIRenderHelper.StringAlignment;
import net.minecraft.client.gui.ScaledResolution;
@@ -20,6 +20,7 @@
import static com.paneedah.mwc.proxies.ClientProxy.MC;
import static com.paneedah.mwc.ProjectConstants.ID;
+import static com.paneedah.weaponlib.render.gui.ColorPalette.*;
/**
* Singleton modification GUI renderer & logic class
@@ -54,7 +55,6 @@ public class ModificationGUI {
private static final int TOOLTIP_COL_ERROR = 0x702b2b;
- private static final int TOOLTIP_COL_NORMAL = 0x00000;
private static final int[][] DEFAULT_POSITION = new int[][]{{-50, 50}, {120, 75}, {150, 0}, {100, -50},
@@ -211,7 +211,7 @@ public static ModificationGroup fromID(int id) {
* faster to just look it up here.
* (Attachment = 0, Modification = 1, Customization = 2)
*
- * @param ID (0-2)
+ * @param id (0-2)
*
* @return String with first letter capatilized
*/
@@ -242,7 +242,7 @@ public static class TooltipBuilder {
/**
* Sets tooltip builder's color
*
- * @param Hex color code
+ * @param color The color code
*/
public void setColor(int color) {
this.color = color;
@@ -251,7 +251,7 @@ public void setColor(int color) {
/**
* Adds a line with a bullet point in front of it
*
- * @param line
+ * @param text The text to add a bullet point to
*/
public void addBulletPoint(String text) {
addLine("� " + text);
@@ -436,24 +436,6 @@ public void setPos(double x, double y) {
}
-
- /**
- * Translates an unlocalized name via {@link TextComponentTranslation}
- *
- * @param Unlocalized item name
- *
- * @return Localized item name
- */
- public static String translate(String unlocalized) {
- return new TextComponentTranslation(unlocalized + ".name").getFormattedText();
- }
-
- public double getGUIScale() {
-
- return 0.3;
- }
-
-
/**
* Allows the class to update things like alpha without losing track of the initial color
*/
@@ -518,7 +500,7 @@ public void setupForWeapon(PlayerWeaponInstance pwi) {
hasBeenSetup = true;
- int[][] guiPositions = pwi.getWeapon().builder.getGUIPositions();
+ int[][] guiPositions = pwi.getWeapon().builder.getGuiPositions();
for (ModificationTab tab : tabList) {
// Update custom GUI positionings
tab.setPos(guiPositions[tab.id][0], guiPositions[tab.id][1]);
@@ -586,9 +568,9 @@ public void render(ModContext modContext) {
// Draws background rectangles
- GUIRenderHelper.drawColoredRectangle(20, 20, 115, 175, SIDEBAR_ALPHA, ColorPalette.BLACK);
- GUIRenderHelper.drawColoredRectangle(140.5, 20, 7.5, 175, SIDEBAR_ALPHA, ColorPalette.BLACK);
- GUIRenderHelper.drawColoredRectangle(20, 200, 128, 125, SIDEBAR_ALPHA, ColorPalette.BLACK);
+ GUIRenderHelper.drawColoredRectangle(20, 20, 115, 175, SIDEBAR_ALPHA, BLACK);
+ GUIRenderHelper.drawColoredRectangle(140.5, 20, 7.5, 175, SIDEBAR_ALPHA, BLACK);
+ GUIRenderHelper.drawColoredRectangle(20, 200, 128, 125, SIDEBAR_ALPHA, BLACK);
float firerate = weaponInstance.getFireRate();
@@ -610,21 +592,21 @@ public void render(ModContext modContext) {
// Write titles in
GUIRenderHelper.drawScaledString(
TextFormatting.GOLD + "Weapon Stats",
- 30, 205, 1.0, ColorPalette.WHITE);
+ 30, 205, 1.0, WHITE);
GUIRenderHelper.drawScaledString(
- TextFormatting.GOLD + translate(weapon.getTranslationKey()),
- 30, 30, 1.0, ColorPalette.WHITE);
+ TextFormatting.GOLD + LangTools.formatName(weapon.getTranslationKey()),
+ 30, 30, 1.0, WHITE);
GUIRenderHelper.drawScaledString(
"Damage :: " + TextFormatting.GOLD + String.format("%.2f", (BalancePackManager.getNetGunDamage(weapon))),
- 30, 60, 1, ColorPalette.WHITE);
+ 30, 60, 1, WHITE);
GUIRenderHelper.drawScaledString("Recoil :: " + TextFormatting.GOLD + String.format("%.2f", (weaponInstance.getRecoil())),
- 30, 75, 1, ColorPalette.WHITE);
+ 30, 75, 1, WHITE);
GUIRenderHelper.drawScaledString("Firerate :: " + TextFormatting.GOLD + weaponInstance.getFireRate(), 30, 90, 1,
- ColorPalette.WHITE);
+ WHITE);
GUIRenderHelper.drawScaledString(
"Inaccuracy :: " + TextFormatting.GOLD + String.format("%.1f", (weaponInstance.getInaccuracy())), 30,
- 105, 1, ColorPalette.WHITE);
+ 105, 1, WHITE);
GlStateManager.popMatrix();
@@ -669,7 +651,7 @@ public void render(ModContext modContext) {
setAlpha(1.0f);
- GUIRenderHelper.drawAlignedString(text, StringAlignment.RIGHT, true, scaledresolution.getScaledWidth_double() - 18, scaledresolution.getScaledHeight_double() - 75 - (18 * groupID), SIDEBAR_SCALE, ColorPalette.WHITE);
+ GUIRenderHelper.drawAlignedString(text, StringAlignment.RIGHT, true, scaledresolution.getScaledWidth_double() - 18, scaledresolution.getScaledHeight_double() - 75 - (18 * groupID), SIDEBAR_SCALE, WHITE);
//System.out.println("hi ");
@@ -846,7 +828,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
PRIMARY_SELECTOR_ELEMENT.render();
}
- tooltip.color = TOOLTIP_COL_NORMAL;
+ tooltip.color = BLACK;
requiresTooltip = true;
tooltip.addLine(
new TextComponentTranslation(primaryAttachment.getTranslationKey() + ".name").getFormattedText());
@@ -856,7 +838,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
pwi);
tooltip.addLine(TextFormatting.BOLD + "Is Required By:");
for (ItemAttachment req : requirees)
- tooltip.addBulletPoint(translate(req.getTranslationKey()));
+ tooltip.addBulletPoint(LangTools.formatName(req.getTranslationKey()));
}
if (isInClick) {
@@ -952,7 +934,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
RIGHT_ARROW_ELEMENT.render();
setAlpha(1.0f);
- GUIRenderHelper.drawScaledString("Pg. " + (tab.page + 1), 188.5, 256.5, 2.5, ColorPalette.WHITE);
+ GUIRenderHelper.drawScaledString("Pg. " + (tab.page + 1), 188.5, 256.5, 2.5, WHITE);
}
@@ -963,7 +945,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
if (dropdownHovered) {
GUIRenderHelper.drawScaledString(title, 125, 10, 2.5, 0xfeca57);
} else {
- GUIRenderHelper.drawScaledString(title, 125, 10, 2.5, ColorPalette.WHITE);
+ GUIRenderHelper.drawScaledString(title, 125, 10, 2.5, WHITE);
}
// Primary item renderer
@@ -1013,10 +995,10 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
tooltip.color = TOOLTIP_COL_ERROR;
- tooltip.addBulletPoint(translate(flag.getAttachment().getTranslationKey()));
+ tooltip.addBulletPoint(LangTools.formatName(flag.getAttachment().getTranslationKey()));
tooltip.addLine(TextFormatting.BOLD + "Required Mods: ");
for (ItemAttachment required : flag.getRequiredParts()) {
- tooltip.addBulletPoint(translate(required.getTranslationKey()));
+ tooltip.addBulletPoint(LangTools.formatName(required.getTranslationKey()));
}
}
// drawTexturedRect(i+11, 150, 0, 300, 89, 89, 512, 512);
@@ -1031,7 +1013,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
selector.render();
GlStateManager.translate(0, 0, -50);
- tooltip.color = TOOLTIP_COL_NORMAL;
+ tooltip.color = BLACK;
requiresTooltip = true;
tooltip.addLine(
new TextComponentTranslation(flag.getAttachment().getTranslationKey() + ".name")
@@ -1094,7 +1076,7 @@ public void drawModificationTab(ScaledResolution sr, ModificationTab tab, int mo
GlStateManager.enableTexture2D();
int space = 0;
for (String splitted : args) {
- GUIRenderHelper.drawScaledString(splitted, mouseX + 2, mouseY + 2 + space, 1.0, ColorPalette.WHITE);
+ GUIRenderHelper.drawScaledString(splitted, mouseX + 2, mouseY + 2 + space, 1.0, WHITE);
space += 10;
}
diff --git a/src/main/java/com/paneedah/weaponlib/render/ResourceManager.java b/src/main/java/com/paneedah/weaponlib/render/ResourceManager.java
deleted file mode 100644
index 630f5e6fe..000000000
--- a/src/main/java/com/paneedah/weaponlib/render/ResourceManager.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.paneedah.weaponlib.render;
-
-import net.minecraft.util.ResourceLocation;
-
-import static com.paneedah.mwc.ProjectConstants.ID;
-
-public class ResourceManager {
- // Controls some guns icon textures
- public static final ResourceLocation GUN_ICON_SHEET = new ResourceLocation(ID + ":textures/gui/guniconsheet.png");
-}
diff --git a/src/main/java/com/paneedah/weaponlib/render/SpriteSheetTools.java b/src/main/java/com/paneedah/weaponlib/render/SpriteSheetTools.java
index d39e52da2..924da8ab1 100644
--- a/src/main/java/com/paneedah/weaponlib/render/SpriteSheetTools.java
+++ b/src/main/java/com/paneedah/weaponlib/render/SpriteSheetTools.java
@@ -1,7 +1,12 @@
package com.paneedah.weaponlib.render;
+import lombok.Getter;
+import lombok.Setter;
+
public class SpriteSheetTools {
+ @Getter
+ @Setter
public static class Sprite {
private double minU, minV, maxU, maxV;
@@ -12,69 +17,55 @@ public Sprite(double minU, double minV, double maxU, double maxV) {
this.maxV = maxV;
}
- public double getMinU() {
- return minU;
- }
-
- public void setMinU(double minU) {
- this.minU = minU;
- }
-
- public double getMinV() {
- return minV;
- }
-
- public void setMinV(double minV) {
- this.minV = minV;
- }
-
- public double getMaxU() {
- return maxU;
- }
-
- public void setMaxU(double maxU) {
- this.maxU = maxU;
- }
-
- public double getMaxV() {
- return maxV;
- }
-
- public void setMaxV(double maxV) {
- this.maxV = maxV;
- }
-
}
-
+ /**
+ * Retrieves a square sprite from a sprite sheet.
+ *
+ * @param id The index of the sprite.
+ * @param spriteSize The size of the sprite.
+ * @param width The width of the sprite sheet.
+ * @param height The height of the sprite sheet.
+ * @return A new Sprite object representing the sprite's coordinates.
+ */
public static Sprite getSquareSprite(int id, double spriteSize, double width, double height) {
-
- //id = 2;
int columns = (int) Math.floor(width / spriteSize);
int rows = (int) Math.floor(height / spriteSize);
double u = (id % columns) * spriteSize / width;
double v = Math.floor(id / columns) * spriteSize / height;
- //System.out.println(u + " | " + v + " | " + (columns));
return new Sprite(u, v, u + (spriteSize / width), v + (spriteSize / height));
}
+ /**
+ * Retrieves a rectangular sprite from a sprite sheet, with an option to flip the sprite.
+ *
+ * @param id The index of the sprite.
+ * @param spriteWidth The width of the sprite.
+ * @param spriteHeight The height of the sprite.
+ * @param width The width of the sprite sheet.
+ * @param height The height of the sprite sheet.
+ * @param flip Whether to flip the sprite horizontally.
+ * @return A new Sprite object representing the sprite's coordinates.
+ */
public static Sprite getRectSprite(int id, double spriteWidth, double spriteHeight, double width, double height, boolean flip) {
int columns = (int) Math.floor(width / spriteWidth);
int rows = (int) Math.floor(height / spriteHeight);
double u = (id % columns) * spriteWidth / width;
- double v = (id / columns) * spriteWidth / height;
-
- if (flip) {
-
+ double v = Math.floor(id / columns) * spriteHeight / height;
- return new Sprite(u, v, u + (spriteWidth / width), v + (spriteHeight / height));
-
- } else {
- return new Sprite(u, v, u + (spriteWidth / width), v + (spriteHeight / height));
+ double minU = u;
+ double maxU = u + (spriteWidth / width);
+ double minV = v;
+ double maxV = v + (spriteHeight / height);
+ // If flipping horizontally, swap minU and maxU
+ if (flip) {
+ double temp = minU;
+ minU = maxU;
+ maxU = temp;
}
+ return new Sprite(minU, minV, maxU, maxV);
}
-
}
diff --git a/src/main/java/com/paneedah/weaponlib/render/gui/ColorPalette.java b/src/main/java/com/paneedah/weaponlib/render/gui/ColorPalette.java
index 538b7b6a9..397cd4cce 100644
--- a/src/main/java/com/paneedah/weaponlib/render/gui/ColorPalette.java
+++ b/src/main/java/com/paneedah/weaponlib/render/gui/ColorPalette.java
@@ -1,6 +1,59 @@
package com.paneedah.weaponlib.render.gui;
+
+/**
+ * The Colors used for the UIs in MWC
+ *
+ * BRIGHT_YARROW is used for HUD, and SUN_FLOWER is used for the Open door display
+ *
+ * @author Jim
+ */
public class ColorPalette {
+ // STANDARD
public static final int WHITE = 0xffffff;
public static final int BLACK = 0x000000;
+
+ // V1 Pallet
+ public static final int TURQUOISE = 0x1abc9c;
+ public static final int EMERALD = 0x2ecc71;
+ public static final int PETER_RIVER = 0x3498db;
+ public static final int AMETHYST = 0x9b59b6;
+ public static final int WET_ASPHALT = 0x34495e;
+ public static final int GREEN_SEA = 0x16a085;
+ public static final int NEPHRITIS = 0x27ae60;
+ public static final int BELIZE_HOLE = 0x2980b9;
+ public static final int WISTERIA = 0x8e44ad;
+ public static final int MIDNIGHT_BLUE = 0x2c3e50;
+ public static final int SUN_FLOWER = 0xf1c40f;
+ public static final int CARROT = 0xe67e22;
+ public static final int ALIZARIN = 0xe74c3c;
+ public static final int CLOUDS = 0xecf0f1;
+ public static final int CONCRETE = 0x95a5a6;
+ public static final int ORANGE = 0xf39c12;
+ public static final int PUMPKIN = 0xd35400;
+ public static final int POMEGRANATE = 0xc0392b;
+ public static final int SILVER = 0xbdc3c7;
+ public static final int ASBESTOS = 0x7f8c8d;
+
+ // American Pallet
+ public static final int LIGHT_GREENISH_BLUE = 0x55EFC4;
+ public static final int FADED_POSTER = 0x81ECEC;
+ public static final int GREEN_DARNER_TAIL = 0x74B9FF;
+ public static final int SHY_MOMENT = 0xA29BFE;
+ public static final int CITY_LIGHTS = 0xDFE6E9;
+ public static final int MINT_LEAF = 0x00B894;
+ public static final int ROBINS_EGG_BLUE = 0x00CEC9;
+ public static final int ELECTRON_BLUE = 0x0984e3;
+ public static final int EXODUS_FRUIT = 0x6C5CE7;
+ public static final int SOOTHING_BREEZE = 0xB2BEC3;
+ public static final int SOUR_LEMON = 0xFFEAA7;
+ public static final int FIRST_DATE = 0xFAB1A0;
+ public static final int PINK_GLAMOUR = 0xFF7675;
+ public static final int PICO8_PINK = 0xFD79A8;
+ public static final int AMERICAN_RIVER = 0x636E72;
+ public static final int BRIGHT_YARROW = 0xFDCB6E;
+ public static final int ORANGEVILLE = 0xE17055;
+ public static final int CHI_GONG = 0xD63031;
+ public static final int PRUNUS_AVIUM = 0xE84393;
+ public static final int DRACULA_ORCHID = 0x2D3436;
}
diff --git a/src/main/java/com/paneedah/weaponlib/render/modern/RayTraceUtil.java b/src/main/java/com/paneedah/weaponlib/render/modern/RayTraceUtil.java
deleted file mode 100644
index 2cfbdce87..000000000
--- a/src/main/java/com/paneedah/weaponlib/render/modern/RayTraceUtil.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.paneedah.weaponlib.render.modern;
-
-public class RayTraceUtil {
-
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/render/qrender/QBoxer.java b/src/main/java/com/paneedah/weaponlib/render/qrender/QBoxer.java
deleted file mode 100644
index f7e062a8e..000000000
--- a/src/main/java/com/paneedah/weaponlib/render/qrender/QBoxer.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.paneedah.weaponlib.render.qrender;
-
-import net.minecraft.client.model.ModelBox;
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.client.model.PositionTextureVertex;
-import net.minecraft.client.model.TexturedQuad;
-import net.minecraft.util.math.Vec3d;
-import org.lwjgl.util.vector.Matrix4f;
-import org.lwjgl.util.vector.Vector4f;
-
-public class QBoxer extends ModelBox {
-
- private PositionTextureVertex[] vertexPositions;
- private TexturedQuad[] quadList;
-
-
- /*
- * CONSTRUCTOR INFO
- */
- public int texU;
- public int texV;
- public float x;
- public float y;
- public float z;
- public int dx;
- public int dy;
- public int dz;
- public float delta;
- public boolean mirror;
-
-
- public QBoxer(ModelRenderer renderer, int texU, int texV, float x, float y, float z, int dx, int dy, int dz,
- float delta, boolean mirror) {
- super(renderer, texU, texV, x, y, z, dx, dy, dz, delta, mirror);
-
- /*
- this.vertexPositions = new PositionTextureVertex[8];
- this.quadList = new TexturedQuad[6];
- float f = x + (float)dx;
- float f1 = y + (float)dy;
- float f2 = z + (float)dz;
- x = x - delta;
- y = y - delta;
- z = z - delta;
- f = f + delta;
- f1 = f1 + delta;
- f2 = f2 + delta;
-
- if (mirror)
- {
- float f3 = f;
- f = x;
- x = f3;
- }
-
- PositionTextureVertex positiontexturevertex7 = new PositionTextureVertex(x, y, z, 0.0F, 0.0F);
- PositionTextureVertex positiontexturevertex = new PositionTextureVertex(f, y, z, 0.0F, 8.0F);
- PositionTextureVertex positiontexturevertex1 = new PositionTextureVertex(f, f1, z, 8.0F, 8.0F);
- PositionTextureVertex positiontexturevertex2 = new PositionTextureVertex(x, f1, z, 8.0F, 0.0F);
- PositionTextureVertex positiontexturevertex3 = new PositionTextureVertex(x, y, f2, 0.0F, 0.0F);
- PositionTextureVertex positiontexturevertex4 = new PositionTextureVertex(f, y, f2, 0.0F, 8.0F);
- PositionTextureVertex positiontexturevertex5 = new PositionTextureVertex(f, f1, f2, 8.0F, 8.0F);
- PositionTextureVertex positiontexturevertex6 = new PositionTextureVertex(x, f1, f2, 8.0F, 0.0F);
-
-
- applyMatrixTransforms(positiontexturevertex, openGLMAT);
- applyMatrixTransforms(positiontexturevertex1, openGLMAT);
- applyMatrixTransforms(positiontexturevertex2, openGLMAT);
- applyMatrixTransforms(positiontexturevertex3, openGLMAT);
- applyMatrixTransforms(positiontexturevertex4, openGLMAT);
- applyMatrixTransforms(positiontexturevertex5, openGLMAT);
- applyMatrixTransforms(positiontexturevertex6, openGLMAT);
- applyMatrixTransforms(positiontexturevertex7, openGLMAT);
-
- this.vertexPositions[0] = positiontexturevertex7;
- this.vertexPositions[1] = positiontexturevertex;
- this.vertexPositions[2] = positiontexturevertex1;
- this.vertexPositions[3] = positiontexturevertex2;
- this.vertexPositions[4] = positiontexturevertex3;
- this.vertexPositions[5] = positiontexturevertex4;
- this.vertexPositions[6] = positiontexturevertex5;
- this.vertexPositions[7] = positiontexturevertex6;
- this.quadList[0] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex4, positiontexturevertex, positiontexturevertex1, positiontexturevertex5}, texU + dz + dx, texV + dz, texU + dz + dx + dz, texV + dz + dy, renderer.textureWidth, renderer.textureHeight);
- this.quadList[1] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex7, positiontexturevertex3, positiontexturevertex6, positiontexturevertex2}, texU, texV + dz, texU + dz, texV + dz + dy, renderer.textureWidth, renderer.textureHeight);
- this.quadList[2] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex4, positiontexturevertex3, positiontexturevertex7, positiontexturevertex}, texU + dz, texV, texU + dz + dx, texV + dz, renderer.textureWidth, renderer.textureHeight);
- this.quadList[3] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex1, positiontexturevertex2, positiontexturevertex6, positiontexturevertex5}, texU + dz + dx, texV + dz, texU + dz + dx + dx, texV, renderer.textureWidth, renderer.textureHeight);
- this.quadList[4] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex, positiontexturevertex7, positiontexturevertex2, positiontexturevertex1}, texU + dz, texV + dz, texU + dz + dx, texV + dz + dy, renderer.textureWidth, renderer.textureHeight);
- this.quadList[5] = new TexturedQuad(new PositionTextureVertex[] {positiontexturevertex3, positiontexturevertex4, positiontexturevertex5, positiontexturevertex6}, texU + dz + dx + dz, texV + dz, texU + dz + dx + dz + dx, texV + dz + dy, renderer.textureWidth, renderer.textureHeight);
-
- if (mirror)
- {
- for (TexturedQuad texturedquad : this.quadList)
- {
- texturedquad.flipFace();
- }
- }*/
- }
-
-
- public void applyMatrixTransforms(PositionTextureVertex vert, Matrix4f openGLMAT) {
- Vec3d v = vert.vector3D;
- Vector4f v3d = new Vector4f((float) v.x, (float) v.y, (float) v.z, 1.0f);
-
-
- //org.lwjgl.util.vector.Matrix4f openGLMAT = MatrixHelper.captureMatrix();
- Vector4f r = org.lwjgl.util.vector.Matrix4f.transform(openGLMAT, v3d, null);
- vert.vector3D = new Vec3d(r.x, r.y, r.z);
-
- }
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/render/qrender/QOven.java b/src/main/java/com/paneedah/weaponlib/render/qrender/QOven.java
deleted file mode 100644
index 59705ac9a..000000000
--- a/src/main/java/com/paneedah/weaponlib/render/qrender/QOven.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.paneedah.weaponlib.render.qrender;
-
-import net.minecraft.client.model.ModelBase;
-
-public class QOven {
-
- public void bake(ModelBase model) {
-
- }
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/render/scopes/Reticle.java b/src/main/java/com/paneedah/weaponlib/render/scopes/Reticle.java
index f71d62ad7..dabcc229c 100644
--- a/src/main/java/com/paneedah/weaponlib/render/scopes/Reticle.java
+++ b/src/main/java/com/paneedah/weaponlib/render/scopes/Reticle.java
@@ -1,5 +1,7 @@
package com.paneedah.weaponlib.render.scopes;
+import lombok.Getter;
+import lombok.Setter;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.Vec3d;
@@ -11,12 +13,11 @@ public class Reticle {
private static final int DEFAULT_TINT = 0x576574;
- private ResourceLocation reticleTexture;
+ @Getter @Setter private ResourceLocation reticleTexture;
private Type reticleType;
-
- private float textureScale;
- private Vec3d backgroundColor;
+ @Setter @Getter private float textureScale;
+ @Setter @Getter private Vec3d backgroundColor;
public enum Type {
HOLOGRAPHIC,
@@ -45,30 +46,6 @@ private static Vec3d extractColorFromHex(int color) {
return new Vec3d(col.getRed() / 255f, col.getBlue() / 255f, col.getGreen() / 255f);
}
- public ResourceLocation getReticleTexture() {
- return reticleTexture;
- }
-
- public void setReticleTexture(ResourceLocation reticleTexture) {
- this.reticleTexture = reticleTexture;
- }
-
- public float getTextureScale() {
- return textureScale;
- }
-
- public void setTextureScale(float textureScale) {
- this.textureScale = textureScale;
- }
-
-
- public Vec3d getBackgroundColor() {
- return backgroundColor;
- }
-
- public void setBackgroundColor(Vec3d backgroundColor) {
- this.backgroundColor = backgroundColor;
- }
public static int getDefaultTint() {
return DEFAULT_TINT;
diff --git a/src/main/java/com/paneedah/weaponlib/tile/CustomTileEntityRenderer.java b/src/main/java/com/paneedah/weaponlib/tile/CustomTileEntityRenderer.java
index b75534aff..f0fc1bb64 100644
--- a/src/main/java/com/paneedah/weaponlib/tile/CustomTileEntityRenderer.java
+++ b/src/main/java/com/paneedah/weaponlib/tile/CustomTileEntityRenderer.java
@@ -7,7 +7,18 @@
import java.util.function.Consumer;
-public class CustomTileEntityRenderer extends net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer> {
+/**
+ * Custom renderer for TileEntity with a specified model and texture.
+ *
+ * @param The type of CustomTileEntity being rendered.
+ */
+public class CustomTileEntityRenderer>
+ extends net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer {
+
+ private static final float TRANSLATE_Y = 1.0F;
+ private static final float SCALE_FACTOR = 1.0F;
+ private static final float ROTATION_ANGLE = 90f;
+ private static final float MODEL_RENDER_SCALE = 0.0625f;
private final ModelBase model;
private final ResourceLocation textureResource;
@@ -20,30 +31,52 @@ public CustomTileEntityRenderer(ModelBase model, ResourceLocation textureResourc
this.positioning = positioning;
}
+ /**
+ * Renders the tile entity with appropriate transformations.
+ *
+ * @param tileEntity The tile entity being rendered.
+ * @param posX The x position for rendering.
+ * @param posY The y position for rendering.
+ * @param posZ The z position for rendering.
+ * @param partialTicks Partial ticks for smoother rendering.
+ * @param destroyStage The destroy stage of the block.
+ * @param alpha The alpha value for transparency.
+ */
@Override
- public void render(CustomTileEntity> tileEntity, double posX, double posY, double posZ, float partialTicks, int destroyStage, float alpha) {
+ public void render(T tileEntity, double posX, double posY, double posZ,
+ float partialTicks, int destroyStage, float alpha) {
GL11.glPushMatrix();
- this.bindTexture(textureResource);
+ bindTexture(textureResource);
+ setupRenderingTransformations(tileEntity, posX, posY, posZ);
+
+ // Call the positioning consumer to apply additional transformations if necessary
+ positioning.accept(tileEntity);
+
+ // Render the model
+ model.render(null, 0f, 0f, 0f, 0f, 0f, MODEL_RENDER_SCALE);
+
+ GL11.glPopMatrix();
+ }
- // GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ /**
+ * Sets up the rendering transformations based on tile entity's position and orientation.
+ *
+ * @param tileEntity The tile entity being rendered.
+ * @param posX The x position for rendering.
+ * @param posY The y position for rendering.
+ * @param posZ The z position for rendering.
+ */
+ private void setupRenderingTransformations(T tileEntity, double posX, double posY, double posZ) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- GL11.glTranslatef((float) posX, (float) posY + 1.0F, (float) posZ + 1.0F);
- GL11.glScalef(1.0F, -1.0F, -1.0F);
+ GL11.glTranslatef((float) posX, (float) posY + TRANSLATE_Y, (float) posZ + TRANSLATE_Y);
+ GL11.glScalef(SCALE_FACTOR, -SCALE_FACTOR, -SCALE_FACTOR);
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
- GL11.glRotatef(90f * tileEntity.getSide(), 0, 1f, 0);
- GL11.glRotatef(-90f, 0, 1f, 0);
- GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ // Rotate based on the side of the tile entity
+ GL11.glRotatef(ROTATION_ANGLE * tileEntity.getSide(), 0, 1f, 0);
+ GL11.glRotatef(-ROTATION_ANGLE, 0, 1f, 0);
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
GL11.glTranslatef(0F, -0.5F, 0F);
-
- //System.out.println("Rendering side " + ((CustomTileEntity>) tileEntity).getSide());
-// GL11.glRotatef(-90f * ((CustomTileEntity>) tileEntity).getSide(), 0, 1f, 0);
- positioning.accept(tileEntity);
- //GL11.glEnable(GL11.GL_CULL_FACE);
- model.render(null, 0f, 0f, 0f, 0f, 0f, 0.0625f);
-
- // GL11.glDisable(GL12.GL_RESCALE_NORMAL);
- GL11.glPopMatrix();
}
}
diff --git a/src/main/java/com/paneedah/weaponlib/tile/LootBoxTileEntity.java b/src/main/java/com/paneedah/weaponlib/tile/LootBoxTileEntity.java
index 82638b81e..df5414488 100644
--- a/src/main/java/com/paneedah/weaponlib/tile/LootBoxTileEntity.java
+++ b/src/main/java/com/paneedah/weaponlib/tile/LootBoxTileEntity.java
@@ -14,6 +14,8 @@
import java.util.Set;
+import static com.paneedah.mwc.ProjectConstants.LOGGER;
+
public class LootBoxTileEntity extends CustomTileEntity {
private static final String TAG_TIME = "T";
@@ -35,7 +37,7 @@ public void dropContents(World world, BlockPos pos, EntityPlayer player) {
lastEquipmentDispenseTimestamp = world.getWorldTime();
Equipment equipment = configuration.getEquipmentOptions().pick(EnumDifficulty.EASY);
if (equipment != null && equipment.item != null) {
- System.out.println("Dropping " + equipment.item.getTranslationKey());
+ LOGGER.info("Dropping " + equipment.item.getTranslationKey());
player.playSound(configuration.getDispenseSound(), 0.15f, 1);
ItemStack equipmentItemStack = ItemStack.EMPTY;
if (equipment.item instanceof Weapon) {
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicle.java b/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicle.java
index 0a8f5cb4a..7ad959295 100644
--- a/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicle.java
+++ b/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicle.java
@@ -2735,7 +2735,7 @@ public void handleGeneralSound() {
// PLAY SHIFTING SOUND
if (isInShift()) {
- PositionedSound ps = new PositionedSoundRecord(getConfiguration().getShiftSound(), SoundCategory.MASTER, 1.5f, 1.0f, (float) posX, (float) posY, (float) posZ);
+ PositionedSound ps = new PositionedSoundRecord(getConfiguration().getGearshiftSound(), SoundCategory.MASTER, 1.5f, 1.0f, (float) posX, (float) posY, (float) posZ);
MC.getSoundHandler().playSound(ps);
}
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicleConfiguration.java b/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicleConfiguration.java
index 4cfb51e7f..93706b627 100644
--- a/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicleConfiguration.java
+++ b/src/main/java/com/paneedah/weaponlib/vehicle/EntityVehicleConfiguration.java
@@ -5,6 +5,7 @@
import com.paneedah.weaponlib.ModContext;
import com.paneedah.weaponlib.vehicle.jimphysics.PhysicsConfiguration;
import com.paneedah.weaponlib.vehicle.jimphysics.Transmission;
+import lombok.Getter;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
@@ -24,18 +25,13 @@
public class EntityVehicleConfiguration implements EntityConfiguration {
+ @Getter
public static class Seat {
Vec3d seatPosition;
public Seat(Vec3d position) {
seatPosition = position;
}
-
- public Vec3d getSeatPosition() {
- return seatPosition;
- }
-
-
}
/*
@@ -389,14 +385,14 @@ public Builder customBlock(Object object) {
//public Transmission transmission;
- private SoundEvent enterSound;
- private SoundEvent exitSound;
- private SoundEvent idleSound;
- private SoundEvent runSound;
- private SoundEvent constantRevSound;
+ @Getter private SoundEvent enterSound;
+ @Getter private SoundEvent exitSound;
+ @Getter private SoundEvent idleSound;
+ @Getter private SoundEvent runSound;
+ @Getter private SoundEvent constantRevSound;
- private SoundEvent backfireSound;
- private SoundEvent gearshiftSound;
+ @Getter private SoundEvent backfireSound;
+ @Getter private SoundEvent gearshiftSound;
public boolean shiftRight;
@@ -417,7 +413,7 @@ public Builder customBlock(Object object) {
private final Builder builder;
- private PhysicsConfiguration physicsConfig;
+ @Getter private PhysicsConfiguration physicsConfig;
// private GearShiftPattern pattern;
@@ -427,10 +423,6 @@ public EntityVehicleConfiguration(Builder builder) {
this.builder = builder;
}
- public PhysicsConfiguration getPhysicsConfig() {
- return this.physicsConfig;
- }
-
/*
public GearShiftPattern getPattern() {
return this.pattern;
@@ -475,34 +467,6 @@ public Transmission getVehicleTransmission() {
return transmission;
}*/
- public SoundEvent getEnterSound() {
- return enterSound;
- }
-
- public SoundEvent getExitSound() {
- return exitSound;
- }
-
- public SoundEvent getIdleSound() {
- return idleSound;
- }
-
- public SoundEvent getRunSound() {
- return runSound;
- }
-
- public SoundEvent getConstantRev() {
- return constantRevSound;
- }
-
- public SoundEvent getBackfireSound() {
- return this.backfireSound;
- }
-
- public SoundEvent getShiftSound() {
- return this.gearshiftSound;
- }
-
/*
public Function getHandling() {
return builder.handling;
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/ICloneable.java b/src/main/java/com/paneedah/weaponlib/vehicle/ICloneable.java
deleted file mode 100644
index 5471ec2f3..000000000
--- a/src/main/java/com/paneedah/weaponlib/vehicle/ICloneable.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.paneedah.weaponlib.vehicle;
-
-public interface ICloneable {
-
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/forjosh.java b/src/main/java/com/paneedah/weaponlib/vehicle/forjosh.java
deleted file mode 100644
index 78cd8fdeb..000000000
--- a/src/main/java/com/paneedah/weaponlib/vehicle/forjosh.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.paneedah.weaponlib.vehicle;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fml.relauncher.ReflectionHelper;
-import net.minecraftforge.items.ItemStackHandler;
-
-import java.lang.reflect.Method;
-
-public class forjosh {
-
- public static ItemStackHandler getVMWSlots(EntityPlayer player) {
- Method m = null;
- try {
- m = ReflectionHelper.findMethod(Class.forName("com.paneedah.mwc.capabilities.EquipmentCapability"), "getInventory", null, EntityLivingBase.class);
- } catch (Exception e) {
- return null;
- }
- Object inventory = null;
- try {
- inventory = m.invoke(null, player);
- } catch (Exception e) {
- return null;
- }
- ItemStack[] backpack = null;
- if (inventory != null) {
- try {
- backpack = (ItemStack[]) ReflectionHelper.findField(Class.forName("com.paneedah.mwc.equipment.inventory.EquipmentInventory"), "inventory").get(inventory);
- } catch (Exception e) {
- return null;
- }
- }
- ItemStackHandler handler = new ItemStackHandler(2);
- handler.setStackInSlot(0, backpack[0]);
- handler.setStackInSlot(1, backpack[1]);
- return handler;
- }
-
- public static byte[] getBytes(ItemStackHandler handler) {
- ItemStack one = handler.getStackInSlot(0);
- ItemStack two = handler.getStackInSlot(1);
-
- NBTTagCompound comp = new NBTTagCompound();
- comp.setTag("firstItem", one.getTagCompound());
- comp.setTag("secondItem", two.getTagCompound());
-
- return comp.toString().getBytes();
- }
-
-
-}
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/jimphysics/Transmission.java b/src/main/java/com/paneedah/weaponlib/vehicle/jimphysics/Transmission.java
index d61415126..c1a967acf 100644
--- a/src/main/java/com/paneedah/weaponlib/vehicle/jimphysics/Transmission.java
+++ b/src/main/java/com/paneedah/weaponlib/vehicle/jimphysics/Transmission.java
@@ -27,8 +27,8 @@ public class Transmission {
public int upshiftRPM = 0;
public int downshiftRPM = 0;
- public int eUShift = 0;
- public int eDShift = 0;
+ public int eUShift = 2500;
+ public int eDShift = 1200;
/**
* Transmission Alterable Settings
diff --git a/src/main/java/com/paneedah/weaponlib/vehicle/network/VehiclePhysSerializer.java b/src/main/java/com/paneedah/weaponlib/vehicle/network/VehiclePhysSerializer.java
index 8813c49ee..ad0fc083b 100644
--- a/src/main/java/com/paneedah/weaponlib/vehicle/network/VehiclePhysSerializer.java
+++ b/src/main/java/com/paneedah/weaponlib/vehicle/network/VehiclePhysSerializer.java
@@ -2,6 +2,7 @@
import com.paneedah.weaponlib.vehicle.jimphysics.solver.VehiclePhysicsSolver;
import io.redstudioragnarok.redcore.vectors.Vector3D;
+import lombok.Setter;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializer;
@@ -10,7 +11,7 @@
import java.io.IOException;
public class VehiclePhysSerializer {
- public VehiclePhysicsSolver solver;
+ @Setter public VehiclePhysicsSolver solver;
public double synthAccelFor;
public double synthAccelSide;
@@ -23,10 +24,6 @@ public VehiclePhysSerializer(VehiclePhysicsSolver solver) {
this.solver = solver;
}
- public void setSolver(VehiclePhysicsSolver solver) {
- this.solver = solver;
- }
-
public void setData(double synthAccelFor, double synthAccelSide, Vec3d velocity) {
this.synthAccelFor = synthAccelFor;
this.synthAccelSide = synthAccelSide;
diff --git a/src/main/resources/assets/mwc/textures/models/holographic.png b/src/main/resources/assets/mwc/textures/models/holographic.png
index 04675cd25..9d574b24e 100644
Binary files a/src/main/resources/assets/mwc/textures/models/holographic.png and b/src/main/resources/assets/mwc/textures/models/holographic.png differ
diff --git a/src/main/resources/assets/mwc/textures/models/holographic2.png b/src/main/resources/assets/mwc/textures/models/holographic2.png
index c95aa0d9a..780faae86 100644
Binary files a/src/main/resources/assets/mwc/textures/models/holographic2.png and b/src/main/resources/assets/mwc/textures/models/holographic2.png differ