Archived
Initial decompiled source import
This commit is contained in:
commit
7cef5fd70e
54 files changed
+60560
No files matched your search
@@ -0,0 +1,4 @@
|
||||
build/
|
||||
run/
|
||||
|
||||
.gradle/
|
||||
@@ -0,0 +1 @@
|
||||
_client-1.7.10-real/mods/【拔刀剑】技能SlashBlade-ZxSa-r6vB -OfficialEdition-.jar
|
||||
@@ -0,0 +1,11 @@
|
||||
# SlashBlade-ZxSa
|
||||
|
||||
Reconstructed source repository for the Minecraft 1.7.10 SlashBlade addon `flammpfeil.slashblade.zxsa`.
|
||||
|
||||
Original jar is preserved under `original/`. Sources were decompiled with CFR 0.152 and adjusted only as needed for compilation.
|
||||
|
||||
Build:
|
||||
|
||||
```powershell
|
||||
./gradlew clean build
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhconvention'
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compileOnlyApi('mods.flammpfeil.slashblade:SlashBlade:mc1.7.10-r87')
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
gtnh.settings.blowdryerTag = 0.2.0
|
||||
|
||||
modName = SlashBlade-ZxSa
|
||||
modId = flammpfeil.slashblade.zxsa
|
||||
modGroup = Zxsa.mods.zxsa
|
||||
modVersion = 1.0.0
|
||||
gtnh.modules.gitVersion = false
|
||||
useModGroupForPublishing = false
|
||||
autoUpdateBuildScript = false
|
||||
|
||||
minecraftVersion = 1.7.10
|
||||
forgeVersion = 10.13.4.1614
|
||||
channel = stable
|
||||
mappingsVersion = 12
|
||||
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
enableModernJavaSyntax = false
|
||||
enableGenericInjection = false
|
||||
|
||||
usesMixins = false
|
||||
usesShadowedDependencies = false
|
||||
includeWellKnownRepositories = true
|
||||
disableSpotless = true
|
||||
disableCheckstyle = true
|
||||
|
||||
org.gradle.jvmargs = -Xmx2G
|
||||
org.gradle.parallel = true
|
||||
org.gradle.configuration-cache = false
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+7
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,248 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 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.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# 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/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+90
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name "GTNH Maven"
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
mavenContent {
|
||||
includeGroup("com.gtnewhorizons")
|
||||
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.49'
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.SidedProxy
|
||||
*/
|
||||
package Zxsa.mods.zxsa;
|
||||
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
|
||||
public class InitProxy {
|
||||
@SidedProxy(clientSide="Zxsa.mods.zxsa.InitProxyClient", serverSide="Zxsa.mods.zxsa.InitProxy")
|
||||
public static InitProxy proxy;
|
||||
|
||||
public void initializeItemRenderer() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.client.registry.RenderingRegistry
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
*/
|
||||
package Zxsa.mods.zxsa;
|
||||
|
||||
import Zxsa.mods.zxsa.InitProxy;
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx_Zx;
|
||||
import Zxsa.mods.zxsa.entity.EntityHuDie;
|
||||
import Zxsa.mods.zxsa.entity.EntitySlashDimensionEx;
|
||||
import Zxsa.mods.zxsa.entity.EntitySword;
|
||||
import Zxsa.mods.zxsa.entity.EntityTanMU;
|
||||
import Zxsa.mods.zxsa.render.RenderDriveEx;
|
||||
import Zxsa.mods.zxsa.render.RenderDriveEx_Zx;
|
||||
import Zxsa.mods.zxsa.render.RenderHuDie;
|
||||
import Zxsa.mods.zxsa.render.RenderSlashDimensionEx;
|
||||
import Zxsa.mods.zxsa.render.RenderSword;
|
||||
import Zxsa.mods.zxsa.render.RenderTanMU;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
|
||||
public class InitProxyClient
|
||||
extends InitProxy {
|
||||
@Override
|
||||
public void initializeItemRenderer() {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDriveEx.class, (Render)new RenderDriveEx());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityAquaEdge.class, (Render)new RenderDriveEx());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDriveEx_Zx.class, (Render)new RenderDriveEx_Zx());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySlashDimensionEx.class, (Render)new RenderSlashDimensionEx());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySword.class, (Render)new RenderSword());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTanMU.class, (Render)new RenderTanMU());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityHuDie.class, (Render)new RenderHuDie());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.Mod
|
||||
* cpw.mods.fml.common.Mod$EventHandler
|
||||
* cpw.mods.fml.common.event.FMLPostInitializationEvent
|
||||
* cpw.mods.fml.common.event.FMLPreInitializationEvent
|
||||
* cpw.mods.fml.common.eventhandler.SubscribeEvent
|
||||
* cpw.mods.fml.common.registry.EntityRegistry
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.SlashBlade
|
||||
* mods.flammpfeil.slashblade.named.event.LoadEvent$InitEvent
|
||||
* net.minecraftforge.common.MinecraftForge
|
||||
*/
|
||||
package Zxsa.mods.zxsa;
|
||||
|
||||
import Zxsa.mods.zxsa.InitProxy;
|
||||
import Zxsa.mods.zxsa.ability.EnderTeleportCanceller;
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx_Zx;
|
||||
import Zxsa.mods.zxsa.entity.EntityHuDie;
|
||||
import Zxsa.mods.zxsa.entity.EntityNoFireLightningBoltEx;
|
||||
import Zxsa.mods.zxsa.entity.EntitySlashDimensionEx;
|
||||
import Zxsa.mods.zxsa.entity.EntitySword;
|
||||
import Zxsa.mods.zxsa.entity.EntityTanMU;
|
||||
import Zxsa.mods.zxsa.specialattack.Not10_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not11_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not12_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not1_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not2_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not3_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not4_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not5_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not6_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not7_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not8_SA;
|
||||
import Zxsa.mods.zxsa.specialattack.Not9_SA;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.SlashBlade;
|
||||
import mods.flammpfeil.slashblade.named.event.LoadEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@Mod(name="ZxSa", modid="flammpfeil.slashblade.zxsa", version="mc1.7.10-r5", dependencies="required-after:flammpfeil.slashblade")
|
||||
public class ZxSa {
|
||||
public static final String modname = "ZxSa";
|
||||
public static final String modid = "flammpfeil.slashblade.zxsa";
|
||||
public static final String version = "mc1.7.10-r5";
|
||||
public static EnderTeleportCanceller enderTeleportCanceller;
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent evt) {
|
||||
SlashBlade.InitEventBus.register(this);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
EntityRegistry.registerModEntity(EntityDriveEx.class, (String)"EntityDriveExK2", (int)4, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntityAquaEdge.class, (String)"EntityAquaEdge2", (int)5, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntityDriveEx_Zx.class, (String)"EntityDriveExZx2", (int)6, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntitySlashDimensionEx.class, (String)"EntitySlashDimensionEx2", (int)7, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntitySword.class, (String)"EntitySword", (int)8, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntityNoFireLightningBoltEx.class, (String)"NoFireLigntningBoltEx2", (int)9, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntityTanMU.class, (String)"EntityTanMU", (int)10, this, (int)250, (int)1, (boolean)true);
|
||||
EntityRegistry.registerModEntity(EntityHuDie.class, (String)"EntityHuDie", (int)11, this, (int)250, (int)1, (boolean)true);
|
||||
InitProxy.proxy.initializeItemRenderer();
|
||||
enderTeleportCanceller = new EnderTeleportCanceller();
|
||||
MinecraftForge.EVENT_BUS.register(enderTeleportCanceller);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void init(LoadEvent.InitEvent event) {
|
||||
ItemSlashBlade.specialAttacks.put(10001, new Not1_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10002, new Not2_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10003, new Not3_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10004, new Not4_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10005, new Not5_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10006, new Not6_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10008, new Not8_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10007, new Not7_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10009, new Not9_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10010, new Not10_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10011, new Not11_SA());
|
||||
ItemSlashBlade.specialAttacks.put(10012, new Not12_SA());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.eventhandler.SubscribeEvent
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.monster.EntityEnderman
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraftforge.event.entity.living.EnderTeleportEvent
|
||||
*/
|
||||
package Zxsa.mods.zxsa.ability;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
||||
|
||||
public class EnderTeleportCanceller {
|
||||
public static final String CancelingTimesStr = "SB.zxsa.WarpCancel";
|
||||
|
||||
public static void setTeleportCancel(Entity target, int ticks) {
|
||||
if (!(target instanceof EntityEnderman)) {
|
||||
return;
|
||||
}
|
||||
target.getEntityData().setLong(CancelingTimesStr, target.worldObj.getTotalWorldTime() + (long)ticks);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void EnderTeleportEventHandler(EnderTeleportEvent event) {
|
||||
EntityLivingBase target = event.entityLiving;
|
||||
if (target == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound tag = target.getEntityData();
|
||||
if (tag == null) {
|
||||
return;
|
||||
}
|
||||
if (!tag.hasKey(CancelingTimesStr)) {
|
||||
return;
|
||||
}
|
||||
long timeout = tag.getLong(CancelingTimesStr);
|
||||
long now = target.worldObj.getTotalWorldTime();
|
||||
if (timeout == 0L) {
|
||||
return;
|
||||
}
|
||||
if (now < timeout && timeout - now < 12000L) {
|
||||
event.setCanceled(true);
|
||||
} else {
|
||||
tag.removeTag(CancelingTimesStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.relauncher.ReflectionHelper
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.monster.EntityEnderman
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import Zxsa.mods.zxsa.ability.EnderTeleportCanceller;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityAquaEdge
|
||||
extends EntityDriveEx {
|
||||
public EntityAquaEdge(World par1World) {
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityAquaEdge(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit, float roll) {
|
||||
super(par1World, entityLiving, AttackLevel, multiHit, roll);
|
||||
this.setRoll(roll);
|
||||
}
|
||||
|
||||
public EntityAquaEdge(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
super(par1World, entityLiving, AttackLevel, multiHit);
|
||||
}
|
||||
|
||||
public EntityAquaEdge(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
super(par1World, entityLiving, AttackLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact(Entity curEntity, float damage) {
|
||||
EnderTeleportCanceller.setTeleportCancel(curEntity, 100);
|
||||
this.spawnParticle(curEntity);
|
||||
if (!curEntity.worldObj.isRemote) {
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("drown", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
curEntity.attackEntityFrom(ds, damage);
|
||||
}
|
||||
if (curEntity.isBurning()) {
|
||||
curEntity.playSound("random.fizz", 0.7f, 1.6f + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4f);
|
||||
byte data = curEntity.getDataWatcher().getWatchableObjectByte(0);
|
||||
boolean flag = false;
|
||||
int offset = 0;
|
||||
if (flag) {
|
||||
curEntity.getDataWatcher().updateObject(0, ((byte)(data | 1 << offset)));
|
||||
} else {
|
||||
curEntity.getDataWatcher().updateObject(0, ((byte)(data & ~(1 << offset))));
|
||||
}
|
||||
}
|
||||
if (!curEntity.worldObj.isRemote && this.blade != null && curEntity instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
if (curEntity instanceof EntityEnderman) {
|
||||
((EntityEnderman)curEntity).setTarget(null);
|
||||
((EntityEnderman)curEntity).setScreaming(false);
|
||||
ReflectionHelper.setPrivateValue(EntityEnderman.class, ((EntityEnderman)curEntity), false, "isAggressive", "isAggressive");
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnParticle(Entity target) {
|
||||
target.worldObj.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height, target.posZ, 3.0, 3.0, 3.0);
|
||||
target.worldObj.spawnParticle("largeexplode", target.posX + 1.0, target.posY + (double)target.height + 1.0, target.posZ, 3.0, 3.0, 3.0);
|
||||
target.worldObj.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height + 0.5, target.posZ + 1.0, 3.0, 3.0, 3.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,446 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.world.IBlockAccess
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityDriveEx
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
|
||||
public EntityDriveEx(World par1World) {
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityDriveEx(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit, float roll) {
|
||||
this(par1World, entityLiving, AttackLevel, multiHit);
|
||||
this.setRoll(roll);
|
||||
}
|
||||
|
||||
public EntityDriveEx(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsMultiHit(multiHit);
|
||||
}
|
||||
|
||||
public EntityDriveEx(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(2.0f, 1.0f);
|
||||
this.setLocationAndAngles(this.thrower.posX, this.thrower.posY + (double)this.thrower.getEyeHeight() / 2.0, this.thrower.posZ, this.thrower.rotationYaw, this.thrower.rotationPitch);
|
||||
this.setDriveVector(0.75f);
|
||||
this.setPosition(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, Float.valueOf(0.0f));
|
||||
this.getDataWatcher().addObject(6, 20);
|
||||
this.getDataWatcher().addObject(10, 0x3333FF);
|
||||
this.getDataWatcher().addObject(21, Float.valueOf(1.05f));
|
||||
this.getDataWatcher().addObject(22, Float.valueOf(0.0f));
|
||||
this.getDataWatcher().addObject(23, 0);
|
||||
this.getDataWatcher().addObject(24, String.valueOf(""));
|
||||
this.getDataWatcher().addObject(25, String.valueOf(""));
|
||||
this.getDataWatcher().addObject(26, 1);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(10);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(10, value);
|
||||
}
|
||||
|
||||
public boolean getIsMultiHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) == 0;
|
||||
}
|
||||
|
||||
public void setIsMultiHit(boolean isMultiHit) {
|
||||
this.getDataWatcher().updateObject(4, ((byte)(isMultiHit ? 1 : 0)));
|
||||
}
|
||||
|
||||
public float getRoll() {
|
||||
return this.getDataWatcher().getWatchableObjectFloat(5);
|
||||
}
|
||||
|
||||
public void setRoll(float roll) {
|
||||
this.getDataWatcher().updateObject(5, Float.valueOf(roll));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(6, lifetime);
|
||||
}
|
||||
|
||||
public float getInitSpeed() {
|
||||
return this.getDataWatcher().getWatchableObjectFloat(21);
|
||||
}
|
||||
|
||||
public void setInitSpeed(float value) {
|
||||
this.getDataWatcher().updateObject(21, Float.valueOf(value));
|
||||
}
|
||||
|
||||
public float getNextSpeed() {
|
||||
return this.getDataWatcher().getWatchableObjectFloat(22);
|
||||
}
|
||||
|
||||
public void setNextSpeed(float value) {
|
||||
this.getDataWatcher().updateObject(22, Float.valueOf(value));
|
||||
}
|
||||
|
||||
public int getChangeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(23);
|
||||
}
|
||||
|
||||
public void setChangeTime(int value) {
|
||||
this.getDataWatcher().updateObject(23, value);
|
||||
}
|
||||
|
||||
public String getSound() {
|
||||
return this.getDataWatcher().getWatchableObjectString(24);
|
||||
}
|
||||
|
||||
public void setSound(String value) {
|
||||
this.getDataWatcher().updateObject(24, String.valueOf(value));
|
||||
}
|
||||
|
||||
public String getParticle() {
|
||||
return this.getDataWatcher().getWatchableObjectString(25);
|
||||
}
|
||||
|
||||
public void setParticle(String value) {
|
||||
this.getDataWatcher().updateObject(25, String.valueOf(value));
|
||||
}
|
||||
|
||||
public boolean getIsPlayerSound() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(26) == 0;
|
||||
}
|
||||
|
||||
public void setIsPlayerSound(boolean isPlaySound) {
|
||||
this.getDataWatcher().updateObject(26, ((byte)(!isPlaySound ? 1 : 0)));
|
||||
}
|
||||
|
||||
public void setSpeedByTimeEvent(float initSpeed, float nextSpeed, int changeTime) {
|
||||
this.setInitSpeed(initSpeed);
|
||||
this.setNextSpeed(nextSpeed);
|
||||
this.setChangeTime(changeTime);
|
||||
}
|
||||
|
||||
public void setInitialSpeed(float f) {
|
||||
this.setLocationAndAngles(this.thrower.posX, this.thrower.posY + (double)this.thrower.getEyeHeight() / 2.0, this.thrower.posZ, this.thrower.rotationYaw, this.thrower.rotationPitch);
|
||||
this.setDriveVector(f);
|
||||
}
|
||||
|
||||
public void setDriveVector(float fYVecOfst) {
|
||||
float fYawDtoR = this.rotationYaw / 180.0f * 3.141593f;
|
||||
float fPitDtoR = this.rotationPitch / 180.0f * 3.141593f;
|
||||
this.motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
float f3 = MathHelper.sqrt_double((double)(this.motionX * this.motionX + this.motionZ * this.motionZ));
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0 / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, f3) * 180.0 / Math.PI);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
int nPosZ;
|
||||
int nPosY;
|
||||
int nPosX;
|
||||
Block nBlock;
|
||||
if (this.thrower == null) {
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
double dAmbit = 1.5;
|
||||
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox((double)(this.posX - dAmbit), (double)(this.posY - dAmbit), (double)(this.posZ - dAmbit), (double)(this.posX + dAmbit), (double)(this.posY + dAmbit), (double)(this.posZ + dAmbit));
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (!this.getIsMultiHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (!this.getIsMultiHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
if (this.getIsMultiHit()) {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.QuickDrive);
|
||||
} else {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.Drive);
|
||||
}
|
||||
for (Entity curEntity : list) {
|
||||
this.onImpact(curEntity, magicDamage);
|
||||
}
|
||||
}
|
||||
if (!(nBlock = this.worldObj.getBlock(nPosX = MathHelper.floor_double((double)this.posX), nPosY = MathHelper.floor_double((double)this.posY), nPosZ = MathHelper.floor_double((double)this.posZ))).isAir((IBlockAccess)this.worldObj, nPosX, nPosY, nPosZ) && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
|
||||
this.setDead();
|
||||
}
|
||||
double m_x = this.motionX;
|
||||
double m_y = this.motionY;
|
||||
double m_z = this.motionZ;
|
||||
int changeTime = this.getChangeTime();
|
||||
if (changeTime != 0 && this.ticksExisted >= changeTime) {
|
||||
float nextSpeed = this.getNextSpeed();
|
||||
this.playSound();
|
||||
this.motionX = m_x *= (double)nextSpeed;
|
||||
this.motionY = m_y *= (double)nextSpeed;
|
||||
this.motionZ = m_z *= (double)nextSpeed;
|
||||
this.posX += m_x;
|
||||
this.posY += m_y;
|
||||
this.posZ += m_z;
|
||||
} else {
|
||||
float initSpeed = this.getInitSpeed();
|
||||
if (initSpeed >= 1.05f) {
|
||||
this.motionX = m_x *= (double)initSpeed;
|
||||
this.motionY = m_y *= (double)initSpeed;
|
||||
this.motionZ = m_z *= (double)initSpeed;
|
||||
this.posX += m_x;
|
||||
this.posY += m_y;
|
||||
this.posZ += m_z;
|
||||
} else {
|
||||
this.posX += this.motionX * 0.1;
|
||||
this.posY += this.motionY * 0.1;
|
||||
this.posZ += this.motionZ * 0.1;
|
||||
}
|
||||
}
|
||||
this.playParticle();
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean handleLavaMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public float getShadowSize() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public void mountEntity(Entity par1Entity) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
this.thrower = entity;
|
||||
}
|
||||
|
||||
public void onImpact(Entity target, float damage) {
|
||||
if (target != null) {
|
||||
if (target.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
target.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
target.attackEntityFrom(ds, damage);
|
||||
if (this.blade != null && target instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)target, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void playParticle() {
|
||||
String particle = this.getParticle();
|
||||
if (particle != null && !particle.equals("")) {
|
||||
Random rand = new Random();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle(particle, this.posX + (double)(rand.nextFloat() * this.width * 2.0f) - (double)this.width - var2 * var8, this.posY + (double)(rand.nextFloat() * this.height) - var4 * var8, this.posZ + (double)(rand.nextFloat() * this.width * 2.0f) - (double)this.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
}
|
||||
|
||||
public void playSound() {
|
||||
if (!this.getIsPlayerSound()) {
|
||||
String sound = this.getSound();
|
||||
if (sound != null && !sound.equals("") && this.thrower instanceof EntityPlayer) {
|
||||
this.thrower.playSound(sound, 1.0f, 1.5f);
|
||||
}
|
||||
this.setIsPlayerSound(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.world.IBlockAccess
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityDriveEx_Zx
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
|
||||
public EntityDriveEx_Zx(World par1World) {
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityDriveEx_Zx(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit, float roll) {
|
||||
this(par1World, entityLiving, AttackLevel, multiHit);
|
||||
this.setRoll(roll);
|
||||
}
|
||||
|
||||
public EntityDriveEx_Zx(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsMultiHit(multiHit);
|
||||
}
|
||||
|
||||
public EntityDriveEx_Zx(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(1.0f, 2.0f);
|
||||
this.setLocationAndAngles(this.thrower.posX, this.thrower.posY + (double)this.thrower.getEyeHeight() / 2.0, this.thrower.posZ, this.thrower.rotationYaw, this.thrower.rotationPitch);
|
||||
this.setDriveVector(0.75f);
|
||||
this.setPosition(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, Float.valueOf(0.0f));
|
||||
this.getDataWatcher().addObject(6, 20);
|
||||
this.getDataWatcher().addObject(7, 0);
|
||||
this.getDataWatcher().addObject(10, 0x3333FF);
|
||||
}
|
||||
|
||||
public boolean getIsMultiHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) == 0;
|
||||
}
|
||||
|
||||
public void setIsMultiHit(boolean isMultiHit) {
|
||||
this.getDataWatcher().updateObject(4, ((byte)(isMultiHit ? 1 : 0)));
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(10);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(10, value);
|
||||
}
|
||||
|
||||
public float getRoll() {
|
||||
return this.getDataWatcher().getWatchableObjectFloat(5);
|
||||
}
|
||||
|
||||
public void setRoll(float roll) {
|
||||
this.getDataWatcher().updateObject(5, Float.valueOf(roll));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(6, lifetime);
|
||||
}
|
||||
|
||||
public boolean getIsSlashDimension() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(7) == 1;
|
||||
}
|
||||
|
||||
public void setIsSlashDimension(boolean isSlashDimension) {
|
||||
this.getDataWatcher().updateObject(7, ((byte)(isSlashDimension ? 1 : 0)));
|
||||
}
|
||||
|
||||
public void setInitialSpeed(float f) {
|
||||
this.setLocationAndAngles(this.thrower.posX, this.thrower.posY + (double)this.thrower.getEyeHeight() / 2.0, this.thrower.posZ, this.thrower.rotationYaw, this.thrower.rotationPitch);
|
||||
this.setDriveVector(f);
|
||||
}
|
||||
|
||||
public void setDriveVector(float fYVecOfst) {
|
||||
float fYawDtoR = this.rotationYaw / 180.0f * 3.141593f;
|
||||
float fPitDtoR = this.rotationPitch / 180.0f * 3.141593f;
|
||||
this.motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
float f3 = MathHelper.sqrt_double((double)(this.motionX * this.motionX + this.motionZ * this.motionZ));
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0 / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, f3) * 180.0 / Math.PI);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if (!this.worldObj.isRemote) {
|
||||
int nPosZ;
|
||||
int nPosY;
|
||||
int nPosX;
|
||||
Block nBlock;
|
||||
double dAmbit = 1.5;
|
||||
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox((double)(this.posX - dAmbit), (double)(this.posY - dAmbit), (double)(this.posZ - dAmbit), (double)(this.posX + dAmbit), (double)(this.posY + dAmbit), (double)(this.posZ + dAmbit));
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (!this.getIsMultiHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (!this.getIsMultiHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
if (this.getIsMultiHit()) {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.QuickDrive);
|
||||
} else {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.Drive);
|
||||
}
|
||||
for (Entity curEntity : list) {
|
||||
float health;
|
||||
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
|
||||
health = Math.max(1.0f, health - magicDamage);
|
||||
((EntityLivingBase)curEntity).setHealth(health);
|
||||
}
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
curEntity.attackEntityFrom(ds, magicDamage);
|
||||
if (this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
}
|
||||
if (!(nBlock = this.worldObj.getBlock(nPosX = MathHelper.floor_double((double)this.posX), nPosY = MathHelper.floor_double((double)this.posY), nPosZ = MathHelper.floor_double((double)this.posZ))).isAir((IBlockAccess)this.worldObj, nPosX, nPosY, nPosZ) && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
this.motionX *= 1.049999952316284;
|
||||
this.motionY *= 1.049999952316284;
|
||||
this.motionZ *= 1.049999952316284;
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean handleLavaMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public float getShadowSize() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public void mountEntity(Entity par1Entity) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
this.thrower = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.TeleportCanceller
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.TeleportCanceller;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityHuDie
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
private static final int LIFETIME = 3;
|
||||
private static final int SINGLE_HIT = 4;
|
||||
private static final int IS_SLASH_DIMENSION = 5;
|
||||
private static final int THROWER_ENTITY_ID = 6;
|
||||
private static final int INTERVAL = 7;
|
||||
private static final int COLOR = 8;
|
||||
|
||||
public EntityHuDie(World par1World) {
|
||||
super(par1World);
|
||||
this.ticksExisted = 0;
|
||||
this.getEntityData().setInteger("seed", this.rand.nextInt(50));
|
||||
}
|
||||
|
||||
public EntityHuDie(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsSingleHit(multiHit);
|
||||
}
|
||||
|
||||
public EntityHuDie(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(4.0f, 4.0f);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(3, 20);
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, 0);
|
||||
this.getDataWatcher().addObject(6, 0);
|
||||
this.getDataWatcher().addObject(7, 7);
|
||||
this.getDataWatcher().addObject(8, 0x3333FF);
|
||||
}
|
||||
|
||||
public boolean getIsSingleHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) != 0;
|
||||
}
|
||||
|
||||
public void setIsSingleHit(boolean isSingleHit) {
|
||||
this.getDataWatcher().updateObject(4, (isSingleHit ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(3);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(3, lifetime);
|
||||
}
|
||||
|
||||
public boolean getIsSlashDimension() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(5) != 0;
|
||||
}
|
||||
|
||||
public void setIsSlashDimension(boolean isSlashDimension) {
|
||||
this.getDataWatcher().updateObject(5, (isSlashDimension ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getInterval() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(7);
|
||||
}
|
||||
|
||||
public void setInterval(int value) {
|
||||
this.getDataWatcher().updateObject(7, value);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(8);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(8, value);
|
||||
}
|
||||
|
||||
public int getThrowerEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setThrowerEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(6, entityid);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (this.ticksExisted < 8 && this.ticksExisted % 2 == 0) {
|
||||
this.playSound("mob.wither.hurt", 0.2f, 0.5f + 0.25f * this.rand.nextFloat());
|
||||
}
|
||||
AxisAlignedBB bb = this.boundingBox;
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (this.getIsSingleHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (this.getIsSingleHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.SlashDimMagic);
|
||||
for (Entity curEntity : list) {
|
||||
float health;
|
||||
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
|
||||
health = Math.max(1.0f, health - magicDamage);
|
||||
((EntityLivingBase)curEntity).setHealth(health);
|
||||
}
|
||||
Vec3 pos = Vec3.createVectorHelper((double)curEntity.posX, (double)curEntity.posY, (double)curEntity.posZ);
|
||||
TeleportCanceller.setCancel((Entity)curEntity);
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage().setProjectile();
|
||||
if (this.blade != null && curEntity instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
if (3 >= this.ticksExisted || this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
|
||||
if (this.getIsSlashDimension()) {
|
||||
curEntity.addVelocity(0.0, 0.5, 0.0);
|
||||
continue;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.punch.effectId, (ItemStack)this.blade);
|
||||
if (0 < level) {
|
||||
curEntity.addVelocity(Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5, 0.2, -Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5);
|
||||
continue;
|
||||
}
|
||||
curEntity.addVelocity(-Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5, 0.2, Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
int id;
|
||||
if (this.thrower == null && (id = this.getThrowerEntityId()) != 0) {
|
||||
this.thrower = this.worldObj.getEntityByID(id);
|
||||
}
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
if (entity != null) {
|
||||
this.setThrowerEntityId(entity.getEntityId());
|
||||
}
|
||||
this.thrower = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* net.minecraft.command.IEntitySelector
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.effect.EntityLightningBolt
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.world.World
|
||||
* net.minecraftforge.event.ForgeEventFactory
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import Zxsa.mods.zxsa.ability.EnderTeleportCanceller;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
public class EntityNoFireLightningBoltEx
|
||||
extends EntityLightningBolt {
|
||||
private int lightningState;
|
||||
private int boltLivingTime;
|
||||
private Entity target;
|
||||
private IEntitySelector selector;
|
||||
private static String doFireTickTmp = "true";
|
||||
protected float AttackLevel = 0.0f;
|
||||
protected Entity thrower;
|
||||
private float magicDamage = 0.0f;
|
||||
|
||||
public static World StoreDoFireTick(World world) {
|
||||
doFireTickTmp = world.getGameRules().getGameRuleStringValue("doFireTick");
|
||||
world.getGameRules().setOrCreateGameRule("doFireTick", "false");
|
||||
return world;
|
||||
}
|
||||
|
||||
public static World RestoreDoFireTick(World world) {
|
||||
world.getGameRules().setOrCreateGameRule("doFireTick", doFireTickTmp);
|
||||
return world;
|
||||
}
|
||||
|
||||
public EntityNoFireLightningBoltEx(World p_i1703_1_, double p_i1703_2_, double p_i1703_4_, double p_i1703_6_, Entity target, IEntitySelector selector, Entity thrower) {
|
||||
this(p_i1703_1_, p_i1703_2_, p_i1703_4_, p_i1703_6_, target, selector, thrower, 0.0f);
|
||||
}
|
||||
|
||||
public EntityNoFireLightningBoltEx(World p_i1703_1_, double p_i1703_2_, double p_i1703_4_, double p_i1703_6_, Entity target, IEntitySelector selector, Entity thrower, float magicDamage) {
|
||||
super(EntityNoFireLightningBoltEx.StoreDoFireTick(p_i1703_1_), p_i1703_2_, p_i1703_4_, p_i1703_6_);
|
||||
EntityNoFireLightningBoltEx.RestoreDoFireTick(p_i1703_1_);
|
||||
this.lightningState = 2;
|
||||
this.boltLivingTime = this.rand.nextInt(3) + 1;
|
||||
this.target = target;
|
||||
this.selector = selector;
|
||||
this.thrower = thrower;
|
||||
this.magicDamage = magicDamage;
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
if (this.thrower == null) {
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
this.onEntityUpdate();
|
||||
if (this.lightningState == 2) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0f, 0.8f + this.rand.nextFloat() * 0.2f);
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 2.0f, 0.5f + this.rand.nextFloat() * 0.2f);
|
||||
}
|
||||
--this.lightningState;
|
||||
if (this.lightningState < 0) {
|
||||
if (this.boltLivingTime <= 0) {
|
||||
this.setDead();
|
||||
} else if (this.lightningState < -this.rand.nextInt(10)) {
|
||||
--this.boltLivingTime;
|
||||
this.lightningState = 1;
|
||||
this.boltVertex = this.rand.nextLong();
|
||||
}
|
||||
}
|
||||
if (this.lightningState >= 0) {
|
||||
ItemStack stack;
|
||||
double d0 = 3.0;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)this, AxisAlignedBB.getBoundingBox((double)(this.posX - d0), (double)(this.posY - d0), (double)(this.posZ - d0), (double)(this.posX + d0), (double)(this.posY + 6.0 + d0), (double)(this.posZ + d0)), this.selector);
|
||||
if (this.target.isEntityAlive()) {
|
||||
list.add(this.target);
|
||||
}
|
||||
if ((stack = ((EntityPlayer)this.thrower).getHeldItem()) != null && stack.getItem() instanceof ItemSlashBlade) {
|
||||
int spLightLevel;
|
||||
NBTTagCompound nbt;
|
||||
if (this.magicDamage == 0.0f) {
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)this.thrower);
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
this.magicDamage = 1.0f + (ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * -0.2f + (float)level / 20.0f + 0.04f * (float)rank);
|
||||
}
|
||||
if ((nbt = ItemSlashBlade.getSpecialEffect((ItemStack)stack)) != null && (spLightLevel = nbt.getInteger("SPLighting")) > 1) {
|
||||
this.magicDamage = (float)((double)this.magicDamage * ((double)spLightLevel * 0.5));
|
||||
}
|
||||
if (this.magicDamage < 1.0f) {
|
||||
this.magicDamage = 1.0f;
|
||||
}
|
||||
for (int l = 0; l < list.size(); ++l) {
|
||||
Entity entity;
|
||||
if (this.worldObj.isRemote || (entity = (Entity)list.get(l)) == null || entity.isDead) continue;
|
||||
if (entity.hurtResistantTime != 5) {
|
||||
entity.hurtResistantTime = 5;
|
||||
}
|
||||
EnderTeleportCanceller.setTeleportCancel(entity, 600);
|
||||
if (ForgeEventFactory.onEntityStruckByLightning((Entity)entity, (EntityLightningBolt)this)) continue;
|
||||
entity.attackEntityFrom(DamageSource.onFire, this.magicDamage);
|
||||
entity.setFire(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,770 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.entity.EntityPhantomSwordBase
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.command.IEntitySelector
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.IProjectile
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.util.MovingObjectPosition
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.entity.EntityPhantomSwordBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityPhantomSwordBaseEx
|
||||
extends Entity
|
||||
implements IProjectile,
|
||||
IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
static final int THROWER_ENTITY_ID = 11;
|
||||
float speed = 0.0f;
|
||||
float iniYaw = Float.NaN;
|
||||
float iniPitch = Float.NaN;
|
||||
double hitX;
|
||||
double hitY;
|
||||
double hitZ;
|
||||
float hitYaw;
|
||||
float hitPitch;
|
||||
public Entity ridingEntity2 = null;
|
||||
|
||||
public EntityPhantomSwordBaseEx(World par1World) {
|
||||
super(par1World);
|
||||
this.noClip = true;
|
||||
}
|
||||
|
||||
public EntityPhantomSwordBaseEx(World par1World, EntityLivingBase entityLiving, float AttackLevel, float roll) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setRoll(roll);
|
||||
}
|
||||
|
||||
public EntityPhantomSwordBaseEx(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
|
||||
this.setThrower((Entity)entityLiving);
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(0.5f, 0.5f);
|
||||
float dist = 2.0f;
|
||||
double ran = ((double)this.rand.nextFloat() - 0.5) * 2.0;
|
||||
double yaw = Math.toRadians(-this.thrower.rotationYaw + 90.0f);
|
||||
double x = ran * Math.sin(yaw);
|
||||
double y = 1.0 - Math.abs(ran);
|
||||
double z = ran * Math.cos(yaw);
|
||||
this.setLocationAndAngles(this.thrower.posX + (x *= (double)dist), this.thrower.posY + (y *= (double)dist), this.thrower.posZ + (z *= (double)dist), this.thrower.rotationYaw, this.thrower.rotationPitch);
|
||||
this.iniYaw = this.thrower.rotationYaw;
|
||||
this.iniPitch = this.thrower.rotationPitch;
|
||||
this.setDriveVector(1.75f);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(11, 0);
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, Float.valueOf(0.0f));
|
||||
this.getDataWatcher().addObject(6, 20);
|
||||
this.getDataWatcher().addObject(7, 7);
|
||||
this.getDataWatcher().addObject(10, 0x3333FF);
|
||||
this.getDataWatcher().addObject(24, String.valueOf(""));
|
||||
this.getDataWatcher().addObject(25, String.valueOf(""));
|
||||
this.getDataWatcher().addObject(26, 1);
|
||||
}
|
||||
|
||||
public int getThrowerEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(11);
|
||||
}
|
||||
|
||||
public void setThrowerEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(11, entityid);
|
||||
}
|
||||
|
||||
public int getTargetEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(4);
|
||||
}
|
||||
|
||||
public void setTargetEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(4, entityid);
|
||||
}
|
||||
|
||||
public float getRoll() {
|
||||
return this.getDataWatcher().getWatchableObjectFloat(5);
|
||||
}
|
||||
|
||||
public void setRoll(float roll) {
|
||||
this.getDataWatcher().updateObject(5, Float.valueOf(roll));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(6, lifetime);
|
||||
}
|
||||
|
||||
public int getInterval() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(7);
|
||||
}
|
||||
|
||||
public void setInterval(int value) {
|
||||
this.getDataWatcher().updateObject(7, value);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(10);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(10, value);
|
||||
}
|
||||
|
||||
public String getSound() {
|
||||
return this.getDataWatcher().getWatchableObjectString(24);
|
||||
}
|
||||
|
||||
public void setSound(String value) {
|
||||
this.getDataWatcher().updateObject(24, String.valueOf(value));
|
||||
}
|
||||
|
||||
public String getParticle() {
|
||||
return this.getDataWatcher().getWatchableObjectString(25);
|
||||
}
|
||||
|
||||
public void setParticle(String value) {
|
||||
this.getDataWatcher().updateObject(25, String.valueOf(value));
|
||||
}
|
||||
|
||||
public boolean getIsPlayerSound() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(26) == 0;
|
||||
}
|
||||
|
||||
public void setIsPlayerSound(boolean isPlaySound) {
|
||||
this.getDataWatcher().updateObject(26, ((byte)(!isPlaySound ? 1 : 0)));
|
||||
}
|
||||
|
||||
public boolean doTargeting() {
|
||||
Entity target;
|
||||
Entity rayEntity;
|
||||
if (this.ticksExisted > this.getInterval()) {
|
||||
return false;
|
||||
}
|
||||
int targetid = this.getTargetEntityId();
|
||||
Entity owner = this.thrower;
|
||||
if (this.thrower == null) {
|
||||
owner = this;
|
||||
}
|
||||
if (targetid == 0 && (rayEntity = this.getRayTrace(owner, 30.0)) != null) {
|
||||
targetid = rayEntity.getEntityId();
|
||||
this.setTargetEntityId(rayEntity.getEntityId());
|
||||
}
|
||||
if (targetid == 0 && (rayEntity = this.getRayTrace(owner, 30.0, 5.0f, 5.0f)) != null) {
|
||||
targetid = rayEntity.getEntityId();
|
||||
this.setTargetEntityId(rayEntity.getEntityId());
|
||||
}
|
||||
if (targetid != 0 && (target = this.worldObj.getEntityByID(targetid)) != null) {
|
||||
if (Float.isNaN(this.iniPitch) && this.thrower != null) {
|
||||
this.iniYaw = this.thrower.rotationYaw;
|
||||
this.iniPitch = this.thrower.rotationPitch;
|
||||
}
|
||||
this.faceEntity(this, target, (float)this.ticksExisted * 1.0f, (float)this.ticksExisted * 1.0f);
|
||||
this.setDriveVector(1.75f, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Entity getRayTrace(Entity owner, double reachMax) {
|
||||
return this.getRayTrace(owner, reachMax, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
public Entity getRayTrace(Entity owner, double reachMax, float expandFactor, float expandBorder) {
|
||||
float par1 = 1.0f;
|
||||
MovingObjectPosition objectMouseOver = EntityPhantomSwordBaseEx.rayTrace(owner, reachMax, par1);
|
||||
double reachMin = reachMax;
|
||||
Vec3 entityPos = EntityPhantomSwordBaseEx.getPosition(owner);
|
||||
if (objectMouseOver != null) {
|
||||
reachMin = objectMouseOver.hitVec.distanceTo(entityPos);
|
||||
}
|
||||
Vec3 lookVec = EntityPhantomSwordBaseEx.getLook(owner, par1);
|
||||
Vec3 reachVec = entityPos.addVector(lookVec.xCoord * reachMax, lookVec.yCoord * reachMax, lookVec.zCoord * reachMax);
|
||||
Entity pointedEntity = null;
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)this, this.boundingBox.addCoord(lookVec.xCoord * reachMax, lookVec.yCoord * reachMax, lookVec.zCoord * reachMax).expand((double)expandFactor, (double)expandFactor, (double)expandFactor));
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
double tmpDistance = reachMin;
|
||||
EntityLivingBase viewer = owner instanceof EntityLivingBase ? (EntityLivingBase)owner : null;
|
||||
for (Entity entity : list) {
|
||||
double d3;
|
||||
if (entity == null || !entity.canBeCollidedWith() || !ItemSlashBlade.AttackableSelector.isEntityApplicable(entity) || viewer != null && !viewer.canEntityBeSeen(entity)) continue;
|
||||
float borderSize = entity.getCollisionBorderSize() + expandBorder;
|
||||
AxisAlignedBB axisalignedbb = entity.boundingBox.expand((double)borderSize, (double)borderSize, (double)borderSize);
|
||||
MovingObjectPosition movingobjectposition = axisalignedbb.calculateIntercept(entityPos, reachVec);
|
||||
if (axisalignedbb.isVecInside(entityPos)) {
|
||||
if (!(0.0 < tmpDistance) && tmpDistance != 0.0) continue;
|
||||
pointedEntity = entity;
|
||||
tmpDistance = 0.0;
|
||||
continue;
|
||||
}
|
||||
if (movingobjectposition == null || !((d3 = entityPos.distanceTo(movingobjectposition.hitVec)) < tmpDistance) && tmpDistance != 0.0) continue;
|
||||
if (entity == this.ridingEntity && !entity.canRiderInteract()) {
|
||||
if (tmpDistance != 0.0) continue;
|
||||
pointedEntity = entity;
|
||||
continue;
|
||||
}
|
||||
pointedEntity = entity;
|
||||
tmpDistance = d3;
|
||||
}
|
||||
return pointedEntity;
|
||||
}
|
||||
|
||||
public static MovingObjectPosition rayTrace(Entity owner, double par1, float par3) {
|
||||
Vec3 vec3 = EntityPhantomSwordBaseEx.getPosition(owner);
|
||||
Vec3 vec31 = EntityPhantomSwordBaseEx.getLook(owner, par3);
|
||||
Vec3 vec32 = vec3.addVector(vec31.xCoord * par1, vec31.yCoord * par1, vec31.zCoord * par1);
|
||||
return owner.worldObj.rayTraceBlocks(vec3, vec32, false);
|
||||
}
|
||||
|
||||
public static Vec3 getPosition(Entity owner) {
|
||||
return Vec3.createVectorHelper((double)owner.posX, (double)(owner.posY + (double)owner.getEyeHeight()), (double)owner.posZ);
|
||||
}
|
||||
|
||||
public static Vec3 getLook(Entity owner, float rotMax) {
|
||||
if (rotMax == 1.0f) {
|
||||
float f1 = MathHelper.cos((float)(-owner.rotationYaw * ((float)Math.PI / 180) - (float)Math.PI));
|
||||
float f2 = MathHelper.sin((float)(-owner.rotationYaw * ((float)Math.PI / 180) - (float)Math.PI));
|
||||
float f3 = -MathHelper.cos((float)(-owner.rotationPitch * ((float)Math.PI / 180)));
|
||||
float f4 = MathHelper.sin((float)(-owner.rotationPitch * ((float)Math.PI / 180)));
|
||||
return Vec3.createVectorHelper((double)(f2 * f3), (double)f4, (double)(f1 * f3));
|
||||
}
|
||||
float f1 = owner.prevRotationPitch + (owner.rotationPitch - owner.prevRotationPitch) * rotMax;
|
||||
float f2 = owner.prevRotationYaw + (owner.rotationYaw - owner.prevRotationYaw) * rotMax;
|
||||
float f3 = MathHelper.cos((float)(-f2 * ((float)Math.PI / 180) - (float)Math.PI));
|
||||
float f4 = MathHelper.sin((float)(-f2 * ((float)Math.PI / 180) - (float)Math.PI));
|
||||
float f5 = -MathHelper.cos((float)(-f1 * ((float)Math.PI / 180)));
|
||||
float f6 = MathHelper.sin((float)(-f1 * ((float)Math.PI / 180)));
|
||||
return Vec3.createVectorHelper((double)(f4 * f5), (double)f6, (double)(f3 * f5));
|
||||
}
|
||||
|
||||
public void faceEntity(Entity viewer, Entity target, float yawStep, float pitchStep) {
|
||||
double d2;
|
||||
double d0 = target.posX - viewer.posX;
|
||||
double d1 = target.posZ - viewer.posZ;
|
||||
if (target instanceof EntityLivingBase) {
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase)target;
|
||||
d2 = entitylivingbase.posY + (double)entitylivingbase.getEyeHeight() - (viewer.posY + (double)viewer.getEyeHeight());
|
||||
} else {
|
||||
d2 = (target.boundingBox.minY + target.boundingBox.maxY) / 2.0 - (viewer.posY + (double)viewer.getEyeHeight());
|
||||
}
|
||||
double d3 = MathHelper.sqrt_double((double)(d0 * d0 + d1 * d1));
|
||||
float f2 = (float)(Math.atan2(d1, d0) * 180.0 / Math.PI) - 90.0f;
|
||||
float f3 = (float)(-(Math.atan2(d2, d3) * 180.0 / Math.PI));
|
||||
this.iniPitch = this.updateRotation(this.iniPitch, f3, pitchStep);
|
||||
this.iniYaw = this.updateRotation(this.iniYaw, f2, yawStep);
|
||||
}
|
||||
|
||||
private float updateRotation(float par1, float par2, float par3) {
|
||||
float f3 = MathHelper.wrapAngleTo180_float((float)(par2 - par1));
|
||||
if (f3 > par3) {
|
||||
f3 = par3;
|
||||
}
|
||||
if (f3 < -par3) {
|
||||
f3 = -par3;
|
||||
}
|
||||
return par1 + f3;
|
||||
}
|
||||
|
||||
public void setDriveVector(float fYVecOfset) {
|
||||
this.setDriveVector(fYVecOfset, true);
|
||||
}
|
||||
|
||||
public void setDriveVector(float fYVecOfst, boolean init) {
|
||||
float fYawDtoR = this.iniYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = this.iniPitch / 180.0f * (float)Math.PI;
|
||||
this.motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
this.motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst;
|
||||
float f3 = MathHelper.sqrt_double((double)(this.motionX * this.motionX + this.motionZ * this.motionZ));
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0 / Math.PI);
|
||||
this.rotationPitch = (float)(Math.atan2(this.motionY, f3) * 180.0 / Math.PI);
|
||||
if (init) {
|
||||
this.speed = fYVecOfst;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
}
|
||||
}
|
||||
|
||||
public void updateRidden() {
|
||||
Entity ridingEntity = this.ridingEntity2;
|
||||
if (ridingEntity.isDead) {
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
this.posX = ridingEntity.posX + (this.hitX * Math.cos(Math.toRadians(ridingEntity.rotationYaw)) - this.hitZ * Math.sin(Math.toRadians(ridingEntity.rotationYaw)));
|
||||
this.posY = ridingEntity.posY + this.hitY;
|
||||
this.posZ = ridingEntity.posZ + (this.hitX * Math.sin(Math.toRadians(ridingEntity.rotationYaw)) + this.hitZ * Math.cos(Math.toRadians(ridingEntity.rotationYaw)));
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.rotationPitch = ridingEntity.rotationPitch + this.hitPitch;
|
||||
this.rotationYaw = ridingEntity.rotationYaw + this.hitYaw;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.setRotation(this.rotationYaw, this.rotationPitch);
|
||||
if (this.ticksExisted >= 200) {
|
||||
if (!ridingEntity.isDead && !this.worldObj.isRemote) {
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel / 2.0f);
|
||||
ridingEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
ridingEntity.attackEntityFrom(ds, magicDamage);
|
||||
if (this.blade != null && ridingEntity instanceof EntityLivingBase) {
|
||||
if (this.thrower != null) {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.BreakPhantomSword);
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)ridingEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
ridingEntity.motionX = 0.0;
|
||||
ridingEntity.motionY = 0.0;
|
||||
ridingEntity.motionZ = 0.0;
|
||||
ridingEntity.addVelocity(0.0, 0.1, 0.0);
|
||||
((EntityLivingBase)ridingEntity).hurtTime = 1;
|
||||
}
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
protected void initRotation() {
|
||||
if (this.prevRotationPitch == 0.0f && this.prevRotationYaw == 0.0f) {
|
||||
float f = MathHelper.sqrt_double((double)(this.motionX * this.motionX + this.motionZ * this.motionZ));
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0 / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, f) * 180.0 / Math.PI);
|
||||
}
|
||||
}
|
||||
|
||||
protected MovingObjectPosition getMovingObjectPosition() {
|
||||
IEntitySelector[] selectors;
|
||||
int z;
|
||||
int offset;
|
||||
int y;
|
||||
int x;
|
||||
Block block;
|
||||
Vec3 vec3 = Vec3.createVectorHelper((double)this.posX, (double)this.posY, (double)this.posZ);
|
||||
Vec3 vec31 = Vec3.createVectorHelper((double)(this.posX + this.motionX), (double)(this.posY + this.motionY), (double)(this.posZ + this.motionZ));
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31);
|
||||
vec3 = Vec3.createVectorHelper((double)this.posX, (double)this.posY, (double)this.posZ);
|
||||
vec31 = Vec3.createVectorHelper((double)(this.posX + this.motionX), (double)(this.posY + this.motionY), (double)(this.posZ + this.motionZ));
|
||||
if (movingobjectposition != null && (block = this.worldObj.getBlock(x = MathHelper.floor_double((double)movingobjectposition.hitVec.xCoord), (y = MathHelper.floor_double((double)movingobjectposition.hitVec.yCoord)) + (offset = -1), z = MathHelper.floor_double((double)movingobjectposition.hitVec.zCoord))) != null) {
|
||||
if (block.getCollisionBoundingBoxFromPool(this.worldObj, x, y + offset, z) == null) {
|
||||
movingobjectposition = null;
|
||||
} else {
|
||||
vec31 = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
}
|
||||
Entity entity = null;
|
||||
AxisAlignedBB bb = this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0, 1.0, 1.0);
|
||||
for (IEntitySelector selector : selectors = new IEntitySelector[]{ItemSlashBlade.DestructableSelector, ItemSlashBlade.AttackableSelector}) {
|
||||
Entity target;
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)this, bb, selector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (selector.equals(ItemSlashBlade.AttackableSelector) && this.getTargetEntityId() != 0 && (target = this.worldObj.getEntityByID(this.getTargetEntityId())) != null && target.boundingBox.intersectsWith(bb)) {
|
||||
list.add(target);
|
||||
}
|
||||
double d0 = 0.0;
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
double d1;
|
||||
float f1;
|
||||
AxisAlignedBB axisalignedbb1;
|
||||
MovingObjectPosition movingobjectposition1;
|
||||
Entity entity1 = (Entity)list.get(i);
|
||||
if (entity1 instanceof EntityPhantomSwordBase && ((EntityPhantomSwordBase)entity1).getThrower() == this.getThrower() || !entity1.canBeCollidedWith() || (movingobjectposition1 = (axisalignedbb1 = entity1.boundingBox.expand((double)(f1 = 0.3f), (double)f1, (double)f1)).calculateIntercept(vec31, vec3)) == null || !((d1 = vec31.distanceTo(movingobjectposition1.hitVec)) < d0) && d0 != 0.0) continue;
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
if (entity == null) continue;
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
movingobjectposition.hitInfo = selector;
|
||||
break;
|
||||
}
|
||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit;
|
||||
if (entityplayer.capabilities.disableDamage || this.getThrower() != null && this.getThrower() instanceof EntityPlayer && !((EntityPlayer)this.getThrower()).canAttackPlayer(entityplayer)) {
|
||||
movingobjectposition = null;
|
||||
}
|
||||
}
|
||||
return movingobjectposition;
|
||||
}
|
||||
|
||||
public void doRotation() {
|
||||
if (this.doTargeting()) {
|
||||
return;
|
||||
}
|
||||
float f2 = MathHelper.sqrt_double((double)(this.motionX * this.motionX + this.motionZ * this.motionZ));
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0 / Math.PI);
|
||||
this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0 / Math.PI);
|
||||
while (this.rotationPitch - this.prevRotationPitch < -180.0f) {
|
||||
this.prevRotationPitch -= 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public void normalizeRotation() {
|
||||
while (this.rotationPitch - this.prevRotationPitch >= 180.0f) {
|
||||
this.prevRotationPitch += 360.0f;
|
||||
}
|
||||
while (this.rotationYaw - this.prevRotationYaw < -180.0f) {
|
||||
this.prevRotationYaw -= 360.0f;
|
||||
}
|
||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0f) {
|
||||
this.prevRotationYaw += 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
protected void destructEntity(Entity target) {
|
||||
if (this.thrower == null) {
|
||||
return;
|
||||
}
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
boolean isDestruction = true;
|
||||
if (target instanceof EntityFireball) {
|
||||
if (((EntityFireball)target).shootingEntity != null && ((EntityFireball)target).shootingEntity.getEntityId() == this.thrower.getEntityId()) {
|
||||
isDestruction = false;
|
||||
} else if (this.thrower instanceof EntityLivingBase) {
|
||||
isDestruction = !target.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)((EntityLivingBase)this.thrower)), this.AttackLevel);
|
||||
}
|
||||
} else if (target instanceof EntityArrow) {
|
||||
if (((EntityArrow)target).shootingEntity != null && ((EntityArrow)target).shootingEntity.getEntityId() == this.thrower.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (target instanceof EntityThrowable && ((EntityThrowable)target).getThrower() != null && ((EntityThrowable)target).getThrower().getEntityId() == this.thrower.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (isDestruction && target instanceof IThrowableEntity && ((IThrowableEntity)target).getThrower() != null && ((IThrowableEntity)target).getThrower().getEntityId() == this.thrower.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (isDestruction) {
|
||||
target.motionX = 0.0;
|
||||
target.motionY = 0.0;
|
||||
target.motionZ = 0.0;
|
||||
target.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", target.posX + (double)(rand.nextFloat() * target.width * 2.0f) - (double)target.width - var2 * var8, target.posY + (double)(rand.nextFloat() * target.height) - var4 * var8, target.posZ + (double)(rand.nextFloat() * target.width * 2.0f) - (double)target.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
protected void attackEntity(Entity target) {
|
||||
if (this.thrower != null) {
|
||||
this.thrower.getEntityData().setInteger("LastHitSummonedSwords", this.getEntityId());
|
||||
}
|
||||
this.mountEntity(target);
|
||||
if (!this.worldObj.isRemote) {
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
target.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
target.attackEntityFrom(ds, magicDamage);
|
||||
if (this.blade != null && target instanceof EntityLivingBase && this.thrower != null && this.thrower instanceof EntityLivingBase) {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)target, (EntityLivingBase)this.thrower);
|
||||
target.motionX = 0.0;
|
||||
target.motionY = 0.0;
|
||||
target.motionZ = 0.0;
|
||||
target.addVelocity(0.0, 0.1, 0.0);
|
||||
((EntityLivingBase)target).hurtTime = 1;
|
||||
((ItemSlashBlade)this.blade.getItem()).setDaunting((EntityLivingBase)target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void blastAttackEntity(Entity target) {
|
||||
if (!this.worldObj.isRemote) {
|
||||
float magicDamage = 1.0f;
|
||||
target.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
|
||||
target.attackEntityFrom(ds, magicDamage);
|
||||
if (this.blade != null && target instanceof EntityLivingBase && this.thrower != null && this.thrower instanceof EntityLivingBase) {
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)target, (EntityLivingBase)this.thrower);
|
||||
target.motionX = 0.0;
|
||||
target.motionY = 0.0;
|
||||
target.motionZ = 0.0;
|
||||
target.addVelocity(0.0, 0.1, 0.0);
|
||||
((EntityLivingBase)target).hurtTime = 1;
|
||||
((ItemSlashBlade)this.blade.getItem()).setDaunting((EntityLivingBase)target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean onImpact(MovingObjectPosition mop) {
|
||||
boolean result = true;
|
||||
if (mop.entityHit != null) {
|
||||
Entity target = mop.entityHit;
|
||||
if (mop.hitInfo.equals(ItemSlashBlade.AttackableSelector)) {
|
||||
this.attackEntity(target);
|
||||
} else {
|
||||
this.destructEntity(target);
|
||||
}
|
||||
} else if (!this.worldObj.getCollidingBoundingBoxes((Entity)this, this.boundingBox).isEmpty()) {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void spawnParticle() {
|
||||
if (this.isInWater()) {
|
||||
for (int l = 0; l < 4; ++l) {
|
||||
float trailLength = 0.25f;
|
||||
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)trailLength, this.posY - this.motionY * (double)trailLength, this.posZ - this.motionZ * (double)trailLength, this.motionX, this.motionY, this.motionZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void calculateSpeed() {
|
||||
float speedReductionFactor = 1.1f;
|
||||
if (this.isInWater()) {
|
||||
speedReductionFactor = 1.0f;
|
||||
}
|
||||
this.motionX *= (double)speedReductionFactor;
|
||||
this.motionY *= (double)speedReductionFactor;
|
||||
this.motionZ *= (double)speedReductionFactor;
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
super.onUpdate();
|
||||
if (this.ridingEntity2 != null) {
|
||||
this.updateRidden();
|
||||
} else {
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.setDead();
|
||||
}
|
||||
this.initRotation();
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPosition();
|
||||
if (movingobjectposition != null && this.onImpact(movingobjectposition)) {
|
||||
return;
|
||||
}
|
||||
this.calculateSpeed();
|
||||
this.doRotation();
|
||||
if (this.getInterval() < this.ticksExisted) {
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
}
|
||||
this.normalizeRotation();
|
||||
this.spawnParticle();
|
||||
}
|
||||
}
|
||||
|
||||
public void setDead() {
|
||||
if (this.thrower != null && this.thrower instanceof EntityPlayer) {
|
||||
((EntityPlayer)this.thrower).onCriticalHit((Entity)this);
|
||||
}
|
||||
this.worldObj.playSoundEffect(this.prevPosX, this.prevPosY, this.prevPosZ, "dig.glass", 0.25f, 1.6f);
|
||||
AxisAlignedBB bb = this.boundingBox.expand(1.0, 1.0, 1.0);
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity((Entity)this, bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
for (Entity target : list) {
|
||||
if (target == null) continue;
|
||||
this.blastAttackEntity(target);
|
||||
}
|
||||
super.setDead();
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
super.moveEntity(par1, par3, par5);
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean handleLavaMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public float getShadowSize() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public Entity getRidingEntity() {
|
||||
return this.ridingEntity2;
|
||||
}
|
||||
|
||||
public void mountEntity(Entity par1Entity) {
|
||||
if (par1Entity != null) {
|
||||
this.hitYaw = this.rotationYaw - par1Entity.rotationYaw;
|
||||
this.hitPitch = this.rotationPitch - par1Entity.rotationPitch;
|
||||
this.hitX = this.posX - par1Entity.posX;
|
||||
this.hitY = this.posY - par1Entity.posY;
|
||||
this.hitZ = this.posZ - par1Entity.posZ;
|
||||
this.ridingEntity2 = par1Entity;
|
||||
this.ticksExisted = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public void setThrowableHeading(double v, double v2, double v3, float v4, float v5) {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
int id;
|
||||
if (this.thrower == null && (id = this.getThrowerEntityId()) != 0) {
|
||||
this.thrower = this.worldObj.getEntityByID(id);
|
||||
}
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
if (entity != null) {
|
||||
this.setThrowerEntityId(entity.getEntityId());
|
||||
}
|
||||
this.thrower = entity;
|
||||
}
|
||||
|
||||
public void playParticle() {
|
||||
String particle = this.getParticle();
|
||||
if (particle != null && !particle.equals("")) {
|
||||
Random rand = new Random();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle(particle, this.posX + (double)(rand.nextFloat() * this.width * 2.0f) - (double)this.width - var2 * var8, this.posY + (double)(rand.nextFloat() * this.height) - var4 * var8, this.posZ + (double)(rand.nextFloat() * this.width * 2.0f) - (double)this.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
}
|
||||
|
||||
public void playSound() {
|
||||
if (!this.getIsPlayerSound()) {
|
||||
String sound = this.getSound();
|
||||
if (sound != null && !sound.equals("") && this.thrower instanceof EntityPlayer) {
|
||||
this.thrower.playSound(sound, 1.0f, 1.5f);
|
||||
}
|
||||
this.setIsPlayerSound(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.TeleportCanceller
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.TeleportCanceller;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySlashDimensionEx
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
private static final int LIFETIME = 3;
|
||||
private static final int SINGLE_HIT = 4;
|
||||
private static final int IS_SLASH_DIMENSION = 5;
|
||||
private static final int THROWER_ENTITY_ID = 6;
|
||||
private static final int INTERVAL = 7;
|
||||
private static final int COLOR = 8;
|
||||
|
||||
public EntitySlashDimensionEx(World par1World) {
|
||||
super(par1World);
|
||||
this.ticksExisted = 0;
|
||||
this.getEntityData().setInteger("seed", this.rand.nextInt(50));
|
||||
}
|
||||
|
||||
public EntitySlashDimensionEx(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsSingleHit(multiHit);
|
||||
}
|
||||
|
||||
public EntitySlashDimensionEx(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(4.0f, 4.0f);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(3, 20);
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, 0);
|
||||
this.getDataWatcher().addObject(6, 0);
|
||||
this.getDataWatcher().addObject(7, 7);
|
||||
this.getDataWatcher().addObject(8, 0x3333FF);
|
||||
}
|
||||
|
||||
public boolean getIsSingleHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) != 0;
|
||||
}
|
||||
|
||||
public void setIsSingleHit(boolean isSingleHit) {
|
||||
this.getDataWatcher().updateObject(4, (isSingleHit ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(3);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(3, lifetime);
|
||||
}
|
||||
|
||||
public boolean getIsSlashDimension() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(5) != 0;
|
||||
}
|
||||
|
||||
public void setIsSlashDimension(boolean isSlashDimension) {
|
||||
this.getDataWatcher().updateObject(5, (isSlashDimension ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getInterval() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(7);
|
||||
}
|
||||
|
||||
public void setInterval(int value) {
|
||||
this.getDataWatcher().updateObject(7, value);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(8);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(8, value);
|
||||
}
|
||||
|
||||
public int getThrowerEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setThrowerEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(6, entityid);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (this.ticksExisted < 8 && this.ticksExisted % 2 == 0) {
|
||||
this.playSound("mob.wither.hurt", 0.2f, 0.5f + 0.25f * this.rand.nextFloat());
|
||||
}
|
||||
AxisAlignedBB bb = this.boundingBox;
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (this.getIsSingleHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (this.getIsSingleHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.SlashDimMagic);
|
||||
for (Entity curEntity : list) {
|
||||
float health;
|
||||
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
|
||||
health = Math.max(1.0f, health - magicDamage);
|
||||
((EntityLivingBase)curEntity).setHealth(health);
|
||||
}
|
||||
Vec3 pos = Vec3.createVectorHelper((double)curEntity.posX, (double)curEntity.posY, (double)curEntity.posZ);
|
||||
TeleportCanceller.setCancel((Entity)curEntity);
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage().setProjectile();
|
||||
if (this.blade != null && curEntity instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
if (3 >= this.ticksExisted || this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
|
||||
if (this.getIsSlashDimension()) {
|
||||
curEntity.addVelocity(0.0, 0.5, 0.0);
|
||||
continue;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.punch.effectId, (ItemStack)this.blade);
|
||||
if (0 < level) {
|
||||
curEntity.addVelocity(Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5, 0.2, -Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5);
|
||||
continue;
|
||||
}
|
||||
curEntity.addVelocity(-Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5, 0.2, Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
int id;
|
||||
if (this.thrower == null && (id = this.getThrowerEntityId()) != 0) {
|
||||
this.thrower = this.worldObj.getEntityByID(id);
|
||||
}
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
if (entity != null) {
|
||||
this.setThrowerEntityId(entity.getEntityId());
|
||||
}
|
||||
this.thrower = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.TeleportCanceller
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.TeleportCanceller;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySword
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
private static final int LIFETIME = 3;
|
||||
private static final int SINGLE_HIT = 4;
|
||||
private static final int IS_SLASH_DIMENSION = 5;
|
||||
private static final int THROWER_ENTITY_ID = 6;
|
||||
private static final int INTERVAL = 7;
|
||||
private static final int COLOR = 8;
|
||||
|
||||
public EntitySword(World par1World) {
|
||||
super(par1World);
|
||||
this.ticksExisted = 0;
|
||||
this.getEntityData().setInteger("seed", this.rand.nextInt(50));
|
||||
}
|
||||
|
||||
public EntitySword(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsSingleHit(multiHit);
|
||||
}
|
||||
|
||||
public EntitySword(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(4.0f, 4.0f);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(3, 20);
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, 0);
|
||||
this.getDataWatcher().addObject(6, 0);
|
||||
this.getDataWatcher().addObject(7, 7);
|
||||
this.getDataWatcher().addObject(8, 0x3333FF);
|
||||
}
|
||||
|
||||
public boolean getIsSingleHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) != 0;
|
||||
}
|
||||
|
||||
public void setIsSingleHit(boolean isSingleHit) {
|
||||
this.getDataWatcher().updateObject(4, (isSingleHit ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(3);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(3, lifetime);
|
||||
}
|
||||
|
||||
public boolean getIsSlashDimension() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(5) != 0;
|
||||
}
|
||||
|
||||
public void setIsSlashDimension(boolean isSlashDimension) {
|
||||
this.getDataWatcher().updateObject(5, (isSlashDimension ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getInterval() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(7);
|
||||
}
|
||||
|
||||
public void setInterval(int value) {
|
||||
this.getDataWatcher().updateObject(7, value);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(8);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(8, value);
|
||||
}
|
||||
|
||||
public int getThrowerEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setThrowerEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(6, entityid);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (this.ticksExisted < 8 && this.ticksExisted % 2 == 0) {
|
||||
this.playSound("mob.wither.hurt", 0.2f, 0.5f + 0.25f * this.rand.nextFloat());
|
||||
}
|
||||
AxisAlignedBB bb = this.boundingBox;
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (this.getIsSingleHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (this.getIsSingleHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.SlashDimMagic);
|
||||
for (Entity curEntity : list) {
|
||||
float health;
|
||||
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
|
||||
health = Math.max(1.0f, health - magicDamage);
|
||||
((EntityLivingBase)curEntity).setHealth(health);
|
||||
}
|
||||
Vec3 pos = Vec3.createVectorHelper((double)curEntity.posX, (double)curEntity.posY, (double)curEntity.posZ);
|
||||
TeleportCanceller.setCancel((Entity)curEntity);
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage().setProjectile();
|
||||
if (this.blade != null && curEntity instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
if (3 >= this.ticksExisted || this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
|
||||
if (this.getIsSlashDimension()) {
|
||||
curEntity.addVelocity(0.0, 0.5, 0.0);
|
||||
continue;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.punch.effectId, (ItemStack)this.blade);
|
||||
if (0 < level) {
|
||||
curEntity.addVelocity(Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5, 0.2, -Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5);
|
||||
continue;
|
||||
}
|
||||
curEntity.addVelocity(-Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5, 0.2, Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
int id;
|
||||
if (this.thrower == null && (id = this.getThrowerEntityId()) != 0) {
|
||||
this.thrower = this.worldObj.getEntityByID(id);
|
||||
}
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
if (entity != null) {
|
||||
this.setThrowerEntityId(entity.getEntityId());
|
||||
}
|
||||
this.thrower = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.common.registry.IThrowableEntity
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.TeleportCanceller
|
||||
* net.minecraft.block.material.Material
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.projectile.EntityArrow
|
||||
* net.minecraft.entity.projectile.EntityFireball
|
||||
* net.minecraft.entity.projectile.EntityThrowable
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.DamageSource
|
||||
* net.minecraft.util.EntityDamageSource
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.entity;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.TeleportCanceller;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.entity.projectile.EntityFireball;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityTanMU
|
||||
extends Entity
|
||||
implements IThrowableEntity {
|
||||
protected Entity thrower;
|
||||
protected ItemStack blade = null;
|
||||
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
|
||||
protected float AttackLevel = 0.0f;
|
||||
private static final int LIFETIME = 3;
|
||||
private static final int SINGLE_HIT = 4;
|
||||
private static final int IS_SLASH_DIMENSION = 5;
|
||||
private static final int THROWER_ENTITY_ID = 6;
|
||||
private static final int INTERVAL = 7;
|
||||
private static final int COLOR = 8;
|
||||
|
||||
public EntityTanMU(World par1World) {
|
||||
super(par1World);
|
||||
this.ticksExisted = 0;
|
||||
this.getEntityData().setInteger("seed", this.rand.nextInt(50));
|
||||
}
|
||||
|
||||
public EntityTanMU(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
|
||||
this(par1World, entityLiving, AttackLevel);
|
||||
this.setIsSingleHit(multiHit);
|
||||
}
|
||||
|
||||
public EntityTanMU(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
|
||||
this(par1World);
|
||||
this.AttackLevel = AttackLevel;
|
||||
this.thrower = entityLiving;
|
||||
this.blade = entityLiving.getHeldItem();
|
||||
if (this.blade != null && !(this.blade.getItem() instanceof ItemSlashBlade)) {
|
||||
this.blade = null;
|
||||
}
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity.add(this.thrower);
|
||||
this.alreadyHitEntity.add(this.thrower.ridingEntity);
|
||||
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
|
||||
this.ticksExisted = 0;
|
||||
this.setSize(4.0f, 4.0f);
|
||||
}
|
||||
|
||||
protected void entityInit() {
|
||||
this.getDataWatcher().addObject(3, 20);
|
||||
this.getDataWatcher().addObject(4, 0);
|
||||
this.getDataWatcher().addObject(5, 0);
|
||||
this.getDataWatcher().addObject(6, 0);
|
||||
this.getDataWatcher().addObject(7, 7);
|
||||
this.getDataWatcher().addObject(8, 0x3333FF);
|
||||
}
|
||||
|
||||
public boolean getIsSingleHit() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(4) != 0;
|
||||
}
|
||||
|
||||
public void setIsSingleHit(boolean isSingleHit) {
|
||||
this.getDataWatcher().updateObject(4, (isSingleHit ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getLifeTime() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(3);
|
||||
}
|
||||
|
||||
public void setLifeTime(int lifetime) {
|
||||
this.getDataWatcher().updateObject(3, lifetime);
|
||||
}
|
||||
|
||||
public boolean getIsSlashDimension() {
|
||||
return this.getDataWatcher().getWatchableObjectByte(5) != 0;
|
||||
}
|
||||
|
||||
public void setIsSlashDimension(boolean isSlashDimension) {
|
||||
this.getDataWatcher().updateObject(5, (isSlashDimension ? (byte)1 : 0));
|
||||
}
|
||||
|
||||
public int getInterval() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(7);
|
||||
}
|
||||
|
||||
public void setInterval(int value) {
|
||||
this.getDataWatcher().updateObject(7, value);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(8);
|
||||
}
|
||||
|
||||
public void setColor(int value) {
|
||||
this.getDataWatcher().updateObject(8, value);
|
||||
}
|
||||
|
||||
public int getThrowerEntityId() {
|
||||
return this.getDataWatcher().getWatchableObjectInt(6);
|
||||
}
|
||||
|
||||
public void setThrowerEntityId(int entityid) {
|
||||
this.getDataWatcher().updateObject(6, entityid);
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
if (!this.worldObj.isRemote) {
|
||||
if (this.ticksExisted < 8 && this.ticksExisted % 2 == 0) {
|
||||
this.playSound("mob.wither.hurt", 0.2f, 0.5f + 0.25f * this.rand.nextFloat());
|
||||
}
|
||||
AxisAlignedBB bb = this.boundingBox;
|
||||
if (this.getThrower() instanceof EntityLivingBase) {
|
||||
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
for (Entity curEntity : list) {
|
||||
boolean isDestruction = true;
|
||||
if (curEntity instanceof EntityFireball) {
|
||||
isDestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)entityLiving), this.AttackLevel);
|
||||
} else if (curEntity instanceof EntityArrow) {
|
||||
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof IThrowableEntity) {
|
||||
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
|
||||
isDestruction = false;
|
||||
}
|
||||
if (!isDestruction) continue;
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
curEntity.setDead();
|
||||
for (int var1 = 0; var1 < 10; ++var1) {
|
||||
Random rand = this.getRand();
|
||||
double var2 = rand.nextGaussian() * 0.02;
|
||||
double var4 = rand.nextGaussian() * 0.02;
|
||||
double var6 = rand.nextGaussian() * 0.02;
|
||||
double var8 = 10.0;
|
||||
this.worldObj.spawnParticle("explode", curEntity.posX + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var2 * var8, curEntity.posY + (double)(rand.nextFloat() * curEntity.height) - var4 * var8, curEntity.posZ + (double)(rand.nextFloat() * curEntity.width * 2.0f) - (double)curEntity.width - var6 * var8, var2, var4, var6);
|
||||
}
|
||||
StylishRankManager.doAttack((Entity)this.thrower);
|
||||
}
|
||||
}
|
||||
if (this.getIsSingleHit() || this.ticksExisted % 2 == 0) {
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
|
||||
list.removeAll(this.alreadyHitEntity);
|
||||
if (this.getIsSingleHit()) {
|
||||
this.alreadyHitEntity.addAll(list);
|
||||
}
|
||||
float magicDamage = Math.max(1.0f, this.AttackLevel);
|
||||
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.SlashDimMagic);
|
||||
for (Entity curEntity : list) {
|
||||
float health;
|
||||
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
|
||||
health = Math.max(1.0f, health - magicDamage);
|
||||
((EntityLivingBase)curEntity).setHealth(health);
|
||||
}
|
||||
Vec3 pos = Vec3.createVectorHelper((double)curEntity.posX, (double)curEntity.posY, (double)curEntity.posZ);
|
||||
TeleportCanceller.setCancel((Entity)curEntity);
|
||||
curEntity.hurtResistantTime = 0;
|
||||
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage().setProjectile();
|
||||
if (this.blade != null && curEntity instanceof EntityLivingBase) {
|
||||
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
|
||||
}
|
||||
curEntity.motionX = 0.0;
|
||||
curEntity.motionY = 0.0;
|
||||
curEntity.motionZ = 0.0;
|
||||
if (3 >= this.ticksExisted || this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
|
||||
if (this.getIsSlashDimension()) {
|
||||
curEntity.addVelocity(0.0, 0.5, 0.0);
|
||||
continue;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.punch.effectId, (ItemStack)this.blade);
|
||||
if (0 < level) {
|
||||
curEntity.addVelocity(Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5, 0.2, -Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * (double)level * 0.5);
|
||||
continue;
|
||||
}
|
||||
curEntity.addVelocity(-Math.sin(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5, 0.2, Math.cos(this.getThrower().rotationYaw * (float)Math.PI / 180.0f) * 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.ticksExisted >= this.getLifeTime()) {
|
||||
this.alreadyHitEntity.clear();
|
||||
this.alreadyHitEntity = null;
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public Random getRand() {
|
||||
return this.rand;
|
||||
}
|
||||
|
||||
public boolean isOffsetPositionInLiquid(double par1, double par3, double par5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void moveEntity(double par1, double par3, double par5) {
|
||||
}
|
||||
|
||||
protected void dealFireDamage(int par1) {
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInsideOfMaterial(Material par1Material) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public int getBrightnessForRender(float par1) {
|
||||
float f1 = 0.5f;
|
||||
if (f1 < 0.0f) {
|
||||
f1 = 0.0f;
|
||||
}
|
||||
if (f1 > 1.0f) {
|
||||
f1 = 1.0f;
|
||||
}
|
||||
int i = super.getBrightnessForRender(par1);
|
||||
int j = i & 0xFF;
|
||||
int k = i >> 16 & 0xFF;
|
||||
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
|
||||
j = 240;
|
||||
}
|
||||
return j | k << 16;
|
||||
}
|
||||
|
||||
public float getBrightness(float par1) {
|
||||
float f1 = super.getBrightness(par1);
|
||||
float f2 = 0.9f;
|
||||
f2 = f2 * f2 * f2 * f2;
|
||||
return f1 * (1.0f - f2) + f2;
|
||||
}
|
||||
|
||||
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
|
||||
}
|
||||
|
||||
public void setInPortal() {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldRenderInPass(int pass) {
|
||||
return pass == 1;
|
||||
}
|
||||
|
||||
public void setInWeb() {
|
||||
}
|
||||
|
||||
public Entity getThrower() {
|
||||
int id;
|
||||
if (this.thrower == null && (id = this.getThrowerEntityId()) != 0) {
|
||||
this.thrower = this.worldObj.getEntityByID(id);
|
||||
}
|
||||
return this.thrower;
|
||||
}
|
||||
|
||||
public void setThrower(Entity entity) {
|
||||
if (entity != null) {
|
||||
this.setThrowerEntityId(entity.getEntityId());
|
||||
}
|
||||
this.thrower = entity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* net.minecraft.client.renderer.Tessellator
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public class RenderDriveEx
|
||||
extends Render {
|
||||
private static double[][] dVec = new double[][]{{0.0, 1.0, -0.5}, {0.0, 0.75, 0.0}, {0.1, 0.6, -0.15}, {0.0, 0.5, -0.25}, {-0.1, 0.6, -0.15}, {0.0, 0.0, 0.25}, {0.25, 0.0, 0.0}, {0.0, 0.0, -0.25}, {-0.25, 0.0, 0.0}, {0.0, -0.75, 0.0}, {0.1, -0.6, -0.15}, {0.0, -0.5, -0.25}, {-0.1, -0.6, -0.15}, {0.0, -1.0, -0.5}};
|
||||
private static int[][] nVecPos = new int[][]{{0, 1, 2, 3}, {0, 3, 4, 1}, {1, 5, 6, 2}, {3, 2, 6, 7}, {3, 7, 8, 4}, {1, 4, 8, 5}, {6, 5, 9, 10}, {6, 10, 11, 7}, {8, 7, 11, 12}, {8, 12, 9, 5}, {10, 9, 13, 11}, {12, 11, 13, 9}};
|
||||
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
|
||||
if (entity instanceof EntityDriveEx) {
|
||||
this.doDriveRender((EntityDriveEx)entity, d0, d1, d2, f, f1);
|
||||
}
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity var1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doDriveRender(EntityDriveEx entityDrive, double dX, double dY, double dZ, float f, float f1) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glDisable((int)3553);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
GL11.glBlendFunc((int)770, (int)1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ));
|
||||
GL11.glRotatef((float)entityDrive.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)(-entityDrive.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)entityDrive.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
|
||||
GL11.glScalef((float)0.25f, (float)1.0f, (float)1.0f);
|
||||
float lifetime = entityDrive.getLifeTime();
|
||||
float ticks = entityDrive.ticksExisted;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_I(entityDrive.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
|
||||
double dScale = 1.0;
|
||||
for (int idx = 0; idx < nVecPos.length; ++idx) {
|
||||
tessellator.addVertex(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
|
||||
}
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glEnable((int)3553);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* net.minecraft.client.renderer.Tessellator
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx_Zx;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public class RenderDriveEx_Zx
|
||||
extends Render {
|
||||
private static double[][] dVec = new double[][]{{0.0, 1.0, -0.5}, {0.0, 0.75, 0.0}, {0.1, 0.6, -0.15}, {0.0, 0.5, -0.25}, {-0.1, 0.6, -0.15}, {0.0, 0.0, 0.25}, {0.25, 0.0, 0.0}, {0.0, 0.0, -0.25}, {-0.25, 0.0, 0.0}, {0.0, -0.75, 0.0}, {0.1, -0.6, -0.15}, {0.0, -0.5, -0.25}, {-0.1, -0.6, -0.15}, {0.0, -1.0, -0.5}};
|
||||
private static int[][] nVecPos = new int[][]{{0, 1, 2, 3}, {0, 3, 4, 1}, {1, 5, 6, 2}, {3, 2, 6, 7}, {3, 7, 8, 4}, {1, 4, 8, 5}, {6, 5, 9, 10}, {6, 10, 11, 7}, {8, 7, 11, 12}, {8, 12, 9, 5}, {10, 9, 13, 11}, {12, 11, 13, 9}};
|
||||
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
|
||||
if (entity instanceof EntityDriveEx_Zx) {
|
||||
this.doDriveRender((EntityDriveEx_Zx)entity, d0, d1, d2, f, f1);
|
||||
}
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity var1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doDriveRender(EntityDriveEx_Zx entityDrive, double dX, double dY, double dZ, float f, float f1) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glDisable((int)3553);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
GL11.glBlendFunc((int)770, (int)1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ));
|
||||
GL11.glRotatef((float)entityDrive.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)(-entityDrive.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)entityDrive.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
|
||||
GL11.glScalef((float)0.5f, (float)2.0f, (float)2.0f);
|
||||
float lifetime = entityDrive.getLifeTime();
|
||||
float ticks = entityDrive.ticksExisted;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_I(entityDrive.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
|
||||
double dScale = 1.0;
|
||||
for (int idx = 0; idx < nVecPos.length; ++idx) {
|
||||
tessellator.addVertex(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
|
||||
}
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glEnable((int)3553);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.client.model.obj.Util
|
||||
* mods.flammpfeil.slashblade.client.renderer.GlStateManager
|
||||
* net.minecraft.client.renderer.OpenGlHelper
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.client.renderer.texture.TextureManager
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* net.minecraftforge.client.model.AdvancedModelLoader
|
||||
* net.minecraftforge.client.model.IModelCustom
|
||||
* net.minecraftforge.client.model.obj.WavefrontObject
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityTanMU;
|
||||
import java.awt.Color;
|
||||
import mods.flammpfeil.slashblade.client.model.obj.Util;
|
||||
import mods.flammpfeil.slashblade.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderHuDie
|
||||
extends Render {
|
||||
public static IModelCustom model = null;
|
||||
public static ResourceLocation modelLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/HuDie.obj");
|
||||
public static ResourceLocation textureLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/HuDie.png");
|
||||
|
||||
private TextureManager engine() {
|
||||
return this.renderManager.renderEngine;
|
||||
}
|
||||
|
||||
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
this.renderModel(entity, x, y, z, yaw, partialRenderTick);
|
||||
}
|
||||
|
||||
public void renderModel(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
if (model == null && (model = AdvancedModelLoader.loadModel((ResourceLocation)modelLocation)) instanceof WavefrontObject) {
|
||||
Util.replaceFace((WavefrontObject)((WavefrontObject)model));
|
||||
}
|
||||
this.bindEntityTexture(entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib((int)1048575);
|
||||
GL11.glShadeModel((int)7425);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
int color = 14423100;
|
||||
int lifetime = 20;
|
||||
if (entity instanceof EntityTanMU) {
|
||||
color = ((EntityTanMU)entity).getColor();
|
||||
lifetime = ((EntityTanMU)entity).getLifeTime();
|
||||
}
|
||||
boolean inverse = color < 0;
|
||||
double deathTime = lifetime;
|
||||
double baseAlpha = Math.sin(1.5707963267948966 * (Math.min(deathTime, (double)((float)(lifetime - entity.ticksExisted) - partialRenderTick)) / deathTime));
|
||||
int seed = entity.getEntityData().getInteger("seed");
|
||||
int baseColor = color;
|
||||
Color col = new Color(baseColor);
|
||||
float[] hsb = Color.RGBtoHSB(col.getRed(), col.getGreen(), col.getBlue(), null);
|
||||
baseColor = Color.getHSBColor(0.5f + hsb[0], hsb[1], 0.2f).getRGB() & 0xFFFFFF;
|
||||
baseColor |= (int)(102.0 * baseAlpha) << 24;
|
||||
GL11.glTranslatef((float)((float)x), (float)((float)y), (float)((float)z));
|
||||
float rotParTicks = 40.0f;
|
||||
float rot = (float)entity.ticksExisted % rotParTicks / rotParTicks * 360.0f + partialRenderTick * (360.0f / rotParTicks);
|
||||
float scale = 0.01f;
|
||||
GL11.glScalef((float)scale, (float)scale, (float)scale);
|
||||
float lastx = OpenGlHelper.lastBrightnessX;
|
||||
float lasty = OpenGlHelper.lastBrightnessY;
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)240.0f, (float)240.0f);
|
||||
Color tmpColor = new Color(baseColor, true);
|
||||
GL11.glColor4f((float)((float)tmpColor.getRed() / 220.0f), (float)((float)tmpColor.getGreen() / 20.0f), (float)((float)tmpColor.getBlue() / 60.0f), (float)((float)tmpColor.getAlpha() / 255.0f));
|
||||
OpenGlHelper.glBlendFunc((int)770, (int)1, (int)1, (int)0);
|
||||
GlStateManager.glBlendEquation((int)32779);
|
||||
GL11.glPushMatrix();
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
GL11.glScaled((double)0.95, (double)0.95, (double)0.95);
|
||||
model.renderPart("base");
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
int loop = 3;
|
||||
for (int i = 0; i < loop; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
float ticks = 15.0f;
|
||||
float wave = ((float)entity.ticksExisted + ticks / (float)loop * (float)i + partialRenderTick) % ticks;
|
||||
double waveScale = 1.0 + 0.03 * (double)wave;
|
||||
GL11.glScaled((double)waveScale, (double)waveScale, (double)waveScale);
|
||||
Color tmpColor2 = new Color(baseColor & 0xFFFFFF | (int)(136.0f * ((ticks - wave) / ticks)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor2.getRed() / 220.0f), (float)((float)tmpColor2.getGreen() / 20.0f), (float)((float)tmpColor2.getBlue() / 60.0f), (float)((float)tmpColor2.getAlpha() / 255.0f));
|
||||
model.renderPart("base");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GlStateManager.glBlendEquation((int)32774);
|
||||
int windCount = 5;
|
||||
for (int i = 0; i < windCount; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((double)(360.0 / (double)windCount * (double)i), (double)1.0, (double)0.0, (double)0.0);
|
||||
GL11.glRotated((double)30.0, (double)0.0, (double)1.0, (double)0.0);
|
||||
double rotWind = 18.0;
|
||||
double offsetBase = 7.0;
|
||||
double offset = (double)i * offsetBase;
|
||||
double motionLen = offsetBase * (double)(windCount - 1);
|
||||
double ticks = (float)entity.ticksExisted + partialRenderTick + (float)seed;
|
||||
double offsetTicks = ticks + offset;
|
||||
double progress = offsetTicks % motionLen / motionLen;
|
||||
double rad = Math.PI * 2;
|
||||
Color tmpColor3 = new Color(color & 0xFFFFFF | (int)Math.min(0.0, 255.0 * Math.sin(rad *= progress)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor3.getRed() / 255.0f), (float)((float)tmpColor3.getGreen() / 0.0f), (float)((float)tmpColor3.getBlue() / 0.0f), (float)((float)tmpColor3.getAlpha() / 255.0f));
|
||||
double windScale = 0.4 + progress;
|
||||
GL11.glScaled((double)windScale, (double)windScale, (double)windScale);
|
||||
GL11.glRotated((double)(rotWind * offsetTicks), (double)0.0, (double)0.0, (double)1.0);
|
||||
model.renderPart("wind");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)lastx, (float)lasty);
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glShadeModel((int)7424);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return textureLocation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cpw.mods.fml.relauncher.Side
|
||||
* cpw.mods.fml.relauncher.SideOnly
|
||||
* net.minecraft.client.renderer.Tessellator
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityPhantomSwordBaseEx;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
public class RenderPhantomSwordBaseEx
|
||||
extends Render {
|
||||
private static double[][] dVec = new double[][]{{0.0, 0.0, 417.7431}, {0.0, -44.6113, -30.0}, {38.9907, 0.0, -20.0}, {0.0, 44.6113, -30.0}, {-38.9907, 0.0, -20.0}, {30.9907, 0.0, -50.0}, {-30.9907, 0.0, -50.0}, {0.0, 0.0, -214.0305}, {159.1439, 0.0, -30.0}, {-159.1439, 0.0, -30.0}};
|
||||
private static int[][] nVecPos = new int[][]{{0, 2, 1}, {0, 3, 2}, {0, 4, 3}, {0, 1, 4}, {1, 5, 7}, {5, 3, 7}, {3, 6, 7}, {6, 1, 7}, {2, 8, 1}, {5, 8, 3}, {4, 9, 3}, {6, 9, 1}, {1, 8, 5}, {1, 9, 4}, {3, 8, 2}, {3, 9, 6}};
|
||||
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
|
||||
if (entity instanceof EntityPhantomSwordBaseEx) {
|
||||
this.doDriveRender((EntityPhantomSwordBaseEx)entity, d0, d1, d2, f, f1);
|
||||
}
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity var1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doDriveRender(EntityPhantomSwordBaseEx entityPhantomSword, double dX, double dY, double dZ, float f, float f1) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glDisable((int)3553);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
int color = entityPhantomSword.getColor();
|
||||
boolean inverse = color < 0;
|
||||
color = Math.abs(color);
|
||||
if (!inverse) {
|
||||
GL11.glBlendFunc((int)770, (int)1);
|
||||
} else {
|
||||
GL11.glBlendFunc((int)775, (int)0);
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ));
|
||||
GL11.glRotatef((float)this.lerpDegrees(entityPhantomSword.prevRotationYaw, entityPhantomSword.rotationYaw, f1), (float)0.0f, (float)1.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)(-this.lerpDegrees(entityPhantomSword.prevRotationPitch, entityPhantomSword.rotationPitch, f1)), (float)1.0f, (float)0.0f, (float)0.0f);
|
||||
GL11.glRotatef((float)entityPhantomSword.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
|
||||
float scale = 0.0045f;
|
||||
GL11.glScalef((float)scale, (float)scale, (float)scale);
|
||||
GL11.glScalef((float)0.5f, (float)0.5f, (float)1.0f);
|
||||
float lifetime = entityPhantomSword.getLifeTime();
|
||||
float ticks = entityPhantomSword.ticksExisted;
|
||||
tessellator.startDrawing(4);
|
||||
tessellator.setColorRGBA_I(color, 255);
|
||||
double dScale = 1.0;
|
||||
for (int idx = 0; idx < nVecPos.length; ++idx) {
|
||||
tessellator.addVertex(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
|
||||
tessellator.addVertex(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
|
||||
}
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glEnable((int)3553);
|
||||
}
|
||||
|
||||
float lerp(float start, float end, float percent) {
|
||||
return start + percent * (end - start);
|
||||
}
|
||||
|
||||
float lerpDegrees(float start, float end, float percent) {
|
||||
float diff;
|
||||
for (diff = end - start; diff < -180.0f; diff += 360.0f) {
|
||||
}
|
||||
while (diff >= 180.0f) {
|
||||
diff -= 360.0f;
|
||||
}
|
||||
return start + percent * diff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.client.model.obj.Util
|
||||
* mods.flammpfeil.slashblade.client.renderer.GlStateManager
|
||||
* net.minecraft.client.renderer.OpenGlHelper
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.client.renderer.texture.TextureManager
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* net.minecraftforge.client.model.AdvancedModelLoader
|
||||
* net.minecraftforge.client.model.IModelCustom
|
||||
* net.minecraftforge.client.model.obj.WavefrontObject
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntitySlashDimensionEx;
|
||||
import java.awt.Color;
|
||||
import mods.flammpfeil.slashblade.client.model.obj.Util;
|
||||
import mods.flammpfeil.slashblade.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSlashDimensionEx
|
||||
extends Render {
|
||||
public static IModelCustom model = null;
|
||||
public static ResourceLocation modelLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/slashdimEx.obj");
|
||||
public static ResourceLocation textureLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/slashdimEx.png");
|
||||
|
||||
private TextureManager engine() {
|
||||
return this.renderManager.renderEngine;
|
||||
}
|
||||
|
||||
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
this.renderModel(entity, x, y, z, yaw, partialRenderTick);
|
||||
}
|
||||
|
||||
public void renderModel(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
if (model == null && (model = AdvancedModelLoader.loadModel((ResourceLocation)modelLocation)) instanceof WavefrontObject) {
|
||||
Util.replaceFace((WavefrontObject)((WavefrontObject)model));
|
||||
}
|
||||
this.bindEntityTexture(entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib((int)1048575);
|
||||
GL11.glShadeModel((int)7425);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
int color = 0x5555FF;
|
||||
int lifetime = 20;
|
||||
if (entity instanceof EntitySlashDimensionEx) {
|
||||
color = ((EntitySlashDimensionEx)entity).getColor();
|
||||
lifetime = ((EntitySlashDimensionEx)entity).getLifeTime();
|
||||
}
|
||||
boolean inverse = color < 0;
|
||||
double deathTime = lifetime;
|
||||
double baseAlpha = Math.sin(1.5707963267948966 * (Math.min(deathTime, (double)((float)(lifetime - entity.ticksExisted) - partialRenderTick)) / deathTime));
|
||||
int seed = entity.getEntityData().getInteger("seed");
|
||||
int baseColor = color;
|
||||
Color col = new Color(baseColor);
|
||||
float[] hsb = Color.RGBtoHSB(col.getRed(), col.getGreen(), col.getBlue(), null);
|
||||
baseColor = Color.getHSBColor(0.5f + hsb[0], hsb[1], 0.2f).getRGB() & 0xFFFFFF;
|
||||
baseColor |= (int)(102.0 * baseAlpha) << 24;
|
||||
GL11.glTranslatef((float)((float)x), (float)((float)y), (float)((float)z));
|
||||
float rotParTicks = 40.0f;
|
||||
float rot = (float)entity.ticksExisted % rotParTicks / rotParTicks * 360.0f + partialRenderTick * (360.0f / rotParTicks);
|
||||
float scale = 0.01f;
|
||||
GL11.glScalef((float)scale, (float)scale, (float)scale);
|
||||
float lastx = OpenGlHelper.lastBrightnessX;
|
||||
float lasty = OpenGlHelper.lastBrightnessY;
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)240.0f, (float)240.0f);
|
||||
Color tmpColor = new Color(baseColor, true);
|
||||
GL11.glColor4f((float)((float)tmpColor.getRed() / 255.0f), (float)((float)tmpColor.getGreen() / 255.0f), (float)((float)tmpColor.getBlue() / 255.0f), (float)((float)tmpColor.getAlpha() / 255.0f));
|
||||
OpenGlHelper.glBlendFunc((int)770, (int)1, (int)1, (int)0);
|
||||
GlStateManager.glBlendEquation((int)32779);
|
||||
GL11.glPushMatrix();
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
GL11.glScaled((double)0.95, (double)0.95, (double)0.95);
|
||||
model.renderPart("base");
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
int loop = 3;
|
||||
for (int i = 0; i < loop; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
float ticks = 15.0f;
|
||||
float wave = ((float)entity.ticksExisted + ticks / (float)loop * (float)i + partialRenderTick) % ticks;
|
||||
double waveScale = 1.0 + 0.03 * (double)wave;
|
||||
GL11.glScaled((double)waveScale, (double)waveScale, (double)waveScale);
|
||||
Color tmpColor2 = new Color(baseColor & 0xFFFFFF | (int)(136.0f * ((ticks - wave) / ticks)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor2.getRed() / 255.0f), (float)((float)tmpColor2.getGreen() / 255.0f), (float)((float)tmpColor2.getBlue() / 255.0f), (float)((float)tmpColor2.getAlpha() / 255.0f));
|
||||
model.renderPart("base");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GlStateManager.glBlendEquation((int)32774);
|
||||
int windCount = 5;
|
||||
for (int i = 0; i < windCount; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((double)(360.0 / (double)windCount * (double)i), (double)1.0, (double)0.0, (double)0.0);
|
||||
GL11.glRotated((double)30.0, (double)0.0, (double)1.0, (double)0.0);
|
||||
double rotWind = 18.0;
|
||||
double offsetBase = 7.0;
|
||||
double offset = (double)i * offsetBase;
|
||||
double motionLen = offsetBase * (double)(windCount - 1);
|
||||
double ticks = (float)entity.ticksExisted + partialRenderTick + (float)seed;
|
||||
double offsetTicks = ticks + offset;
|
||||
double progress = offsetTicks % motionLen / motionLen;
|
||||
double rad = Math.PI * 2;
|
||||
Color tmpColor3 = new Color(color & 0xFFFFFF | (int)Math.min(0.0, 255.0 * Math.sin(rad *= progress)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor3.getRed() / 255.0f), (float)((float)tmpColor3.getGreen() / 255.0f), (float)((float)tmpColor3.getBlue() / 255.0f), (float)((float)tmpColor3.getAlpha() / 255.0f));
|
||||
double windScale = 0.4 + progress;
|
||||
GL11.glScaled((double)windScale, (double)windScale, (double)windScale);
|
||||
GL11.glRotated((double)(rotWind * offsetTicks), (double)0.0, (double)0.0, (double)1.0);
|
||||
model.renderPart("wind");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)lastx, (float)lasty);
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glShadeModel((int)7424);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return textureLocation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.client.model.obj.Util
|
||||
* mods.flammpfeil.slashblade.client.renderer.GlStateManager
|
||||
* net.minecraft.client.renderer.OpenGlHelper
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.client.renderer.texture.TextureManager
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* net.minecraftforge.client.model.AdvancedModelLoader
|
||||
* net.minecraftforge.client.model.IModelCustom
|
||||
* net.minecraftforge.client.model.obj.WavefrontObject
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntitySlashDimensionEx;
|
||||
import java.awt.Color;
|
||||
import mods.flammpfeil.slashblade.client.model.obj.Util;
|
||||
import mods.flammpfeil.slashblade.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSword
|
||||
extends Render {
|
||||
public static IModelCustom model = null;
|
||||
public static ResourceLocation modelLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/Sword.obj");
|
||||
public static ResourceLocation textureLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/slashdimEx.png");
|
||||
|
||||
private TextureManager engine() {
|
||||
return this.renderManager.renderEngine;
|
||||
}
|
||||
|
||||
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
this.renderModel(entity, x, y, z, yaw, partialRenderTick);
|
||||
}
|
||||
|
||||
public void renderModel(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
if (model == null && (model = AdvancedModelLoader.loadModel((ResourceLocation)modelLocation)) instanceof WavefrontObject) {
|
||||
Util.replaceFace((WavefrontObject)((WavefrontObject)model));
|
||||
}
|
||||
this.bindEntityTexture(entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib((int)1048575);
|
||||
GL11.glShadeModel((int)7425);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
int color = 0x5555FF;
|
||||
int lifetime = 20;
|
||||
if (entity instanceof EntitySlashDimensionEx) {
|
||||
color = ((EntitySlashDimensionEx)entity).getColor();
|
||||
lifetime = ((EntitySlashDimensionEx)entity).getLifeTime();
|
||||
}
|
||||
boolean inverse = color < 0;
|
||||
double deathTime = lifetime;
|
||||
double baseAlpha = Math.sin(1.5707963267948966 * (Math.min(deathTime, (double)((float)(lifetime - entity.ticksExisted) - partialRenderTick)) / deathTime));
|
||||
int seed = entity.getEntityData().getInteger("seed");
|
||||
int baseColor = color;
|
||||
Color col = new Color(baseColor);
|
||||
float[] hsb = Color.RGBtoHSB(col.getRed(), col.getGreen(), col.getBlue(), null);
|
||||
baseColor = Color.getHSBColor(0.5f + hsb[0], hsb[1], 0.2f).getRGB() & 0xFFFFFF;
|
||||
baseColor |= (int)(102.0 * baseAlpha) << 24;
|
||||
GL11.glTranslatef((float)((float)x), (float)((float)y), (float)((float)z));
|
||||
float rotParTicks = 40.0f;
|
||||
float rot = (float)entity.ticksExisted % rotParTicks / rotParTicks * 360.0f + partialRenderTick * (360.0f / rotParTicks);
|
||||
float scale = 0.01f;
|
||||
GL11.glScalef((float)scale, (float)scale, (float)scale);
|
||||
float lastx = OpenGlHelper.lastBrightnessX;
|
||||
float lasty = OpenGlHelper.lastBrightnessY;
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)240.0f, (float)240.0f);
|
||||
Color tmpColor = new Color(baseColor, true);
|
||||
GL11.glColor4f((float)((float)tmpColor.getRed() / 255.0f), (float)((float)tmpColor.getGreen() / 255.0f), (float)((float)tmpColor.getBlue() / 255.0f), (float)((float)tmpColor.getAlpha() / 255.0f));
|
||||
OpenGlHelper.glBlendFunc((int)770, (int)1, (int)1, (int)0);
|
||||
GlStateManager.glBlendEquation((int)32779);
|
||||
GL11.glPushMatrix();
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
GL11.glScaled((double)0.95, (double)0.95, (double)0.95);
|
||||
model.renderPart("base");
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
int loop = 3;
|
||||
for (int i = 0; i < loop; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
float ticks = 15.0f;
|
||||
float wave = ((float)entity.ticksExisted + ticks / (float)loop * (float)i + partialRenderTick) % ticks;
|
||||
double waveScale = 1.0 + 0.03 * (double)wave;
|
||||
GL11.glScaled((double)waveScale, (double)waveScale, (double)waveScale);
|
||||
Color tmpColor2 = new Color(baseColor & 0xFFFFFF | (int)(136.0f * ((ticks - wave) / ticks)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor2.getRed() / 255.0f), (float)((float)tmpColor2.getGreen() / 255.0f), (float)((float)tmpColor2.getBlue() / 255.0f), (float)((float)tmpColor2.getAlpha() / 255.0f));
|
||||
model.renderPart("base");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GlStateManager.glBlendEquation((int)32774);
|
||||
int windCount = 5;
|
||||
for (int i = 0; i < windCount; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((double)(360.0 / (double)windCount * (double)i), (double)1.0, (double)0.0, (double)0.0);
|
||||
GL11.glRotated((double)30.0, (double)0.0, (double)1.0, (double)0.0);
|
||||
double rotWind = 18.0;
|
||||
double offsetBase = 7.0;
|
||||
double offset = (double)i * offsetBase;
|
||||
double motionLen = offsetBase * (double)(windCount - 1);
|
||||
double ticks = (float)entity.ticksExisted + partialRenderTick + (float)seed;
|
||||
double offsetTicks = ticks + offset;
|
||||
double progress = offsetTicks % motionLen / motionLen;
|
||||
double rad = Math.PI * 2;
|
||||
Color tmpColor3 = new Color(color & 0xFFFFFF | (int)Math.min(0.0, 255.0 * Math.sin(rad *= progress)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor3.getRed() / 255.0f), (float)((float)tmpColor3.getGreen() / 255.0f), (float)((float)tmpColor3.getBlue() / 255.0f), (float)((float)tmpColor3.getAlpha() / 255.0f));
|
||||
double windScale = 0.4 + progress;
|
||||
GL11.glScaled((double)windScale, (double)windScale, (double)windScale);
|
||||
GL11.glRotated((double)(rotWind * offsetTicks), (double)0.0, (double)0.0, (double)1.0);
|
||||
model.renderPart("wind");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)lastx, (float)lasty);
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glShadeModel((int)7424);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return textureLocation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.client.model.obj.Util
|
||||
* mods.flammpfeil.slashblade.client.renderer.GlStateManager
|
||||
* net.minecraft.client.renderer.OpenGlHelper
|
||||
* net.minecraft.client.renderer.entity.Render
|
||||
* net.minecraft.client.renderer.texture.TextureManager
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.util.ResourceLocation
|
||||
* net.minecraftforge.client.model.AdvancedModelLoader
|
||||
* net.minecraftforge.client.model.IModelCustom
|
||||
* net.minecraftforge.client.model.obj.WavefrontObject
|
||||
* org.lwjgl.opengl.GL11
|
||||
*/
|
||||
package Zxsa.mods.zxsa.render;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityTanMU;
|
||||
import java.awt.Color;
|
||||
import mods.flammpfeil.slashblade.client.model.obj.Util;
|
||||
import mods.flammpfeil.slashblade.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderTanMU
|
||||
extends Render {
|
||||
public static IModelCustom model = null;
|
||||
public static ResourceLocation modelLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/TanMU.obj");
|
||||
public static ResourceLocation textureLocation = new ResourceLocation("flammpfeil.slashblade", "model/util/HuDie.png");
|
||||
|
||||
private TextureManager engine() {
|
||||
return this.renderManager.renderEngine;
|
||||
}
|
||||
|
||||
public void doRender(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
this.renderModel(entity, x, y, z, yaw, partialRenderTick);
|
||||
}
|
||||
|
||||
public void renderModel(Entity entity, double x, double y, double z, float yaw, float partialRenderTick) {
|
||||
if (model == null && (model = AdvancedModelLoader.loadModel((ResourceLocation)modelLocation)) instanceof WavefrontObject) {
|
||||
Util.replaceFace((WavefrontObject)((WavefrontObject)model));
|
||||
}
|
||||
this.bindEntityTexture(entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib((int)1048575);
|
||||
GL11.glShadeModel((int)7425);
|
||||
GL11.glDisable((int)2896);
|
||||
GL11.glEnable((int)3042);
|
||||
int color = 14423100;
|
||||
int lifetime = 20;
|
||||
if (entity instanceof EntityTanMU) {
|
||||
color = ((EntityTanMU)entity).getColor();
|
||||
lifetime = ((EntityTanMU)entity).getLifeTime();
|
||||
}
|
||||
boolean inverse = color < 0;
|
||||
double deathTime = lifetime;
|
||||
double baseAlpha = Math.sin(1.5707963267948966 * (Math.min(deathTime, (double)((float)(lifetime - entity.ticksExisted) - partialRenderTick)) / deathTime));
|
||||
int seed = entity.getEntityData().getInteger("seed");
|
||||
int baseColor = color;
|
||||
Color col = new Color(baseColor);
|
||||
float[] hsb = Color.RGBtoHSB(col.getRed(), col.getGreen(), col.getBlue(), null);
|
||||
baseColor = Color.getHSBColor(0.5f + hsb[0], hsb[1], 0.2f).getRGB() & 0xFFFFFF;
|
||||
baseColor |= (int)(102.0 * baseAlpha) << 24;
|
||||
GL11.glTranslatef((float)((float)x), (float)((float)y), (float)((float)z));
|
||||
float rotParTicks = 40.0f;
|
||||
float rot = (float)entity.ticksExisted % rotParTicks / rotParTicks * 360.0f + partialRenderTick * (360.0f / rotParTicks);
|
||||
float scale = 0.01f;
|
||||
GL11.glScalef((float)scale, (float)scale, (float)scale);
|
||||
float lastx = OpenGlHelper.lastBrightnessX;
|
||||
float lasty = OpenGlHelper.lastBrightnessY;
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)240.0f, (float)240.0f);
|
||||
Color tmpColor = new Color(baseColor, true);
|
||||
GL11.glColor4f((float)((float)tmpColor.getRed() / 255.0f), (float)((float)tmpColor.getGreen() / 255.0f), (float)((float)tmpColor.getBlue() / 255.0f), (float)((float)tmpColor.getAlpha() / 255.0f));
|
||||
OpenGlHelper.glBlendFunc((int)770, (int)1, (int)1, (int)0);
|
||||
GlStateManager.glBlendEquation((int)32779);
|
||||
GL11.glPushMatrix();
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
GL11.glScaled((double)0.95, (double)0.95, (double)0.95);
|
||||
model.renderPart("base");
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
int loop = 3;
|
||||
for (int i = 0; i < loop; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
float ticks = 15.0f;
|
||||
float wave = ((float)entity.ticksExisted + ticks / (float)loop * (float)i + partialRenderTick) % ticks;
|
||||
double waveScale = 1.0 + 0.03 * (double)wave;
|
||||
GL11.glScaled((double)waveScale, (double)waveScale, (double)waveScale);
|
||||
Color tmpColor2 = new Color(baseColor & 0xFFFFFF | (int)(136.0f * ((ticks - wave) / ticks)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor2.getRed() / 255.0f), (float)((float)tmpColor2.getGreen() / 255.0f), (float)((float)tmpColor2.getBlue() / 255.0f), (float)((float)tmpColor2.getAlpha() / 255.0f));
|
||||
model.renderPart("base");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GlStateManager.glBlendEquation((int)32774);
|
||||
int windCount = 5;
|
||||
for (int i = 0; i < windCount; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((double)(360.0 / (double)windCount * (double)i), (double)1.0, (double)0.0, (double)0.0);
|
||||
GL11.glRotated((double)30.0, (double)0.0, (double)1.0, (double)0.0);
|
||||
double rotWind = 18.0;
|
||||
double offsetBase = 7.0;
|
||||
double offset = (double)i * offsetBase;
|
||||
double motionLen = offsetBase * (double)(windCount - 1);
|
||||
double ticks = (float)entity.ticksExisted + partialRenderTick + (float)seed;
|
||||
double offsetTicks = ticks + offset;
|
||||
double progress = offsetTicks % motionLen / motionLen;
|
||||
double rad = Math.PI * 2;
|
||||
Color tmpColor3 = new Color(color & 0xFFFFFF | (int)Math.min(0.0, 255.0 * Math.sin(rad *= progress)) << 24, true);
|
||||
GL11.glColor4f((float)((float)tmpColor3.getRed() / 0.0f), (float)((float)tmpColor3.getGreen() / 255.0f), (float)((float)tmpColor3.getBlue() / 255.0f), (float)((float)tmpColor3.getAlpha() / 255.0f));
|
||||
double windScale = 0.4 + progress;
|
||||
GL11.glScaled((double)windScale, (double)windScale, (double)windScale);
|
||||
GL11.glRotated((double)(rotWind * offsetTicks), (double)0.0, (double)0.0, (double)1.0);
|
||||
model.renderPart("wind");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glColor4f((float)1.0f, (float)1.0f, (float)1.0f, (float)1.0f);
|
||||
OpenGlHelper.setLightmapTextureCoords((int)OpenGlHelper.lightmapTexUnit, (float)lastx, (float)lasty);
|
||||
GL11.glDisable((int)3042);
|
||||
GL11.glEnable((int)2896);
|
||||
GL11.glShadeModel((int)7424);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return textureLocation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityDrive
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$SwordType
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.UntouchableTime
|
||||
* mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager
|
||||
* mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.util.MovingObjectPosition
|
||||
* net.minecraft.util.MovingObjectPosition$MovingObjectType
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityTanMU;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.EntityDrive;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.UntouchableTime;
|
||||
import mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not10_SA
|
||||
extends SpecialAttackBase
|
||||
implements IJustSpecialAttack,
|
||||
ISuperSpecialAttack {
|
||||
public String toString() {
|
||||
return "not10_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntityTanMU dim = new EntityTanMU(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
this.spawnParticle(world, target);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
}
|
||||
if (!target.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 0.5f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
EntityTanMU dim = new EntityTanMU(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Entity getEntityToWatch(EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
Entity target = null;
|
||||
for (int dist = 2; dist < 20; dist += 2) {
|
||||
AxisAlignedBB bb = player.boundingBox.copy();
|
||||
Vec3 vec = player.getLookVec();
|
||||
vec = vec.normalize();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
bb = bb.offset(vec.xCoord * (double)dist, vec.yCoord * (double)dist, vec.zCoord * (double)dist);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
float distance = 30.0f;
|
||||
for (Entity curEntity : list) {
|
||||
float curDist = curEntity.getDistanceToEntity((Entity)player);
|
||||
if (!(curDist < distance)) continue;
|
||||
target = curEntity;
|
||||
distance = curDist;
|
||||
}
|
||||
if (target != null) break;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
private void spawnParticle(World world, Entity target) {
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX + 1.0, target.posY + (double)target.height + 1.0, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height + 0.5, target.posZ + 1.0, 3.0, 3.0, 3.0);
|
||||
}
|
||||
|
||||
public void doJustSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntityTanMU dim = new EntityTanMU(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 5.0f);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(pos.xCoord - (double)motionX, pos.yCoord - (double)motionY, pos.zCoord - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntityTanMU dim;
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
player.onEnchantmentCritical(curEntity);
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
if (0 < level) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = target.rotationYaw + (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(target.posX - (double)motionX, target.posY + (double)target.getEyeHeight() / 2.0 - (double)motionY, target.posZ - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
if (!target.worldObj.isRemote && (dim = new EntityTanMU(world, (EntityLivingBase)player, magicDamage)) != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doSuperSpecialAttack(ItemStack stack, EntityPlayer player) {
|
||||
EntityJudgmentCutManager entityDA = new EntityJudgmentCutManager(player.worldObj, (EntityLivingBase)player);
|
||||
if (entityDA != null) {
|
||||
player.worldObj.spawnEntityInWorld((Entity)entityDA);
|
||||
}
|
||||
UntouchableTime.setUntouchableTime((Entity)player, (int)30, (boolean)true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityDrive
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$SwordType
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.UntouchableTime
|
||||
* mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager
|
||||
* mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.util.MovingObjectPosition
|
||||
* net.minecraft.util.MovingObjectPosition$MovingObjectType
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityHuDie;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.EntityDrive;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.UntouchableTime;
|
||||
import mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not11_SA
|
||||
extends SpecialAttackBase
|
||||
implements IJustSpecialAttack,
|
||||
ISuperSpecialAttack {
|
||||
public String toString() {
|
||||
return "not11_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 3.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntityHuDie dim = new EntityHuDie(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(20);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
this.spawnParticle(world, target);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
}
|
||||
if (!target.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.5f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
EntityHuDie dim = new EntityHuDie(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(20);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Entity getEntityToWatch(EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
Entity target = null;
|
||||
for (int dist = 2; dist < 20; dist += 2) {
|
||||
AxisAlignedBB bb = player.boundingBox.copy();
|
||||
Vec3 vec = player.getLookVec();
|
||||
vec = vec.normalize();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
bb = bb.offset(vec.xCoord * (double)dist, vec.yCoord * (double)dist, vec.zCoord * (double)dist);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
float distance = 30.0f;
|
||||
for (Entity curEntity : list) {
|
||||
float curDist = curEntity.getDistanceToEntity((Entity)player);
|
||||
if (!(curDist < distance)) continue;
|
||||
target = curEntity;
|
||||
distance = curDist;
|
||||
}
|
||||
if (target != null) break;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
private void spawnParticle(World world, Entity target) {
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX + 1.0, target.posY + (double)target.height + 1.0, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height + 0.5, target.posZ + 1.0, 3.0, 3.0, 3.0);
|
||||
}
|
||||
|
||||
public void doJustSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 3.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntityHuDie dim = new EntityHuDie(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(20);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 5.0f);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(pos.xCoord - (double)motionX, pos.yCoord - (double)motionY, pos.zCoord - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntityHuDie dim;
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
player.onEnchantmentCritical(curEntity);
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 3.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
if (0 < level) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = target.rotationYaw + (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(target.posX - (double)motionX, target.posY + (double)target.getEyeHeight() / 2.0 - (double)motionY, target.posZ - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
if (!target.worldObj.isRemote && (dim = new EntityHuDie(world, (EntityLivingBase)player, magicDamage)) != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(20);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doSuperSpecialAttack(ItemStack stack, EntityPlayer player) {
|
||||
EntityJudgmentCutManager entityDA = new EntityJudgmentCutManager(player.worldObj, (EntityLivingBase)player);
|
||||
if (entityDA != null) {
|
||||
player.worldObj.spawnEntityInWorld((Entity)entityDA);
|
||||
}
|
||||
UntouchableTime.setUntouchableTime((Entity)player, (int)30, (boolean)true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityPhantomSword
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import mods.flammpfeil.slashblade.EntityPhantomSword;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not12_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not12_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not12_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("random.anvil_break", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("largesmoke", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level / 1.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityPhantomSword entityDrive_VE;
|
||||
EntityPhantomSword entityDrive_VD;
|
||||
EntityPhantomSword entityDrive_VC;
|
||||
EntityPhantomSword entityDrive_VB;
|
||||
EntityPhantomSword entityDrive_VA;
|
||||
if (world.isRemote) continue;
|
||||
EntityPhantomSword entityDrive = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f);
|
||||
if (entityDrive != null) {
|
||||
entityDrive.setLocationAndAngles(player.posX - 1.0, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
if ((entityDrive_VA = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) != null) {
|
||||
entityDrive_VA.setLocationAndAngles(player.posX + 1.0, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_VA.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_VA.setLifeTime(50);
|
||||
entityDrive_VA.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_VA);
|
||||
}
|
||||
if ((entityDrive_VB = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) != null) {
|
||||
entityDrive_VB.setLocationAndAngles(player.posX - 1.0, player.posY + (double)player.getEyeHeight() / 2.0 - 0.5, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_VB.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_VB.setLifeTime(50);
|
||||
entityDrive_VB.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_VB);
|
||||
}
|
||||
if ((entityDrive_VC = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) != null) {
|
||||
entityDrive_VC.setLocationAndAngles(player.posX + 1.0, player.posY + (double)player.getEyeHeight() / 2.0 - 0.5, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_VC.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_VC.setLifeTime(50);
|
||||
entityDrive_VC.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_VC);
|
||||
}
|
||||
if ((entityDrive_VD = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) != null) {
|
||||
entityDrive_VD.setLocationAndAngles(player.posX - 1.0, player.posY + (double)player.getEyeHeight() / 2.0 - 1.0, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_VD.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_VD.setLifeTime(50);
|
||||
entityDrive_VD.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_VD);
|
||||
}
|
||||
if ((entityDrive_VE = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) == null) continue;
|
||||
entityDrive_VE.setLocationAndAngles(player.posX + 1.0, player.posY + (double)player.getEyeHeight() / 2.0 - 1.0, player.posZ - 1.0, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_VE.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_VE.setLifeTime(50);
|
||||
entityDrive_VE.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_VE);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not1_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not1_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not1_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("random.explode", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("happyVillager", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (1.1f + (float)level / 3.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityAquaEdge entityDrive;
|
||||
if (world.isRemote || (entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f)) == null) continue;
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setColor(3329330);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setIsMultiHit(true);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(90.0f + ItemSlashBlade.ComboSequence.Iai.swingDirection);
|
||||
entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive.setParticle("happyVillager");
|
||||
entityDrive.setSound("random.explode");
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not2_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not2_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not2_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("fire.fire", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("flame", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (2.2f + (float)level / 2.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityAquaEdge entityDrive;
|
||||
if (world.isRemote || (entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f)) == null) continue;
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setColor(255);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setIsMultiHit(true);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(0.0f);
|
||||
entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive.setParticle("flame");
|
||||
entityDrive.setSound("fire.fire");
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not3_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not3_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not3_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("ambient.weather.thunder", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("witchMagic", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level / 1.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityAquaEdge entityDrive_vA;
|
||||
if (world.isRemote) continue;
|
||||
EntityAquaEdge entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
|
||||
if (entityDrive != null) {
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setColor(0x7F00FF);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setIsMultiHit(true);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(0.0f);
|
||||
entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive.setParticle("witchMagic");
|
||||
entityDrive.setSound("ambient.weather.thunder");
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
if ((entityDrive_vA = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f)) == null) continue;
|
||||
entityDrive_vA.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_vA.setColor(0x7F00FF);
|
||||
entityDrive_vA.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_vA.setIsMultiHit(true);
|
||||
entityDrive_vA.setLifeTime(50);
|
||||
entityDrive_vA.setRoll(90.0f + ItemSlashBlade.ComboSequence.Iai.swingDirection);
|
||||
entityDrive_vA.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive_vA.setParticle("witchMagic");
|
||||
entityDrive_vA.setSound("ambient.weather.thunder");
|
||||
world.spawnEntityInWorld((Entity)entityDrive_vA);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityPhantomSword
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import mods.flammpfeil.slashblade.EntityPhantomSword;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not4_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not4_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not4_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("random.anvil_break", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("largesmoke", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level / 1.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityPhantomSword entityDrive;
|
||||
if (world.isRemote || (entityDrive = new EntityPhantomSword(world, (EntityLivingBase)player, (float)cost, 0.0f)) == null) continue;
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(0.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx_Zx;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not5_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not5_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not5_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("random.anvil_break", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("largesmoke", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level / 1.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityDriveEx_Zx entityDrive_vA;
|
||||
if (world.isRemote) continue;
|
||||
EntityAquaEdge entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
|
||||
if (entityDrive != null) {
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setColor(6045747);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setIsMultiHit(false);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(45.0f);
|
||||
entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive.setParticle("largesmoke");
|
||||
entityDrive.setSound("random.anvil_break");
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
if ((entityDrive_vA = new EntityDriveEx_Zx(world, (EntityLivingBase)player, cost, false, 0.0f)) == null) continue;
|
||||
entityDrive_vA.setColor(6045747);
|
||||
entityDrive_vA.setIsMultiHit(true);
|
||||
entityDrive_vA.setLifeTime(100);
|
||||
entityDrive_vA.setRoll(90.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive_vA);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityDrive
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$SwordType
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.UntouchableTime
|
||||
* mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager
|
||||
* mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.util.MovingObjectPosition
|
||||
* net.minecraft.util.MovingObjectPosition$MovingObjectType
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntitySlashDimensionEx;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.EntityDrive;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.UntouchableTime;
|
||||
import mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not6_SA
|
||||
extends SpecialAttackBase
|
||||
implements IJustSpecialAttack,
|
||||
ISuperSpecialAttack {
|
||||
public String toString() {
|
||||
return "not6_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntitySlashDimensionEx dim = new EntitySlashDimensionEx(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
this.spawnParticle(world, target);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
}
|
||||
if (!target.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 0.5f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
EntitySlashDimensionEx dim = new EntitySlashDimensionEx(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Entity getEntityToWatch(EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
Entity target = null;
|
||||
for (int dist = 2; dist < 20; dist += 2) {
|
||||
AxisAlignedBB bb = player.boundingBox.copy();
|
||||
Vec3 vec = player.getLookVec();
|
||||
vec = vec.normalize();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
bb = bb.offset(vec.xCoord * (double)dist, vec.yCoord * (double)dist, vec.zCoord * (double)dist);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
float distance = 30.0f;
|
||||
for (Entity curEntity : list) {
|
||||
float curDist = curEntity.getDistanceToEntity((Entity)player);
|
||||
if (!(curDist < distance)) continue;
|
||||
target = curEntity;
|
||||
distance = curDist;
|
||||
}
|
||||
if (target != null) break;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
private void spawnParticle(World world, Entity target) {
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX + 1.0, target.posY + (double)target.height + 1.0, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height + 0.5, target.posZ + 1.0, 3.0, 3.0, 3.0);
|
||||
}
|
||||
|
||||
public void doJustSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntitySlashDimensionEx dim = new EntitySlashDimensionEx(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 5.0f);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(pos.xCoord - (double)motionX, pos.yCoord - (double)motionY, pos.zCoord - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntitySlashDimensionEx dim;
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "mob.endermen.portal", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
player.onEnchantmentCritical(curEntity);
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
if (0 < level) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = target.rotationYaw + (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(target.posX - (double)motionX, target.posY + (double)target.getEyeHeight() / 2.0 - (double)motionY, target.posZ - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
if (!target.worldObj.isRemote && (dim = new EntitySlashDimensionEx(world, (EntityLivingBase)player, magicDamage)) != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doSuperSpecialAttack(ItemStack stack, EntityPlayer player) {
|
||||
EntityJudgmentCutManager entityDA = new EntityJudgmentCutManager(player.worldObj, (EntityLivingBase)player);
|
||||
if (entityDA != null) {
|
||||
player.worldObj.spawnEntityInWorld((Entity)entityDA);
|
||||
}
|
||||
UntouchableTime.setUntouchableTime((Entity)player, (int)30, (boolean)true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.EntityDrive
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$SwordType
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.ability.UntouchableTime
|
||||
* mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager
|
||||
* mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.block.Block
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.util.MathHelper
|
||||
* net.minecraft.util.MovingObjectPosition
|
||||
* net.minecraft.util.MovingObjectPosition$MovingObjectType
|
||||
* net.minecraft.util.Vec3
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntitySword;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.EntityDrive;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.ability.UntouchableTime;
|
||||
import mods.flammpfeil.slashblade.entity.EntityJudgmentCutManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.IJustSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.ISuperSpecialAttack;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not7_SA
|
||||
extends SpecialAttackBase
|
||||
implements IJustSpecialAttack,
|
||||
ISuperSpecialAttack {
|
||||
public String toString() {
|
||||
return "not7_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("random.anvil_break", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 5.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntitySword dim = new EntitySword(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
this.spawnParticle(world, target);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "random.anvil_break", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
}
|
||||
if (!target.worldObj.isRemote) {
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 2.5f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
EntitySword dim = new EntitySword(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Entity getEntityToWatch(EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
Entity target = null;
|
||||
for (int dist = 2; dist < 20; dist += 2) {
|
||||
AxisAlignedBB bb = player.boundingBox.copy();
|
||||
Vec3 vec = player.getLookVec();
|
||||
vec = vec.normalize();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
bb = bb.offset(vec.xCoord * (double)dist, vec.yCoord * (double)dist, vec.zCoord * (double)dist);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
float distance = 30.0f;
|
||||
for (Entity curEntity : list) {
|
||||
float curDist = curEntity.getDistanceToEntity((Entity)player);
|
||||
if (!(curDist < distance)) continue;
|
||||
target = curEntity;
|
||||
distance = curDist;
|
||||
}
|
||||
if (target != null) break;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
private void spawnParticle(World world, Entity target) {
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX + 1.0, target.posY + (double)target.height + 1.0, target.posZ, 3.0, 3.0, 3.0);
|
||||
world.spawnParticle("largeexplode", target.posX, target.posY + (double)target.height + 0.5, target.posZ + 1.0, 3.0, 3.0, 3.0);
|
||||
}
|
||||
|
||||
public void doJustSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
Entity tmp;
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
Entity target = null;
|
||||
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
|
||||
if (entityId != 0 && (tmp = world.getEntityByID(entityId)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
|
||||
target = tmp;
|
||||
}
|
||||
if (target == null) {
|
||||
target = this.getEntityToWatch(player);
|
||||
}
|
||||
if (target == null) {
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.playSound("random.anvil_break", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
if (!player.worldObj.isRemote) {
|
||||
Vec3 tmppos;
|
||||
Block block;
|
||||
Vec3 pos = player.getLookVec();
|
||||
float scale = 5.0f;
|
||||
pos.xCoord *= (double)scale;
|
||||
pos.yCoord *= (double)scale;
|
||||
pos.zCoord *= (double)scale;
|
||||
pos = pos.addVector(player.posX, player.posY, player.posZ);
|
||||
pos = pos.addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
Vec3 offset = Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ).addVector(0.0, (double)player.getEyeHeight(), 0.0);
|
||||
Vec3 look = player.getLookVec();
|
||||
Vec3 offsettedLook = offset.addVector(look.xCoord * 5.0, look.yCoord * 5.0, look.zCoord * 5.0);
|
||||
MovingObjectPosition movingobjectposition = world.rayTraceBlocks(offset, offsettedLook);
|
||||
if (movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && (block = world.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ)) != null && block.isCollidable() && 1.0 < (tmppos = Vec3.createVectorHelper((double)movingobjectposition.hitVec.xCoord, (double)movingobjectposition.hitVec.yCoord, (double)movingobjectposition.hitVec.zCoord)).distanceTo(Vec3.createVectorHelper((double)player.posX, (double)player.posY, (double)player.posZ))) {
|
||||
pos = tmppos;
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 5.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.5f + (float)level / 1.0f);
|
||||
EntitySword dim = new EntitySword(world, (EntityLivingBase)player, magicDamage);
|
||||
if (dim != null) {
|
||||
dim.setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 5.0f);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(pos.xCoord - (double)motionX, pos.yCoord - (double)motionY, pos.zCoord - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntitySword dim;
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "random.anvil_break", 0.5f, 1.0f);
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
|
||||
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
|
||||
}
|
||||
AxisAlignedBB bb = target.boundingBox.copy();
|
||||
bb = bb.expand(2.0, 0.25, 2.0);
|
||||
List<Entity> list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
|
||||
if (!ItemSlashBlade.AttackableSelector.isEntityApplicable(target)) {
|
||||
list.add(target);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
for (Entity curEntity : list) {
|
||||
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.SlashDim);
|
||||
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
|
||||
player.onEnchantmentCritical(curEntity);
|
||||
}
|
||||
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
|
||||
float magicDamage = 5.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 1.0f);
|
||||
if (0 < level) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
EntityDrive entityDrive = new EntityDrive(world, (EntityLivingBase)player, Math.min(1.0f, magicDamage / 3.0f), false, 0.0f);
|
||||
float rotationYaw = target.rotationYaw + (float)(60 * i) + (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float rotationPitch = (entityDrive.getRand().nextFloat() - 0.5f) * 60.0f;
|
||||
float fYawDtoR = rotationYaw / 180.0f * (float)Math.PI;
|
||||
float fPitDtoR = rotationPitch / 180.0f * (float)Math.PI;
|
||||
float fYVecOfst = 0.5f;
|
||||
float motionX = -MathHelper.sin((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
float motionY = -MathHelper.sin((float)fPitDtoR) * fYVecOfst;
|
||||
float motionZ = MathHelper.cos((float)fYawDtoR) * MathHelper.cos((float)fPitDtoR) * fYVecOfst * 2.0f;
|
||||
entityDrive.setLocationAndAngles(target.posX - (double)motionX, target.posY + (double)target.getEyeHeight() / 2.0 - (double)motionY, target.posZ - (double)motionZ, rotationYaw, rotationPitch);
|
||||
entityDrive.setDriveVector(fYVecOfst);
|
||||
entityDrive.setLifeTime(8);
|
||||
entityDrive.setIsMultiHit(false);
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
EnumSet type = blade.getSwordType(stack);
|
||||
entityDrive.setIsSlashDimension(type.contains(ItemSlashBlade.SwordType.FiercerEdge));
|
||||
}
|
||||
entityDrive.setRoll(90.0f + 120.0f * (entityDrive.getRand().nextFloat() - 0.5f));
|
||||
if (entityDrive == null) continue;
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
}
|
||||
if (!target.worldObj.isRemote && (dim = new EntitySword(world, (EntityLivingBase)player, magicDamage)) != null) {
|
||||
dim.setPosition(target.posX, target.posY + (double)target.height / 2.0, target.posZ);
|
||||
dim.setLifeTime(30);
|
||||
dim.setIsSlashDimension(true);
|
||||
world.spawnEntityInWorld((Entity)dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doSuperSpecialAttack(ItemStack stack, EntityPlayer player) {
|
||||
EntityJudgmentCutManager entityDA = new EntityJudgmentCutManager(player.worldObj, (EntityLivingBase)player);
|
||||
if (entityDA != null) {
|
||||
player.worldObj.spawnEntityInWorld((Entity)entityDA);
|
||||
}
|
||||
UntouchableTime.setUntouchableTime((Entity)player, (int)30, (boolean)true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityAquaEdge;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not8_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not8_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not8_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("portal.travel", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("magicCrit", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (1.1f + (float)level / 3.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
if (world.isRemote) continue;
|
||||
EntityAquaEdge entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
|
||||
if (entityDrive != null) {
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setColor(3329330);
|
||||
entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive.setIsMultiHit(true);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setRoll(90.0f + ItemSlashBlade.ComboSequence.Iai.swingDirection);
|
||||
entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive.setInitialSpeed(1.0f);
|
||||
entityDrive.setParticle("magicCrit");
|
||||
entityDrive.setSound("random.explode");
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
}
|
||||
EntityAquaEdge entityDrive_vA = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
|
||||
if (entityDrive != null) {
|
||||
entityDrive_vA.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_vA.setColor(255);
|
||||
entityDrive_vA.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_vA.setIsMultiHit(true);
|
||||
entityDrive_vA.setLifeTime(50);
|
||||
entityDrive_vA.setRoll(90.0f + ItemSlashBlade.ComboSequence.Iai.swingDirection);
|
||||
entityDrive_vA.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive_vA.setInitialSpeed(2.0f);
|
||||
entityDrive_vA.setParticle("magicCrit");
|
||||
entityDrive_vA.setSound("fire.fire");
|
||||
world.spawnEntityInWorld((Entity)entityDrive_vA);
|
||||
}
|
||||
EntityAquaEdge entityDrive_vB = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
|
||||
if (entityDrive == null) continue;
|
||||
entityDrive_vB.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive_vB.setColor(0x7F00FF);
|
||||
entityDrive_vB.setDriveVector(1.2f + (float)(j * 2 / 5));
|
||||
entityDrive_vB.setIsMultiHit(true);
|
||||
entityDrive_vB.setLifeTime(50);
|
||||
entityDrive_vB.setRoll(90.0f + ItemSlashBlade.ComboSequence.Iai.swingDirection);
|
||||
entityDrive_vB.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i);
|
||||
entityDrive_vB.setInitialSpeed(3.0f);
|
||||
entityDrive_vB.setParticle("magicCrit");
|
||||
entityDrive_vB.setSound("ambient.weather.thunder");
|
||||
world.spawnEntityInWorld((Entity)entityDrive_vB);
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade
|
||||
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager
|
||||
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
|
||||
* mods.flammpfeil.slashblade.specialattack.SpecialAttackBase
|
||||
* net.minecraft.enchantment.Enchantment
|
||||
* net.minecraft.enchantment.EnchantmentHelper
|
||||
* net.minecraft.entity.Entity
|
||||
* net.minecraft.entity.EntityLivingBase
|
||||
* net.minecraft.entity.player.EntityPlayer
|
||||
* net.minecraft.item.ItemStack
|
||||
* net.minecraft.nbt.NBTTagCompound
|
||||
* net.minecraft.util.AxisAlignedBB
|
||||
* net.minecraft.world.World
|
||||
*/
|
||||
package Zxsa.mods.zxsa.specialattack;
|
||||
|
||||
import Zxsa.mods.zxsa.entity.EntityDriveEx_Zx;
|
||||
import Zxsa.mods.zxsa.entity.EntityNoFireLightningBoltEx;
|
||||
import java.util.List;
|
||||
import mods.flammpfeil.slashblade.ItemSlashBlade;
|
||||
import mods.flammpfeil.slashblade.ability.StylishRankManager;
|
||||
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Not9_SA
|
||||
extends SpecialAttackBase {
|
||||
public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not9_SA", (float)0.5f);
|
||||
|
||||
public String toString() {
|
||||
return "not9_sa";
|
||||
}
|
||||
|
||||
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
|
||||
World world = player.worldObj;
|
||||
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
|
||||
player.playSound("mob.endermen.portal", 1.0f, 1.5f);
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
double d0 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d1 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d2 = player.getRNG().nextGaussian() * 0.02;
|
||||
double d3 = 10.0;
|
||||
player.worldObj.spawnParticle("portal", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2);
|
||||
}
|
||||
if (player.isBurning()) {
|
||||
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
|
||||
player.extinguish();
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
int cost = -20;
|
||||
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
|
||||
stack.damageItem(10, (EntityLivingBase)player);
|
||||
}
|
||||
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
|
||||
float baseModif = blade.getBaseAttackModifiers(tag);
|
||||
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack));
|
||||
float magicDamage = baseModif * 1.5f;
|
||||
int rank = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank) {
|
||||
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (1.1f + (float)level / 3.0f);
|
||||
}
|
||||
if (7 <= rank) {
|
||||
magicDamage *= 2.0f;
|
||||
}
|
||||
int maxCol = 3;
|
||||
int maxCount = 3;
|
||||
double radBaseRot = Math.toRadians(player.rotationYaw);
|
||||
double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3);
|
||||
for (int j = 0; j < maxCol; ++j) {
|
||||
for (int i = 0; i < maxCount; ++i) {
|
||||
EntityDriveEx_Zx entityDrive;
|
||||
if (world.isRemote || (entityDrive = new EntityDriveEx_Zx(world, (EntityLivingBase)player, magicDamage, false, 0.0f)) == null) continue;
|
||||
entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch);
|
||||
entityDrive.setIsMultiHit(true);
|
||||
entityDrive.setLifeTime(50);
|
||||
entityDrive.setColor(0xFFFF00);
|
||||
entityDrive.setRoll(0.0f);
|
||||
entityDrive.setInitialSpeed(1.0f);
|
||||
world.spawnEntityInWorld((Entity)entityDrive);
|
||||
double dAmbit = 12.0;
|
||||
AxisAlignedBB bb2 = AxisAlignedBB.getBoundingBox((double)(player.posX - dAmbit), (double)(player.posY - dAmbit), (double)(player.posZ - dAmbit), (double)(player.posX + dAmbit), (double)(player.posY + dAmbit), (double)(player.posZ + dAmbit));
|
||||
List<Entity> list2 = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb2, ItemSlashBlade.AttackableSelector);
|
||||
boolean count = false;
|
||||
for (Entity curEntity : list2) {
|
||||
float magicDamage_2 = 7.0f;
|
||||
int rank2 = StylishRankManager.getStylishRank((Entity)player);
|
||||
if (5 <= rank2) {
|
||||
magicDamage_2 += 3.0f;
|
||||
}
|
||||
if (7 <= rank2) {
|
||||
magicDamage_2 *= 2.0f;
|
||||
}
|
||||
world.addWeatherEffect((Entity)new EntityNoFireLightningBoltEx(world, curEntity.posX, curEntity.posY, curEntity.posZ, curEntity, ItemSlashBlade.AttackableSelector, (Entity)player, magicDamage_2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Summary for _client-1.7.10-real\mods\【拔刀剑】技能SlashBlade-ZxSa-r6vB -OfficialEdition-.jar
|
||||
Decompiled with CFR 0.152
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
flammpfeil.slashblade.specialattack.not1_sa=虚·「开辟千山的翠绿地平线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not2_sa=绝·「焚驱万海的拂晓水平线」
|
||||
|
||||
|
||||
flammpfeil.slashblade.specialattack.not3_sa=极·「轰震星宿的环宇天界线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not5_sa=空·「织罗空间的维度平行线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not4_sa=鱼·「脑子一热的咸鱼追踪线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not6_sa=元·「捏造次元的黑球次元线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not7_sa=刃·「虚物为实的幻影刀剑线」
|
||||
|
||||
|
||||
flammpfeil.slashblade.specialattack.not8_sa=炫·「构成光觉的色系彩平线」
|
||||
|
||||
flammpfeil.slashblade.specialattack.not9_sa=闪·「电光一闪的气象云平线」
|
||||
|
||||
|
||||
flammpfeil.slashblade.specialattack.not10_sa=政·「闲的蛋疼的弹幕球平线」
|
||||
|
||||
|
||||
flammpfeil.slashblade.specialattack.not12_sa=剑·「六道残影的剑气幻想线」
|
||||
|
||||
|
||||
flammpfeil.slashblade.specialattack.not11_sa=华灵「蝶妄想」
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 168 B |
@@ -0,0 +1,550 @@
|
||||
# Created by Metasequoia
|
||||
|
||||
v -134.451370 -107.569611 19.047298
|
||||
v -133.216705 -100.414352 18.565025
|
||||
v -128.978317 -102.625122 18.751625
|
||||
v -129.108002 -102.678520 17.627743
|
||||
v -133.536957 -113.520660 19.224377
|
||||
v -129.096863 -109.563393 19.008121
|
||||
v -129.206924 -109.608681 18.054916
|
||||
v 134.767746 81.204788 -18.700172
|
||||
v 134.248901 80.991257 -23.196507
|
||||
v 71.866486 41.209274 -14.108822
|
||||
v 72.385315 41.422798 -9.612484
|
||||
v 128.441925 90.495300 -22.977745
|
||||
v 128.960800 90.708778 -18.481407
|
||||
v 65.801559 52.198196 -9.364450
|
||||
v 65.282692 51.984695 -13.860790
|
||||
v 70.198242 40.079201 -9.296301
|
||||
v 69.679405 39.865692 -13.792643
|
||||
v 63.095608 50.641090 -13.544611
|
||||
v 63.614468 50.854622 -9.048275
|
||||
v -84.831062 -69.558075 11.032318
|
||||
v -87.789284 -65.851166 11.110977
|
||||
v -84.721069 -69.512833 11.985523
|
||||
v -87.659607 -65.797775 12.234859
|
||||
v -90.673042 -62.113304 11.836937
|
||||
v -44.207134 -30.294481 4.393369
|
||||
v -41.387562 -34.114616 4.336082
|
||||
v -41.277554 -34.069336 5.289290
|
||||
v -44.077427 -30.241106 5.517251
|
||||
v -46.952145 -26.443571 5.097948
|
||||
v 66.222359 39.878906 -11.595209
|
||||
v 63.735249 43.929329 -11.587217
|
||||
v 4.216988 5.336822 -2.886517
|
||||
v 6.882534 1.403296 -2.920646
|
||||
v 63.864910 43.982697 -10.463335
|
||||
v 66.332329 39.924171 -10.641994
|
||||
v 6.992535 1.448564 -1.967437
|
||||
v 4.346676 5.390191 -1.762634
|
||||
v 61.322857 48.010384 -10.931952
|
||||
v 1.626119 9.300981 -2.205103
|
||||
v 131.196350 85.681953 -24.378414
|
||||
v 68.155365 46.977943 -15.265909
|
||||
v 132.013229 86.018097 -17.299511
|
||||
v 68.972221 47.314110 -8.187012
|
||||
v 65.968277 45.634354 -14.949732
|
||||
v 66.785126 45.970520 -7.870832
|
||||
v 63.547039 37.166458 -9.565828
|
||||
v 70.672905 41.623978 -10.599792
|
||||
v 70.421158 41.520378 -12.781469
|
||||
v 63.295254 37.062843 -11.747507
|
||||
v 57.644199 46.399963 -11.159588
|
||||
v 64.770096 50.857529 -12.193554
|
||||
v 64.935677 50.925652 -10.758680
|
||||
v 57.809803 46.468132 -9.724720
|
||||
v 60.265896 41.974792 -11.829321
|
||||
v 67.391792 46.432327 -12.863279
|
||||
v 60.562664 42.096924 -9.257460
|
||||
v 67.688583 46.554451 -10.291424
|
||||
v 66.552803 45.876480 -11.434120
|
||||
v 71.316406 40.128174 -2.910504
|
||||
v 67.707397 46.351639 -1.428214
|
||||
v 73.648933 35.444954 -6.676695
|
||||
v 74.080124 33.556870 -11.717693
|
||||
v 72.494301 34.969780 -16.682705
|
||||
v 69.316490 39.305161 -20.241299
|
||||
v 65.398170 45.401329 -21.440014
|
||||
v 61.789211 51.624802 -19.957726
|
||||
v 59.456669 56.308029 -16.191536
|
||||
v 59.025539 58.196114 -11.150551
|
||||
v 60.611256 56.783150 -6.185637
|
||||
v 63.789066 52.447807 -2.626930
|
||||
v 64.941032 44.886330 -11.201113
|
||||
v 66.095650 45.361465 -1.195203
|
||||
v 69.704620 39.138016 -2.677495
|
||||
v 72.037148 34.454788 -6.443686
|
||||
v 72.468323 32.566711 -11.484688
|
||||
v 70.882530 33.979637 -16.449692
|
||||
v 67.704750 38.315010 -20.008293
|
||||
v 63.786388 44.411163 -21.207020
|
||||
v 60.177441 50.634628 -19.724720
|
||||
v 57.844913 55.317841 -15.958533
|
||||
v 57.413754 57.205963 -10.917540
|
||||
v 58.999516 55.793022 -5.952626
|
||||
v 62.177296 51.457634 -2.393921
|
||||
v 66.552803 45.876480 -11.434120
|
||||
v 71.316406 40.128174 -2.910504
|
||||
v 67.707397 46.351639 -1.428214
|
||||
v 73.648933 35.444954 -6.676695
|
||||
v 74.080124 33.556870 -11.717693
|
||||
v 72.494301 34.969780 -16.682705
|
||||
v 69.316490 39.305161 -20.241299
|
||||
v 65.398170 45.401329 -21.440014
|
||||
v 61.789211 51.624802 -19.957726
|
||||
v 59.456669 56.308029 -16.191536
|
||||
v 59.025539 58.196114 -11.150551
|
||||
v 60.611256 56.783150 -6.185637
|
||||
v 63.789066 52.447807 -2.626930
|
||||
v 64.941032 44.886330 -11.201113
|
||||
v 66.095650 45.361465 -1.195203
|
||||
v 69.704620 39.138016 -2.677495
|
||||
v 72.037148 34.454788 -6.443686
|
||||
v 72.468323 32.566711 -11.484688
|
||||
v 70.882530 33.979637 -16.449692
|
||||
v 67.704750 38.315010 -20.008293
|
||||
v 63.786388 44.411163 -21.207020
|
||||
v 60.177441 50.634628 -19.724720
|
||||
v 57.844913 55.317841 -15.958533
|
||||
v 57.413754 57.205963 -10.917540
|
||||
v 58.999516 55.793022 -5.952626
|
||||
v 62.177296 51.457634 -2.393921
|
||||
v 134.767746 81.204788 -18.700172
|
||||
v 134.248901 80.991257 -23.196507
|
||||
v 71.737701 41.420021 -14.103968
|
||||
v 72.256546 41.633545 -9.607634
|
||||
v 128.441925 90.495300 -22.977745
|
||||
v 128.960800 90.708778 -18.481407
|
||||
v 65.930283 51.987473 -9.369301
|
||||
v 65.411469 51.773956 -13.865641
|
||||
v 70.069481 40.289940 -9.291452
|
||||
v 69.550629 40.076424 -13.787790
|
||||
v 63.224361 50.430389 -13.549465
|
||||
v 63.743198 50.643883 -9.053125
|
||||
v 66.222359 39.878906 -11.595209
|
||||
v 63.735249 43.929329 -11.587217
|
||||
v 4.216988 5.336822 -2.886517
|
||||
v 6.882534 1.403296 -2.920646
|
||||
v 63.864910 43.982697 -10.463335
|
||||
v 66.332329 39.924171 -10.641994
|
||||
v 6.992535 1.448564 -1.967437
|
||||
v 4.346676 5.390191 -1.762634
|
||||
v 61.322857 48.010384 -10.931952
|
||||
v 1.626119 9.300981 -2.205103
|
||||
v 131.196350 85.681953 -24.378414
|
||||
v 68.165932 46.960648 -15.266312
|
||||
v 132.013229 86.018097 -17.299511
|
||||
v 68.982780 47.296783 -8.187412
|
||||
v 65.978821 45.617050 -14.950129
|
||||
v 66.795715 45.953194 -7.871231
|
||||
v 63.547039 37.166458 -9.565828
|
||||
v 70.672905 41.623978 -10.599792
|
||||
v 70.421158 41.520378 -12.781469
|
||||
v 63.295254 37.062843 -11.747507
|
||||
v 57.644199 46.399963 -11.159588
|
||||
v 64.770096 50.857529 -12.193554
|
||||
v 64.935677 50.925652 -10.758680
|
||||
v 57.809803 46.468132 -9.724720
|
||||
v 60.265896 41.974792 -11.829321
|
||||
v 67.391792 46.432327 -12.863279
|
||||
v 60.562664 42.096924 -9.257460
|
||||
v 67.688583 46.554451 -10.291424
|
||||
v -134.451370 -107.569611 19.047298
|
||||
v -133.216705 -100.414352 18.565025
|
||||
v -128.978317 -102.625122 18.751625
|
||||
v -129.108002 -102.678520 17.627743
|
||||
v -133.536957 -113.520660 19.224377
|
||||
v -129.096863 -109.563393 19.008121
|
||||
v -129.206924 -109.608681 18.054916
|
||||
v -84.831062 -69.558075 11.032318
|
||||
v -87.789284 -65.851166 11.110977
|
||||
v -84.721069 -69.512833 11.985523
|
||||
v -87.659607 -65.797775 12.234859
|
||||
v -90.673042 -62.113304 11.836937
|
||||
v -44.207134 -30.294481 4.393369
|
||||
v -41.387562 -34.114616 4.336082
|
||||
v -41.277554 -34.069336 5.289290
|
||||
v -44.077427 -30.241106 5.517251
|
||||
v -46.952145 -26.443571 5.097948
|
||||
v 4.216988 5.336822 -2.886517
|
||||
v 6.882534 1.403296 -2.920646
|
||||
v 6.992535 1.448564 -1.967437
|
||||
v 4.346676 5.390191 -1.762634
|
||||
v 1.626119 9.300981 -2.205103
|
||||
# 171 vertices
|
||||
|
||||
vt 0.12500 0.47500
|
||||
vt 0.20000 0.47500
|
||||
vt 0.04425 0.37374
|
||||
vt 0.05000 0.37500
|
||||
vt 0.02500 0.45000
|
||||
vt 0.02500 0.37500
|
||||
vt 0.00731 0.60564
|
||||
vt 0.98387 0.60564
|
||||
vt 0.00731 0.50680
|
||||
vt 0.98387 0.50680
|
||||
vt 1.60789 0.73448
|
||||
vt 1.60789 0.63489
|
||||
vt 1.00759 0.63489
|
||||
vt 1.00759 0.73448
|
||||
vt 3.78060 0.73448
|
||||
vt 3.78060 0.63489
|
||||
vt 3.17114 0.63489
|
||||
vt 3.17114 0.73448
|
||||
vt 0.35000 0.27500
|
||||
vt 0.35000 0.37500
|
||||
vt 0.05000 0.27500
|
||||
vt 0.35000 0.47500
|
||||
vt 0.52500 0.37500
|
||||
vt 0.52500 0.27500
|
||||
vt 0.52500 0.47500
|
||||
vt 0.97500 0.27500
|
||||
vt 0.97500 0.37500
|
||||
vt 0.72500 0.37500
|
||||
vt 0.72500 0.27500
|
||||
vt 0.97500 0.47500
|
||||
vt 0.72500 0.47500
|
||||
vt 0.00731 0.55622
|
||||
vt 0.98387 0.55622
|
||||
vt 0.00073 0.87385
|
||||
vt 0.31447 0.87385
|
||||
vt 0.25724 0.99634
|
||||
vt 0.05796 0.99634
|
||||
vt 0.05796 0.75137
|
||||
vt 0.25724 0.75137
|
||||
vt 4.50771 0.73448
|
||||
vt 4.50771 0.63489
|
||||
vt 0.24716 0.63489
|
||||
vt 0.24716 0.73448
|
||||
vt 2.38541 0.73448
|
||||
vt 2.38541 0.63489
|
||||
vt 0.35938 0.96875
|
||||
vt 0.34375 0.96875
|
||||
vt 0.34398 0.97095
|
||||
vt 0.35964 0.97095
|
||||
vt 0.35944 0.98217
|
||||
vt 0.34391 0.98218
|
||||
vt 0.34376 0.98072
|
||||
vt 0.35927 0.98072
|
||||
vt 0.35959 0.97696
|
||||
vt 0.34398 0.97696
|
||||
vt 0.35928 0.97436
|
||||
vt 0.34372 0.97436
|
||||
vt 0.64062 0.78125
|
||||
vt 0.32812 0.87500
|
||||
vt 0.28125 0.78125
|
||||
vt 0.43750 0.96875
|
||||
vt 0.64062 1.00000
|
||||
vt 0.84375 0.96875
|
||||
vt 0.95312 0.87500
|
||||
vt 1.00000 0.78125
|
||||
vt 0.37500 0.95726
|
||||
vt 0.37500 0.95721
|
||||
vt 0.37500 0.96216
|
||||
vt 0.37500 0.96221
|
||||
vt 0.37500 0.95317
|
||||
vt 0.37500 0.95312
|
||||
vt 0.37500 0.95103
|
||||
vt 0.37500 0.95098
|
||||
vt 0.37500 0.95141
|
||||
vt 0.37500 0.95136
|
||||
vt 0.37500 0.95423
|
||||
vt 0.37500 0.95418
|
||||
vt 0.37500 0.95877
|
||||
vt 0.37500 0.95872
|
||||
vt 0.37500 0.96378
|
||||
vt 0.37500 0.96373
|
||||
vt 0.37500 0.96790
|
||||
vt 0.37500 0.96785
|
||||
vt 0.37500 0.97002
|
||||
vt 0.37500 0.96997
|
||||
vt 0.37500 0.96957
|
||||
vt 0.37500 0.96953
|
||||
vt 0.37500 0.96671
|
||||
vt 0.37500 0.96666
|
||||
# 89 texture vertices
|
||||
|
||||
vn 0.00000 0.00000 0.00000
|
||||
# 1 normal vertices
|
||||
|
||||
g wind
|
||||
f 3/3/1 2/2/1 1/1/1
|
||||
f 2/2/1 4/4/1 1/1/1
|
||||
f 7/6/1 6/6/1 5/5/1
|
||||
f 10/8/1 9/7/1 8/7/1
|
||||
f 11/8/1 10/8/1 8/7/1
|
||||
f 14/10/1 13/9/1 12/9/1
|
||||
f 15/10/1 14/10/1 12/9/1
|
||||
f 10/13/1 11/12/1 16/11/1
|
||||
f 17/14/1 10/13/1 16/11/1
|
||||
f 14/17/1 15/16/1 18/15/1
|
||||
f 19/18/1 14/17/1 18/15/1
|
||||
f 7/6/1 5/5/1 1/1/1
|
||||
f 4/4/1 7/6/1 1/1/1
|
||||
f 6/6/1 3/3/1 1/1/1
|
||||
f 5/5/1 6/6/1 1/1/1
|
||||
f 4/4/1 21/20/1 20/19/1
|
||||
f 7/21/1 4/4/1 20/19/1
|
||||
f 3/3/1 6/21/1 22/19/1
|
||||
f 23/20/1 3/3/1 22/19/1
|
||||
f 6/21/1 7/21/1 20/19/1
|
||||
f 22/19/1 6/21/1 20/19/1
|
||||
f 3/3/1 23/20/1 24/22/1
|
||||
f 2/2/1 3/3/1 24/22/1
|
||||
f 4/4/1 2/2/1 24/22/1
|
||||
f 21/20/1 4/4/1 24/22/1
|
||||
f 20/19/1 21/20/1 25/23/1
|
||||
f 26/24/1 20/19/1 25/23/1
|
||||
f 23/20/1 22/19/1 27/24/1
|
||||
f 28/23/1 23/20/1 27/24/1
|
||||
f 22/19/1 20/19/1 26/24/1
|
||||
f 27/24/1 22/19/1 26/24/1
|
||||
f 24/22/1 23/20/1 28/23/1
|
||||
f 29/25/1 24/22/1 28/23/1
|
||||
f 21/20/1 24/22/1 29/25/1
|
||||
f 25/23/1 21/20/1 29/25/1
|
||||
f 32/28/1 31/27/1 30/26/1
|
||||
f 33/29/1 32/28/1 30/26/1
|
||||
f 26/24/1 25/23/1 32/28/1
|
||||
f 33/29/1 26/24/1 32/28/1
|
||||
f 36/29/1 35/26/1 34/27/1
|
||||
f 37/28/1 36/29/1 34/27/1
|
||||
f 28/23/1 27/24/1 36/29/1
|
||||
f 37/28/1 28/23/1 36/29/1
|
||||
f 33/29/1 30/26/1 35/26/1
|
||||
f 36/29/1 33/29/1 35/26/1
|
||||
f 27/24/1 26/24/1 33/29/1
|
||||
f 36/29/1 27/24/1 33/29/1
|
||||
f 37/28/1 34/27/1 38/30/1
|
||||
f 39/31/1 37/28/1 38/30/1
|
||||
f 29/25/1 28/23/1 37/28/1
|
||||
f 39/31/1 29/25/1 37/28/1
|
||||
f 39/31/1 38/30/1 31/27/1
|
||||
f 32/28/1 39/31/1 31/27/1
|
||||
f 25/23/1 29/25/1 39/31/1
|
||||
f 32/28/1 25/23/1 39/31/1
|
||||
f 41/33/1 40/32/1 9/7/1
|
||||
f 10/8/1 41/33/1 9/7/1
|
||||
f 41/33/1 15/10/1 12/9/1
|
||||
f 40/32/1 41/33/1 12/9/1
|
||||
f 9/36/1 40/35/1 42/34/1
|
||||
f 8/37/1 9/36/1 42/34/1
|
||||
f 40/35/1 12/39/1 13/38/1
|
||||
f 42/34/1 40/35/1 13/38/1
|
||||
f 8/7/1 42/32/1 43/33/1
|
||||
f 11/8/1 8/7/1 43/33/1
|
||||
f 42/32/1 13/9/1 14/10/1
|
||||
f 43/33/1 42/32/1 14/10/1
|
||||
f 15/16/1 41/41/1 44/40/1
|
||||
f 18/15/1 15/16/1 44/40/1
|
||||
f 41/42/1 10/13/1 17/14/1
|
||||
f 44/43/1 41/42/1 17/14/1
|
||||
f 11/12/1 43/45/1 45/44/1
|
||||
f 16/11/1 11/12/1 45/44/1
|
||||
f 43/45/1 14/17/1 19/18/1
|
||||
f 45/44/1 43/45/1 19/18/1
|
||||
f 48/48/1 47/47/1 46/46/1
|
||||
f 49/49/1 48/48/1 46/46/1
|
||||
f 52/52/1 51/51/1 50/50/1
|
||||
f 53/53/1 52/52/1 50/50/1
|
||||
f 51/51/1 55/55/1 54/54/1
|
||||
f 50/50/1 51/51/1 54/54/1
|
||||
f 55/55/1 48/48/1 49/49/1
|
||||
f 54/54/1 55/55/1 49/49/1
|
||||
f 47/47/1 57/57/1 56/56/1
|
||||
f 46/46/1 47/47/1 56/56/1
|
||||
f 57/57/1 52/52/1 53/53/1
|
||||
f 56/56/1 57/57/1 53/53/1
|
||||
f 53/53/1 50/50/1 54/54/1
|
||||
f 49/49/1 53/53/1 54/54/1
|
||||
f 56/56/1 53/53/1 49/49/1
|
||||
f 46/46/1 56/56/1 49/49/1
|
||||
f 60/60/1 59/59/1 58/58/1
|
||||
f 59/59/1 61/61/1 58/58/1
|
||||
f 61/61/1 62/62/1 58/58/1
|
||||
f 62/62/1 63/63/1 58/58/1
|
||||
f 63/63/1 64/64/1 58/58/1
|
||||
f 64/64/1 65/65/1 58/58/1
|
||||
f 65/60/1 66/59/1 58/58/1
|
||||
f 66/59/1 67/61/1 58/58/1
|
||||
f 67/61/1 68/62/1 58/58/1
|
||||
f 68/62/1 69/63/1 58/58/1
|
||||
f 69/63/1 70/64/1 58/58/1
|
||||
f 70/64/1 60/65/1 58/58/1
|
||||
f 73/59/1 72/60/1 71/58/1
|
||||
f 74/61/1 73/59/1 71/58/1
|
||||
f 75/62/1 74/61/1 71/58/1
|
||||
f 76/63/1 75/62/1 71/58/1
|
||||
f 77/64/1 76/63/1 71/58/1
|
||||
f 78/65/1 77/64/1 71/58/1
|
||||
f 79/59/1 78/60/1 71/58/1
|
||||
f 80/61/1 79/59/1 71/58/1
|
||||
f 81/62/1 80/61/1 71/58/1
|
||||
f 82/63/1 81/62/1 71/58/1
|
||||
f 83/64/1 82/63/1 71/58/1
|
||||
f 72/65/1 83/64/1 71/58/1
|
||||
f 72/68/1 73/67/1 59/66/1
|
||||
f 60/69/1 72/68/1 59/66/1
|
||||
f 73/67/1 74/71/1 61/70/1
|
||||
f 59/66/1 73/67/1 61/70/1
|
||||
f 74/71/1 75/73/1 62/72/1
|
||||
f 61/70/1 74/71/1 62/72/1
|
||||
f 75/73/1 76/75/1 63/74/1
|
||||
f 62/72/1 75/73/1 63/74/1
|
||||
f 76/75/1 77/77/1 64/76/1
|
||||
f 63/74/1 76/75/1 64/76/1
|
||||
f 77/77/1 78/79/1 65/78/1
|
||||
f 64/76/1 77/77/1 65/78/1
|
||||
f 78/79/1 79/81/1 66/80/1
|
||||
f 65/78/1 78/79/1 66/80/1
|
||||
f 79/81/1 80/83/1 67/82/1
|
||||
f 66/80/1 79/81/1 67/82/1
|
||||
f 80/83/1 81/85/1 68/84/1
|
||||
f 67/82/1 80/83/1 68/84/1
|
||||
f 81/85/1 82/87/1 69/86/1
|
||||
f 68/84/1 81/85/1 69/86/1
|
||||
f 82/87/1 83/89/1 70/88/1
|
||||
f 69/86/1 82/87/1 70/88/1
|
||||
f 83/89/1 72/68/1 60/69/1
|
||||
f 70/88/1 83/89/1 60/69/1
|
||||
f 86/60/1 85/59/1 84/58/1
|
||||
f 85/59/1 87/61/1 84/58/1
|
||||
f 87/61/1 88/62/1 84/58/1
|
||||
f 88/62/1 89/63/1 84/58/1
|
||||
f 89/63/1 90/64/1 84/58/1
|
||||
f 90/64/1 91/65/1 84/58/1
|
||||
f 91/60/1 92/59/1 84/58/1
|
||||
f 92/59/1 93/61/1 84/58/1
|
||||
f 93/61/1 94/62/1 84/58/1
|
||||
f 94/62/1 95/63/1 84/58/1
|
||||
f 95/63/1 96/64/1 84/58/1
|
||||
f 96/64/1 86/65/1 84/58/1
|
||||
f 99/59/1 98/60/1 97/58/1
|
||||
f 100/61/1 99/59/1 97/58/1
|
||||
f 101/62/1 100/61/1 97/58/1
|
||||
f 102/63/1 101/62/1 97/58/1
|
||||
f 103/64/1 102/63/1 97/58/1
|
||||
f 104/65/1 103/64/1 97/58/1
|
||||
f 105/59/1 104/60/1 97/58/1
|
||||
f 106/61/1 105/59/1 97/58/1
|
||||
f 107/62/1 106/61/1 97/58/1
|
||||
f 108/63/1 107/62/1 97/58/1
|
||||
f 109/64/1 108/63/1 97/58/1
|
||||
f 98/65/1 109/64/1 97/58/1
|
||||
f 112/8/1 111/7/1 110/7/1
|
||||
f 113/8/1 112/8/1 110/7/1
|
||||
f 116/10/1 115/9/1 114/9/1
|
||||
f 117/10/1 116/10/1 114/9/1
|
||||
f 112/13/1 113/12/1 118/11/1
|
||||
f 119/14/1 112/13/1 118/11/1
|
||||
f 116/17/1 117/16/1 120/15/1
|
||||
f 121/18/1 116/17/1 120/15/1
|
||||
f 124/28/1 123/27/1 122/26/1
|
||||
f 125/29/1 124/28/1 122/26/1
|
||||
f 128/29/1 127/26/1 126/27/1
|
||||
f 129/28/1 128/29/1 126/27/1
|
||||
f 125/29/1 122/26/1 127/26/1
|
||||
f 128/29/1 125/29/1 127/26/1
|
||||
f 129/28/1 126/27/1 130/30/1
|
||||
f 131/31/1 129/28/1 130/30/1
|
||||
f 131/31/1 130/30/1 123/27/1
|
||||
f 124/28/1 131/31/1 123/27/1
|
||||
f 133/33/1 132/32/1 111/7/1
|
||||
f 112/8/1 133/33/1 111/7/1
|
||||
f 133/33/1 117/10/1 114/9/1
|
||||
f 132/32/1 133/33/1 114/9/1
|
||||
f 111/36/1 132/35/1 134/34/1
|
||||
f 110/37/1 111/36/1 134/34/1
|
||||
f 132/35/1 114/39/1 115/38/1
|
||||
f 134/34/1 132/35/1 115/38/1
|
||||
f 110/7/1 134/32/1 135/33/1
|
||||
f 113/8/1 110/7/1 135/33/1
|
||||
f 134/32/1 115/9/1 116/10/1
|
||||
f 135/33/1 134/32/1 116/10/1
|
||||
f 117/16/1 133/41/1 136/40/1
|
||||
f 120/15/1 117/16/1 136/40/1
|
||||
f 133/42/1 112/13/1 119/14/1
|
||||
f 136/43/1 133/42/1 119/14/1
|
||||
f 113/12/1 135/45/1 137/44/1
|
||||
f 118/11/1 113/12/1 137/44/1
|
||||
f 135/45/1 116/17/1 121/18/1
|
||||
f 137/44/1 135/45/1 121/18/1
|
||||
f 98/68/1 99/67/1 85/66/1
|
||||
f 86/69/1 98/68/1 85/66/1
|
||||
f 99/67/1 100/71/1 87/70/1
|
||||
f 85/66/1 99/67/1 87/70/1
|
||||
f 100/71/1 101/73/1 88/72/1
|
||||
f 87/70/1 100/71/1 88/72/1
|
||||
f 101/73/1 102/75/1 89/74/1
|
||||
f 88/72/1 101/73/1 89/74/1
|
||||
f 102/75/1 103/77/1 90/76/1
|
||||
f 89/74/1 102/75/1 90/76/1
|
||||
f 103/77/1 104/79/1 91/78/1
|
||||
f 90/76/1 103/77/1 91/78/1
|
||||
f 104/79/1 105/81/1 92/80/1
|
||||
f 91/78/1 104/79/1 92/80/1
|
||||
f 105/81/1 106/83/1 93/82/1
|
||||
f 92/80/1 105/81/1 93/82/1
|
||||
f 106/83/1 107/85/1 94/84/1
|
||||
f 93/82/1 106/83/1 94/84/1
|
||||
f 107/85/1 108/87/1 95/86/1
|
||||
f 94/84/1 107/85/1 95/86/1
|
||||
f 108/87/1 109/89/1 96/88/1
|
||||
f 95/86/1 108/87/1 96/88/1
|
||||
f 109/89/1 98/68/1 86/69/1
|
||||
f 96/88/1 109/89/1 86/69/1
|
||||
f 140/48/1 139/47/1 138/46/1
|
||||
f 141/49/1 140/48/1 138/46/1
|
||||
f 144/52/1 143/51/1 142/50/1
|
||||
f 145/53/1 144/52/1 142/50/1
|
||||
f 143/51/1 147/55/1 146/54/1
|
||||
f 142/50/1 143/51/1 146/54/1
|
||||
f 147/55/1 140/48/1 141/49/1
|
||||
f 146/54/1 147/55/1 141/49/1
|
||||
f 139/47/1 149/57/1 148/56/1
|
||||
f 138/46/1 139/47/1 148/56/1
|
||||
f 149/57/1 144/52/1 145/53/1
|
||||
f 148/56/1 149/57/1 145/53/1
|
||||
f 145/53/1 142/50/1 146/54/1
|
||||
f 141/49/1 145/53/1 146/54/1
|
||||
f 148/56/1 145/53/1 141/49/1
|
||||
f 138/46/1 148/56/1 141/49/1
|
||||
f 152/3/1 151/2/1 150/1/1
|
||||
f 151/2/1 153/4/1 150/1/1
|
||||
f 156/6/1 155/6/1 154/5/1
|
||||
f 156/6/1 154/5/1 150/1/1
|
||||
f 153/4/1 156/6/1 150/1/1
|
||||
f 155/6/1 152/3/1 150/1/1
|
||||
f 154/5/1 155/6/1 150/1/1
|
||||
f 153/4/1 158/20/1 157/19/1
|
||||
f 156/21/1 153/4/1 157/19/1
|
||||
f 152/3/1 155/21/1 159/19/1
|
||||
f 160/20/1 152/3/1 159/19/1
|
||||
f 155/21/1 156/21/1 157/19/1
|
||||
f 159/19/1 155/21/1 157/19/1
|
||||
f 152/3/1 160/20/1 161/22/1
|
||||
f 151/2/1 152/3/1 161/22/1
|
||||
f 153/4/1 151/2/1 161/22/1
|
||||
f 158/20/1 153/4/1 161/22/1
|
||||
f 157/19/1 158/20/1 162/23/1
|
||||
f 163/24/1 157/19/1 162/23/1
|
||||
f 160/20/1 159/19/1 164/24/1
|
||||
f 165/23/1 160/20/1 164/24/1
|
||||
f 159/19/1 157/19/1 163/24/1
|
||||
f 164/24/1 159/19/1 163/24/1
|
||||
f 161/22/1 160/20/1 165/23/1
|
||||
f 166/25/1 161/22/1 165/23/1
|
||||
f 158/20/1 161/22/1 166/25/1
|
||||
f 162/23/1 158/20/1 166/25/1
|
||||
f 163/24/1 162/23/1 167/28/1
|
||||
f 168/29/1 163/24/1 167/28/1
|
||||
f 165/23/1 164/24/1 169/29/1
|
||||
f 170/28/1 165/23/1 169/29/1
|
||||
f 164/24/1 163/24/1 168/29/1
|
||||
f 169/29/1 164/24/1 168/29/1
|
||||
f 166/25/1 165/23/1 170/28/1
|
||||
f 171/31/1 166/25/1 170/28/1
|
||||
f 162/23/1 166/25/1 171/31/1
|
||||
f 167/28/1 162/23/1 171/31/1
|
||||
# 278 elements
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"modid": "ZxSA",
|
||||
"name": "ZxSA",
|
||||
"description": "ZxSA.",
|
||||
"version": "1.0.0",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"authorList": ["Fish"],
|
||||
"credits": "a mod of the minecraft",
|
||||
"logoFile": "",
|
||||
"screenshots": [],
|
||||
"dependencies": []
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,244 @@
|
||||
SlashBlade mc1.7.2 ${version}
|
||||
|
||||
◆概要
|
||||
鞘付きの大太刀を追加します。
|
||||
かの鬼兄ぃ様の魔剣がモデルです。
|
||||
|
||||
たぶんSSP用?SMPにも対応した・・・かも?
|
||||
結構な壊れ性能
|
||||
|
||||
◆利用条件
|
||||
自己責任の下にるなりやくなり好きにするべし。
|
||||
私は責任はとらぬ。
|
||||
|
||||
衝撃波ソースを蛍光塗料氏の無銘剣より拝借
|
||||
配布元に倣い、揚げるなり炒めるなりご自由に。
|
||||
|
||||
◆必要環境(※開発環境のためこれ以前でも動く場合があります
|
||||
mc1.7.2 forge1024以降
|
||||
|
||||
◆インストール
|
||||
modsに入れてください。
|
||||
|
||||
◆使い方
|
||||
コンボルート
|
||||
|
||||
1.
|
||||
右:切り上げ 単体 attackableList無視
|
||||
右:切り下ろし 単体 attackableList無視
|
||||
左:切り下ろし 範囲
|
||||
|
||||
2.
|
||||
左:鞘打ち出し 敵拘束 殺傷なし
|
||||
右:切り上げ 単体 attackableList無視 >1.へ
|
||||
左:鞘戻し 敵拘束 殺傷なし
|
||||
左:抜刀
|
||||
|
||||
3.ジャンプ中
|
||||
右:空中居合い 単体 敵拘束 attackableList無視
|
||||
右:抜刀 単体 attackableList無視
|
||||
左:抜刀 範囲
|
||||
|
||||
4.ジャンプ中
|
||||
左:空中居合い 範囲 敵拘束
|
||||
左:抜刀 単体 attackableList無視
|
||||
左:抜刀 範囲
|
||||
|
||||
※エネミーステップ or 時間経過でジャンプコンボ リセット
|
||||
|
||||
※エネミーステップ
|
||||
モンスターの周囲1ブロック以内であれば踏みつけて更にジャンプできる
|
||||
攻撃は普通に受けるので、鞘打ちや、ジャンプ空中居合い1段の敵拘束を利用して反撃を防ぎながらどうぞ。
|
||||
|
||||
※攻撃力補足
|
||||
鞘打ち =石相当 殺傷なし ※妖刀化の補正あり
|
||||
抜刀攻撃 =ダイヤ相当 殺傷あり ※妖刀化の補正あり
|
||||
折れたあと全て=木刀未満 ※妖刀化の補正無し
|
||||
|
||||
※範囲攻撃補足
|
||||
・敵対Mobにしか当たらない
|
||||
・狼も怒って様が当たらない
|
||||
・村人にも当たらないよ
|
||||
※デフォ設定だとね
|
||||
|
||||
・無敵時間無視、ただし次段まで5tickのインターバル(次段の先行入力は可能
|
||||
・一定時間入力がないと1段から入力し直し(10tick)
|
||||
・左クリックはコンボに関係無し※無敵時間無視も無い
|
||||
・矢を叩き折れるよ、折るので当然拾えないよ。
|
||||
|
||||
・耐久なくなると折れる。折れるだけで消えたりはしないよ。
|
||||
・完品状態で抜刀すると治る。
|
||||
|
||||
持った状態でスニークしてる間、最も近いAttackableにカメラロック
|
||||
カーソル合わせてるエンティティ優先(※AttackableList無視
|
||||
※ロック後はスニークしている限りロック継続
|
||||
|
||||
|
||||
◆レシピ他各性能解説
|
||||
bladeWood 木刀(攻撃力:木剣 耐久:60 補修:原木 折れると消失
|
||||
" #",
|
||||
" # ",
|
||||
"X ",
|
||||
'#',"logWood",
|
||||
'X',new ItemStack(Item.swordWood,1,1) ※木の剣で耐久が1消費済みのもの(1回だけ殴ったもの)
|
||||
|
||||
bladeBambooLight 竹光(攻撃力:石剣 耐久:50 補修:竹 折れると消失
|
||||
" #",
|
||||
" # ",
|
||||
"X ",
|
||||
'#',"bamboo",
|
||||
'X', bladeWood ※木刀 耐久は減っててもいい
|
||||
|
||||
bladeSilverBambooLight 銀紙竹光(攻撃力:鉄剣 耐久:40 補修:竹 折れると消失
|
||||
" TI",
|
||||
"SXK",
|
||||
"PS ",
|
||||
'T', Item.egg,
|
||||
'I', Item.ingotIron / 銀粉 / 銀インゴット
|
||||
'S', Item.silk,
|
||||
'X', bladeBambooLight ※竹光 耐久は減っててもいい
|
||||
'K', "dyeBlack",
|
||||
'P', Item.paper
|
||||
|
||||
bladeWhiteSheath 白鞘の太刀(攻撃力:鉄剣 耐久:70 補修:鉄、スチール、スチールナゲット 折れても残る
|
||||
" #",
|
||||
" # ",
|
||||
"XG ",
|
||||
'#', Item.ingotIron※初期耐久2/3 or スチールインゴット※初期耐久3/4 or 刀の魂塊※後述の特殊インゴット 完品で完成
|
||||
'G', Item.ingotGold,
|
||||
'X', bladeWood ※木刀 耐久は減っててもいい
|
||||
|
||||
SlashBlade 大太刀「」※無銘無名の大太刀(攻撃力:ダイヤ剣 耐久:50 補修:鉄、スチール、スチールナゲット 折れても残る
|
||||
" BI",
|
||||
"L#C",
|
||||
"SG ",
|
||||
'L', Block.blockLapis,
|
||||
'C', Block.coalBlock,
|
||||
'I', itemSphereBladeSoul 刀の魂珠※後述の特殊な玉鋼
|
||||
'B', Item.blazeRod,
|
||||
'G', Item.ingotGold,
|
||||
'S', Item.silk,
|
||||
'#', brokenBladeWhite
|
||||
|
||||
|
||||
itemIngotBladeSoul 刀の魂塊
|
||||
"PPP",
|
||||
"PIP",
|
||||
"PPP",
|
||||
'I', Item.ingotIron,
|
||||
'P', itemProudSoul 刀の魂片※刀が折れた際に入手
|
||||
|
||||
itemIngotBladeSoul 刀の魂塊 スチールを使ったお得Recipe
|
||||
" P ",
|
||||
"PIP",
|
||||
" P ",
|
||||
'I', "ingotSteel",
|
||||
'P', itemProudSoul 刀の魂片※刀が折れた際に入手
|
||||
|
||||
Item.expBottle 経験値ボトル
|
||||
"XXX",
|
||||
"XIX",
|
||||
"XXX",
|
||||
'I',Item.glassBottle,
|
||||
'X',proudSoul※刀が折れた際に入手
|
||||
|
||||
※精錬Recipe
|
||||
itemSphereBladeSoul 刀の魂珠
|
||||
itemIngotBladeSoul 刀の魂塊を精錬する。
|
||||
|
||||
|
||||
◇KillCountが1000超えると、攻撃力限定解除(
|
||||
・自Lvが特定の割合で攻撃力に加算。
|
||||
|
||||
◆大太刀「」のみの特殊能力
|
||||
|
||||
◇何かしらエンチャントするとSlashDimension開放(右クリ貯め攻撃)
|
||||
攻撃力は3段と同等、射程約20ブロックほど、視線方向の最も近いターゲットを中心に範囲攻撃、消耗(5+巻き込んだ敵数)
|
||||
|
||||
◇エンチャントと名を付けると、自己修復が付く妖刀モード。
|
||||
・メインインベントリ中で手持ち状態以外の時、毎秒Expと満腹度を消費して自己修復
|
||||
・耐久値全快の完品時3段目抜刀攻撃が自身を中心とした広範囲攻撃になる。
|
||||
|
||||
◇KillCountが1000超えると、攻撃力限定解除(
|
||||
・自Lvが特定の割合で攻撃力に加算。
|
||||
|
||||
◇ProudSoulが1000を超えると、戦闘時修復能力開放
|
||||
・手持ち中に経験値を拾うとそのぶん自己修復。
|
||||
※ProudSoul自体は、手持ち中に経験値改修したり、妖刀時の自己修復で吸収される経験値で増えていく。
|
||||
|
||||
・範囲攻撃はエンダードラゴンにも当たるけれど、かなり判定は狭いかつシビア
|
||||
|
||||
・履歴
|
||||
githubみて
|
||||
https://github.com/flammpfeil/SlashBlade/commits/beta
|
||||
|
||||
mc1.6.2 r10
|
||||
mod:攻撃力限定解除条件を妖刀モードから分離 1000Killに
|
||||
mod:戦闘時修復解除条件を妖刀モードから分離 1000ProudSoul(吸収経験値量)に
|
||||
add:周囲に敵が居る状態で、動かずに納刀を完了すると、経験値取得ボーナス他
|
||||
※貰える経験値 周囲の敵数/2 上限10 耐久が40を切っていること。
|
||||
|
||||
mc1.6.2 r9
|
||||
add:いろいろ追加。
|
||||
|
||||
mc1.6.2 r8
|
||||
fix:遠隔攻撃時、折れるのではなく消失していたのを修正
|
||||
fix:内部的に冗長な点一部リファクタリング
|
||||
|
||||
mc1.6.2 r7
|
||||
fix:ほんのりSMP対応
|
||||
|
||||
mc1.6.2 r6
|
||||
fix:溜め攻撃周りを整理。溜め完了時のエフェクト追加
|
||||
|
||||
mc1.6.2 r5
|
||||
fix:攻撃可能リストの文字列エスケープ処理を追加
|
||||
|
||||
mc1.6.2 r3
|
||||
fix:描画周りをさらに修正。若干滑らかに動くように?
|
||||
mod:折れるのが、耐久全損時に(消失しなくなったのに赤ゲージで折れても意味がない)
|
||||
|
||||
mc1.6.2 r2
|
||||
fix:描画周りを正常化 AetherはPFLMがあると使えるようになる。
|
||||
add:攻撃可能リストConfigで右クリック時の攻撃対象を選択できるように
|
||||
|
||||
mc1.6.2 r1
|
||||
アップデート 名称変更
|
||||
|
||||
mc1.5.0 r1
|
||||
アップデート
|
||||
|
||||
mc1.4.6-7 r8
|
||||
妖刀モード時
|
||||
鞘打ちでトドメさせない
|
||||
Lvによる強化がほんのり弱体化
|
||||
手持ち9個欄に無い場合修復しない
|
||||
折れたときの微妙な報酬追加。
|
||||
燃料としては溶岩バケツと同等&瓶とクラフトでエンチャ瓶に1個・・・。
|
||||
|
||||
対ガスト有効化
|
||||
|
||||
mc1.4.6-7 r7
|
||||
妖刀モードのいろいろ追加。
|
||||
|
||||
mc1.4.6-7 r6
|
||||
ノックバック無しロジック変更。
|
||||
|
||||
mc1.4.6-7 r5
|
||||
ボス的に攻撃できるように修正。
|
||||
着火TNTを切り壊す、火球を打ち返すように。
|
||||
|
||||
mc1.4.6-7 r4
|
||||
右クリック押しっぱなしで手を振っていたの止める修正
|
||||
他エンチャと銘の効果明記。
|
||||
|
||||
mc1.4.6-7 r3
|
||||
右クリック押しっぱなしでコンボ進行していた点を修正。
|
||||
クリックすべし
|
||||
|
||||
mc1.4.6-7 r2
|
||||
鞘打ちにエンチャント乗らなかったの修正。
|
||||
壊れ性能++
|
||||
|
||||
mc1.4.6-7 r1
|
||||
初版
|
||||
Reference in new issue
Block a user