初始化反编译源码

This commit is contained in:
layue13 committed 2026-06-30 04:05:01 +08:00
commit 1832dacd2c
105 files changed
+223726

No files matched your search

@@ -0,0 +1,490 @@
/*
* 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 com.moe.allweapon.Entityadd;
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.Date;
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 EntityDriveAdd
extends Entity
implements IThrowableEntity {
protected Entity thrower;
protected ItemStack blade = null;
protected List<Entity> alreadyHitEntity = new ArrayList<Entity>();
protected float AttackLevel = 0.0f;
private int i;
private Long startTime = new Date().getTime();
public EntityDriveAdd(World par1World) {
super(par1World);
}
public EntityDriveAdd(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit, float roll) {
this(par1World, entityLiving, AttackLevel, multiHit);
this.setRoll(roll);
}
public EntityDriveAdd(World par1World, EntityLivingBase entityLiving, float AttackLevel, boolean multiHit) {
this(par1World, entityLiving, AttackLevel);
this.setIsMultiHit(multiHit);
}
public EntityDriveAdd(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
this(par1World);
this.AttackLevel = AttackLevel;
this.field_70129_M = entityLiving.func_70047_e() / 2.0f;
this.thrower = entityLiving;
if (this.blade != null && !(this.blade.func_77973_b() instanceof ItemSlashBlade)) {
this.blade = null;
}
this.alreadyHitEntity.clear();
this.alreadyHitEntity.add(this.thrower);
this.alreadyHitEntity.add(this.thrower.field_70154_o);
this.alreadyHitEntity.add(this.thrower.field_70153_n);
this.field_70173_aa = 0;
this.func_70105_a(2.0f, 4.0f);
this.func_70012_b(this.thrower.field_70165_t, this.thrower.field_70163_u + (double)this.thrower.func_70047_e() / 2.0, this.thrower.field_70161_v, this.thrower.field_70177_z, this.thrower.field_70125_A);
this.setDriveVector(0.75f);
this.func_70107_b(this.field_70165_t + this.field_70159_w, this.field_70163_u + this.field_70181_x, this.field_70161_v + this.field_70179_y);
}
protected void func_70088_a() {
this.func_70096_w().func_75682_a(4, (Object)0);
this.func_70096_w().func_75682_a(5, (Object)Float.valueOf(0.0f));
this.func_70096_w().func_75682_a(10, (Object)0x3333FF);
this.func_70096_w().func_75682_a(11, (Object)Float.valueOf(1.0f));
this.func_70096_w().func_75682_a(12, (Object)Float.valueOf(0.25f));
this.func_70096_w().func_75682_a(13, (Object)Float.valueOf(1.0f));
this.func_70096_w().func_75682_a(6, (Object)20);
this.func_70096_w().func_75682_a(21, (Object)Float.valueOf(1.05f));
this.func_70096_w().func_75682_a(22, (Object)Float.valueOf(0.0f));
this.func_70096_w().func_75682_a(23, (Object)0);
this.func_70096_w().func_75682_a(24, (Object)String.valueOf(""));
this.func_70096_w().func_75682_a(25, (Object)String.valueOf(""));
this.func_70096_w().func_75682_a(7, (Object)0);
this.func_70096_w().func_75682_a(26, (Object)1);
}
public boolean getIsPlayerSound() {
return this.func_70096_w().func_75683_a(26) == 0;
}
public void setIsPlayerSound(boolean isPlaySound) {
this.func_70096_w().func_75692_b(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
}
public float getInitSpeed() {
return this.func_70096_w().func_111145_d(21);
}
public void setInitSpeed(float value) {
this.func_70096_w().func_75692_b(21, (Object)Float.valueOf(value));
}
public float getNextSpeed() {
return this.func_70096_w().func_111145_d(22);
}
public void setNextSpeed(float value) {
this.func_70096_w().func_75692_b(22, (Object)Float.valueOf(value));
}
public int getChangeTime() {
return this.func_70096_w().func_75679_c(23);
}
public void setChangeTime(int value) {
this.func_70096_w().func_75692_b(23, (Object)value);
}
public String getSound() {
return this.func_70096_w().func_75681_e(24);
}
public void setSound(String value) {
this.func_70096_w().func_75692_b(24, (Object)String.valueOf(value));
}
public String getParticle() {
return this.func_70096_w().func_75681_e(25);
}
public void setParticle(String value) {
this.func_70096_w().func_75692_b(25, (Object)String.valueOf(value));
}
public float getc() {
return this.func_70096_w().func_111145_d(11);
}
public void setc(Float value) {
this.func_70096_w().func_75692_b(11, (Object)Float.valueOf(value.floatValue()));
}
public float getk() {
return this.func_70096_w().func_111145_d(12);
}
public void setk(Float value) {
this.func_70096_w().func_75692_b(12, (Object)Float.valueOf(value.floatValue()));
}
public float getg() {
return this.func_70096_w().func_111145_d(13);
}
public void setg(Float value) {
this.func_70096_w().func_75692_b(13, (Object)Float.valueOf(value.floatValue()));
}
public int getColor() {
return this.func_70096_w().func_75679_c(10);
}
public void setColor(int value) {
this.func_70096_w().func_75692_b(10, (Object)value);
}
public boolean getIsMultiHit() {
return this.func_70096_w().func_75683_a(4) == 0;
}
public void setIsMultiHit(boolean isMultiHit) {
this.func_70096_w().func_75692_b(4, (Object)((byte)(isMultiHit ? 1 : 0)));
}
public float getRoll() {
return this.func_70096_w().func_111145_d(5);
}
public void setRoll(float roll) {
this.func_70096_w().func_75692_b(5, (Object)Float.valueOf(roll));
}
public int getLifeTime() {
return this.func_70096_w().func_75679_c(6);
}
public void setLifeTime(int lifetime) {
this.func_70096_w().func_75692_b(6, (Object)lifetime);
}
public boolean getIsSlashDimension() {
return this.func_70096_w().func_75683_a(7) == 1;
}
public void setIsSlashDimension(boolean isSlashDimension) {
this.func_70096_w().func_75692_b(7, (Object)((byte)(isSlashDimension ? 1 : 0)));
}
public void setInitialSpeed(float f) {
this.func_70012_b(this.thrower.field_70165_t, this.thrower.field_70163_u + (double)this.thrower.func_70047_e() / 2.0, this.thrower.field_70161_v, this.thrower.field_70177_z, this.thrower.field_70125_A);
this.setDriveVector(f);
}
public void setDriveVector(float fYVecOfst) {
float fYawDtoR = this.field_70177_z / 180.0f * 3.141593f;
float fPitDtoR = this.field_70125_A / 180.0f * 3.141593f;
this.field_70159_w = -MathHelper.func_76126_a((float)fYawDtoR) * MathHelper.func_76134_b((float)fPitDtoR) * fYVecOfst;
this.field_70181_x = -MathHelper.func_76126_a((float)fPitDtoR) * fYVecOfst;
this.field_70179_y = MathHelper.func_76134_b((float)fYawDtoR) * MathHelper.func_76134_b((float)fPitDtoR) * fYVecOfst;
float f3 = MathHelper.func_76133_a((double)(this.field_70159_w * this.field_70159_w + this.field_70179_y * this.field_70179_y));
this.field_70126_B = this.field_70177_z = (float)(Math.atan2(this.field_70159_w, this.field_70179_y) * 180.0 / Math.PI);
this.field_70127_C = this.field_70125_A = (float)(Math.atan2(this.field_70181_x, f3) * 180.0 / Math.PI);
}
public void func_70071_h_() {
long time = new Date().getTime();
long time_2 = (time - this.startTime) / 1000L;
if (time_2 >= 3L) {
this.alreadyHitEntity.clear();
this.alreadyHitEntity = null;
this.func_70106_y();
return;
}
this.field_70142_S = this.field_70165_t;
this.field_70137_T = this.field_70163_u;
this.field_70136_U = this.field_70161_v;
if (!this.field_70170_p.field_72995_K) {
int nPosZ;
int nPosY;
int nPosX;
Block nBlock;
double dAmbit = 1.5;
AxisAlignedBB bb = AxisAlignedBB.func_72330_a((double)(this.field_70165_t - dAmbit), (double)(this.field_70163_u - dAmbit), (double)(this.field_70161_v - dAmbit), (double)(this.field_70165_t + dAmbit), (double)(this.field_70163_u + dAmbit), (double)(this.field_70161_v + dAmbit));
if (this.getThrower() instanceof EntityLivingBase) {
EntityLivingBase entityLiving = (EntityLivingBase)this.getThrower();
List list = this.field_70170_p.func_94576_a(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 : (java.util.List<Entity>)(java.util.List<?>)list) {
boolean isDestruction = true;
if (curEntity instanceof EntityFireball) {
isDestruction = ((EntityFireball)curEntity).field_70235_a != null && ((EntityFireball)curEntity).field_70235_a.func_145782_y() == entityLiving.func_145782_y() ? false : !curEntity.func_70097_a(DamageSource.func_76358_a((EntityLivingBase)entityLiving), this.AttackLevel / 5.0f);
} else if (curEntity instanceof EntityArrow) {
if (((EntityArrow)curEntity).field_70250_c != null && ((EntityArrow)curEntity).field_70250_c.func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
}
} else if (curEntity instanceof IThrowableEntity) {
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
}
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).func_85052_h() != null && ((EntityThrowable)curEntity).func_85052_h().func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
}
if (!isDestruction) continue;
curEntity.field_70159_w = 0.0;
curEntity.field_70181_x = 0.0;
curEntity.field_70179_y = 0.0;
curEntity.func_70106_y();
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.field_70170_p.func_72869_a("explode", curEntity.field_70165_t + (double)(rand.nextFloat() * curEntity.field_70130_N * 2.0f) - (double)curEntity.field_70130_N - var2 * var8, curEntity.field_70163_u + (double)(rand.nextFloat() * curEntity.field_70131_O) - var4 * var8, curEntity.field_70161_v + (double)(rand.nextFloat() * curEntity.field_70130_N * 2.0f) - (double)curEntity.field_70130_N - var6 * var8, var2, var4, var6);
}
StylishRankManager.doAttack((Entity)this.thrower);
}
}
if (!this.getIsMultiHit() || this.field_70173_aa % 2 == 0) {
List list = this.field_70170_p.func_94576_a(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 : (java.util.List<Entity>)(java.util.List<?>)list) {
float health;
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).func_110143_aJ())) {
health = Math.max(1.0f, health - magicDamage);
((EntityLivingBase)curEntity).func_70606_j(health);
}
curEntity.field_70172_ad = 0;
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).func_76348_h().func_82726_p();
curEntity.func_70097_a(ds, magicDamage / 5.0f);
if (this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
((ItemSlashBlade)this.blade.func_77973_b()).func_77644_a(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
}
}
if (!(nBlock = this.field_70170_p.func_147439_a(nPosX = MathHelper.func_76128_c((double)this.field_70165_t), nPosY = MathHelper.func_76128_c((double)this.field_70163_u), nPosZ = MathHelper.func_76128_c((double)this.field_70161_v))).isAir((IBlockAccess)this.field_70170_p, nPosX, nPosY, nPosZ) && nBlock.func_149668_a(this.field_70170_p, nPosX, nPosY, nPosZ) != null) {
this.func_70106_y();
}
}
this.field_70159_w *= 1.049999952316284;
this.field_70181_x *= 1.049999952316284;
this.field_70179_y *= 1.049999952316284;
double m_x = this.field_70159_w;
double m_y = this.field_70181_x;
double m_z = this.field_70179_y;
this.field_70165_t += this.field_70159_w;
this.field_70163_u += this.field_70181_x;
this.field_70161_v += this.field_70179_y;
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
int changeTime = this.getChangeTime();
if (changeTime != 0 && this.field_70173_aa >= changeTime) {
float nextSpeed = this.getNextSpeed();
this.playSound();
this.field_70159_w = m_x *= (double)nextSpeed;
this.field_70181_x = m_y *= (double)nextSpeed;
this.field_70179_y = m_z *= (double)nextSpeed;
this.field_70165_t += m_x;
this.field_70163_u += m_y;
this.field_70161_v += m_z;
} else {
float initSpeed = this.getInitSpeed();
if (initSpeed >= 1.05f) {
this.field_70159_w = m_x *= (double)initSpeed;
this.field_70181_x = m_y *= (double)initSpeed;
this.field_70179_y = m_z *= (double)initSpeed;
this.field_70165_t += m_x;
this.field_70163_u += m_y;
this.field_70161_v += m_z;
} else {
this.field_70165_t += this.field_70159_w * 0.1;
this.field_70163_u += this.field_70181_x * 0.1;
this.field_70161_v += this.field_70179_y * 0.1;
}
}
this.playParticle();
this.func_70107_b(this.field_70165_t, this.field_70163_u, this.field_70161_v);
if (this.field_70173_aa >= this.getLifeTime()) {
this.alreadyHitEntity.clear();
this.alreadyHitEntity = null;
this.func_70106_y();
}
}
public Random getRand() {
return this.field_70146_Z;
}
public boolean func_70038_c(double par1, double par3, double par5) {
return false;
}
public void func_70091_d(double par1, double par3, double par5) {
}
protected void func_70081_e(int par1) {
}
public boolean func_70072_I() {
return false;
}
public boolean func_70055_a(Material par1Material) {
return false;
}
public boolean func_70058_J() {
return false;
}
@SideOnly(value=Side.CLIENT)
public int func_70070_b(float par1) {
float f1 = 0.5f;
if (f1 < 0.0f) {
f1 = 0.0f;
}
if (f1 > 1.0f) {
f1 = 1.0f;
}
int i = super.func_70070_b(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 func_70013_c(float par1) {
float f1 = super.func_70013_c(par1);
float f2 = 0.9f;
f2 = f2 * f2 * f2 * f2;
return f1 * (1.0f - f2) + f2;
}
protected void func_70037_a(NBTTagCompound nbttagcompound) {
}
protected void func_70014_b(NBTTagCompound nbttagcompound) {
}
@SideOnly(value=Side.CLIENT)
public float func_70053_R() {
return 0.0f;
}
public void func_70078_a(Entity par1Entity) {
}
@SideOnly(value=Side.CLIENT)
public void func_70056_a(double par1, double par3, double par5, float par7, float par8, int par9) {
}
public void func_70063_aa() {
}
public boolean func_70027_ad() {
return false;
}
public boolean shouldRenderInPass(int pass) {
return pass == 1;
}
public void func_70110_aj() {
}
public Entity getThrower() {
return this.thrower;
}
public void setThrower(Entity entity) {
this.thrower = entity;
}
public void playParticle() {
this.i = 0;
while (this.i < 20) {
String particle = this.getParticle();
if (particle != null && !particle.equals("")) {
Random rand = new Random();
double var2 = rand.nextGaussian() * 0.12;
double var4 = rand.nextGaussian() * 0.12;
double var6 = rand.nextGaussian() * 0.12;
double var8 = 10.0;
this.field_70170_p.func_72869_a(particle, this.field_70165_t + (double)(rand.nextFloat() * this.field_70130_N * 2.0f) - (double)this.field_70130_N - var2 * var8, this.field_70163_u + (double)(rand.nextFloat() * this.field_70131_O) - var4 * var8, this.field_70161_v + (double)(rand.nextFloat() * this.field_70130_N * 2.0f) - (double)this.field_70130_N - var6 * var8, var2, var4, var6);
}
++this.i;
}
}
public void playSound() {
if (!this.getIsPlayerSound()) {
String sound = this.getSound();
if (sound != null && !sound.equals("") && this.thrower instanceof EntityPlayer) {
this.thrower.func_85030_a(sound, 1.0f, 1.5f);
}
this.setIsPlayerSound(true);
}
}
}