Initial decompiled source import

This commit is contained in:
hcs61256cs committed 2026-07-08 17:18:17 +08:00
commit 0513619b6a
30 files changed
+80918

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
build/
run/
.gradle/
+1
View File
@@ -0,0 +1 @@
_client-1.7.10-real/mods/【拔刀剑附属】[大地之刃]SlashBlade-Terra-mc1.7.10-r1.jar
+15
View File
@@ -0,0 +1,15 @@
# SlashBlade-Terra
Decompiled source tree derived from `_client-1.7.10-real/mods/【拔刀剑附属】[大地之刃]SlashBlade-Terra-mc1.7.10-r1.jar`.
- Runtime modid: `flammpfeil.slashblade.terra`
- Extra compile-time dependency: Botania
- Original jar copy: `original/【拔刀剑附属】[大地之刃]SlashBlade-Terra-mc1.7.10-r1.jar`
- Decompiled Java: `src/main/java`
- Extracted resources: `src/main/resources`
Build with:
```sh
./gradlew clean build
```
+7
View File
@@ -0,0 +1,7 @@
plugins {
id 'com.gtnewhorizons.gtnhconvention'
}
tasks.named('jar') {
archiveFileName = 'SlashBlade-Terra-mc1.7.10-r1.jar'
}
+8
View File
@@ -0,0 +1,8 @@
dependencies {
compileOnlyApi('mods.flammpfeil.slashblade:SlashBlade:mc1.7.10-r87')
compileOnly('com.github.GTNewHorizons:Botania:1.13.16-GTNH:dev') { transitive = false }
}
repositories {
mavenLocal()
}
+28
View File
@@ -0,0 +1,28 @@
gtnh.settings.blowdryerTag = 0.2.0
modName = SlashBlade-Terra
modId = flammpfeil.slashblade.terra
modGroup = mods.flammpfeil.slashblade.terra
modVersion = mc1.7.10-r1
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
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+248
View File
@@ -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
View File
@@ -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
+19
View File
@@ -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 mods.flammpfeil.slashblade.terra;
import cpw.mods.fml.common.SidedProxy;
public class InitProxy {
@SidedProxy(clientSide="mods.flammpfeil.slashblade.terra.InitProxyClient", serverSide="mods.flammpfeil.slashblade.terra.InitProxy")
public static InitProxy proxy;
public void initializeItemRenderer() {
}
}
@@ -0,0 +1,23 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* cpw.mods.fml.client.registry.RenderingRegistry
* net.minecraft.client.renderer.entity.Render
*/
package mods.flammpfeil.slashblade.terra;
import cpw.mods.fml.client.registry.RenderingRegistry;
import mods.flammpfeil.slashblade.terra.InitProxy;
import mods.flammpfeil.slashblade.terra.client.renderer.RenderPhantomSwordEx;
import mods.flammpfeil.slashblade.terra.entity.EntityPhantomSwordEx;
import net.minecraft.client.renderer.entity.Render;
public class InitProxyClient
extends InitProxy {
@Override
public void initializeItemRenderer() {
RenderingRegistry.registerEntityRenderingHandler(EntityPhantomSwordEx.class, (Render)new RenderPhantomSwordEx());
}
}
@@ -0,0 +1,160 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* com.google.common.collect.Lists
* 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
* cpw.mods.fml.common.registry.GameRegistry
* mods.flammpfeil.slashblade.ItemSlashBlade
* mods.flammpfeil.slashblade.ItemSlashBladeNamed
* mods.flammpfeil.slashblade.SlashBlade
* mods.flammpfeil.slashblade.named.event.LoadEvent$InitEvent
* mods.flammpfeil.slashblade.named.event.LoadEvent$PostInitEvent
* mods.flammpfeil.slashblade.stats.AchievementEx
* mods.flammpfeil.slashblade.stats.AchievementList
* mods.flammpfeil.slashblade.util.SlashBladeAchievementCreateEvent
* mods.flammpfeil.slashblade.util.SlashBladeHooks
* net.minecraft.enchantment.Enchantment
* net.minecraft.init.Items
* net.minecraft.item.Item
* net.minecraft.item.Item$ToolMaterial
* net.minecraft.item.ItemStack
* net.minecraft.nbt.NBTBase
* net.minecraft.nbt.NBTTagCompound
* net.minecraft.stats.Achievement
* net.minecraft.stats.AchievementList
* vazkii.botania.api.BotaniaAPI
* vazkii.botania.api.lexicon.LexiconEntry
* vazkii.botania.api.lexicon.LexiconPage
* vazkii.botania.api.recipe.RecipeRuneAltar
* vazkii.botania.common.lexicon.page.PageRuneRecipe
*/
package mods.flammpfeil.slashblade.terra;
import com.google.common.collect.Lists;
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 cpw.mods.fml.common.registry.GameRegistry;
import java.util.Stack;
import mods.flammpfeil.slashblade.ItemSlashBlade;
import mods.flammpfeil.slashblade.ItemSlashBladeNamed;
import mods.flammpfeil.slashblade.SlashBlade;
import mods.flammpfeil.slashblade.named.event.LoadEvent;
import mods.flammpfeil.slashblade.stats.AchievementEx;
import mods.flammpfeil.slashblade.stats.AchievementList;
import mods.flammpfeil.slashblade.terra.InitProxy;
import mods.flammpfeil.slashblade.terra.entity.EntityPhantomSwordEx;
import mods.flammpfeil.slashblade.terra.specialattack.TerraSwords;
import mods.flammpfeil.slashblade.terra.specialeffect.ManaBurst;
import mods.flammpfeil.slashblade.terra.specialeffect.ManaPoolRepair;
import mods.flammpfeil.slashblade.util.SlashBladeAchievementCreateEvent;
import mods.flammpfeil.slashblade.util.SlashBladeHooks;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.Achievement;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.lexicon.LexiconPage;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.common.lexicon.page.PageRuneRecipe;
@Mod(name="Terra", modid="flammpfeil.slashblade.terra", version="mc1.7.10-r1", dependencies="required-after:flammpfeil.slashblade;required-after:Botania")
public class Terra {
public static final String modname = "Terra";
public static final String modid = "flammpfeil.slashblade.terra";
public static final String version = "mc1.7.10-r1";
public static final String base = "flammpfeil.slashblade.named.terra";
public static final int ArtsIDTeraSwords = 39;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent evt) {
SlashBlade.InitEventBus.register(this);
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
EntityRegistry.registerModEntity(EntityPhantomSwordEx.class, (String)"PhantomSwordExK", (int)1, this, (int)250, (int)1, (boolean)true);
SlashBladeHooks.EventBus.register(new ManaBurst());
SlashBladeHooks.EventBus.register(new ManaPoolRepair());
InitProxy.proxy.initializeItemRenderer();
}
@SubscribeEvent
public void init(LoadEvent.InitEvent event) {
ItemSlashBlade.specialAttacks.put(39, new TerraSwords());
String name = base;
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(100));
ItemSlashBlade.setBaseAttackModifier((NBTTagCompound)tag, (float)(4.0f + Item.ToolMaterial.EMERALD.getDamageVsEntity()));
ItemSlashBlade.TextureName.set(tag, "named/terra/terra");
ItemSlashBlade.ModelName.set(tag, "named/terra/terra");
ItemSlashBlade.SpecialAttackType.set(tag, Integer.valueOf(39));
ItemSlashBlade.StandbyRenderType.set(tag, Integer.valueOf(3));
ItemSlashBladeNamed.IsDefaultBewitched.set(tag, Boolean.valueOf(true));
tag.setString("RepairOreDicMaterial", "ingotTerrasteel");
tag.setInteger("SummonedSwordColor", 3524113);
NBTTagCompound etag = new NBTTagCompound();
tag.setTag("SB.SEffect", (NBTBase)etag);
etag.setInteger("ManaBurst", 10);
etag.setInteger("ManaPoolRepair", 1);
customblade.addEnchantment(Enchantment.power, 2);
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add("flammpfeil.slashblade:" + name);
}
@SubscribeEvent
public void postinit(LoadEvent.PostInitEvent event) {
ItemStack sphere = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
ItemStack soul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"proudsoul", (int)1);
String name = base;
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack terraBlade = GameRegistry.findItemStack((String)"Botania", (String)"terraSword", (int)1);
ItemStack vineBall = GameRegistry.findItemStack((String)"Botania", (String)"vineBall", (int)1);
ItemStack thornChakram = GameRegistry.findItemStack((String)"Botania", (String)"thornChakram", (int)1);
RecipeRuneAltar runeAltarRecipe = BotaniaAPI.registerRuneAltarRecipe((ItemStack)blade, (int)10000, (Object[])new Object[]{terraBlade, sphere, "gaiaIngot", vineBall, new ItemStack(Items.gold_ingot), thornChakram, "ingotTerrasteel", soul});
for (LexiconEntry entry : BotaniaAPI.categoryTools.entries) {
if (!entry.unlocalizedName.equalsIgnoreCase("terraSword")) continue;
entry.setLexiconPages(new LexiconPage[]{new PageRuneRecipe("sb", runeAltarRecipe)});
break;
}
}
@SubscribeEvent
public void addAchievement(SlashBladeAchievementCreateEvent event) {
Stack<Achievement> parent = new Stack<Achievement>();
Achievement startParent = net.minecraft.stats.AchievementList.killEnemy;
String bladename = base;
ItemStack blade = SlashBlade.getCustomBlade((String)bladename);
if (blade != null) {
parent.push(AchievementList.registerCraftingAchievement((String)bladename, (ItemStack)blade, (Achievement)startParent));
Terra.setContent((Achievement)parent.peek(), bladename);
parent.pop();
}
}
static void setContent(Achievement achievement, String contentKey) {
if (!(achievement instanceof AchievementEx)) {
return;
}
if (!SlashBlade.recipeMultimap.containsKey(contentKey)) {
return;
}
((AchievementEx)achievement).content = Lists.newArrayList((Iterable)SlashBlade.recipeMultimap.get(contentKey));
}
}
@@ -0,0 +1,71 @@
/*
* 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 mods.flammpfeil.slashblade.terra.client.renderer;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mods.flammpfeil.slashblade.terra.entity.EntityPhantomSwordEx;
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 RenderPhantomSwordEx
extends Render {
private static double[][] dVec = new double[][]{{0.0, 0.0, 417.7431}, {0.0, -44.6113, 0.0}, {38.9907, 0.0, 50.0}, {0.0, 44.6113, 0.0}, {-38.9907, 0.0, 50.0}, {38.9907, 0.0, -50.0}, {-38.9907, 0.0, -50.0}, {0.0, 0.0, -214.0305}, {159.1439, 0.0, -49.6611}, {-159.1439, 0.0, -49.6611}};
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 EntityPhantomSwordEx) {
this.doDriveRender((EntityPhantomSwordEx)entity, d0, d1, d2, f, f1);
}
}
protected ResourceLocation getEntityTexture(Entity var1) {
return null;
}
private void doDriveRender(EntityPhantomSwordEx 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);
GL11.glBlendFunc((int)770, (int)1);
GL11.glPushMatrix();
GL11.glTranslatef((float)((float)dX), (float)((float)dY), (float)((float)dZ));
GL11.glRotatef((float)entityPhantomSword.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entityPhantomSword.rotationPitch), (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(entityPhantomSword.getColor(), 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);
}
}
@@ -0,0 +1,358 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* cpw.mods.fml.common.registry.GameRegistry
* cpw.mods.fml.common.registry.IThrowableEntity
* mods.flammpfeil.slashblade.EntityPhantomSword
* mods.flammpfeil.slashblade.ItemSlashBlade
* mods.flammpfeil.slashblade.ability.StylishRankManager
* mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes
* net.minecraft.block.Block
* 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.Item
* net.minecraft.item.ItemStack
* net.minecraft.util.AxisAlignedBB
* net.minecraft.util.DamageSource
* net.minecraft.util.EntityDamageSource
* net.minecraft.util.MathHelper
* net.minecraft.util.Vec3
* net.minecraft.world.IBlockAccess
* net.minecraft.world.World
* vazkii.botania.common.entity.EntityManaBurst
* vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword
*/
package mods.flammpfeil.slashblade.terra.entity;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.IThrowableEntity;
import java.util.List;
import java.util.Random;
import mods.flammpfeil.slashblade.EntityPhantomSword;
import mods.flammpfeil.slashblade.ItemSlashBlade;
import mods.flammpfeil.slashblade.ability.StylishRankManager;
import net.minecraft.block.Block;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import vazkii.botania.common.entity.EntityManaBurst;
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword;
public class EntityPhantomSwordEx
extends EntityPhantomSword {
double hitX;
double hitY;
double hitZ;
float hitYaw;
float hitPitch;
Entity ridingEntity2 = null;
float iniYaw;
float iniPitch;
boolean initIniYP = false;
public EntityPhantomSwordEx(World par1World) {
super(par1World);
}
public EntityPhantomSwordEx(World par1World, EntityLivingBase entityLiving, float AttackLevel, float roll) {
super(par1World, entityLiving, AttackLevel, roll);
}
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(7, 7);
this.getDataWatcher().addObject(8, Float.valueOf(0.0f));
this.getDataWatcher().addObject(9, Float.valueOf(-720.0f));
this.getDataWatcher().addObject(10, 0x3333FF);
}
public int getInterval() {
return this.getDataWatcher().getWatchableObjectInt(7);
}
public void setInterval(int value) {
this.getDataWatcher().updateObject(7, value);
}
public float getIniYaw() {
return this.getDataWatcher().getWatchableObjectFloat(8);
}
public void setIniYaw(float value) {
this.getDataWatcher().updateObject(8, Float.valueOf(value));
}
public float getIniPitch() {
return this.getDataWatcher().getWatchableObjectFloat(9);
}
public void setIniPitch(float value) {
this.getDataWatcher().updateObject(9, Float.valueOf(value));
}
public int getColor() {
return this.getDataWatcher().getWatchableObjectInt(10);
}
public void setColor(int value) {
this.getDataWatcher().updateObject(10, value);
}
public void updateRidden() {
Entity ridingEntity = this.ridingEntity2;
if (ridingEntity.isDead) {
this.setDead();
return;
}
if (ridingEntity instanceof EntityLivingBase) {
((EntityLivingBase)ridingEntity).hurtTime = 0;
((EntityLivingBase)ridingEntity).hurtResistantTime = 0;
}
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.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 >= this.getLifeTime()) {
if (!ridingEntity.isDead) {
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) {
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);
}
}
this.setDead();
}
}
public void onUpdate() {
if (this.ridingEntity2 != null) {
this.updateRidden();
} else {
Block nBlock;
Entity target;
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
double dAmbit = 0.75;
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 EntityManaBurst) continue;
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);
this.setDead();
return;
}
}
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
list.removeAll(this.alreadyHitEntity);
if (this.getTargetEntityId() != 0 && (target = this.worldObj.getEntityByID(this.getTargetEntityId())) != null && target.isEntityAlive() && target.boundingBox.intersectsWith(bb)) {
list.add(target);
}
this.alreadyHitEntity.addAll(list);
Vec3 vec31 = Vec3.createVectorHelper((double)this.posX, (double)this.posY, (double)this.posZ);
Vec3 vec3 = Vec3.createVectorHelper((double)(this.posX + this.motionX), (double)(this.posY + this.motionY), (double)(this.posZ + this.motionZ));
double d0 = 10.0;
Entity hitEntity = null;
for (Entity curEntity : list) {
double d1;
if (!curEntity.canBeCollidedWith() || !((d1 = (double)curEntity.getDistanceToEntity((Entity)this)) < d0) && d0 != 0.0) continue;
hitEntity = curEntity;
d0 = d1;
}
if (hitEntity != null) {
float magicDamage = Math.max(1.0f, this.AttackLevel);
hitEntity.hurtResistantTime = 0;
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageBypassesArmor().setMagicDamage();
hitEntity.attackEntityFrom(ds, magicDamage);
if (this.blade != null && hitEntity instanceof EntityLivingBase) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
((ItemSlashBlade)this.blade.getItem()).hitEntity(this.blade, (EntityLivingBase)hitEntity, (EntityLivingBase)this.thrower);
hitEntity.motionX = 0.0;
hitEntity.motionY = 0.0;
hitEntity.motionZ = 0.0;
hitEntity.addVelocity(0.0, 0.1, 0.0);
((EntityLivingBase)hitEntity).hurtTime = 0;
((EntityLivingBase)hitEntity).hurtResistantTime = 0;
}
this.mountEntity(hitEntity);
}
int nPosX = MathHelper.floor_double((double)this.posX);
int nPosY = MathHelper.floor_double((double)this.posY);
int nPosZ = MathHelper.floor_double((double)this.posZ);
if (this.ridingEntity2 == null && !(nBlock = this.worldObj.getBlock(nPosX, nPosY, nPosZ)).isAir((IBlockAccess)this.worldObj, nPosX, nPosY, nPosZ) && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
this.setDead();
return;
}
if (this.getInterval() == this.ticksExisted) {
this.doBurst();
}
if (this.getInterval() < this.ticksExisted) {
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
} else {
this.doTargeting();
}
this.setPosition(this.posX, this.posY, this.posZ);
if (this.ticksExisted >= this.getLifeTime()) {
this.setDead();
}
}
}
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 = Math.max(0, this.getLifeTime() - 20);
}
}
public void doTargeting() {
Entity target;
int targetid = this.getTargetEntityId();
if (targetid != 0 && (target = this.worldObj.getEntityByID(targetid)) != null) {
if (!this.initIniYP) {
this.initIniYP = true;
if (this.getIniPitch() < -700.0f) {
this.iniYaw = this.thrower.rotationYaw;
this.iniPitch = this.thrower.rotationPitch;
} else {
this.iniYaw = this.getIniYaw();
this.iniPitch = this.getIniPitch();
}
}
this.faceEntity((Entity)this, target, (float)this.ticksExisted * 1.0f, (float)this.ticksExisted * 1.0f);
this.setDriveVector(1.75f, false);
}
}
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 fYVecOfst, boolean init) {
super.setDriveVector(fYVecOfst, 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.prevRotationYaw = this.rotationYaw;
this.prevRotationPitch = this.rotationPitch;
}
}
private void doBurst() {
if (!(this.thrower instanceof EntityPlayer)) {
return;
}
if (this.worldObj.isRemote) {
return;
}
EntityPlayer player = (EntityPlayer)this.thrower;
ItemTerraSword terraSword = (ItemTerraSword)GameRegistry.findItem((String)"Botania", (String)"terraSword");
ItemStack terraSwordStack = new ItemStack((Item)terraSword, 1, terraSword.getMaxDamage());
EntityManaBurst burst = terraSword.getBurst(player, terraSwordStack);
burst.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw + 180.0f, -this.rotationPitch);
float factor = 1.0f;
burst.setMotion(this.motionX * (double)factor, this.motionY * (double)factor, this.motionZ * (double)factor);
this.worldObj.spawnEntityInWorld((Entity)burst);
this.worldObj.playSoundAtEntity((Entity)player, "botania:terraBlade", 0.4f, 1.4f);
}
}
@@ -0,0 +1,131 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* cpw.mods.fml.common.registry.GameRegistry
* 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.Item
* net.minecraft.item.ItemStack
* net.minecraft.nbt.NBTTagCompound
* net.minecraft.util.AxisAlignedBB
* net.minecraft.util.Vec3
* net.minecraft.world.World
* vazkii.botania.api.mana.ManaItemHandler
* vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword
*/
package mods.flammpfeil.slashblade.terra.specialattack;
import cpw.mods.fml.common.registry.GameRegistry;
import java.util.List;
import mods.flammpfeil.slashblade.ItemSlashBlade;
import mods.flammpfeil.slashblade.ability.StylishRankManager;
import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase;
import mods.flammpfeil.slashblade.terra.entity.EntityPhantomSwordEx;
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.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import vazkii.botania.api.mana.ManaItemHandler;
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword;
public class TerraSwords
extends SpecialAttackBase {
public String toString() {
return "terra";
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (!world.isRemote) {
Entity tmp;
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
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) {
int i;
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.SlashDim);
int cost = -40;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-40), false)) {
stack.damageItem(10, (EntityLivingBase)player);
}
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.PhantomSword);
blade.attackTargetEntity(stack, target, player, Boolean.valueOf(true));
player.onCriticalHit(target);
target.motionX = 0.0;
target.motionY = 0.0;
target.motionZ = 0.0;
if (target instanceof EntityLivingBase) {
blade.setDaunting((EntityLivingBase)target);
((EntityLivingBase)target).hurtTime = 0;
((EntityLivingBase)target).hurtResistantTime = 0;
}
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack);
float magicDamage = 1.0f + ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * ((float)level / 5.0f);
ItemTerraSword terraSword = (ItemTerraSword)GameRegistry.findItem((String)"Botania", (String)"terraSword");
ItemStack terraSwordStack = new ItemStack((Item)terraSword, 1, terraSword.getMaxDamage());
int count = 3;
int rank = StylishRankManager.getStylishRank((Entity)player);
for (i = 1; i < rank; ++i) {
if (!ManaItemHandler.requestManaExactForTool((ItemStack)terraSwordStack, (EntityPlayer)player, (int)100, (boolean)true)) continue;
++count;
}
for (i = 0; i < count; ++i) {
EntityPhantomSwordEx entityDrive;
if (world.isRemote || (entityDrive = new EntityPhantomSwordEx(world, (EntityLivingBase)player, magicDamage, 90.0f)) == null) continue;
entityDrive.setInterval(7 + i * 2);
entityDrive.setLifeTime(30);
entityDrive.setColor(3524113);
entityDrive.setTargetEntityId(target.getEntityId());
world.spawnEntityInWorld((Entity)entityDrive);
}
}
}
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Kiriorosi);
}
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;
}
}
@@ -0,0 +1,89 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* cpw.mods.fml.common.eventhandler.SubscribeEvent
* cpw.mods.fml.common.registry.GameRegistry
* mods.flammpfeil.slashblade.ItemSlashBlade
* mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence
* mods.flammpfeil.slashblade.util.SlashBladeEvent$OnUpdateEvent
* net.minecraft.entity.Entity
* net.minecraft.entity.player.EntityPlayer
* net.minecraft.item.Item
* net.minecraft.item.ItemStack
* net.minecraft.nbt.NBTTagCompound
* net.minecraft.potion.Potion
* net.minecraft.potion.PotionEffect
* vazkii.botania.api.mana.ManaItemHandler
* vazkii.botania.common.entity.EntityManaBurst
* vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword
*/
package mods.flammpfeil.slashblade.terra.specialeffect;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import mods.flammpfeil.slashblade.ItemSlashBlade;
import mods.flammpfeil.slashblade.util.SlashBladeEvent;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import vazkii.botania.api.mana.ManaItemHandler;
import vazkii.botania.common.entity.EntityManaBurst;
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraSword;
public class ManaBurst {
public static final String EffectKey = "ManaBurst";
@SubscribeEvent
public void onUpdateItemSlashBlade(SlashBladeEvent.OnUpdateEvent event) {
int check;
boolean doBurst;
if (!event.isCurrent) {
return;
}
if (event.world.isRemote) {
return;
}
if (!(event.entity instanceof EntityPlayer)) {
return;
}
EntityPlayer player = (EntityPlayer)event.entity;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)event.blade);
NBTTagCompound etag = tag.getCompoundTag("SB.SEffect");
int reqiredLevel = etag.getInteger(EffectKey);
if (reqiredLevel == 0) {
return;
}
ItemSlashBlade.ComboSequence seq = ItemSlashBlade.getComboSequence((NBTTagCompound)tag);
if (seq == ItemSlashBlade.ComboSequence.None) {
return;
}
if (seq == ItemSlashBlade.ComboSequence.Noutou) {
return;
}
if (seq.useScabbard) {
return;
}
doBurst = reqiredLevel <= player.experienceLevel || player.getRNG().nextInt(4) == 0;
if (!doBurst) {
return;
}
PotionEffect haste = player.getActivePotionEffect(Potion.digSpeed);
check = haste != null ? (haste.getAmplifier() != 1 ? 3 : 4) : 2;
if (player.swingProgressInt != check) {
return;
}
ItemTerraSword terraSword = (ItemTerraSword)GameRegistry.findItem((String)"Botania", (String)"terraSword");
ItemStack terraSwordStack = new ItemStack((Item)terraSword, 1, terraSword.getMaxDamage());
if (!ManaItemHandler.requestManaExactForTool((ItemStack)terraSwordStack, (EntityPlayer)player, (int)100, (boolean)true)) {
return;
}
EntityManaBurst burst = terraSword.getBurst(player, terraSwordStack);
event.world.spawnEntityInWorld((Entity)burst);
event.world.playSoundAtEntity((Entity)player, "botania:terraBlade", 0.4f, 1.4f);
}
}
@@ -0,0 +1,71 @@
/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* cpw.mods.fml.common.eventhandler.SubscribeEvent
* cpw.mods.fml.relauncher.ReflectionHelper
* mods.flammpfeil.slashblade.ItemSlashBlade
* mods.flammpfeil.slashblade.entity.EntityBladeStand
* mods.flammpfeil.slashblade.util.SlashBladeEvent$OnEntityBladeStandUpdateEvent
* net.minecraft.item.ItemStack
* net.minecraft.nbt.NBTTagCompound
* net.minecraft.tileentity.TileEntity
* vazkii.botania.common.block.tile.mana.TilePool
*/
package mods.flammpfeil.slashblade.terra.specialeffect;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.ReflectionHelper;
import mods.flammpfeil.slashblade.ItemSlashBlade;
import mods.flammpfeil.slashblade.entity.EntityBladeStand;
import mods.flammpfeil.slashblade.util.SlashBladeEvent;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import vazkii.botania.common.block.tile.mana.TilePool;
public class ManaPoolRepair {
static final int RepairManaCost = 100;
public static final String EffectKey = "ManaPoolRepair";
@SubscribeEvent
public void onUpdateBladeStand(SlashBladeEvent.OnEntityBladeStandUpdateEvent event) {
try {
TileEntity tile;
EntityBladeStand stand = (EntityBladeStand)ReflectionHelper.getPrivateValue(SlashBladeEvent.OnEntityBladeStandUpdateEvent.class, event, "entityBladeStand");
if (!stand.hasBlade()) {
return;
}
ItemStack blade = event.blade;
if (!blade.isItemDamaged()) {
return;
}
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)blade);
NBTTagCompound etag = tag.getCompoundTag("SB.SEffect");
int reqiredLevel = etag.getInteger(EffectKey);
if (reqiredLevel == 0) {
return;
}
int x = (int)Math.floor(stand.posX);
int y = (int)Math.floor(stand.posY);
int z = (int)Math.floor(stand.posZ);
if ((tile = stand.worldObj.getTileEntity(x, --y, z)) == null) {
return;
}
if (!(tile instanceof TilePool)) {
return;
}
TilePool pool = (TilePool)tile;
int current = pool.getCurrentMana();
if (current < 100) {
return;
}
pool.recieveMana(-100);
blade.setItemDamage(blade.getItemDamage() - 1);
}
catch (Throwable throwable) {
// empty catch block
}
}
}
+2
View File
@@ -0,0 +1,2 @@
Summary for E:\天地联盟\SlashBlade-Terra\original\【拔刀剑附属】[大地之刃]SlashBlade-Terra-mc1.7.10-r1.jar
Decompiled with CFR 0.152
@@ -0,0 +1,12 @@
item.flammpfeil.slashblade.named.terra.name=Terra Blade
flammpfeil.slashblade.specialattack.terra=BlisteringTerraSwords
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra.pos=30, 8
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra=Terra Blade
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra.desc=§8§l§oBlessed ivy
botania.page.terraSwordsb=SlashBlade
slashblade.seffect.name.ManaBurst=§a§oManaBurst
slashblade.seffect.name.ManaPoolRepair=§a§oManaPoolRepair
@@ -0,0 +1 @@
#文字コード判定用文字列
@@ -0,0 +1,13 @@
#文字コード判定用文字列
item.flammpfeil.slashblade.named.terra.name=大地之刃
flammpfeil.slashblade.specialattack.terra=灼热地裂斩
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra.pos=30, 8
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra=大地之刃
achievement.flammpfeil.slashblade.flammpfeil.slashblade.named.terra.desc=§8§l§o集大地精华而成
botania.page.terraSwordsb=拔刀剑
slashblade.seffect.name.ManaBurst=§a§o玛娜强化
slashblade.seffect.name.ManaPoolRepair=§a§o玛娜池修复
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because it is too large. Load diff
+18
View File
@@ -0,0 +1,18 @@
[
{
"modid": "flammpfeil.slashblade.terra",
"name": "SlashBlade-Terra",
"description":"",
"version": "mc1.7.10-r1",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",
"authors": [ "Ferne"],
"credits": "Furia",
"logoFile": "",
"parent":"flammpfeil.slashblade",
"screenshots": [],
"requiredMods": [],
"dependencies": []
}
]