mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-20 20:22:10 +00:00
Reduced explosive damage
This commit is contained in:
1 parent
5e24ba1886
commit
e01a79f844
2 files changed
+15
-15
No files matched your search
+11
-11
@@ -38,31 +38,31 @@ public class BowHandler {
|
||||
|
||||
f *= speedModifier;
|
||||
|
||||
EntityDraconicArrow entityarrow = new EntityDraconicArrow(stack, world, player, f * 2.0F);//.setShooter(player);
|
||||
EntityDraconicArrow entityArrow = new EntityDraconicArrow(stack, world, player, f * 2.0F);//.setShooter(player);
|
||||
|
||||
if (f >= 1.0F)
|
||||
entityarrow.setIsCritical(true);
|
||||
entityArrow.setIsCritical(true);
|
||||
|
||||
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, stack);
|
||||
|
||||
if (k > 0) //
|
||||
entityarrow.setDamage(entityarrow.getDamage() + k + 0.5D);
|
||||
entityArrow.setDamage(entityArrow.getDamage() + k + 0.5D);
|
||||
|
||||
int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, stack);
|
||||
|
||||
if (l > 0)
|
||||
entityarrow.setKnockbackStrength(l * 2);
|
||||
entityArrow.setKnockbackStrength(l * 2);
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, stack) > 0)
|
||||
entityarrow.setFire(200);
|
||||
entityArrow.setFire(200);
|
||||
|
||||
if (ignorSpeedWhenCalculatingDamage) {
|
||||
entityarrow.ignorSpeed = true;
|
||||
entityarrow.setDamage(entityarrow.getDamage() + ignorSpeedCompensation);
|
||||
entityArrow.ignorSpeed = true;
|
||||
entityArrow.setDamage(entityArrow.getDamage() + ignorSpeedCompensation);
|
||||
}
|
||||
if (isExplosive) {
|
||||
if ((player.inventory.hasItemStack(new ItemStack(Items.gunpowder, 4)) || player.capabilities.isCreativeMode)) {
|
||||
entityarrow.explosive = isExplosive;
|
||||
entityArrow.explosive = isExplosive;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
player.inventory.consumeInventoryItem(Items.gunpowder);
|
||||
} else {
|
||||
@@ -75,14 +75,14 @@ public class BowHandler {
|
||||
world.playSoundAtEntity(player, "random.bow", 1.0F, soundPitchModifier * (1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.3F));
|
||||
|
||||
if (flag)
|
||||
entityarrow.canBePickedUp = 2;
|
||||
entityArrow.canBePickedUp = 2;
|
||||
else {
|
||||
entityarrow.canBePickedUp = 1;
|
||||
entityArrow.canBePickedUp = 1;
|
||||
player.inventory.consumeInventoryItem(Items.arrow);
|
||||
}
|
||||
|
||||
if (!world.isRemote)
|
||||
world.spawnEntityInWorld(entityarrow);
|
||||
world.spawnEntityInWorld(entityArrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -87,9 +87,9 @@ public class DraconicBow extends ItemBow
|
||||
else if (currentMode.equals("sharpshooter"))
|
||||
BowHandler.standerdShot(stack, world, player, count, itemRand, 21F, 5F, true, 30D, 0.7F, false, 20);
|
||||
else if (currentMode.equals("explosive"))
|
||||
BowHandler.standerdShot(stack, world, player, count, itemRand, 5F, 0.8F, true, 0D, 1F, true, 40);
|
||||
BowHandler.standerdShot(stack, world, player, count, itemRand, 5F, 0.5F, true, 0D, 1F, true, 80);
|
||||
else if (currentMode.equals("devistation"))
|
||||
BowHandler.standerdShot(stack, world, player, count, itemRand, 2F, 1.5F, true, 0D, 1F, true, 0);
|
||||
BowHandler.standerdShot(stack, world, player, count, itemRand, 2F, 2.0F, true, 0D, 1F, true, 0);
|
||||
}
|
||||
|
||||
public void changeMode(ItemStack stack, EntityPlayer player)
|
||||
@@ -170,9 +170,9 @@ public class DraconicBow extends ItemBow
|
||||
return getItemIconForUseDuration(0);
|
||||
} else
|
||||
{
|
||||
if (j >= 40)
|
||||
if (j >= 80)
|
||||
return getItemIconForUseDuration(2);
|
||||
else if (j > 20)
|
||||
else if (j > 40)
|
||||
return getItemIconForUseDuration(1);
|
||||
else if (j > 0)
|
||||
return getItemIconForUseDuration(0);
|
||||
|
||||
Reference in new issue
Block a user