Some balance changes

This commit is contained in:
Vincent Lee committed 2016-04-27 19:26:56 -05:00
1 parent fca4e2bfa8
commit dc35d395cf
5 files changed
+37 -6

No files matched your search

@@ -68,11 +68,14 @@ public class EntityFallingStar extends EntityThrowableCopy {
@Override
protected void onImpact(RayTraceResult pos) {
if (worldObj.isRemote)
return;
EntityLivingBase thrower = getThrower();
if(pos.entityHit != null && thrower != null && pos.entityHit != thrower && !pos.entityHit.isDead) {
if(thrower instanceof EntityPlayer)
pos.entityHit.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) thrower), 10);
else pos.entityHit.attackEntityFrom(DamageSource.generic, 10);
pos.entityHit.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) thrower), Math.random() < 0.25 ? 10 : 5);
else pos.entityHit.attackEntityFrom(DamageSource.generic, Math.random() < 0.25 ? 10 : 5);
}
if (pos.getBlockPos() != null) {
@@ -10,10 +10,14 @@
*/
package vazkii.botania.common.item.equipment.tool;
import com.google.common.collect.Multimap;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
@@ -64,4 +68,15 @@ public class ItemEnderDagger extends ItemManasteelSword implements IColorable {
return false;
}
@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -1.25, 0));
}
return multimap;
}
}
@@ -24,11 +24,12 @@ import vazkii.botania.common.lib.LibItemNames;
public class ItemGlassPick extends ItemManasteelPick {
private static final int MANA_PER_DAMAGE = 160;
private static final ToolMaterial MATERIAL = EnumHelper.addToolMaterial("MANASTEEL_GLASS", 0, 125, 4.8F, 1F, 10);
private static final ToolMaterial MATERIAL = EnumHelper.addToolMaterial("MANASTEEL_GLASS", 0, 125, 4.8F, 0F, 10);
public ItemGlassPick() {
super(MATERIAL, LibItemNames.GLASS_PICK);
MinecraftForge.EVENT_BUS.register(this);
attackSpeed = -1;
}
@SubscribeEvent
@@ -46,11 +46,11 @@ public class ItemStarSword extends ItemManasteelSword implements ICraftAchieveme
PotionEffect haste = player.getActivePotionEffect(MobEffects.digSpeed);
float check = haste == null ? 0.16666667F : haste.getAmplifier() == 1 ? 0.5F : 0.4F;
if(player.getHeldItemMainhand() == par1ItemStack && player.swingProgress == check && !par2World.isRemote && par2World.rand.nextInt(2) == 0) {
if(player.getHeldItemMainhand() == par1ItemStack && player.swingProgress == check && !par2World.isRemote) {
RayTraceResult pos = ToolCommons.raytraceFromEntity(par2World, par3Entity, true, 48);
if(pos != null && pos.getBlockPos() != null) {
Vector3 posVec = new Vector3(pos.getBlockPos().getX(), pos.getBlockPos().getY(), pos.getBlockPos().getZ());
Vector3 motVec = new Vector3((Math.random() - 0.5) * 18, 24, (Math.random() - 0.5) * 18);
Vector3 motVec = new Vector3((0.5 * Math.random() - 0.25) * 18, 24, (0.5 * Math.random() - 0.25) * 18);
posVec.add(motVec);
motVec.normalize().negate().multiply(1.5);
@@ -61,6 +61,17 @@ public class ItemStarSword extends ItemManasteelSword implements ICraftAchieveme
star.motionZ = motVec.z;
par2World.spawnEntityInWorld(star);
if (!par2World.isRaining()
&& Math.abs(par2World.getWorldTime() - 18000) < 1800
&& Math.random() < 0.125) {
EntityFallingStar bonusStar = new EntityFallingStar(par2World, player);
bonusStar.setPosition(posVec.x, posVec.y, posVec.z);
bonusStar.motionX = motVec.x + Math.random() - 0.5;
bonusStar.motionY = motVec.y + Math.random() - 0.5;
bonusStar.motionZ = motVec.z + Math.random() - 0.5;
par2World.spawnEntityInWorld(bonusStar);
}
ToolCommons.damageItem(par1ItemStack, 1, player, MANA_PER_DAMAGE);
par2World.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.starcaller, SoundCategory.PLAYERS, 0.4F, 1.4F);
}
@@ -57,7 +57,8 @@ public class ItemThunderSword extends ItemManasteelSword implements ICraftAchiev
Random rand = new Random(lightningSeed);
EntityLivingBase lightningSource = entity;
for(int i = 0; i < 4; i++) {
int hops = entity.worldObj.isThundering() ? 10 : 4;
for(int i = 0; i < hops; i++) {
List<Entity> entities = entity.worldObj.getEntitiesInAABBexcluding(lightningSource, new AxisAlignedBB(lightningSource.posX - range, lightningSource.posY - range, lightningSource.posZ - range, lightningSource.posX + range, lightningSource.posY + range, lightningSource.posZ + range), selector);
if(entities.isEmpty())
break;