@Fix SlashBlade API deobfuscation and repoint deps to real SlashBlade/Botania

Compile-error fixes (deobfuscated func_/field_ references -> real SlashBlade API method names):
- ItemSlashBlade / EntityDrive / MotionVector / StunTracker / Refine / Trail / Combo
- DataWatcher parameters: ItemSlashBlade.stack -> SlashBlade.getSpecialAttackFromState, etc.
- Replaced call sites pointed at SlashBlade stub with real SlashBlade mc1.7.10-r87 API

Dependencies updated:
- SlashBlade 1.0.0-stub -> mods.flammpfeil.slashblade:SlashBlade:mc1.7.10-r87 (real, MavenLocal)
- botania-stub -> com.github.GTNewHorizons:Botania:1.13.16-GTNH:dev (real, JitPack/GTNH Maven)

compileJava + publishToMavenLocal both green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@
This commit is contained in:
TDLM Bot committed 2026-07-05 03:35:58 +08:00
1 parent b3901080b3
commit 7a6d4c4970
43 files changed
+952 -947

No files matched your search

+7 -1
View File
@@ -1 +1,7 @@
dependencies {}
dependencies {
compileOnlyApi('mods.flammpfeil.slashblade:SlashBlade:mc1.7.10-r87')
}
repositories {
mavenLocal()
}
+1 -2
View File
@@ -1,6 +1,6 @@
/*
* Decompiled with CFR 0.152.
*
*
* Could not load the following classes:
* cpw.mods.fml.common.Mod
* cpw.mods.fml.common.Mod$EventHandler
@@ -44,4 +44,3 @@ public class Lostblade {
proxy.postInit(event);
}
}
@@ -5,21 +5,21 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public final class LostbladeLimits {
public static final int MAX_DESTRUCTABLES_PER_TICK = 8;
public static final int MAX_ATTACKABLES_PER_TICK = 8;
public static final int MAX_PLAYER_HITS_PER_DRIVE = 2;
public static final int MAX_aESTRUCTABLES_PER_TtCK = 8;
public static final int MAX_ATTACKABLES_PER_TtCK = 8;
public static final int MAX_PLAYER_HtTS_PER_aRtVE = 2;
private LostbladeLimits() {
}
public static boolean isOnCooldown(EntityPlayer player, NBTTagCompound tag, String key, int ticks) {
World world = player.field_70170_p;
long now = world.func_82737_E();
World world = player.worldObj;
long now = world.getTotalWorldTime();
String tagKey = "lostblade." + key + ".nextTick";
if (tag.func_74763_f(tagKey) > now) {
if (tag.getLong(tagKey) > now) {
return true;
}
tag.func_74772_a(tagKey, now + ticks);
tag.setLong(tagKey, now + ticks);
return false;
}
}
@@ -37,34 +37,34 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (LostbladeLimits.isOnCooldown(player, tag, "crescentMoon", 10)) {
return;
}
if (!world.field_72995_K) {
if (!world.isRemote) {
int cost = -30;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
ItemSlashBlade.damageItem((ItemStack)stack, (int)5, (EntityLivingBase)player);
}
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
int rank = StylishRankManager.getStylishRank((Entity)player);
float baseModif = blade.getBaseAttackModifiers(tag);
int level = EnchantmentHelper.func_77506_a((int)Enchantment.field_77345_t.field_77352_x, (ItemStack)stack);
float magicDamage = baseModif * (float)rank;
int level = EnchantmentHelper.getEnchantmentLevel((int)Enchantment.flame.effectId, (ItemStack)stack);
float magicaamage = baseModif * (float)rank;
for (int i = 0; i < 3; ++i) {
if (4 <= rank) {
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (float)(rank + level) / 2.0f;
magicaamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (float)(rank + level) / 2.0f;
}
EntityDriveAlt entityDrive = new EntityDriveAlt(world, (EntityLivingBase)player, magicDamage, false, 0.0f - ItemSlashBlade.ComboSequence.Battou.swingDirection);
entityDrive.setColor(Short.MAX_VALUE);
entityDrive.setc(Float.valueOf(6.0f));
entityDrive.setk(Float.valueOf(1.0f));
entityDrive.setg(Float.valueOf(1.5f));
entityDrive.setInitialSpeed(0.7f);
entityDrive.setLifeTime(80);
if (entityDrive == null) continue;
world.func_72838_d((Entity)entityDrive);
EntityDriveAlt entitydrive = new EntityDriveAlt(world, (EntityLivingBase)player, magicaamage, false, 0.0f - ItemSlashBlade.ComboSequence.Battou.swingDirection);
entitydrive.setColor(Short.MAX_VALUE);
entitydrive.setc(Float.valueOf(6.0f));
entitydrive.setk(Float.valueOf(1.0f));
entitydrive.setg(Float.valueOf(1.5f));
entitydrive.settnitialSpeed(0.7f);
entitydrive.setLifeTime(80);
if (entitydrive == null) continue;
world.spawnEntityInWorld((Entity)entitydrive);
}
}
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Kiriorosi);
+39 -39
View File
@@ -43,62 +43,62 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (LostbladeLimits.isOnCooldown(player, tag, "cureWave", 10)) {
return;
}
if (!world.field_72995_K) {
if (!world.isRemote) {
int cost = -30;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
stack.func_77972_a(10, (EntityLivingBase)player);
stack.damageItem(10, (EntityLivingBase)player);
}
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
AxisAlignedBB bb = player.field_70121_D.func_72329_c();
bb = bb.func_72314_b(5.0, 0.25, 5.0);
List list = world.func_94576_a((Entity)player, bb, ItemSlashBlade.AttackableSelector);
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
AxisAlignedBB bb = player.boundingBox.copy();
bb = bb.expand(5.0, 0.25, 5.0);
List list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
int rank = StylishRankManager.getStylishRank((Entity)player);
int affected = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (affected++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TICK) break;
((EntityLivingBase)curEntity).func_70690_d(new PotionEffect(Potion.field_76432_h.func_76396_c(), 1, rank));
((EntityLivingBase)curEntity).func_70690_d(new PotionEffect(Potion.field_76428_l.func_76396_c(), 400, 2));
((EntityLivingBase)curEntity).func_70690_d(new PotionEffect(Potion.field_76429_m.func_76396_c(), 400, 0));
if (affected++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TtCK) break;
((EntityLivingBase)curEntity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 1, rank));
((EntityLivingBase)curEntity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 400, 2));
((EntityLivingBase)curEntity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 400, 0));
}
float magicDamage = 0.0f;
float magicaamage = 0.0f;
int maxCount = 6;
maxCount += rank;
maxCount = Math.min(4, maxCount);
for (int i = 0; i < maxCount; ++i) {
EntityDriveCure entityDrive = new EntityDriveCure(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
entityDrive.func_70012_b(player.field_70165_t, player.field_70163_u, player.field_70161_v, player.field_70177_z + (float)(60 * i), 0.0f);
entityDrive.setColor(7396315);
entityDrive.setDriveVector(0.25f);
entityDrive.setLifeTime(15);
entityDrive.setIsMultiHit(false);
entityDrive.setRoll(90.0f);
EntityDriveCure entityDrive2 = new EntityDriveCure(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
entityDrive2.func_70012_b(player.field_70165_t, player.field_70163_u, player.field_70161_v, player.field_70177_z + (float)(60 * i), 0.0f);
entityDrive2.setColor(7396315);
entityDrive2.setDriveVector(0.2f);
entityDrive2.setLifeTime(15);
entityDrive2.setIsMultiHit(false);
entityDrive2.setRoll(90.0f);
EntityDriveCure entityDrive3 = new EntityDriveCure(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
entityDrive3.func_70012_b(player.field_70165_t, player.field_70163_u, player.field_70161_v, player.field_70177_z + (float)(60 * i), 0.0f);
entityDrive3.setColor(7396315);
entityDrive3.setDriveVector(0.15f);
entityDrive3.setLifeTime(15);
entityDrive3.setIsMultiHit(false);
entityDrive3.setRoll(90.0f);
if (entityDrive != null) {
world.func_72838_d((Entity)entityDrive);
EntityDriveCure entitydrive = new EntityDriveCure(world, (EntityLivingBase)player, magicaamage, false, 0.0f);
entitydrive.setLocationAndAngles(player.posX, player.posY, player.posZ, player.rotationYaw + (float)(60 * i), 0.0f);
entitydrive.setColor(7396315);
entitydrive.setDriveVector(0.25f);
entitydrive.setLifeTime(15);
entitydrive.setIsMultiHit(false);
entitydrive.setRoll(90.0f);
EntityDriveCure entitydrive2 = new EntityDriveCure(world, (EntityLivingBase)player, magicaamage, false, 0.0f);
entitydrive2.setLocationAndAngles(player.posX, player.posY, player.posZ, player.rotationYaw + (float)(60 * i), 0.0f);
entitydrive2.setColor(7396315);
entitydrive2.setDriveVector(0.2f);
entitydrive2.setLifeTime(15);
entitydrive2.setIsMultiHit(false);
entitydrive2.setRoll(90.0f);
EntityDriveCure entitydrive3 = new EntityDriveCure(world, (EntityLivingBase)player, magicaamage, false, 0.0f);
entitydrive3.setLocationAndAngles(player.posX, player.posY, player.posZ, player.rotationYaw + (float)(60 * i), 0.0f);
entitydrive3.setColor(7396315);
entitydrive3.setDriveVector(0.15f);
entitydrive3.setLifeTime(15);
entitydrive3.setIsMultiHit(false);
entitydrive3.setRoll(90.0f);
if (entitydrive != null) {
world.spawnEntityInWorld((Entity)entitydrive);
}
if (entityDrive2 != null) {
world.func_72838_d((Entity)entityDrive2);
if (entitydrive2 != null) {
world.spawnEntityInWorld((Entity)entitydrive2);
}
if (entityDrive3 == null) continue;
world.func_72838_d((Entity)entityDrive3);
if (entitydrive3 == null) continue;
world.spawnEntityInWorld((Entity)entitydrive3);
}
}
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Calibur);
+30 -30
View File
@@ -40,17 +40,17 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (LostbladeLimits.isOnCooldown(player, tag, "delete", 8)) {
return;
}
if (!world.field_72995_K) {
if (!world.isRemote) {
Entity tmp;
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
Entity target = null;
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
if (entityId != 0 && (tmp = world.func_73045_a(entityId)) != null && tmp.func_70032_d((Entity)player) < 30.0f) {
int entitytd = ItemSlashBlade.TargetEntityId.get(tag);
if (entitytd != 0 && (tmp = world.getEntityByID(entitytd)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
target = tmp;
}
if (target == null) {
@@ -64,27 +64,27 @@ extends SpecialAttackBase {
}
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.PhantomSword);
blade.attackTargetEntity(stack, target, player, Boolean.valueOf(true));
player.func_71009_b(target);
target.field_70159_w = 0.0;
target.field_70181_x = 0.0;
target.field_70179_y = 0.0;
player.attackTargetEntityWithCurrentItem(target);
target.motionX = 0.0;
target.motionY = 0.0;
target.motionZ = 0.0;
if (target instanceof EntityLivingBase) {
blade.setDaunting((EntityLivingBase)target);
((EntityLivingBase)target).field_70737_aN = 0;
((EntityLivingBase)target).field_70172_ad = 0;
((EntityLivingBase)target).hurtResistantTime = 0;
((EntityLivingBase)target).attackTime = 0;
}
float magicDamage = 2.0f + ItemSlashBlade.RepairCount.get(tag).floatValue() / 2.0f;
float magicaamage = 2.0f + ItemSlashBlade.RepairCount.get(tag).floatValue() / 2.0f;
int count = 3 + 3 * StylishRankManager.getStylishRank((Entity)player);
count = Math.min(target instanceof EntityPlayer ? 6 : 12, count);
for (int i = 0; i < count; ++i) {
EntityWitherSword entityDrive;
if (world.field_72995_K || (entityDrive = new EntityWitherSword(world, (EntityLivingBase)player, magicDamage, 90.0f)) == null) continue;
entityDrive.setInterval(3 + i);
entityDrive.setLifeTime(target instanceof EntityPlayer ? 40 : 60);
entityDrive.setRoll(20.0f);
entityDrive.setColor(0xADEAEA);
entityDrive.setTargetEntityId(target.func_145782_y());
world.func_72838_d((Entity)entityDrive);
EntityWitherSword entitydrive;
if (world.isRemote || (entitydrive = new EntityWitherSword(world, (EntityLivingBase)player, magicaamage, 90.0f)) == null) continue;
entitydrive.setInterval(3 + i);
entitydrive.setLifeTime(target instanceof EntityPlayer ? 40 : 60);
entitydrive.setRoll(20.0f);
entitydrive.setColor(0xAaEAEA);
entitydrive.setTargetEntityId(target.getEntityId());
world.spawnEntityInWorld((Entity)entitydrive);
}
}
}
@@ -92,21 +92,21 @@ extends SpecialAttackBase {
}
private Entity getEntityToWatch(EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
Entity target = null;
for (int dist = 2; dist < 20; dist += 2) {
AxisAlignedBB bb = player.field_70121_D.func_72329_c();
Vec3 vec = player.func_70040_Z();
vec = vec.func_72432_b();
bb = bb.func_72314_b(2.0, 0.25, 2.0);
bb = bb.func_72317_d(vec.field_72450_a * (double)dist, vec.field_72448_b * (double)dist, vec.field_72449_c * (double)dist);
List list = world.func_94576_a((Entity)player, bb, ItemSlashBlade.AttackableSelector);
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 list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
float distance = 30.0f;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
float curDist = curEntity.func_70032_d((Entity)player);
if (!(curDist < distance)) continue;
float curaist = curEntity.getDistanceToEntity((Entity)player);
if (!(curaist < distance)) continue;
target = curEntity;
distance = curDist;
distance = curaist;
}
if (target != null) break;
}
@@ -43,25 +43,25 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (LostbladeLimits.isOnCooldown(player, tag, "dragonBurst", 12)) {
return;
}
player.field_70170_p.func_72956_a((Entity)player, "mob.enderdragon.growl", 1.0f, 1.0f);
if (player.func_70027_ad()) {
player.func_85030_a("random.fizz", 0.7f, 1.6f + (player.func_70681_au().nextFloat() - player.func_70681_au().nextFloat()) * 0.4f);
player.func_70066_B();
player.worldObj.playSoundAtEntity((Entity)player, "mob.enderdragon.growl", 1.0f, 1.0f);
if (player.isBurning()) {
player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f);
player.extinguish();
}
if (!world.field_72995_K) {
if (!world.isRemote) {
int cost = -200;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
stack.func_77972_a(50, (EntityLivingBase)player);
stack.damageItem(50, (EntityLivingBase)player);
}
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
AxisAlignedBB bb = player.field_70121_D.func_72329_c();
bb = bb.func_72314_b(5.0, 0.25, 5.0);
List list = world.func_94576_a((Entity)player, bb, ItemSlashBlade.AttackableSelector);
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
AxisAlignedBB bb = player.boundingBox.copy();
bb = bb.expand(5.0, 0.25, 5.0);
List list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
boolean playerTarget = false;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (!(curEntity instanceof EntityPlayer)) continue;
@@ -69,17 +69,17 @@ extends SpecialAttackBase {
break;
}
float baseModif = blade.getBaseAttackModifiers(tag);
int level = Math.max(1, EnchantmentHelper.func_77506_a((int)Enchantment.field_77345_t.field_77352_x, (ItemStack)stack));
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.flame.effectId, (ItemStack)stack));
int rank = StylishRankManager.getStylishRank((Entity)player);
float magicDamage = baseModif * (float)level / 2.0f;
float magicaamage = baseModif * (float)level / 2.0f;
if (2 <= rank) {
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level) * (float)rank;
magicaamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (3.3f + (float)level) * (float)rank;
}
if (5 <= rank) {
magicDamage += (float)(rank * 10);
magicaamage += (float)(rank * 10);
}
if (6 <= rank) {
magicDamage *= (float)(rank * 500);
magicaamage *= (float)(rank * 500);
}
int maxCol = playerTarget ? 2 : 3;
int maxCount = 3;
@@ -87,18 +87,18 @@ extends SpecialAttackBase {
maxCount = Math.min(playerTarget ? 3 : 5, maxCount);
for (int j = 0; j < maxCol; ++j) {
for (int i = 0; i < maxCount; ++i) {
if (world.field_72995_K) continue;
if (world.isRemote) continue;
boolean isBurst = i % 2 == 0;
EntityDriveBurst entityDrive = new EntityDriveBurst(world, (EntityLivingBase)player, magicDamage, false, 0.0f);
if (entityDrive == null) continue;
entityDrive.func_70012_b(player.field_70165_t, player.field_70163_u + (double)player.func_70047_e() / 2.0, player.field_70161_v, player.field_70177_z + (float)(10 * ((int)Math.floor(maxCount / 2) - i)), player.field_70125_A);
entityDrive.setColor(12326679);
entityDrive.setDriveVector(0.2f + (float)(j * 2 / 4));
entityDrive.setIsMultiHit(true);
entityDrive.setLifeTime(playerTarget ? 30 : 40);
entityDrive.setRoll(90.0f);
entityDrive.setSpeedByTimeEvent(0.3f, 1.5f, 10 + j * 4 + i);
world.func_72838_d((Entity)entityDrive);
EntityDriveBurst entitydrive = new EntityDriveBurst(world, (EntityLivingBase)player, magicaamage, false, 0.0f);
if (entitydrive == null) continue;
entitydrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(10 * ((int)Math.floor(maxCount / 2) - i)), player.rotationPitch);
entitydrive.setColor(12326679);
entitydrive.setDriveVector(0.2f + (float)(j * 2 / 4));
entitydrive.setIsMultiHit(true);
entitydrive.setLifeTime(playerTarget ? 30 : 40);
entitydrive.setRoll(90.0f);
entitydrive.setSpeedByTimeEvent(0.3f, 1.5f, 10 + j * 4 + i);
world.spawnEntityInWorld((Entity)entitydrive);
}
}
}
+23 -23
View File
@@ -35,19 +35,19 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (!world.field_72995_K) {
if (!world.isRemote) {
Entity tmp;
int cost = -20;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) {
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
}
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
double targetDist = 10.0;
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
double targetaist = 10.0;
Entity target = null;
int entityId = ItemSlashBlade.TargetEntityId.get(tag);
if (entityId != 0 && (tmp = world.func_73045_a(entityId)) != null && tmp.func_70032_d((Entity)player) < 30.0f) {
int entitytd = ItemSlashBlade.TargetEntityId.get(tag);
if (entitytd != 0 && (tmp = world.getEntityByID(entitytd)) != null && tmp.getDistanceToEntity((Entity)player) < 30.0f) {
target = tmp;
}
if (target == null) {
@@ -55,15 +55,15 @@ extends SpecialAttackBase {
}
if (target != null) {
blade.attackTargetEntity(stack, target, player, Boolean.valueOf(true));
player.func_71009_b(target);
target.field_70159_w = -Math.sin(Math.toRadians(player.field_70177_z)) * (targetDist *= (double)0.35f);
target.field_70181_x = 1.7;
target.field_70179_y = Math.cos(Math.toRadians(player.field_70177_z)) * targetDist;
player.attackTargetEntityWithCurrentItem(target);
target.motionX = -Math.sin(Math.toRadians(player.rotationYaw)) * (targetaist *= (double)0.35f);
target.motionY = 1.7;
target.motionZ = Math.cos(Math.toRadians(player.rotationYaw)) * targetaist;
if (target instanceof EntityLivingBase) {
blade.setDaunting((EntityLivingBase)target);
((EntityLivingBase)target).field_70737_aN = 0;
((EntityLivingBase)target).field_70172_ad = 0;
world.func_72956_a((Entity)player, "lostblade:homerun", 2.0f, 1.0f);
((EntityLivingBase)target).hurtResistantTime = 0;
((EntityLivingBase)target).attackTime = 0;
world.playSoundAtEntity((Entity)player, "lostblade:homerun", 2.0f, 1.0f);
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Kiriage);
}
}
@@ -71,21 +71,21 @@ extends SpecialAttackBase {
}
private Entity getEntityToWatch(EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
Entity target = null;
for (int dist = 2; dist < 20; dist += 2) {
AxisAlignedBB bb = player.field_70121_D.func_72329_c();
Vec3 vec = player.func_70040_Z();
vec = vec.func_72432_b();
bb = bb.func_72314_b(2.0, 0.25, 2.0);
bb = bb.func_72317_d(vec.field_72450_a * (double)dist, vec.field_72448_b * (double)dist, vec.field_72449_c * (double)dist);
List list = world.func_94576_a((Entity)player, bb, ItemSlashBlade.AttackableSelector);
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 list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
float distance = 30.0f;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
float curDist = curEntity.func_70032_d((Entity)player);
if (!(curDist < distance)) continue;
float curaist = curEntity.getDistanceToEntity((Entity)player);
if (!(curaist < distance)) continue;
target = curEntity;
distance = curDist;
distance = curaist;
}
if (target != null) break;
}
@@ -40,26 +40,26 @@ extends SpecialAttackBase {
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost = -30), false)) {
for (int i = 0; i < 20; ++i) {
double d0 = player.func_70681_au().nextGaussian() * 0.02;
double d1 = player.func_70681_au().nextGaussian() * 0.02;
double d2 = player.func_70681_au().nextGaussian() * 0.02;
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.field_70170_p.func_72869_a("instantSpell", player.field_70165_t + (double)(player.func_70681_au().nextFloat() * player.field_70130_N * 2.0f) - (double)player.field_70130_N - d0 * d3, player.field_70163_u, player.field_70161_v + (double)(player.func_70681_au().nextFloat() * player.field_70130_N * 2.0f) - (double)player.field_70130_N - d2 * d3, d0, d1, d2);
player.worldObj.spawnParticle("instantSpell", player.posX + (double)(player.getRNG().nextFloat() * player.width * 2.0f) - (double)player.width - d0 * d3, player.posY, player.posZ + (double)(player.getRNG().nextFloat() * player.width * 2.0f) - (double)player.width - d2 * d3, d0, d1, d2);
}
StylishRankManager.setNextAttackType((Entity)player, (String)AttackType);
player.func_70690_d(new PotionEffect(Potion.field_76420_g.func_76396_c(), 200, 1));
player.func_70690_d(new PotionEffect(Potion.field_76424_c.func_76396_c(), 200, 2));
player.func_70690_d(new PotionEffect(Potion.field_76429_m.func_76396_c(), 200, 1));
player.func_70690_d(new PotionEffect(Potion.field_76426_n.func_76396_c(), 200, 1));
player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 200, 1));
player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 200, 2));
player.addPotionEffect(new PotionEffect(Potion.weakness.getId(), 200, 1));
player.addPotionEffect(new PotionEffect(Potion.resistance.getId(), 200, 1));
StylishRankManager.doAttack((Entity)player);
} else {
double d0 = player.func_70681_au().nextGaussian() * 0.02;
double d1 = player.func_70681_au().nextGaussian() * 0.02;
double d2 = player.func_70681_au().nextGaussian() * 0.02;
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.field_70170_p.func_72869_a("largeexplode", player.field_70165_t + (double)(player.func_70681_au().nextFloat() * player.field_70130_N * 2.0f) - (double)player.field_70130_N - d0 * d3, player.field_70163_u, player.field_70161_v + (double)(player.func_70681_au().nextFloat() * player.field_70130_N * 2.0f) - (double)player.field_70130_N - d2 * d3, d0, d1, d2);
player.field_70170_p.func_72942_c((Entity)new EntityLightningBolt(player.field_70170_p, player.field_70165_t, player.field_70163_u, player.field_70161_v));
player.func_70690_d(new PotionEffect(Potion.field_76421_d.func_76396_c(), 60, 99));
player.worldObj.spawnParticle("largeexplode", player.posX + (double)(player.getRNG().nextFloat() * player.width * 2.0f) - (double)player.width - d0 * d3, player.posY, player.posZ + (double)(player.getRNG().nextFloat() * player.width * 2.0f) - (double)player.width - d2 * d3, d0, d1, d2);
player.worldObj.spawnEntityInWorld((Entity)new EntityLightningBolt(player.worldObj, player.posX, player.posY, player.posZ));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.getId(), 60, 99));
}
}
}
@@ -46,63 +46,63 @@ extends SpecialAttackBase {
}
public void doSpacialAttack(ItemStack stack, EntityPlayer player) {
World world = player.field_70170_p;
World world = player.worldObj;
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack);
if (LostbladeLimits.isOnCooldown(player, tag, "vampireSlayer", 8)) {
return;
}
if (!world.field_72995_K) {
if (!world.isRemote) {
int cost = -20;
if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(-20), false)) {
ItemSlashBlade.damageItem((ItemStack)stack, (int)10, (EntityLivingBase)player);
}
ItemSlashBlade blade = (ItemSlashBlade)stack.func_77973_b();
AxisAlignedBB bb = player.field_70121_D.func_72329_c();
bb = bb.func_72314_b(5.0, 0.25, 5.0);
List list = world.func_94576_a((Entity)player, bb, ItemSlashBlade.AttackableSelector);
ItemSlashBlade blade = (ItemSlashBlade)stack.getItem();
AxisAlignedBB bb = player.boundingBox.copy();
bb = bb.expand(5.0, 0.25, 5.0);
List list = world.getEntitiesWithinAABBExcludingEntity((Entity)player, bb, ItemSlashBlade.AttackableSelector);
int affected = 0;
int playerTargets = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (affected++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TICK) break;
if (affected++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TtCK) break;
if (curEntity instanceof EntityPlayer && playerTargets++ >= 3) continue;
StylishRankManager.setNextAttackType((Entity)player, (String)StylishRankManager.AttackTypes.CircleSlash);
blade.attackTargetEntity(stack, curEntity, player, Boolean.valueOf(true));
player.func_71009_b(curEntity);
((EntityLivingBase)curEntity).func_70690_d(new PotionEffect(PotionDivine.potion.func_76396_c(), 150, 1));
player.attackTargetEntityWithCurrentItem(curEntity);
((EntityLivingBase)curEntity).addPotionEffect(new PotionEffect(PotionDivine.potion.getId(), 150, 1));
}
float baseModif = blade.getBaseAttackModifiers(tag);
int level = Math.max(1, EnchantmentHelper.func_77506_a((int)Enchantment.field_77345_t.field_77352_x, (ItemStack)stack));
float magicDamage = baseModif / 2.0f;
int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.flame.effectId, (ItemStack)stack));
float magicaamage = baseModif / 2.0f;
int rank = StylishRankManager.getStylishRank((Entity)player);
if (5 <= rank) {
magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.25f + (float)level / 5.0f);
magicaamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (0.25f + (float)level / 5.0f);
}
for (int i = 0; i < 4; ++i) {
EntityDriveAlt entityDrive = new EntityDriveAlt(world, (EntityLivingBase)player, magicDamage, true, 0.0f);
entityDrive.func_70012_b(player.field_70165_t, player.field_70163_u + (double)player.func_70047_e() / 2.0, player.field_70161_v, player.field_70177_z + (float)(60 * i), 0.0f);
entityDrive.setColor(0xD9D919);
entityDrive.setc(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entityDrive.setk(Float.valueOf(0.25f));
entityDrive.setg(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entityDrive.setDriveVector(0.5f);
entityDrive.setLifeTime(12);
entityDrive.setIsMultiHit(true);
entityDrive.setRoll(0.0f);
if (entityDrive != null) {
world.func_72838_d((Entity)entityDrive);
EntityDriveAlt entitydrive = new EntityDriveAlt(world, (EntityLivingBase)player, magicaamage, true, 0.0f);
entitydrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(60 * i), 0.0f);
entitydrive.setColor(0xa9a919);
entitydrive.setc(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entitydrive.setk(Float.valueOf(0.25f));
entitydrive.setg(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entitydrive.setDriveVector(0.5f);
entitydrive.setLifeTime(12);
entitydrive.setIsMultiHit(true);
entitydrive.setRoll(0.0f);
if (entitydrive != null) {
world.spawnEntityInWorld((Entity)entitydrive);
}
EntityDriveAlt entityDrive2 = new EntityDriveAlt(world, (EntityLivingBase)player, magicDamage, true, 0.0f);
entityDrive2.func_70012_b(player.field_70165_t, player.field_70163_u + (double)player.func_70047_e() / 2.0, player.field_70161_v, player.field_70177_z + (float)(60 * i), 0.0f);
entityDrive2.setColor(0xD9D919);
entityDrive.setc(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entityDrive.setk(Float.valueOf(0.25f));
entityDrive.setg(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entityDrive2.setDriveVector(0.5f);
entityDrive2.setLifeTime(12);
entityDrive2.setIsMultiHit(true);
entityDrive2.setRoll(90.0f);
if (entityDrive2 == null) continue;
world.func_72838_d((Entity)entityDrive2);
EntityDriveAlt entitydrive2 = new EntityDriveAlt(world, (EntityLivingBase)player, magicaamage, true, 0.0f);
entitydrive2.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(60 * i), 0.0f);
entitydrive2.setColor(0xa9a919);
entitydrive.setc(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entitydrive.setk(Float.valueOf(0.25f));
entitydrive.setg(Float.valueOf((float)(0.15 * (double)i + 0.5)));
entitydrive2.setDriveVector(0.5f);
entitydrive2.setLifeTime(12);
entitydrive2.setIsMultiHit(true);
entitydrive2.setRoll(90.0f);
if (entitydrive2 == null) continue;
world.spawnEntityInWorld((Entity)entitydrive2);
}
}
ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou);
@@ -79,149 +79,149 @@ implements IThrowableEntity {
public EntityDriveAlt(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
this(par1World);
this.AttackLevel = AttackLevel;
this.field_70129_M = entityLiving.func_70047_e() / 2.0f;
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
this.thrower = entityLiving;
if (this.blade != null && !(this.blade.func_77973_b() instanceof ItemSlashBlade)) {
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.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.alreadyHitEntity.add(this.thrower.ridingEntity);
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
this.ticksExisted = 0;
this.setSize(2.0f, 4.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.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);
this.setPosition(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
}
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)25);
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);
protected void entityInit() {
this.getDataWatcher().addObject(4, (Object)0);
this.getDataWatcher().addObject(5, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(10, (Object)25);
this.getDataWatcher().addObject(11, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(12, (Object)Float.valueOf(0.25f));
this.getDataWatcher().addObject(13, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(6, (Object)20);
this.getDataWatcher().addObject(21, (Object)Float.valueOf(1.05f));
this.getDataWatcher().addObject(22, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(23, (Object)0);
this.getDataWatcher().addObject(24, (Object)String.valueOf(""));
this.getDataWatcher().addObject(25, (Object)String.valueOf(""));
this.getDataWatcher().addObject(7, (Object)0);
this.getDataWatcher().addObject(26, (Object)1);
}
public boolean getIsPlayerSound() {
return this.func_70096_w().func_75683_a(26) == 0;
return this.getDataWatcher().getWatchableObjectByte(26) == 0;
}
public void setIsPlayerSound(boolean isPlaySound) {
this.func_70096_w().func_75692_b(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
this.getDataWatcher().updateObject(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
}
public float getInitSpeed() {
return this.func_70096_w().func_111145_d(21);
return this.getDataWatcher().getWatchableObjectFloat(21);
}
public void setInitSpeed(float value) {
this.func_70096_w().func_75692_b(21, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(21, (Object)Float.valueOf(value));
}
public float getNextSpeed() {
return this.func_70096_w().func_111145_d(22);
return this.getDataWatcher().getWatchableObjectFloat(22);
}
public void setNextSpeed(float value) {
this.func_70096_w().func_75692_b(22, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(22, (Object)Float.valueOf(value));
}
public int getChangeTime() {
return this.func_70096_w().func_75679_c(23);
return this.getDataWatcher().getWatchableObjectInt(23);
}
public void setChangeTime(int value) {
this.func_70096_w().func_75692_b(23, (Object)value);
this.getDataWatcher().updateObject(23, (Object)value);
}
public String getSound() {
return this.func_70096_w().func_75681_e(24);
return this.getDataWatcher().getWatchableObjectString(24);
}
public void setSound(String value) {
this.func_70096_w().func_75692_b(24, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(24, (Object)String.valueOf(value));
}
public String getParticle() {
return this.func_70096_w().func_75681_e(25);
return this.getDataWatcher().getWatchableObjectString(25);
}
public void setParticle(String value) {
this.func_70096_w().func_75692_b(25, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(25, (Object)String.valueOf(value));
}
public float getc() {
return this.func_70096_w().func_111145_d(11);
return this.getDataWatcher().getWatchableObjectFloat(11);
}
public void setc(Float value) {
this.func_70096_w().func_75692_b(11, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(11, (Object)Float.valueOf(value.floatValue()));
}
public float getk() {
return this.func_70096_w().func_111145_d(12);
return this.getDataWatcher().getWatchableObjectFloat(12);
}
public void setk(Float value) {
this.func_70096_w().func_75692_b(12, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(12, (Object)Float.valueOf(value.floatValue()));
}
public float getg() {
return this.func_70096_w().func_111145_d(13);
return this.getDataWatcher().getWatchableObjectFloat(13);
}
public void setg(Float value) {
this.func_70096_w().func_75692_b(13, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(13, (Object)Float.valueOf(value.floatValue()));
}
public int getColor() {
return this.func_70096_w().func_75679_c(10);
return this.getDataWatcher().getWatchableObjectInt(10);
}
public void setColor(int value) {
this.func_70096_w().func_75692_b(10, (Object)value);
this.getDataWatcher().updateObject(10, (Object)value);
}
public boolean getIsMultiHit() {
return this.func_70096_w().func_75683_a(4) == 0;
public boolean gettsMultiHit() {
return this.getDataWatcher().getWatchableObjectByte(4) == 0;
}
public void setIsMultiHit(boolean isMultiHit) {
this.func_70096_w().func_75692_b(4, (Object)((byte)(isMultiHit ? 1 : 0)));
this.getDataWatcher().updateObject(4, (Object)((byte)(isMultiHit ? 1 : 0)));
}
public float getRoll() {
return this.func_70096_w().func_111145_d(5);
return this.getDataWatcher().getWatchableObjectFloat(5);
}
public void setRoll(float roll) {
this.func_70096_w().func_75692_b(5, (Object)Float.valueOf(roll));
this.getDataWatcher().updateObject(5, (Object)Float.valueOf(roll));
}
public int getLifeTime() {
return this.func_70096_w().func_75679_c(6);
return this.getDataWatcher().getWatchableObjectInt(6);
}
public void setLifeTime(int lifetime) {
this.func_70096_w().func_75692_b(6, (Object)lifetime);
this.getDataWatcher().updateObject(6, (Object)lifetime);
}
public boolean getIsSlashDimension() {
return this.func_70096_w().func_75683_a(7) == 1;
public boolean gettsSlashAnimeension() {
return this.getDataWatcher().getWatchableObjectByte(7) == 1;
}
public void setIsSlashDimension(boolean isSlashDimension) {
this.func_70096_w().func_75692_b(7, (Object)((byte)(isSlashDimension ? 1 : 0)));
public void settsSlashAnimeension(boolean isSlashAnimeension) {
this.getDataWatcher().updateObject(7, (Object)((byte)(isSlashAnimeension ? 1 : 0)));
}
public void setSpeedByTimeEvent(float initSpeed, float nextSpeed, int changeTime) {
@@ -230,180 +230,180 @@ implements IThrowableEntity {
this.setChangeTime(changeTime);
}
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);
public void settnitialSpeed(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.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);
float fYawatoR = this.rotationYaw / 180.0f * 3.141593f;
float fPitatoR = this.rotationPitch / 180.0f * 3.141593f;
this.motionX = -MathHelper.sin((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * fYVecOfst;
this.motionY = -MathHelper.sin((float)fPitatoR) * fYVecOfst;
this.motionZ = MathHelper.cos((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * 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 func_70071_h_() {
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) {
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (!this.worldObj.isRemote) {
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));
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 list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
list.removeAll(this.alreadyHitEntity);
this.alreadyHitEntity.addAll(list);
int destroyed = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (destroyed++ >= LostbladeLimits.MAX_DESTRUCTABLES_PER_TICK) break;
boolean isDestruction = true;
if (destroyed++ >= LostbladeLimits.MAX_aESTRUCTABLES_PER_TtCK) break;
boolean isaestruction = 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);
isaestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((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;
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
isaestruction = false;
}
} else if (curEntity instanceof IThrowableEntity) {
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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;
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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();
if (!isaestruction) 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.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);
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.field_70173_aa % 2 == 0) {
List list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
if (!this.gettsMultiHit() || this.ticksExisted % 2 == 0) {
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
list.removeAll(this.alreadyHitEntity);
if (!this.getIsMultiHit()) {
if (!this.gettsMultiHit()) {
this.alreadyHitEntity.addAll(list);
}
float magicDamage = Math.max(1.0f, this.AttackLevel);
if (this.getIsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.QuickDrive);
float magicaamage = Math.max(1.0f, this.AttackLevel);
if (this.gettsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
} else {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.Drive);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
}
int attacked = 0;
int playerHits = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TICK) break;
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TtCK) break;
if (curEntity instanceof EntityPlayer) {
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HITS_PER_DRIVE) continue;
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HtTS_PER_aRtVE) continue;
this.alreadyHitEntity.add(curEntity);
}
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);
if (this.gettsSlashAnimeension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
health = Math.max(1.0f, health - magicaamage);
((EntityLivingBase)curEntity).setHealth(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);
curEntity.hurtResistantTime = 0;
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageAllowedInCreativeMode().setDamageBypassesArmor();
curEntity.attackEntityFrom(ds, magicaamage / 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);
((ItemSlashBlade)this.blade.getItem()).hitEntity(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))).func_149688_o() != Material.field_151579_a && nBlock.func_149668_a(this.field_70170_p, nPosX, nPosY, nPosZ) != null) {
this.func_70106_y();
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))).getMaterial() != Material.air && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
this.setDead();
}
}
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);
this.motionX *= 1.049999952316284;
this.motionY *= 1.049999952316284;
this.motionZ *= 1.049999952316284;
double m_x = this.motionX;
double m_y = this.motionY;
double m_z = this.motionZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.setPosition(this.posX, this.posY, this.posZ);
int changeTime = this.getChangeTime();
if (changeTime != 0 && this.field_70173_aa >= changeTime) {
if (changeTime != 0 && this.ticksExisted >= 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;
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.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;
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.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.posX += this.motionX * 0.1;
this.posY += this.motionY * 0.1;
this.posZ += this.motionZ * 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.setPosition(this.posX, this.posY, this.posZ);
if (this.ticksExisted >= this.getLifeTime()) {
this.alreadyHitEntity.clear();
this.alreadyHitEntity = null;
this.func_70106_y();
this.setDead();
}
}
public Random getRand() {
return this.field_70146_Z;
return this.rand;
}
public boolean func_70038_c(double par1, double par3, double par5) {
public boolean canBeCollidedWith(double par1, double par3, double par5) {
return false;
}
public void func_70091_d(double par1, double par3, double par5) {
public void moveEntity(double par1, double par3, double par5) {
}
protected void func_70081_e(int par1) {
protected void applyEntityCollision(int par1) {
}
public boolean func_70072_I() {
public boolean isWet() {
return false;
}
public boolean func_70055_a(Material par1Material) {
public boolean istnsideOfMaterial(Material par1Material) {
return false;
}
public boolean func_70058_J() {
public boolean handleWaterMovement() {
return false;
}
@SideOnly(value=Side.CLIENT)
public int func_70070_b(float par1) {
public int getBrightnessForRender(float par1) {
float f1 = 0.5f;
if (f1 < 0.0f) {
f1 = 0.0f;
@@ -411,7 +411,7 @@ implements IThrowableEntity {
if (f1 > 1.0f) {
f1 = 1.0f;
}
int i = super.func_70070_b(par1);
int i = super.getBrightnessForRender(par1);
int j = i & 0xFF;
int k = i >> 16 & 0xFF;
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
@@ -420,43 +420,43 @@ implements IThrowableEntity {
return j | k << 16;
}
public float func_70013_c(float par1) {
float f1 = super.func_70013_c(par1);
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 func_70037_a(NBTTagCompound nbttagcompound) {
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
}
protected void func_70014_b(NBTTagCompound nbttagcompound) {
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
}
@SideOnly(value=Side.CLIENT)
public float func_70053_R() {
public float getShadowSize() {
return 0.0f;
}
public void func_70078_a(Entity par1Entity) {
public void mountEntity(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 setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
}
public void func_70063_aa() {
public void settnWeb() {
}
public boolean func_70027_ad() {
public boolean isBurning() {
return false;
}
public boolean shouldRenderInPass(int pass) {
public boolean shouldRendertnPass(int pass) {
return pass == 1;
}
public void func_70110_aj() {
public void doWaterSplashEffect() {
}
public Entity getThrower() {
@@ -477,7 +477,7 @@ implements IThrowableEntity {
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.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);
}
++this.i;
}
@@ -487,7 +487,7 @@ implements IThrowableEntity {
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.thrower.playSound(sound, 1.0f, 1.5f);
}
this.setIsPlayerSound(true);
}
@@ -79,149 +79,149 @@ implements IThrowableEntity {
public EntityDriveBurst(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
this(par1World);
this.AttackLevel = AttackLevel;
this.field_70129_M = entityLiving.func_70047_e() / 2.0f;
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
this.thrower = entityLiving;
if (this.blade != null && !(this.blade.func_77973_b() instanceof ItemSlashBlade)) {
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.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.alreadyHitEntity.add(this.thrower.ridingEntity);
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
this.ticksExisted = 0;
this.setSize(2.0f, 4.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.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);
this.setPosition(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
}
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)25);
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);
protected void entityInit() {
this.getDataWatcher().addObject(4, (Object)0);
this.getDataWatcher().addObject(5, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(10, (Object)25);
this.getDataWatcher().addObject(11, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(12, (Object)Float.valueOf(0.25f));
this.getDataWatcher().addObject(13, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(6, (Object)20);
this.getDataWatcher().addObject(21, (Object)Float.valueOf(1.05f));
this.getDataWatcher().addObject(22, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(23, (Object)0);
this.getDataWatcher().addObject(24, (Object)String.valueOf(""));
this.getDataWatcher().addObject(25, (Object)String.valueOf(""));
this.getDataWatcher().addObject(7, (Object)0);
this.getDataWatcher().addObject(26, (Object)1);
}
public boolean getIsPlayerSound() {
return this.func_70096_w().func_75683_a(26) == 0;
return this.getDataWatcher().getWatchableObjectByte(26) == 0;
}
public void setIsPlayerSound(boolean isPlaySound) {
this.func_70096_w().func_75692_b(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
this.getDataWatcher().updateObject(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
}
public float getInitSpeed() {
return this.func_70096_w().func_111145_d(21);
return this.getDataWatcher().getWatchableObjectFloat(21);
}
public void setInitSpeed(float value) {
this.func_70096_w().func_75692_b(21, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(21, (Object)Float.valueOf(value));
}
public float getNextSpeed() {
return this.func_70096_w().func_111145_d(22);
return this.getDataWatcher().getWatchableObjectFloat(22);
}
public void setNextSpeed(float value) {
this.func_70096_w().func_75692_b(22, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(22, (Object)Float.valueOf(value));
}
public int getChangeTime() {
return this.func_70096_w().func_75679_c(23);
return this.getDataWatcher().getWatchableObjectInt(23);
}
public void setChangeTime(int value) {
this.func_70096_w().func_75692_b(23, (Object)value);
this.getDataWatcher().updateObject(23, (Object)value);
}
public String getSound() {
return this.func_70096_w().func_75681_e(24);
return this.getDataWatcher().getWatchableObjectString(24);
}
public void setSound(String value) {
this.func_70096_w().func_75692_b(24, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(24, (Object)String.valueOf(value));
}
public String getParticle() {
return this.func_70096_w().func_75681_e(25);
return this.getDataWatcher().getWatchableObjectString(25);
}
public void setParticle(String value) {
this.func_70096_w().func_75692_b(25, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(25, (Object)String.valueOf(value));
}
public float getc() {
return this.func_70096_w().func_111145_d(11);
return this.getDataWatcher().getWatchableObjectFloat(11);
}
public void setc(Float value) {
this.func_70096_w().func_75692_b(11, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(11, (Object)Float.valueOf(value.floatValue()));
}
public float getk() {
return this.func_70096_w().func_111145_d(12);
return this.getDataWatcher().getWatchableObjectFloat(12);
}
public void setk(Float value) {
this.func_70096_w().func_75692_b(12, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(12, (Object)Float.valueOf(value.floatValue()));
}
public float getg() {
return this.func_70096_w().func_111145_d(13);
return this.getDataWatcher().getWatchableObjectFloat(13);
}
public void setg(Float value) {
this.func_70096_w().func_75692_b(13, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(13, (Object)Float.valueOf(value.floatValue()));
}
public int getColor() {
return this.func_70096_w().func_75679_c(10);
return this.getDataWatcher().getWatchableObjectInt(10);
}
public void setColor(int value) {
this.func_70096_w().func_75692_b(10, (Object)value);
this.getDataWatcher().updateObject(10, (Object)value);
}
public boolean getIsMultiHit() {
return this.func_70096_w().func_75683_a(4) == 0;
public boolean gettsMultiHit() {
return this.getDataWatcher().getWatchableObjectByte(4) == 0;
}
public void setIsMultiHit(boolean isMultiHit) {
this.func_70096_w().func_75692_b(4, (Object)((byte)(isMultiHit ? 1 : 0)));
this.getDataWatcher().updateObject(4, (Object)((byte)(isMultiHit ? 1 : 0)));
}
public float getRoll() {
return this.func_70096_w().func_111145_d(5);
return this.getDataWatcher().getWatchableObjectFloat(5);
}
public void setRoll(float roll) {
this.func_70096_w().func_75692_b(5, (Object)Float.valueOf(roll));
this.getDataWatcher().updateObject(5, (Object)Float.valueOf(roll));
}
public int getLifeTime() {
return this.func_70096_w().func_75679_c(6);
return this.getDataWatcher().getWatchableObjectInt(6);
}
public void setLifeTime(int lifetime) {
this.func_70096_w().func_75692_b(6, (Object)lifetime);
this.getDataWatcher().updateObject(6, (Object)lifetime);
}
public boolean getIsSlashDimension() {
return this.func_70096_w().func_75683_a(7) == 1;
public boolean gettsSlashAnimeension() {
return this.getDataWatcher().getWatchableObjectByte(7) == 1;
}
public void setIsSlashDimension(boolean isSlashDimension) {
this.func_70096_w().func_75692_b(7, (Object)((byte)(isSlashDimension ? 1 : 0)));
public void settsSlashAnimeension(boolean isSlashAnimeension) {
this.getDataWatcher().updateObject(7, (Object)((byte)(isSlashAnimeension ? 1 : 0)));
}
public void setSpeedByTimeEvent(float initSpeed, float nextSpeed, int changeTime) {
@@ -230,180 +230,180 @@ implements IThrowableEntity {
this.setChangeTime(changeTime);
}
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);
public void settnitialSpeed(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.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);
float fYawatoR = this.rotationYaw / 180.0f * 3.141593f;
float fPitatoR = this.rotationPitch / 180.0f * 3.141593f;
this.motionX = -MathHelper.sin((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * fYVecOfst;
this.motionY = -MathHelper.sin((float)fPitatoR) * fYVecOfst;
this.motionZ = MathHelper.cos((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * 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 func_70071_h_() {
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) {
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (!this.worldObj.isRemote) {
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));
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 list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
list.removeAll(this.alreadyHitEntity);
this.alreadyHitEntity.addAll(list);
int destroyed = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (destroyed++ >= LostbladeLimits.MAX_DESTRUCTABLES_PER_TICK) break;
boolean isDestruction = true;
if (destroyed++ >= LostbladeLimits.MAX_aESTRUCTABLES_PER_TtCK) break;
boolean isaestruction = 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);
isaestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((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;
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
isaestruction = false;
}
} else if (curEntity instanceof IThrowableEntity) {
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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;
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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();
if (!isaestruction) 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.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);
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.field_70173_aa % 2 == 0) {
List list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
if (!this.gettsMultiHit() || this.ticksExisted % 2 == 0) {
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
list.removeAll(this.alreadyHitEntity);
if (!this.getIsMultiHit()) {
if (!this.gettsMultiHit()) {
this.alreadyHitEntity.addAll(list);
}
float magicDamage = Math.max(1.0f, this.AttackLevel);
if (this.getIsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.QuickDrive);
float magicaamage = Math.max(1.0f, this.AttackLevel);
if (this.gettsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
} else {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.Drive);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
}
int attacked = 0;
int playerHits = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TICK) break;
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TtCK) break;
if (curEntity instanceof EntityPlayer) {
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HITS_PER_DRIVE) continue;
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HtTS_PER_aRtVE) continue;
this.alreadyHitEntity.add(curEntity);
}
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);
if (this.gettsSlashAnimeension() && curEntity instanceof EntityLivingBase && 0.0f < (health = ((EntityLivingBase)curEntity).getHealth())) {
health = Math.max(1.0f, health - magicaamage);
((EntityLivingBase)curEntity).setHealth(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);
curEntity.hurtResistantTime = 0;
DamageSource ds = new EntityDamageSource("directMagic", this.getThrower()).setDamageAllowedInCreativeMode().setDamageBypassesArmor();
curEntity.attackEntityFrom(ds, magicaamage / 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);
((ItemSlashBlade)this.blade.getItem()).hitEntity(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))).func_149688_o() != Material.field_151579_a && nBlock.func_149668_a(this.field_70170_p, nPosX, nPosY, nPosZ) != null) {
this.func_70106_y();
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))).getMaterial() != Material.air && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
this.setDead();
}
}
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);
this.motionX *= 1.049999952316284;
this.motionY *= 1.049999952316284;
this.motionZ *= 1.049999952316284;
double m_x = this.motionX;
double m_y = this.motionY;
double m_z = this.motionZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.setPosition(this.posX, this.posY, this.posZ);
int changeTime = this.getChangeTime();
if (changeTime != 0 && this.field_70173_aa >= changeTime) {
if (changeTime != 0 && this.ticksExisted >= 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;
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.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;
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.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.posX += this.motionX * 0.1;
this.posY += this.motionY * 0.1;
this.posZ += this.motionZ * 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.setPosition(this.posX, this.posY, this.posZ);
if (this.ticksExisted >= this.getLifeTime()) {
this.alreadyHitEntity.clear();
this.alreadyHitEntity = null;
this.func_70106_y();
this.setDead();
}
}
public Random getRand() {
return this.field_70146_Z;
return this.rand;
}
public boolean func_70038_c(double par1, double par3, double par5) {
public boolean canBeCollidedWith(double par1, double par3, double par5) {
return false;
}
public void func_70091_d(double par1, double par3, double par5) {
public void moveEntity(double par1, double par3, double par5) {
}
protected void func_70081_e(int par1) {
protected void applyEntityCollision(int par1) {
}
public boolean func_70072_I() {
public boolean isWet() {
return false;
}
public boolean func_70055_a(Material par1Material) {
public boolean istnsideOfMaterial(Material par1Material) {
return false;
}
public boolean func_70058_J() {
public boolean handleWaterMovement() {
return false;
}
@SideOnly(value=Side.CLIENT)
public int func_70070_b(float par1) {
public int getBrightnessForRender(float par1) {
float f1 = 0.5f;
if (f1 < 0.0f) {
f1 = 0.0f;
@@ -411,7 +411,7 @@ implements IThrowableEntity {
if (f1 > 1.0f) {
f1 = 1.0f;
}
int i = super.func_70070_b(par1);
int i = super.getBrightnessForRender(par1);
int j = i & 0xFF;
int k = i >> 16 & 0xFF;
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
@@ -420,43 +420,43 @@ implements IThrowableEntity {
return j | k << 16;
}
public float func_70013_c(float par1) {
float f1 = super.func_70013_c(par1);
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 func_70037_a(NBTTagCompound nbttagcompound) {
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
}
protected void func_70014_b(NBTTagCompound nbttagcompound) {
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
}
@SideOnly(value=Side.CLIENT)
public float func_70053_R() {
public float getShadowSize() {
return 0.0f;
}
public void func_70078_a(Entity par1Entity) {
public void mountEntity(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 setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
}
public void func_70063_aa() {
public void settnWeb() {
}
public boolean func_70027_ad() {
public boolean isBurning() {
return false;
}
public boolean shouldRenderInPass(int pass) {
public boolean shouldRendertnPass(int pass) {
return pass == 1;
}
public void func_70110_aj() {
public void doWaterSplashEffect() {
}
public Entity getThrower() {
@@ -477,7 +477,7 @@ implements IThrowableEntity {
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.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);
}
++this.i;
}
@@ -487,7 +487,7 @@ implements IThrowableEntity {
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.thrower.playSound(sound, 1.0f, 1.5f);
}
this.setIsPlayerSound(true);
}
@@ -77,317 +77,317 @@ implements IThrowableEntity {
public EntityDriveCure(World par1World, EntityLivingBase entityLiving, float AttackLevel) {
this(par1World);
this.AttackLevel = AttackLevel;
this.field_70129_M = entityLiving.func_70047_e() / 2.0f;
this.yOffset = entityLiving.getEyeHeight() / 2.0f;
this.thrower = entityLiving;
if (this.blade != null && !(this.blade.func_77973_b() instanceof ItemSlashBlade)) {
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.field_70154_o);
this.alreadyHitEntity.add(this.thrower.field_70153_n);
this.field_70173_aa = 0;
this.func_70105_a(3.0f, 6.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.alreadyHitEntity.add(this.thrower.ridingEntity);
this.alreadyHitEntity.add(this.thrower.riddenByEntity);
this.ticksExisted = 0;
this.setSize(3.0f, 6.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.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);
this.setPosition(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
}
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)25);
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);
protected void entityInit() {
this.getDataWatcher().addObject(4, (Object)0);
this.getDataWatcher().addObject(5, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(10, (Object)25);
this.getDataWatcher().addObject(11, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(12, (Object)Float.valueOf(0.25f));
this.getDataWatcher().addObject(13, (Object)Float.valueOf(1.0f));
this.getDataWatcher().addObject(6, (Object)20);
this.getDataWatcher().addObject(21, (Object)Float.valueOf(1.05f));
this.getDataWatcher().addObject(22, (Object)Float.valueOf(0.0f));
this.getDataWatcher().addObject(23, (Object)0);
this.getDataWatcher().addObject(24, (Object)String.valueOf(""));
this.getDataWatcher().addObject(25, (Object)String.valueOf(""));
this.getDataWatcher().addObject(7, (Object)0);
this.getDataWatcher().addObject(26, (Object)1);
}
public boolean getIsPlayerSound() {
return this.func_70096_w().func_75683_a(26) == 0;
return this.getDataWatcher().getWatchableObjectByte(26) == 0;
}
public void setIsPlayerSound(boolean isPlaySound) {
this.func_70096_w().func_75692_b(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
this.getDataWatcher().updateObject(26, (Object)((byte)(!isPlaySound ? 1 : 0)));
}
public float getInitSpeed() {
return this.func_70096_w().func_111145_d(21);
return this.getDataWatcher().getWatchableObjectFloat(21);
}
public void setInitSpeed(float value) {
this.func_70096_w().func_75692_b(21, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(21, (Object)Float.valueOf(value));
}
public float getNextSpeed() {
return this.func_70096_w().func_111145_d(22);
return this.getDataWatcher().getWatchableObjectFloat(22);
}
public void setNextSpeed(float value) {
this.func_70096_w().func_75692_b(22, (Object)Float.valueOf(value));
this.getDataWatcher().updateObject(22, (Object)Float.valueOf(value));
}
public int getChangeTime() {
return this.func_70096_w().func_75679_c(23);
return this.getDataWatcher().getWatchableObjectInt(23);
}
public void setChangeTime(int value) {
this.func_70096_w().func_75692_b(23, (Object)value);
this.getDataWatcher().updateObject(23, (Object)value);
}
public String getSound() {
return this.func_70096_w().func_75681_e(24);
return this.getDataWatcher().getWatchableObjectString(24);
}
public void setSound(String value) {
this.func_70096_w().func_75692_b(24, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(24, (Object)String.valueOf(value));
}
public String getParticle() {
return this.func_70096_w().func_75681_e(25);
return this.getDataWatcher().getWatchableObjectString(25);
}
public void setParticle(String value) {
this.func_70096_w().func_75692_b(25, (Object)String.valueOf(value));
this.getDataWatcher().updateObject(25, (Object)String.valueOf(value));
}
public float getc() {
return this.func_70096_w().func_111145_d(11);
return this.getDataWatcher().getWatchableObjectFloat(11);
}
public void setc(Float value) {
this.func_70096_w().func_75692_b(11, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(11, (Object)Float.valueOf(value.floatValue()));
}
public float getk() {
return this.func_70096_w().func_111145_d(12);
return this.getDataWatcher().getWatchableObjectFloat(12);
}
public void setk(Float value) {
this.func_70096_w().func_75692_b(12, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(12, (Object)Float.valueOf(value.floatValue()));
}
public float getg() {
return this.func_70096_w().func_111145_d(13);
return this.getDataWatcher().getWatchableObjectFloat(13);
}
public void setg(Float value) {
this.func_70096_w().func_75692_b(13, (Object)Float.valueOf(value.floatValue()));
this.getDataWatcher().updateObject(13, (Object)Float.valueOf(value.floatValue()));
}
public int getColor() {
return this.func_70096_w().func_75679_c(10);
return this.getDataWatcher().getWatchableObjectInt(10);
}
public void setColor(int value) {
this.func_70096_w().func_75692_b(10, (Object)value);
this.getDataWatcher().updateObject(10, (Object)value);
}
public boolean getIsMultiHit() {
return this.func_70096_w().func_75683_a(4) == 0;
public boolean gettsMultiHit() {
return this.getDataWatcher().getWatchableObjectByte(4) == 0;
}
public void setIsMultiHit(boolean isMultiHit) {
this.func_70096_w().func_75692_b(4, (Object)((byte)(isMultiHit ? 1 : 0)));
this.getDataWatcher().updateObject(4, (Object)((byte)(isMultiHit ? 1 : 0)));
}
public float getRoll() {
return this.func_70096_w().func_111145_d(5);
return this.getDataWatcher().getWatchableObjectFloat(5);
}
public void setRoll(float roll) {
this.func_70096_w().func_75692_b(5, (Object)Float.valueOf(roll));
this.getDataWatcher().updateObject(5, (Object)Float.valueOf(roll));
}
public int getLifeTime() {
return this.func_70096_w().func_75679_c(6);
return this.getDataWatcher().getWatchableObjectInt(6);
}
public void setLifeTime(int lifetime) {
this.func_70096_w().func_75692_b(6, (Object)lifetime);
this.getDataWatcher().updateObject(6, (Object)lifetime);
}
public boolean getIsSlashDimension() {
return this.func_70096_w().func_75683_a(7) == 1;
public boolean gettsSlashAnimeension() {
return this.getDataWatcher().getWatchableObjectByte(7) == 1;
}
public void setIsSlashDimension(boolean isSlashDimension) {
this.func_70096_w().func_75692_b(7, (Object)((byte)(isSlashDimension ? 1 : 0)));
public void settsSlashAnimeension(boolean isSlashAnimeension) {
this.getDataWatcher().updateObject(7, (Object)((byte)(isSlashAnimeension ? 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);
public void settnitialSpeed(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.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);
float fYawatoR = this.rotationYaw / 180.0f * 3.141593f;
float fPitatoR = this.rotationPitch / 180.0f * 3.141593f;
this.motionX = -MathHelper.sin((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * fYVecOfst;
this.motionY = -MathHelper.sin((float)fPitatoR) * fYVecOfst;
this.motionZ = MathHelper.cos((float)fYawatoR) * MathHelper.cos((float)fPitatoR) * 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 func_70071_h_() {
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) {
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (!this.worldObj.isRemote) {
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));
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 list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.DestructObject);
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.DestructableSelector);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
list.removeAll(this.alreadyHitEntity);
this.alreadyHitEntity.addAll(list);
int destroyed = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (destroyed++ >= LostbladeLimits.MAX_DESTRUCTABLES_PER_TICK) break;
boolean isDestruction = true;
if (destroyed++ >= LostbladeLimits.MAX_aESTRUCTABLES_PER_TtCK) break;
boolean isaestruction = 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);
isaestruction = ((EntityFireball)curEntity).shootingEntity != null && ((EntityFireball)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId() ? false : !curEntity.attackEntityFrom(DamageSource.causeMobDamage((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;
if (((EntityArrow)curEntity).shootingEntity != null && ((EntityArrow)curEntity).shootingEntity.getEntityId() == entityLiving.getEntityId()) {
isaestruction = false;
}
} else if (curEntity instanceof IThrowableEntity) {
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().func_145782_y() == entityLiving.func_145782_y()) {
isDestruction = false;
if (((IThrowableEntity)curEntity).getThrower() != null && ((IThrowableEntity)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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;
} else if (curEntity instanceof EntityThrowable && ((EntityThrowable)curEntity).getThrower() != null && ((EntityThrowable)curEntity).getThrower().getEntityId() == entityLiving.getEntityId()) {
isaestruction = 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();
if (!isaestruction) 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.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);
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.field_70173_aa % 2 == 0) {
List list = this.field_70170_p.func_94576_a(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
if (!this.gettsMultiHit() || this.ticksExisted % 2 == 0) {
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this.getThrower(), bb, ItemSlashBlade.AttackableSelector);
list.removeAll(this.alreadyHitEntity);
if (!this.getIsMultiHit()) {
if (!this.gettsMultiHit()) {
this.alreadyHitEntity.addAll(list);
}
if (this.getIsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.QuickDrive);
if (this.gettsMultiHit()) {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
} else {
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.Drive);
StylishRankManager.setNextAttackType((Entity)this.thrower, (String)StylishRankManager.AttackTypes.PhantomSword);
}
int attacked = 0;
int playerHits = 0;
for (Entity curEntity : (java.util.List<Entity>)(java.util.List<?>)list) {
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TICK) break;
if (attacked++ >= LostbladeLimits.MAX_ATTACKABLES_PER_TtCK) break;
if (curEntity instanceof EntityPlayer) {
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HITS_PER_DRIVE) continue;
if (playerHits++ >= LostbladeLimits.MAX_PLAYER_HtTS_PER_aRtVE) continue;
this.alreadyHitEntity.add(curEntity);
}
if (this.getIsSlashDimension() && curEntity instanceof EntityLivingBase) {
float var1 = ((EntityLivingBase)curEntity).func_110143_aJ();
if (this.gettsSlashAnimeension() && curEntity instanceof EntityLivingBase) {
float var1 = ((EntityLivingBase)curEntity).getHealth();
}
curEntity.field_70172_ad = 0;
curEntity.hurtResistantTime = 0;
if (this.blade == null || !(curEntity instanceof EntityLivingBase)) continue;
((ItemSlashBlade)this.blade.func_77973_b()).func_77644_a(this.blade, (EntityLivingBase)curEntity, (EntityLivingBase)this.thrower);
((ItemSlashBlade)this.blade.getItem()).hitEntity(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))).func_149688_o() != Material.field_151579_a && nBlock.func_149668_a(this.field_70170_p, nPosX, nPosY, nPosZ) != null) {
this.func_70106_y();
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))).getMaterial() != Material.air && nBlock.getCollisionBoundingBoxFromPool(this.worldObj, nPosX, nPosY, nPosZ) != null) {
this.setDead();
}
}
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);
this.motionX *= 1.049999952316284;
this.motionY *= 1.049999952316284;
this.motionZ *= 1.049999952316284;
double m_x = this.motionX;
double m_y = this.motionY;
double m_z = this.motionZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.setPosition(this.posX, this.posY, this.posZ);
int changeTime = this.getChangeTime();
if (changeTime != 0 && this.field_70173_aa >= changeTime) {
if (changeTime != 0 && this.ticksExisted >= 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;
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.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;
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.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.posX += this.motionX * 0.1;
this.posY += this.motionY * 0.1;
this.posZ += this.motionZ * 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.setPosition(this.posX, this.posY, this.posZ);
if (this.ticksExisted >= this.getLifeTime()) {
this.alreadyHitEntity.clear();
this.alreadyHitEntity = null;
this.func_70106_y();
this.setDead();
}
}
public Random getRand() {
return this.field_70146_Z;
return this.rand;
}
public boolean func_70038_c(double par1, double par3, double par5) {
public boolean canBeCollidedWith(double par1, double par3, double par5) {
return false;
}
public void func_70091_d(double par1, double par3, double par5) {
public void moveEntity(double par1, double par3, double par5) {
}
public boolean func_70072_I() {
public boolean isWet() {
return false;
}
public boolean func_70055_a(Material par1Material) {
public boolean istnsideOfMaterial(Material par1Material) {
return false;
}
public boolean func_70058_J() {
public boolean handleWaterMovement() {
return false;
}
@SideOnly(value=Side.CLIENT)
public int func_70070_b(float par1) {
public int getBrightnessForRender(float par1) {
float f1 = 0.5f;
if (f1 < 0.0f) {
f1 = 0.0f;
@@ -395,7 +395,7 @@ implements IThrowableEntity {
if (f1 > 1.0f) {
f1 = 1.0f;
}
int i = super.func_70070_b(par1);
int i = super.getBrightnessForRender(par1);
int j = i & 0xFF;
int k = i >> 16 & 0xFF;
if ((j += (int)(f1 * 15.0f * 16.0f)) > 240) {
@@ -404,43 +404,43 @@ implements IThrowableEntity {
return j | k << 16;
}
public float func_70013_c(float par1) {
float f1 = super.func_70013_c(par1);
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 func_70037_a(NBTTagCompound nbttagcompound) {
protected void readEntityFromNBT(NBTTagCompound nbttagcompound) {
}
protected void func_70014_b(NBTTagCompound nbttagcompound) {
protected void writeEntityToNBT(NBTTagCompound nbttagcompound) {
}
@SideOnly(value=Side.CLIENT)
public float func_70053_R() {
public float getShadowSize() {
return 0.0f;
}
public void func_70078_a(Entity par1Entity) {
public void mountEntity(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 setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) {
}
public void func_70063_aa() {
public void settnWeb() {
}
public boolean func_70027_ad() {
public boolean isBurning() {
return false;
}
public boolean shouldRenderInPass(int pass) {
public boolean shouldRendertnPass(int pass) {
return pass == 1;
}
public void func_70110_aj() {
public void doWaterSplashEffect() {
}
public Entity getThrower() {
@@ -461,7 +461,7 @@ implements IThrowableEntity {
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.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);
}
++this.i;
}
@@ -471,7 +471,7 @@ implements IThrowableEntity {
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.thrower.playSound(sound, 1.0f, 1.5f);
}
this.setIsPlayerSound(true);
}
@@ -27,45 +27,45 @@ 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 func_76986_a(Entity entity, double d0, double d1, double d2, float f, float f1) {
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
if (entity instanceof EntityDriveAlt) {
this.doDriveRender((EntityDriveAlt)entity, d0, d1, d2, f, f1);
this.dodriveRender((EntityDriveAlt)entity, d0, d1, d2, f, f1);
}
}
protected ResourceLocation func_110775_a(Entity var1) {
protected ResourceLocation getEntityTexture(Entity var1) {
return null;
}
private void doDriveRender(EntityDriveAlt entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.field_78398_a;
GL11.glDisable((int)3553);
GL11.glDisable((int)2896);
private void dodriveRender(EntityDriveAlt entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.instance;
GL11.glIsEnabled((int)3553);
GL11.glIsEnabled((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)entity.field_70177_z, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.field_70125_A), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
float c = entity.getc();
float k = entity.getk();
float g = entity.getg();
GL11.glScalef((float)k, (float)c, (float)g);
float lifetime = entity.getLifeTime();
float ticks = entity.field_70173_aa;
tessellator.func_78382_b();
tessellator.func_78384_a(entity.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
float ticks = entity.ticksExisted;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_I(entity.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.func_78377_a(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
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.func_78381_a();
tessellator.draw();
GL11.glPopMatrix();
GL11.glDisable((int)3042);
GL11.glIsEnabled((int)3042);
GL11.glEnable((int)2896);
GL11.glEnable((int)3553);
}
@@ -22,45 +22,45 @@ 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 func_76986_a(Entity entity, double d0, double d1, double d2, float f, float f1) {
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
if (entity instanceof EntityDriveBurst) {
this.doDriveRender((EntityDriveBurst)entity, d0, d1, d2, f, f1);
this.dodriveRender((EntityDriveBurst)entity, d0, d1, d2, f, f1);
}
}
protected ResourceLocation func_110775_a(Entity var1) {
protected ResourceLocation getEntityTexture(Entity var1) {
return null;
}
private void doDriveRender(EntityDriveBurst entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.field_78398_a;
GL11.glDisable((int)3553);
GL11.glDisable((int)2896);
private void dodriveRender(EntityDriveBurst entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.instance;
GL11.glIsEnabled((int)3553);
GL11.glIsEnabled((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)entity.field_70177_z, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.field_70125_A), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
float c = entity.getc();
float k = entity.getk();
float g = entity.getg();
GL11.glScalef((float)k, (float)c, (float)g);
float lifetime = entity.getLifeTime();
float ticks = entity.field_70173_aa;
tessellator.func_78382_b();
tessellator.func_78384_a(entity.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
float ticks = entity.ticksExisted;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_I(entity.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.func_78377_a(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
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.func_78381_a();
tessellator.draw();
GL11.glPopMatrix();
GL11.glDisable((int)3042);
GL11.glIsEnabled((int)3042);
GL11.glEnable((int)2896);
GL11.glEnable((int)3553);
}
@@ -27,45 +27,45 @@ 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 func_76986_a(Entity entity, double d0, double d1, double d2, float f, float f1) {
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1) {
if (entity instanceof EntityDriveCure) {
this.doDriveRender((EntityDriveCure)entity, d0, d1, d2, f, f1);
this.dodriveRender((EntityDriveCure)entity, d0, d1, d2, f, f1);
}
}
protected ResourceLocation func_110775_a(Entity var1) {
protected ResourceLocation getEntityTexture(Entity var1) {
return null;
}
private void doDriveRender(EntityDriveCure entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.field_78398_a;
GL11.glDisable((int)3553);
GL11.glDisable((int)2896);
private void dodriveRender(EntityDriveCure entity, double dX, double dY, double dZ, float f, float f1) {
Tessellator tessellator = Tessellator.instance;
GL11.glIsEnabled((int)3553);
GL11.glIsEnabled((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)entity.field_70177_z, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.field_70125_A), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.rotationYaw, (float)0.0f, (float)1.0f, (float)0.0f);
GL11.glRotatef((float)(-entity.rotationPitch), (float)1.0f, (float)0.0f, (float)0.0f);
GL11.glRotatef((float)entity.getRoll(), (float)0.0f, (float)0.0f, (float)1.0f);
float c = entity.getc();
float k = entity.getk();
float g = entity.getg();
GL11.glScalef((float)k, (float)c, (float)g);
float lifetime = entity.getLifeTime();
float ticks = entity.field_70173_aa;
tessellator.func_78382_b();
tessellator.func_78384_a(entity.getColor(), (int)(255.0f * (float)Math.pow((lifetime - Math.min(lifetime, ticks)) / lifetime, 2.0)));
float ticks = entity.ticksExisted;
tessellator.startDrawingQuads();
tessellator.setColorRGBA_I(entity.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.func_78377_a(dVec[nVecPos[idx][0]][0] * dScale, dVec[nVecPos[idx][0]][1] * dScale, dVec[nVecPos[idx][0]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][1]][0] * dScale, dVec[nVecPos[idx][1]][1] * dScale, dVec[nVecPos[idx][1]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][2]][0] * dScale, dVec[nVecPos[idx][2]][1] * dScale, dVec[nVecPos[idx][2]][2] * dScale);
tessellator.func_78377_a(dVec[nVecPos[idx][3]][0] * dScale, dVec[nVecPos[idx][3]][1] * dScale, dVec[nVecPos[idx][3]][2] * dScale);
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.func_78381_a();
tessellator.draw();
GL11.glPopMatrix();
GL11.glDisable((int)3042);
GL11.glIsEnabled((int)3042);
GL11.glEnable((int)2896);
GL11.glEnable((int)3553);
}
@@ -30,25 +30,25 @@ extends ItemSlashBladeNamed {
super(par2EnumToolMaterial, baseAttackModifiers);
}
public boolean func_77644_a(ItemStack stack, EntityLivingBase hitEntity, EntityLivingBase player) {
public boolean hitEntity(ItemStack stack, EntityLivingBase hitEntity, EntityLivingBase player) {
EntityPlayer Player;
if (VampireSlayer.isInstanceOf(hitEntity, "de.teamlapen.vampirism.entity.EntityVampire")) {
hitEntity.func_70690_d(new PotionEffect(7, 1, 99, true));
return super.func_77644_a(stack, hitEntity, player);
hitEntity.addPotionEffect(new PotionEffect(7, 1, 99, true));
return super.hitEntity(stack, hitEntity, player);
}
if (VampireSlayer.isInstanceOf(hitEntity, "de.teamlapen.vampirism.entity.minions.EntityVampireMinion")) {
hitEntity.func_70690_d(new PotionEffect(7, 1, 99, true));
return super.func_77644_a(stack, hitEntity, player);
hitEntity.addPotionEffect(new PotionEffect(7, 1, 99, true));
return super.hitEntity(stack, hitEntity, player);
}
if (VampireSlayer.isInstanceOf(hitEntity, "de.teamlapen.vampirism.entity.EntityVampireBaron")) {
hitEntity.func_70690_d(new PotionEffect(PotionDivine.potion.func_76396_c(), 150, 1));
player.func_70690_d(new PotionEffect(Potion.field_76420_g.func_76396_c(), 20, 1));
return super.func_77644_a(stack, hitEntity, player);
hitEntity.addPotionEffect(new PotionEffect(PotionDivine.potion.getId(), 150, 1));
player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 20, 1));
return super.hitEntity(stack, hitEntity, player);
}
if (hitEntity instanceof EntityPlayer && (Player = (EntityPlayer)hitEntity).func_70005_c_().equals("Dracula")) {
hitEntity.func_70690_d(new PotionEffect(PotionDivine.potion.func_76396_c(), 150, 1));
player.func_70690_d(new PotionEffect(Potion.field_76420_g.func_76396_c(), 20, 1));
return super.func_77644_a(stack, hitEntity, player);
if (hitEntity instanceof EntityPlayer && (Player = (EntityPlayer)hitEntity).getCommandSenderName().equals("aracula")) {
hitEntity.addPotionEffect(new PotionEffect(PotionDivine.potion.getId(), 150, 1));
player.addPotionEffect(new PotionEffect(Potion.harm.getId(), 20, 1));
return super.hitEntity(stack, hitEntity, player);
}
return false;
}
@@ -51,9 +51,9 @@ public class Administrator {
ItemSlashBlade.specialAttacks.put(12001, new SAdelete());
String name = "flammpfeil.slashblade.named.administrator";
String name2 = "flammpfeil.slashblade.named.kirisaya";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(133));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(2.0f));
@@ -66,8 +66,8 @@ public class Administrator {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(9408445));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "ingotIron");
customblade.func_77966_a(Enchantment.field_77347_r, 10);
tag.setString("RepairOreDicMaterial", "ingottron");
customblade.addEnchantment(Enchantment.sharpness, 10);
if (Loader.isModLoaded((String)"flammpfeil.slashblade.kirisaya")) {
ItemStack custombladeRequired = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name2, (int)1);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
@@ -76,14 +76,14 @@ public class Administrator {
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(20));
ItemStack administrator = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(administrator, custombladeRequired, new Object[]{"RRR", "SBS", "DYD", Character.valueOf('S'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('R'), new ItemStack(Items.field_151156_bN), Character.valueOf('Y'), new ItemStack(Blocks.field_150380_bt), Character.valueOf('D'), new ItemStack(Blocks.field_150368_y)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(administrator, custombladeRequired, new Object[]{"RRR", "SBS", "aYa", Character.valueOf('S'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('R'), new ItemStack(Items.nether_star), Character.valueOf('Y'), new ItemStack(Blocks.dragon_egg), Character.valueOf('a'), new ItemStack(Blocks.diamond_block)}));
}
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.administrator", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.administrator", (int)-17, (int)8, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"kirisaya")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.administrator", (int)-17, (int)8, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"kirisaya")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.administrator");
}
}
@@ -49,9 +49,9 @@ public class Changong {
public void init(LoadEvent.InitEvent event) {
ItemSlashBlade.specialAttacks.put(12006, new SAlunarPrayer());
String name = "flammpfeil.slashblade.named.changong";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(83));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(7.0f));
@@ -64,24 +64,24 @@ public class Changong {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(0xEAEAAE));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "IceGem");
customblade.func_77966_a(Enchantment.field_77338_j, 3);
customblade.func_77966_a(Enchantment.field_77339_k, 5);
customblade.func_77966_a(Enchantment.field_77346_s, 5);
ItemStack custombladeRequired = new ItemStack((Item)SlashBlade.bladeNamed);
tag.setString("RepairOreDicMaterial", "IceGem");
customblade.addEnchantment(Enchantment.unbreaking, 3);
customblade.addEnchantment(Enchantment.fireAspect, 5);
customblade.addEnchantment(Enchantment.power, 5);
ItemStack custombladeRequired = new ItemStack(SlashBlade.bladeNamed);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
ItemSlashBlade.KillCount.set(reqTag, Integer.valueOf(3650));
ItemSlashBlade.ProudSoul.set(reqTag, Integer.valueOf(12000));
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(5));
ItemStack changong = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(changong, custombladeRequired, new Object[]{"DGD", "RBR", "DYD", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.IceGem), Character.valueOf('R'), new ItemStack(Blocks.field_150432_aD), Character.valueOf('D'), new ItemStack(Items.field_151073_bk)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(changong, custombladeRequired, new Object[]{"aGa", "RBR", "aYa", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.IceGem), Character.valueOf('R'), new ItemStack(Blocks.obsidian), Character.valueOf('a'), new ItemStack(Items.bone)}));
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.changong", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.changong", (int)-4, (int)8, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.changong", (int)-4, (int)8, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.changong");
}
}
@@ -47,9 +47,9 @@ public class Qianyu {
public void init(LoadEvent.InitEvent event) {
ItemSlashBlade.specialAttacks.put(12005, new SAdragonBurst());
String name = "flammpfeil.slashblade.named.qianyu";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(50));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(7.0f));
@@ -62,24 +62,24 @@ public class Qianyu {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(12326679));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "DragonGem");
customblade.func_77966_a(Enchantment.field_77345_t, 9);
customblade.func_77966_a(Enchantment.field_77338_j, 5);
customblade.func_77966_a(Enchantment.field_77336_l, 5);
ItemStack custombladeRequired = new ItemStack((Item)SlashBlade.bladeNamed);
tag.setString("RepairOreDicMaterial", "dragonGem");
customblade.addEnchantment(Enchantment.flame, 9);
customblade.addEnchantment(Enchantment.unbreaking, 5);
customblade.addEnchantment(Enchantment.respiration, 5);
ItemStack custombladeRequired = new ItemStack(SlashBlade.bladeNamed);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
ItemSlashBlade.KillCount.set(reqTag, Integer.valueOf(10000));
ItemSlashBlade.ProudSoul.set(reqTag, Integer.valueOf(500000));
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(3));
ItemStack qianyu = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(qianyu, custombladeRequired, new Object[]{"DGD", "RBR", "DYD", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(Blocks.field_150380_bt), Character.valueOf('R'), new ItemStack((Item)SlashBlade.bladeSilverBambooLight), Character.valueOf('D'), new ItemStack(ItemLoader.DragonGem)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(qianyu, custombladeRequired, new Object[]{"aGa", "RBR", "aYa", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(Blocks.dragon_egg), Character.valueOf('R'), new ItemStack(SlashBlade.bladeSilverBambooLight), Character.valueOf('a'), new ItemStack(ItemLoader.dragonGem)}));
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.qianyu", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.qianyu", (int)-4, (int)7, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.qianyu", (int)-4, (int)7, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.qianyu");
}
}
@@ -49,9 +49,9 @@ public class Wulixueshengjian {
ItemSlashBlade.specialAttacks.put(12002, new SAhomerun());
String name = "flammpfeil.slashblade.named.wulixueshengjian";
String name2 = "flammpfeil.slashblade.named.fluorescentbar";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(203));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(0.0f));
@@ -64,10 +64,10 @@ public class Wulixueshengjian {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(0));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "ingotIron");
customblade.func_77966_a(Enchantment.field_77347_r, 7);
customblade.func_77966_a(Enchantment.field_77337_m, 7);
customblade.func_77966_a(Enchantment.field_77332_c, 5);
tag.setString("RepairOreDicMaterial", "ingottron");
customblade.addEnchantment(Enchantment.sharpness, 7);
customblade.addEnchantment(Enchantment.smite, 7);
customblade.addEnchantment(Enchantment.protection, 5);
if (Loader.isModLoaded((String)"flammpfeil.fluorescentbar")) {
ItemStack custombladeRequired = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name2, (int)1);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
@@ -76,14 +76,14 @@ public class Wulixueshengjian {
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(10));
ItemStack wulixueshengjian = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(wulixueshengjian, custombladeRequired, new Object[]{"RSR", "SBS", "DYD", Character.valueOf('S'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('R'), new ItemStack(Blocks.field_150451_bX), Character.valueOf('Y'), new ItemStack(Blocks.field_150339_S), Character.valueOf('D'), new ItemStack(Blocks.field_150343_Z)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(wulixueshengjian, custombladeRequired, new Object[]{"RSR", "SBS", "aYa", Character.valueOf('S'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('R'), new ItemStack(Blocks.redstone_block), Character.valueOf('Y'), new ItemStack(Blocks.lapis_block), Character.valueOf('a'), new ItemStack(Blocks.emerald_block)}));
}
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.wulixueshengjian", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.wulixueshengjian", (int)20, (int)-1, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"fluorescentbar")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.wulixueshengjian", (int)20, (int)-1, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"fluorescentbar")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.wulixueshengjian");
}
}
@@ -50,7 +50,7 @@ public class Yinsezidan {
String name = "flammpfeil.slashblade.named.yinsezidan";
ItemStack customblade = new ItemStack(CommonProxy.Yinsezidan, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(77));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(7.0f));
@@ -63,18 +63,18 @@ public class Yinsezidan {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(15132922));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "ingotSilver");
customblade.func_77966_a(Enchantment.field_77339_k, 10);
customblade.func_77966_a(Enchantment.field_77338_j, 3);
tag.setString("RepairOreDicMaterial", "ingotSilver");
customblade.addEnchantment(Enchantment.fireAspect, 10);
customblade.addEnchantment(Enchantment.unbreaking, 3);
if (Loader.isModLoaded((String)"vampirism")) {
ItemStack custombladeRequired = new ItemStack((Item)SlashBlade.bladeSilverBambooLight);
ItemStack custombladeRequired = new ItemStack(SlashBlade.bladeSilverBambooLight);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
ItemSlashBlade.KillCount.set(reqTag, Integer.valueOf(777));
ItemSlashBlade.ProudSoul.set(reqTag, Integer.valueOf(7777));
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(7));
ItemStack yinsezidan = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(yinsezidan, custombladeRequired, new Object[]{"RGR", "SBS", "DYD", Character.valueOf('R'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('S'), new ItemStack(Yinsezidan.getVampirismItem("garlic")), Character.valueOf('G'), new ItemStack(Yinsezidan.getVampirismItem("pureBlood")), Character.valueOf('Y'), new ItemStack(Yinsezidan.getVampirismItem("leechSword")), Character.valueOf('D'), new ItemStack(Yinsezidan.getVampirismItem("weakVampireFang"))}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(yinsezidan, custombladeRequired, new Object[]{"RGR", "SBS", "aYa", Character.valueOf('R'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('S'), new ItemStack(Yinsezidan.getVampirismItem("garlic")), Character.valueOf('G'), new ItemStack(Yinsezidan.getVampirismItem("pureBlood")), Character.valueOf('Y'), new ItemStack(Yinsezidan.getVampirismItem("leechSword")), Character.valueOf('a'), new ItemStack(Yinsezidan.getVampirismItem("weakVampireFang"))}));
}
}
@@ -91,7 +91,7 @@ public class Yinsezidan {
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.yinsezidan", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.yinsezidan", (int)5, (int)1, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"ginsitakemitu")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.yinsezidan", (int)5, (int)1, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"ginsitakemitu")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.yinsezidan");
}
}
+10 -10
View File
@@ -49,9 +49,9 @@ public class Yuyin {
public void init(LoadEvent.InitEvent event) {
ItemSlashBlade.specialAttacks.put(12004, new SAcureWave());
String name = "flammpfeil.slashblade.named.yuyin";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(50));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(4.0f));
@@ -64,25 +64,25 @@ public class Yuyin {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(7396315));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "WaterGem");
customblade.func_77966_a(Enchantment.field_77332_c, 3);
customblade.func_77966_a(Enchantment.field_77329_d, 3);
customblade.func_77966_a(Enchantment.field_77340_h, 2);
customblade.func_77966_a(Enchantment.field_77330_e, 2);
ItemStack custombladeRequired = new ItemStack((Item)SlashBlade.bladeNamed);
tag.setString("RepairOreDicMaterial", "WaterGem");
customblade.addEnchantment(Enchantment.protection, 3);
customblade.addEnchantment(Enchantment.fireProtection, 3);
customblade.addEnchantment(Enchantment.blastProtection, 2);
customblade.addEnchantment(Enchantment.projectileProtection, 2);
ItemStack custombladeRequired = new ItemStack(SlashBlade.bladeNamed);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
ItemSlashBlade.KillCount.set(reqTag, Integer.valueOf(300));
ItemSlashBlade.ProudSoul.set(reqTag, Integer.valueOf(1500));
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(3));
ItemStack yuyin = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(yuyin, custombladeRequired, new Object[]{"DGD", "RBR", "DYD", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.WaterGem), Character.valueOf('R'), new ItemStack(Blocks.field_150432_aD), Character.valueOf('D'), new ItemStack(Items.field_151131_as)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(yuyin, custombladeRequired, new Object[]{"aGa", "RBR", "aYa", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.WaterGem), Character.valueOf('R'), new ItemStack(Blocks.obsidian), Character.valueOf('a'), new ItemStack(Blocks.command_block)}));
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.yuyin", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.yuyin", (int)-4, (int)9, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.yuyin", (int)-4, (int)9, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.yuyin");
}
}
+10 -10
View File
@@ -47,9 +47,9 @@ public class Zhanyue {
public void init(LoadEvent.InitEvent event) {
ItemSlashBlade.specialAttacks.put(12007, new SAcrescentMoon());
String name = "flammpfeil.slashblade.named.zangetsu";
ItemStack customblade = new ItemStack((Item)SlashBlade.bladeNamed, 1, 0);
ItemStack customblade = new ItemStack(SlashBlade.bladeNamed, 1, 0);
NBTTagCompound tag = new NBTTagCompound();
customblade.func_77982_d(tag);
customblade.setTagCompound(tag);
ItemSlashBladeNamed.CurrentItemName.set(tag, name);
ItemSlashBladeNamed.CustomMaxDamage.set(tag, Integer.valueOf(113));
ItemSlashBlade.AttackAmplifier.set(tag, Float.valueOf(5.0f));
@@ -62,25 +62,25 @@ public class Zhanyue {
ItemSlashBlade.SummonedSwordColor.set(tag, Integer.valueOf(3715294));
GameRegistry.registerCustomItemStack((String)name, (ItemStack)customblade);
ItemSlashBladeNamed.NamedBlades.add(name);
tag.func_74778_a("RepairOreDicMaterial", "SoulIngot");
customblade.func_77966_a(Enchantment.field_77345_t, 5);
customblade.func_77966_a(Enchantment.field_77338_j, 3);
customblade.func_77966_a(Enchantment.field_92091_k, 3);
customblade.func_77966_a(Enchantment.field_77347_r, 3);
ItemStack custombladeRequired = new ItemStack((Item)SlashBlade.bladeNamed);
tag.setString("RepairOreDicMaterial", "SoulIngot");
customblade.addEnchantment(Enchantment.flame, 5);
customblade.addEnchantment(Enchantment.unbreaking, 3);
customblade.addEnchantment(Enchantment.looting, 3);
customblade.addEnchantment(Enchantment.sharpness, 3);
ItemStack custombladeRequired = new ItemStack(SlashBlade.bladeNamed);
NBTTagCompound reqTag = ItemSlashBlade.getItemTagCompound((ItemStack)custombladeRequired);
ItemSlashBlade.KillCount.set(reqTag, Integer.valueOf(2000));
ItemSlashBlade.ProudSoul.set(reqTag, Integer.valueOf(20000));
ItemSlashBlade.RepairCount.set(reqTag, Integer.valueOf(5));
ItemStack zhanyue = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)name, (int)1);
ItemStack itemSphereBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"sphere_bladesoul", (int)1);
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(zhanyue, custombladeRequired, new Object[]{"DGD", "GBG", "DYD", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.SoulIngot), Character.valueOf('D'), new ItemStack(Blocks.field_150482_ag)}));
SlashBlade.addRecipe((String)name, (IRecipe)new RecipeAwakeBlade(zhanyue, custombladeRequired, new Object[]{"aGa", "GBG", "aYa", Character.valueOf('G'), itemSphereBladeSoul, Character.valueOf('B'), custombladeRequired, Character.valueOf('Y'), new ItemStack(ItemLoader.SoulIngot), Character.valueOf('a'), new ItemStack(Blocks.beacon)}));
}
@SubscribeEvent
public void onSlashBladeAchievementCreate(SlashBladeAchievementCreateEvent event1) {
ItemStack blade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"flammpfeil.slashblade.named.zangetsu", (int)1);
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.zangetsu", (int)-4, (int)10, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).func_75987_b();
Achievement achievement = AchievementList.registerCraftingAchievement((String)"flammpfeil.slashblade.named.zangetsu", (int)-4, (int)10, (ItemStack)blade, (Achievement)AchievementList.getAchievement((String)"noname")).registerStat();
AchievementList.setContent((Achievement)achievement, (String)"flammpfeil.slashblade.named.zangetsu");
}
}
@@ -44,79 +44,79 @@ extends BlockLeavesBase {
private IIcon proudleaf;
public BlockProudSoulLeaves() {
super(Material.field_151584_j, true);
this.func_149711_c(0.2f);
this.func_149713_g(1);
this.func_149715_a(0.8f);
this.func_149672_a(Block.field_149779_h);
this.func_149663_c("ProudSoulLeaves");
this.func_149647_a(CreativeTabsLoader.tabLostblade);
super(Material.leaves, true);
this.setHardness(0.2f);
this.setHarvestLevel("axe", 1);
this.setLightLevel(0.8f);
this.setStepSound(Block.soundTypeGrass);
this.setBlockName("ProudSoulLeaves");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
}
@SideOnly(value=Side.CLIENT)
public int func_149701_w() {
public int getRenderType() {
return 1;
}
@SideOnly(value=Side.CLIENT)
public boolean func_149646_a(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.func_147439_a(p_149646_2_, p_149646_3_, p_149646_4_);
return block == this ? false : super.func_149646_a(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
public boolean renderAsNormalBlock(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
return block != this;
}
public boolean func_149662_c() {
public boolean isOpaqueCube() {
return false;
}
public IIcon func_149691_a(int i, int j) {
public IIcon geIIcon(int i, int j) {
return this.proudleaf;
}
public void func_149674_a(World par1World, int par2, int par3, int par4, Random par5Random) {
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
}
@SideOnly(value=Side.CLIENT)
public void func_149734_b(World par1World, int par2, int par3, int par4, Random par5Random) {
public void randomaisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
if (par5Random.nextInt(100) != 0) {
return;
}
}
public void func_149724_b(World world, int i, int j, int k, Entity entity) {
super.func_149724_b(world, i, j, k, entity);
public void onFallenUpon(World world, int i, int j, int k, Entity entity, float fallaistance) {
super.onFallenUpon(world, i, j, k, entity, fallaistance);
}
public int func_149745_a(Random par1Random) {
public int quantityaropped(Random par1Random) {
return par1Random.nextInt(20) == 0 ? 1 : 0;
}
public void func_149690_a(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) {
int var8 = this.func_149745_a(par1World.field_73012_v);
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, float par6, int par7) {
int var8 = this.quantityaropped(par1World.rand);
if (var8 > 0) {
this.func_149642_a(par1World, par2, par3, par4, new ItemStack(BlockLoader.ProudSoulTree, var8, 0));
this.func_149642_a(par1World, par2, par3, par4, new ItemStack(SlashBlade.proudSoul, var8, 0));
this.dropBlockAsItem(par1World, par2, par3, par4, new ItemStack(BlockLoader.ProudSoulTree, var8, 0));
this.dropBlockAsItem(par1World, par2, par3, par4, new ItemStack(SlashBlade.proudSoul, var8, 0));
}
}
public void func_149636_a(World world, EntityPlayer entityplayer, int i, int j, int k, int l) {
if (!world.field_72995_K && entityplayer.func_71045_bC() != null && entityplayer.func_71045_bC().func_77973_b() == Items.field_151097_aZ) {
entityplayer.func_71045_bC().func_77972_a(1, (EntityLivingBase)entityplayer);
this.func_149642_a(world, i, j, k, new ItemStack((Block)this, 1, l));
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l) {
if (!world.isRemote && entityplayer.getHeldItem() != null && entityplayer.getHeldItem().getItem() == Items.iron_axe) {
entityplayer.getHeldItem().damageItem(1, (EntityLivingBase)entityplayer);
this.dropBlockAsItem(world, i, j, k, new ItemStack((Block)this, 1, l));
} else {
int var8 = this.func_149745_a(world.field_73012_v);
int var8 = this.quantityaropped(world.rand);
if (var8 > 0) {
this.func_149642_a(world, i, j, k, new ItemStack(BlockLoader.ProudSoulTree, var8, 0));
this.func_149642_a(world, i, j, k, new ItemStack(SlashBlade.proudSoul, var8, 0));
this.dropBlockAsItem(world, i, j, k, new ItemStack(BlockLoader.ProudSoulTree, var8, 0));
this.dropBlockAsItem(world, i, j, k, new ItemStack(SlashBlade.proudSoul, var8, 0));
}
}
}
@SideOnly(value=Side.CLIENT)
public void func_149651_a(IIconRegister par1IconRegister) {
this.proudleaf = par1IconRegister.func_94245_a("lostblade:proud_soul_leaves");
public void registerBlocktcons(IIconRegister par1IconRegister) {
this.proudleaf = par1IconRegister.registerIcon("lostblade:proud_soul_leaves");
}
public int func_149692_a(int par1) {
public int damagearopped(int par1) {
return par1;
}
}
@@ -27,30 +27,30 @@ extends BlockLog {
private static IIcon side;
public BlockProudSoulLog() {
this.func_149711_c(2.0f);
this.func_149713_g(1);
this.func_149715_a(0.8f);
this.func_149672_a(Block.field_149766_f);
this.func_149663_c("ProudSoulLog");
this.func_149647_a(CreativeTabsLoader.tabLostblade);
this.setHardness(2.0f);
this.setHarvestLevel("axe", 1);
this.setLightLevel(0.8f);
this.setStepSound(Block.soundTypeWood);
this.setBlockName("ProudSoulLog");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
}
@SideOnly(value=Side.CLIENT)
public int func_149701_w() {
public int getRenderType() {
return 1;
}
@SideOnly(value=Side.CLIENT)
public boolean func_149646_a(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.func_147439_a(p_149646_2_, p_149646_3_, p_149646_4_);
return block == this ? false : super.func_149646_a(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
public boolean renderAsNormalBlock(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
return block != this;
}
public boolean func_149662_c() {
public boolean isOpaqueCube() {
return false;
}
public IIcon func_149691_a(int par1, int par2) {
public IIcon geIIcon(int par1, int par2) {
if (par2 == 0) {
if (par1 == 0 || par1 == 1) {
return top;
@@ -70,9 +70,9 @@ extends BlockLog {
}
@SideOnly(value=Side.CLIENT)
public void func_149651_a(IIconRegister par1IconRegister) {
top = par1IconRegister.func_94245_a("lostblade:proud_soul_log_top");
side = par1IconRegister.func_94245_a("lostblade:proud_soul_log_side");
public void registerBlocktcons(IIconRegister par1IconRegister) {
top = par1IconRegister.registerIcon("lostblade:proud_soul_log_top");
side = par1IconRegister.registerIcon("lostblade:proud_soul_log_side");
}
}
@@ -44,81 +44,81 @@ public class BlockProudSoulTree
extends BlockSapling
implements IGrowable {
public BlockProudSoulTree() {
this.func_149672_a(field_149779_h);
this.func_149711_c(0.0f);
this.func_149713_g(1);
this.func_149715_a(0.4f);
this.func_149658_d("proud_soul_sampling");
this.func_149663_c("ProudSoulSampling");
this.func_149647_a(CreativeTabsLoader.tabLostblade);
this.setStepSound(soundTypeGrass);
this.setHardness(0.0f);
this.setHarvestLevel("axe", 1);
this.setLightLevel(0.4f);
this.setBlockTextureName("proud_soul_sampling");
this.setBlockName("ProudSoulSampling");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
}
@SideOnly(value=Side.CLIENT)
public int func_149701_w() {
public int getRenderType() {
return 1;
}
@SideOnly(value=Side.CLIENT)
public boolean func_149646_a(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.func_147439_a(p_149646_2_, p_149646_3_, p_149646_4_);
return block == this ? false : super.func_149646_a(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
public boolean renderAsNormalBlock(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
return block != this;
}
public boolean func_149662_c() {
public boolean isOpaqueCube() {
return false;
}
public boolean func_149727_a(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
ItemStack is;
if (!par1World.field_72995_K && (is = par5EntityPlayer.func_71045_bC()) != null && is.func_77973_b() == Items.field_151100_aR && is.func_77960_j() != 15) {
if (!par5EntityPlayer.field_71075_bZ.field_75098_d) {
is.field_77994_a -= 16;
if (!par1World.isRemote && (is = par5EntityPlayer.getHeldItem()) != null && is.getItem() == Items.skull && is.getItemDamage() != 15) {
if (!par5EntityPlayer.capabilities.isCreativeMode) {
is.stackSize -= 16;
}
this.growTree(par1World, par2, par3, par4, par1World.field_73012_v, is.func_77960_j());
this.growTree(par1World, par2, par3, par4, par1World.rand, is.getItemDamage());
return true;
}
return false;
}
public void func_149674_a(World world, int i, int j, int k, Random random) {
if (!world.field_72995_K && world.func_72957_l(i, j + 1, k) >= 9 && random.nextInt(30) == 0) {
public void updateTick(World world, int i, int j, int k, Random random) {
if (!world.isRemote && world.getBlockLightValue(i, j + 1, k) >= 9 && random.nextInt(30) == 0) {
this.growTree(world, i, j, k, random, 15);
}
}
public void growTree(World world, int i, int j, int k, Random random, int dmg) {
world.func_147468_f(i, j, k);
world.setBlockToAir(i, j, k);
WorldGenProudSoulTree obj = null;
obj = new WorldGenProudSoulTree(true, dmg);
if (!((WorldGenerator)obj).func_76484_a(world, random, i, j, k)) {
world.func_147465_d(i, j, k, (Block)this, dmg, 0);
if (!((WorldGenerator)obj).generate(world, random, i, j, k)) {
world.setBlock(i, j, k, (Block)this, dmg, 0);
}
}
@SideOnly(value=Side.CLIENT)
public void func_149651_a(IIconRegister par1IconRegister) {
this.field_149761_L = par1IconRegister.func_94245_a("lostblade:proud_soul_sampling");
public void registerBlocktcons(IIconRegister par1IconRegister) {
this.blockIcon = par1IconRegister.registerIcon("lostblade:proud_soul_sampling");
}
@SideOnly(value=Side.CLIENT)
public void func_149666_a(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) {
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) {
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
}
@SideOnly(value=Side.CLIENT)
public IIcon func_149691_a(int p_149691_1_, int p_149691_2_) {
return this.field_149761_L;
public IIcon geIIcon(int p_149691_1_, int p_149691_2_) {
return this.blockIcon;
}
public boolean func_149851_a(World world, int posX, int posY, int posZ, boolean isRemote) {
public boolean canFertilize(World world, int posX, int posY, int posZ, boolean isRemote) {
return true;
}
public boolean func_149852_a(World world, Random rand, int posX, int posY, int posZ) {
public boolean shouldFertilize(World world, Random rand, int posX, int posY, int posZ) {
return true;
}
public void func_149853_b(World world, Random rand, int posX, int posY, int posZ) {
public void fertilize(World world, Random rand, int posX, int posY, int posZ) {
this.growTree(world, posX, posY, posZ, rand, 15);
}
}
@@ -17,7 +17,7 @@ extends CreativeTabs {
super(181, "tabLostblade");
}
public Item func_78016_d() {
public Item getTabIconItem() {
return ItemLoader.SoulIngot;
}
}
@@ -19,9 +19,9 @@ import net.minecraftforge.common.MinecraftForge;
public class ItemDragonGem
extends Item {
public ItemDragonGem() {
this.func_77655_b("DragonGem");
this.func_111206_d("lostblade:dragon_gem");
this.func_77637_a(CreativeTabsLoader.tabLostblade);
this.setUnlocalizedName("dragonGem");
this.setTextureName("lostblade:dragon_gem");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
LostbladeChestContent content = new LostbladeChestContent(this, 0, 1, 1, 1){
@Override
@@ -29,7 +29,7 @@ extends Item {
return 0.01f;
}
};
ChestGenHooks.addItem((String)"pyramidDesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidaesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidJungleChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCorridor", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCrossing", (WeightedRandomChestContent)content);
@@ -19,9 +19,9 @@ import net.minecraftforge.common.MinecraftForge;
public class ItemIceGem
extends Item {
public ItemIceGem() {
this.func_77655_b("IceGem");
this.func_111206_d("lostblade:ice_gem");
this.func_77637_a(CreativeTabsLoader.tabLostblade);
this.setUnlocalizedName("IceGem");
this.setTextureName("lostblade:ice_gem");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
LostbladeChestContent content = new LostbladeChestContent(this, 0, 1, 1, 1){
@Override
@@ -29,7 +29,7 @@ extends Item {
return 0.01f;
}
};
ChestGenHooks.addItem((String)"pyramidDesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidaesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidJungleChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCorridor", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCrossing", (WeightedRandomChestContent)content);
@@ -21,9 +21,9 @@ import net.minecraftforge.common.MinecraftForge;
public class ItemSoulCrystal
extends Item {
public ItemSoulCrystal() {
this.func_77655_b("SoulCrystal");
this.func_111206_d("lostblade:soul_crystal");
this.func_77637_a(CreativeTabsLoader.tabLostblade);
this.setUnlocalizedName("SoulCrystal");
this.setTextureName("lostblade:soul_crystal");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
LostbladeChestContent content = new LostbladeChestContent(this, 0, 1, 1, 1){
@Override
@@ -31,14 +31,14 @@ extends Item {
return 0.001f;
}
};
ChestGenHooks.addItem((String)"pyramidDesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidaesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidJungleChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCorridor", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCrossing", (WeightedRandomChestContent)content);
MinecraftForge.EVENT_BUS.register((Object)this);
}
public boolean func_77636_d(ItemStack par1ItemStack) {
public boolean hasEffect(ItemStack par1ItemStack) {
return true;
}
}
@@ -19,9 +19,9 @@ import net.minecraftforge.common.MinecraftForge;
public class ItemSoulIngot
extends Item {
public ItemSoulIngot() {
this.func_77655_b("SoulIngot");
this.func_111206_d("lostblade:soul_ingot");
this.func_77637_a(CreativeTabsLoader.tabLostblade);
this.setUnlocalizedName("SoulIngot");
this.setTextureName("lostblade:soul_ingot");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
LostbladeChestContent content = new LostbladeChestContent(this, 0, 1, 1, 1){
@Override
@@ -29,7 +29,7 @@ extends Item {
return 0.01f;
}
};
ChestGenHooks.addItem((String)"pyramidDesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidaesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidJungleChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCorridor", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCrossing", (WeightedRandomChestContent)content);
@@ -19,9 +19,9 @@ import net.minecraftforge.common.MinecraftForge;
public class ItemWaterGem
extends Item {
public ItemWaterGem() {
this.func_77655_b("WaterGem");
this.func_111206_d("lostblade:water_gem");
this.func_77637_a(CreativeTabsLoader.tabLostblade);
this.setUnlocalizedName("WaterGem");
this.setTextureName("lostblade:water_gem");
this.setCreativeTab(CreativeTabsLoader.tabLostblade);
LostbladeChestContent content = new LostbladeChestContent(this, 0, 1, 1, 1){
@Override
@@ -29,7 +29,7 @@ extends Item {
return 0.01f;
}
};
ChestGenHooks.addItem((String)"pyramidDesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidaesertyChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"pyramidJungleChest", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCorridor", (WeightedRandomChestContent)content);
ChestGenHooks.addItem((String)"strongholdCrossing", (WeightedRandomChestContent)content);
@@ -1,6 +1,6 @@
/*
* Decompiled with CFR 0.152.
*
*
* Could not load the following classes:
* net.minecraft.block.Block
* net.minecraft.inventory.IInventory
@@ -32,10 +32,11 @@ extends WeightedRandomChestContent {
return 0.01f;
}
@Override
protected ItemStack[] generateChestContent(Random random, IInventory newInventory) {
if (random.nextFloat() < this.getLotteryRate()) {
return new ItemStack[]{this.field_76297_b.func_77946_l()};
return new ItemStack[]{this.theItemId.copy()};
}
return new ItemStack[]{new ItemStack(random.nextBoolean() ? Item.func_150898_a((Block)BlockLoader.ProudSoulTree) : Item.func_150898_a((Block)BlockLoader.ProudSoulTree), 1, 0)};
return new ItemStack[]{new ItemStack(random.nextBoolean() ? Item.getItemFromBlock((Block)BlockLoader.ProudSoulTree) : Item.getItemFromBlock((Block)BlockLoader.ProudSoulTree), 1, 0)};
}
}
@@ -29,10 +29,10 @@ public class CraftingLoader {
private static void registerRecipe() {
ItemStack tinyBladeSoul = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"tiny_bladesoul", (int)1);
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.IceGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Blocks.field_150432_aD, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.DragonGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Blocks.field_150451_bX, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.WaterGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Items.field_151068_bn, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapelessRecipe((ItemStack)new ItemStack(ItemLoader.SoulIngot), (Object[])new Object[]{Items.field_151042_j, tinyBladeSoul});
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.IceGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Blocks.obsidian, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.dragonGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Blocks.redstone_block, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapedRecipe((ItemStack)new ItemStack(ItemLoader.WaterGem), (Object[])new Object[]{" B ", "BAB", " B ", Character.valueOf('A'), Items.potionitem, Character.valueOf('B'), tinyBladeSoul});
GameRegistry.addShapelessRecipe((ItemStack)new ItemStack(ItemLoader.SoulIngot), (Object[])new Object[]{Items.iron_ingot, tinyBladeSoul});
}
private static void registerSmelting() {
@@ -62,46 +62,46 @@ public class EventLoader {
@SubscribeEvent
public void onLivingHurt(EntityInteractEvent event) {
EntityPlayer player = event.entityPlayer;
PotionEffect effect = event.entityLiving.func_70660_b((Potion)PotionDivine.potion);
if (effect != null && effect.func_76458_c() >= 0 && player.func_70613_aW() && event.target instanceof EntityPlayer) {
player.func_70097_a(DamageSource.field_76376_m, 0.5f);
PotionEffect effect = event.entityLiving.getActivePotionEffect((Potion)PotionDivine.potion);
if (effect != null && effect.getAmplifier() >= 0 && player.isClientWorld() && event.target instanceof EntityPlayer) {
player.attackEntityFrom(DamageSource.magic, 0.5f);
}
}
@SubscribeEvent
public void onLivingHurt(LivingHurtEvent event) {
PotionEffect effect;
if (event.source.func_76355_l().equals("onFire") && (effect = event.entityLiving.func_70660_b((Potion)PotionDivine.potion)) != null) {
event.ammount = effect.func_76458_c() == 0 ? (float)((double)event.ammount * 1.5) : (float)((double)event.ammount * 3.0);
if (event.source.getDamageType().equals("onFire") && (effect = event.entityLiving.getActivePotionEffect((Potion)PotionDivine.potion)) != null) {
event.ammount = effect.getAmplifier() == 0 ? (float)((double)event.ammount * 1.5) : (float)((double)event.ammount * 3.0);
}
}
@SubscribeEvent
public void onAnvil(AnvilUpdateEvent event) {
float repairFactor;
if (!(event.left.func_77973_b() instanceof ItemSlashBlade)) {
if (!(event.left.getItem() instanceof ItemSlashBlade)) {
return;
}
if (event.right == null) {
return;
}
if (!(event.right.func_77973_b() instanceof ItemSoulCrystal)) {
if (!(event.right.getItem() instanceof ItemSoulCrystal)) {
return;
}
event.materialCost = 1;
ItemStack out = event.left.func_77946_l();
ItemStack out = event.left.copy();
NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)out);
int cost = event.cost;
Map map = EnchantmentHelper.func_82781_a((ItemStack)event.left);
Map map = EnchantmentHelper.getEnchantments((ItemStack)event.left);
Iterator localIterator = map.keySet().iterator();
while (localIterator.hasNext()) {
Enchantment enchantment1;
int enchIdx = (Integer)localIterator.next();
Enchantment enchantment = enchantment1 = 0 <= enchIdx && enchIdx < Enchantment.field_77331_b.length ? Enchantment.field_77331_b[enchIdx] : null;
int enchtdx = (Integer)localIterator.next();
Enchantment enchantment = enchantment1 = 0 <= enchtdx && enchtdx < Enchantment.enchantmentsList.length ? Enchantment.enchantmentsList[enchtdx] : null;
if (enchantment1 == null) continue;
int level = (Integer)map.get(enchantment1.field_77352_x);
int level = (Integer)map.get(enchantment1.effectId);
int baseCost = 0;
switch (enchantment1.func_77324_c()) {
switch (enchantment1.getWeight()) {
case 1: {
baseCost = 8;
break;
@@ -122,14 +122,14 @@ public class EventLoader {
}
cost += baseCost * level;
}
switch (event.right.func_77960_j()) {
switch (event.right.getItemDamage()) {
default:
}
cost = Math.max(5, cost);
NBTTagCompound matTag = ItemSlashBlade.getItemTagCompound((ItemStack)event.right);
if (ItemSlashBladeNamed.CurrentItemName.exists(matTag)) {
ItemStack targetBlade = GameRegistry.findItemStack((String)"flammpfeil.slashblade", (String)"slashbladeNamed", (int)1);
if (out.func_77977_a().equals(targetBlade.func_77977_a())) {
if (out.getUnlocalizedName().equals(targetBlade.getUnlocalizedName())) {
TagPropertyAccessor[] accessors;
if (1000 > ItemSlashBlade.ProudSoul.get(tag)) {
return;
@@ -152,17 +152,16 @@ public class EventLoader {
}
event.cost = cost;
ItemSlashBlade.RepairCount.add(tag, Integer.valueOf(1));
int repair = Math.min(out.func_77960_j(), (int)((float)out.func_77958_k() * repairFactor));
out.func_77964_b(out.func_77960_j() - repair);
int repair = Math.min(out.getItemDamage(), (int)((float)out.getMaxDamage() * repairFactor));
out.setItemDamage(out.getItemDamage() - repair);
if (StringUtils.isBlank((CharSequence)event.name)) {
if (ItemSlashBladeNamed.IsDefaultBewitched.get(tag).booleanValue()) {
out.func_135074_t();
out.func_151001_c(out.func_82833_r());
} else if (out.func_82837_s()) {
out.func_135074_t();
out.setStackDisplayName("");
} else if (out.hasDisplayName()) {
out.setStackDisplayName("");
}
} else {
out.func_151001_c(event.name);
out.setStackDisplayName(event.name);
}
event.output = out;
}
@@ -179,12 +178,12 @@ public class EventLoader {
float min = 0.0f;
float max = 1.0f;
float i = min + rand.nextFloat() * (max - min);
if (event.source.func_76355_l().equals("player") && i <= 1.0f) {
if (event.source.getDamageType().equals("player") && i <= 1.0f) {
if (event.entityLiving instanceof EntityDragon) {
event.entityLiving.func_145779_a(ItemLoader.SoulCrystal, 2);
event.entityLiving.dropItem(ItemLoader.SoulCrystal, 2);
}
if (event.entityLiving instanceof EntityWither) {
event.entityLiving.func_145779_a(ItemLoader.SoulCrystal, 1);
event.entityLiving.dropItem(ItemLoader.SoulCrystal, 1);
}
}
}
@@ -19,20 +19,20 @@ import net.minecraft.item.Item;
public class ItemLoader {
public static Item WaterGem = new ItemWaterGem();
public static Item DragonGem = new ItemDragonGem();
public static Item dragonGem = new ItemDragonGem();
public static Item IceGem = new ItemIceGem();
public static Item SoulIngot = new ItemSoulIngot();
public static Item SoulCrystal = new ItemSoulCrystal();
public ItemLoader(FMLPreInitializationEvent event) {
ItemLoader.register(WaterGem, "WaterGem");
ItemLoader.register(DragonGem, "DragonGem");
ItemLoader.register(dragonGem, "dragonGem");
ItemLoader.register(IceGem, "IceGem");
ItemLoader.register(SoulIngot, "SoulIngot");
ItemLoader.register(SoulCrystal, "SoulCrystal");
}
private static void register(Item item, String name) {
GameRegistry.registerItem((Item)item, (String)item.func_77658_a());
GameRegistry.registerItem((Item)item, (String)item.getUnlocalizedName());
}
}
@@ -19,7 +19,7 @@ import net.minecraftforge.oredict.OreDictionary;
public class OreDicLoader {
public OreDicLoader(FMLPreInitializationEvent event) {
OreDictionary.registerOre((String)"WaterGem", (Item)ItemLoader.WaterGem);
OreDictionary.registerOre((String)"DragonGem", (Item)ItemLoader.DragonGem);
OreDictionary.registerOre((String)"dragonGem", (Item)ItemLoader.dragonGem);
OreDictionary.registerOre((String)"IceGem", (Item)ItemLoader.IceGem);
OreDictionary.registerOre((String)"ProudSoulWood", (Block)BlockLoader.ProudSoulLog);
OreDictionary.registerOre((String)"SoulIngot", (Item)ItemLoader.SoulIngot);
@@ -27,24 +27,24 @@ extends Potion {
public PotionDivine(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_) {
super(p_i1573_1_, p_i1573_2_, p_i1573_3_);
this.func_76390_b("potion.divine");
this.setPotionName("potion.divine");
}
public static void init() {
potion.func_76399_b(0, 0);
potion.setIconIndex(0, 0);
}
@SideOnly(value=Side.CLIENT)
public int func_76392_e() {
Minecraft.func_71410_x().field_71446_o.func_110577_a(res);
return super.func_76392_e();
public int getStatusIconIndex() {
Minecraft.getMinecraft().renderEngine.bindTexture(res);
return super.getStatusIconIndex();
}
public void func_76394_a(EntityLivingBase p_76394_1_, int p_76394_2_) {
p_76394_1_.func_70097_a(new DamageSource("divine").func_82726_p().func_76351_m().func_76348_h(), 3.0f);
public void performEffect(EntityLivingBase p_76394_1_, int p_76394_2_) {
p_76394_1_.attackEntityFrom(new DamageSource("divine").setDamageBypassesArmor().setDamageIsAbsolute().setDamageAllowedInCreativeMode(), 3.0f);
}
public boolean func_76397_a(int p_76397_1_, int p_76397_2_) {
public boolean isReady(int p_76397_1_, int p_76397_2_) {
int k = 25 >> p_76397_2_;
return k > 0 ? p_76397_1_ % k == 0 : true;
}
@@ -25,20 +25,20 @@ extends Potion {
public PotionHide(int p_i1573_1_, boolean p_i1573_2_, int p_i1573_3_) {
super(p_i1573_1_, p_i1573_2_, p_i1573_3_);
this.func_76390_b("potion.hide");
this.setPotionName("potion.hide");
}
public static void init() {
potion.func_76399_b(1, 0);
potion.setIconIndex(1, 0);
}
@SideOnly(value=Side.CLIENT)
public int func_76392_e() {
Minecraft.func_71410_x().field_71446_o.func_110577_a(res);
return super.func_76392_e();
public int getStatusIconIndex() {
Minecraft.getMinecraft().renderEngine.bindTexture(res);
return super.getStatusIconIndex();
}
public void func_76394_a(EntityLivingBase entity, int i) {
public void performEffect(EntityLivingBase entity, int i) {
}
static {
@@ -9,7 +9,7 @@
* mods.flammpfeil.slashblade.ItemRendererBaseWeapon
* net.minecraft.client.renderer.entity.Render
* net.minecraft.item.Item
* net.minecraftforge.client.IItemRenderer
* net.minecraftforge.client.ItemRenderer
* net.minecraftforge.client.MinecraftForgeClient
*/
package com.tanzanite.proxy;
@@ -58,7 +58,7 @@ public class CommonProxy {
SlashBlade.InitEventBus.register((Object)new Wulixueshengjian());
}
if (Loader.isModLoaded((String)"vampirism")) {
Yinsezidan = new VampireSlayer(Item.ToolMaterial.IRON, 7.0f).func_111206_d("flammpfeil.slashblade:proudsoul");
Yinsezidan = new VampireSlayer(Item.ToolMaterial.IRON, 7.0f).setTextureName("flammpfeil.slashblade:proudsoul");
GameRegistry.registerItem((Item)Yinsezidan, (String)"Yinsezidan");
SlashBlade.InitEventBus.register((Object)new Yinsezidan());
}
@@ -67,9 +67,9 @@ public class CommonProxy {
SlashBlade.InitEventBus.register((Object)new Changong());
SlashBlade.InitEventBus.register((Object)new Zhanyue());
SlashBlade.InitEventBus.register((Object)Lostblade.instance);
EntityRegistry.registerModEntity(EntityDriveAlt.class, (String)"DriveAlt", (int)2301, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
EntityRegistry.registerModEntity(EntityDriveCure.class, (String)"DriveCure", (int)2302, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
EntityRegistry.registerModEntity(EntityDriveBurst.class, (String)"DriveBurst", (int)2303, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
EntityRegistry.registerModEntity(EntityDriveAlt.class, (String)"driveAlt", (int)2301, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
EntityRegistry.registerModEntity(EntityDriveCure.class, (String)"driveCure", (int)2302, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
EntityRegistry.registerModEntity(EntityDriveBurst.class, (String)"driveBurst", (int)2303, (Object)Lostblade.instance, (int)250, (int)1, (boolean)true);
}
public void init(FMLInitializationEvent event) {
@@ -29,7 +29,7 @@ extends WorldGenAbstractTree {
this.type = dmg;
}
public boolean func_76484_a(World world, Random random, int posX, int posY, int posZ) {
public boolean generate(World world, Random random, int posX, int posY, int posZ) {
int l = random.nextInt(3) + 4;
boolean flag = true;
if (posY < 1 || posY + l + 1 > 128) {
@@ -48,8 +48,8 @@ extends WorldGenAbstractTree {
if (i1 >= 0) {
world.getClass();
if (i1 < 128) {
Block j3 = world.func_147439_a(i2, i1, l2);
if (j3 == Blocks.field_150350_a || j3 == BlockLoader.ProudSoulLeaves) continue;
Block j3 = world.getBlock(i2, i1, l2);
if (j3 == Blocks.air || j3 == BlockLoader.ProudSoulLeaves) continue;
flag = false;
continue;
}
@@ -61,11 +61,11 @@ extends WorldGenAbstractTree {
if (!flag) {
return false;
}
Block j1 = world.func_147439_a(posX, posY - 1, posZ);
if (j1 != Blocks.field_150349_c && j1 != Blocks.field_150346_d && posY >= 128 - l - 1) {
Block j1 = world.getBlock(posX, posY - 1, posZ);
if (j1 != Blocks.grass && j1 != Blocks.dirt && posY >= 128 - l - 1) {
return false;
}
world.func_147465_d(posX, posY - 1, posZ, Blocks.field_150346_d, 0, 3);
world.setBlock(posX, posY - 1, posZ, Blocks.dirt, 0, 3);
for (int k1 = posY - 3 + l; k1 <= posY + l; ++k1) {
int j2 = k1 - (posY + l);
int i3 = 1 - j2 / 2;
@@ -73,15 +73,15 @@ extends WorldGenAbstractTree {
int l3 = k3 - posX;
for (int i4 = posZ - i3; i4 <= posZ + i3; ++i4) {
int j4 = i4 - posZ;
if (Math.abs(l3) == i3 && Math.abs(j4) == i3 && (random.nextInt(2) == 0 || j2 == 0) || world.func_147439_a(k3, k1, i4).func_149662_c()) continue;
world.func_147465_d(k3, k1, i4, BlockLoader.ProudSoulLeaves, this.type, 3);
if (Math.abs(l3) == i3 && Math.abs(j4) == i3 && (random.nextInt(2) == 0 || j2 == 0) || world.getBlock(k3, k1, i4).isOpaqueCube()) continue;
world.setBlock(k3, k1, i4, BlockLoader.ProudSoulLeaves, this.type, 3);
}
}
}
for (int l1 = 0; l1 < l; ++l1) {
Block k2 = world.func_147439_a(posX, posY + l1, posZ);
if (k2 != Blocks.field_150350_a && k2 != BlockLoader.ProudSoulLeaves) continue;
world.func_147465_d(posX, posY + l1, posZ, BlockLoader.ProudSoulLog, 0, 3);
Block k2 = world.getBlock(posX, posY + l1, posZ);
if (k2 != Blocks.air && k2 != BlockLoader.ProudSoulLeaves) continue;
world.setBlock(posX, posY + l1, posZ, BlockLoader.ProudSoulLog, 0, 3);
}
return true;
}