Fully fixed elementals.
This commit is contained in:
parent
07973fb674
commit
bf068d1487
|
@ -17,7 +17,7 @@ import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
|
|||
public class ClientEventHandler
|
||||
{
|
||||
private Minecraft mcClient = FMLClientHandler.instance().getClient();
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -21,8 +19,8 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
public class EntityElemental extends EntityDemon
|
||||
{
|
||||
|
@ -144,12 +142,6 @@ public class EntityElemental extends EntityDemon
|
|||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean func_110182_bF()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(25) != 0;
|
||||
}
|
||||
|
||||
protected void updateEntityActionState()
|
||||
{
|
||||
if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0)
|
||||
|
@ -259,17 +251,6 @@ public class EntityElemental extends EntityDemon
|
|||
--this.attackCounter;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
byte b1 = (byte) (this.attackCounter > 10 ? 1 : 0);
|
||||
|
||||
if (b0 != b1)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, Byte.valueOf(b1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -317,7 +298,6 @@ public class EntityElemental extends EntityDemon
|
|||
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.readEntityFromNBT(par1NBTTagCompound);
|
||||
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
|
||||
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
@ -353,14 +333,6 @@ public class EntityElemental extends EntityDemon
|
|||
public void setAttackTarget(EntityLivingBase par1EntityLivingBase)
|
||||
{
|
||||
super.setAttackTarget(par1EntityLivingBase);
|
||||
|
||||
if (par1EntityLivingBase == null)
|
||||
{
|
||||
this.setAngry(false);
|
||||
} else if (!this.isTamed())
|
||||
{
|
||||
this.setAngry(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -376,7 +348,6 @@ public class EntityElemental extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, this.getHealth());
|
||||
this.dataWatcher.addObject(19, 0);
|
||||
this.dataWatcher.addObject(25, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -505,30 +476,6 @@ public class EntityElemental extends EntityDemon
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this wolf is angry or not.
|
||||
*/
|
||||
public boolean isAngry()
|
||||
{
|
||||
return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether this wolf is angry or not.
|
||||
*/
|
||||
public void setAngry(boolean par1)
|
||||
{
|
||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||
|
||||
if (par1)
|
||||
{
|
||||
this.dataWatcher.updateObject(16, b0 | 2);
|
||||
} else
|
||||
{
|
||||
this.dataWatcher.updateObject(16, b0 & -3);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if an entity can be despawned, used on idle far away entities
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
|
|
@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.renderer.model;
|
|||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ModelElemental extends ModelBase
|
||||
|
@ -71,11 +70,10 @@ public class ModelElemental extends ModelBase
|
|||
return;
|
||||
}
|
||||
|
||||
int ratio = 20;
|
||||
float rot = (entity.worldObj.getWorldTime() % ratio) / ratio;
|
||||
Shape1.rotateAngleX = f / 5;
|
||||
Shape2.rotateAngleZ = f / 5;
|
||||
Shape3.rotateAngleY = f / 5;
|
||||
EntityBlaze d;
|
||||
float ratio = 0.1f;
|
||||
float rot = (entity.worldObj.getWorldTime() + f) * ratio;
|
||||
Shape1.rotateAngleX = rot;
|
||||
Shape2.rotateAngleZ = rot;
|
||||
Shape3.rotateAngleY = rot;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue