mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
Entities
This commit is contained in:
1 parent
017829927f
commit
cfbf2cc538
14 files changed
+343
-282
No files matched your search
@@ -14,12 +14,15 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.sound.BotaniaSoundEvents;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class EntityMagicLandmine extends Entity {
|
||||
@@ -49,7 +52,7 @@ public class EntityMagicLandmine extends Entity {
|
||||
Botania.proxy.wispFX(worldObj, posX - range + Math.random() * range * 2, posY, posZ - range + Math.random() * range * 2, r, g, b, 0.4F, -0.015F, 1);
|
||||
|
||||
if(ticksExisted >= 55) {
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "botania:gaiaTrap", 0.3F, 1F);
|
||||
worldObj.playSound(null, posX, posY, posZ, BotaniaSoundEvents.gaiaTrap, SoundCategory.NEUTRAL, 0.3F, 1F);
|
||||
|
||||
float m = 0.35F;
|
||||
g = 0.4F;
|
||||
@@ -60,8 +63,8 @@ public class EntityMagicLandmine extends Entity {
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(posX - range, posY - range, posZ - range, posX + range, posY + range, posZ + range));
|
||||
for(EntityPlayer player : players) {
|
||||
player.attackEntityFrom(summoner == null ? DamageSource.generic : DamageSource.causeMobDamage(summoner), 10);
|
||||
player.addPotionEffect(new PotionEffect(Potion.blindness.id, 25, 0));
|
||||
PotionEffect wither = new PotionEffect(Potion.wither.id, 70, 3);
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.blindness, 25, 0));
|
||||
PotionEffect wither = new PotionEffect(MobEffects.wither, 70, 3);
|
||||
wither.getCurativeItems().clear();
|
||||
player.addPotionEffect(wither);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user