#141 - Poison needle now displays as a poison needle
This commit is contained in:
parent
d26944e5f0
commit
89fd3cd659
|
@ -11,6 +11,7 @@ import net.minecraft.util.math.MathHelper;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.legacy.aether.common.entities.projectile.EntityPoisonNeedle;
|
||||
import com.legacy.aether.common.entities.projectile.darts.EntityDartBase;
|
||||
import com.legacy.aether.common.entities.projectile.darts.EntityDartEnchanted;
|
||||
import com.legacy.aether.common.entities.projectile.darts.EntityDartGolden;
|
||||
|
@ -26,6 +27,11 @@ public class DartBaseRenderer<DART extends EntityDartBase> extends Render<DART>
|
|||
|
||||
public void renderDart(DART dart, double d, double d1, double d2, float f, float f1)
|
||||
{
|
||||
if (dart.isInvisible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.bindEntityTexture(dart);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)d, (float)d1, (float)d2);
|
||||
|
@ -95,7 +101,7 @@ public class DartBaseRenderer<DART extends EntityDartBase> extends Render<DART>
|
|||
protected ResourceLocation getEntityTexture(DART entity)
|
||||
{
|
||||
String base = entity instanceof EntityDartGolden ? "golden" : entity instanceof EntityDartEnchanted ? "enchanted" : "poison";
|
||||
return new ResourceLocation("aether_legacy", "textures/entities/projectile/dart/" + base + "_dart.png");
|
||||
return new ResourceLocation("aether_legacy", "textures/entities/projectile/dart/" + base + (entity instanceof EntityPoisonNeedle ? "_needle" : "_dart") + ".png");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,32 +1,27 @@
|
|||
package com.legacy.aether.common.player.movement;
|
||||
package com.legacy.aether.common.entities.movement;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
import com.legacy.aether.common.player.PlayerAether;
|
||||
|
||||
public class AetherPoisonMovement
|
||||
{
|
||||
|
||||
public int poisonTime = 0;
|
||||
public int poisonTime = 0;
|
||||
|
||||
public double rotD, motD;
|
||||
|
||||
private EntityPlayer thePlayer;
|
||||
private EntityLivingBase entityLiving;
|
||||
|
||||
public PlayerAether player;
|
||||
|
||||
public AetherPoisonMovement(PlayerAether player)
|
||||
public AetherPoisonMovement(EntityLivingBase entity)
|
||||
{
|
||||
this.player = player;
|
||||
this.thePlayer = player.thePlayer;
|
||||
this.entityLiving = entity;
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
int timeUntilHit = this.poisonTime % 50;
|
||||
|
||||
if (this.thePlayer.isDead)
|
||||
if (this.entityLiving.isDead)
|
||||
{
|
||||
this.poisonTime = 0;
|
||||
|
||||
|
@ -49,7 +44,7 @@ public class AetherPoisonMovement
|
|||
|
||||
if (timeUntilHit == 0)
|
||||
{
|
||||
this.thePlayer.attackEntityFrom(DamageSource.generic, 1);
|
||||
this.entityLiving.attackEntityFrom(DamageSource.generic, 1);
|
||||
}
|
||||
|
||||
this.poisonTime--;
|
||||
|
@ -76,17 +71,17 @@ public class AetherPoisonMovement
|
|||
|
||||
public void distractEntity()
|
||||
{
|
||||
double gaussian = this.thePlayer.worldObj.rand.nextGaussian();
|
||||
double gaussian = this.entityLiving.worldObj.rand.nextGaussian();
|
||||
double newMotD = 0.1D * gaussian;
|
||||
double newRotD = (Math.PI / 4D) * gaussian;
|
||||
|
||||
this.motD = 0.2D * newMotD + (0.8D) * this.motD;
|
||||
this.thePlayer.motionX += this.motD;
|
||||
this.thePlayer.motionZ += this.motD;
|
||||
this.entityLiving.motionX += this.motD;
|
||||
this.entityLiving.motionZ += this.motD;
|
||||
this.rotD = 0.125D * newRotD + (1.0D - 0.125D) * this.rotD;
|
||||
|
||||
this.thePlayer.rotationYaw = (float)((double)this.thePlayer.rotationYaw + rotD);
|
||||
this.thePlayer.rotationPitch = (float)((double)this.thePlayer.rotationPitch + rotD);
|
||||
this.entityLiving.rotationYaw = (float)((double)this.entityLiving.rotationYaw + rotD);
|
||||
this.entityLiving.rotationPitch = (float)((double)this.entityLiving.rotationPitch + rotD);
|
||||
}
|
||||
|
||||
}
|
|
@ -24,7 +24,8 @@ public class EntityPoisonNeedle extends EntityDartPoison
|
|||
this.setDamage(1);
|
||||
}
|
||||
|
||||
public boolean func_189652_ae()
|
||||
@Override
|
||||
public boolean hasNoGravity()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -12,20 +12,24 @@ import net.minecraft.entity.SharedMonsterAttributes;
|
|||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.server.management.PlayerList;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import com.legacy.aether.common.AetherConfig;
|
||||
import com.legacy.aether.common.blocks.BlocksAether;
|
||||
import com.legacy.aether.common.containers.inventory.InventoryAccessories;
|
||||
import com.legacy.aether.common.entities.movement.AetherPoisonMovement;
|
||||
import com.legacy.aether.common.entities.passive.EntityMiniCloud;
|
||||
import com.legacy.aether.common.entities.passive.mountable.EntityParachute;
|
||||
import com.legacy.aether.common.items.ItemsAether;
|
||||
|
@ -37,7 +41,6 @@ import com.legacy.aether.common.player.abilities.AbilityArmor;
|
|||
import com.legacy.aether.common.player.abilities.AbilityFlight;
|
||||
import com.legacy.aether.common.player.abilities.AbilityRepulsion;
|
||||
import com.legacy.aether.common.player.capability.PlayerAetherManager;
|
||||
import com.legacy.aether.common.player.movement.AetherPoisonMovement;
|
||||
import com.legacy.aether.common.player.perks.AetherRankings;
|
||||
import com.legacy.aether.common.player.perks.util.DonatorMoaSkin;
|
||||
import com.legacy.aether.common.registry.achievements.AchievementsAether;
|
||||
|
@ -91,7 +94,7 @@ public class PlayerAether
|
|||
this.thePlayer = player;
|
||||
|
||||
this.donatorMoaSkin = new DonatorMoaSkin();
|
||||
this.poison = new AetherPoisonMovement(this);
|
||||
this.poison = new AetherPoisonMovement(player);
|
||||
this.accessories = new InventoryAccessories(this);
|
||||
|
||||
this.abilities = new Ability [] {new AbilityArmor(this), new AbilityAccessories(this), new AbilityFlight(this), new AbilityRepulsion(this)};
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 366 B |
Loading…
Reference in a new issue