package main.flowstoneenergy.entities;

import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;

public class EntityRobot extends Entity implements IEntityAdditionalSpawnData {

    private boolean charged;

    public EntityRobot(World world) {
        super(world);
        setSize(1.5F, 0.6F);
    }

    public boolean isCharged() {
        return charged;
    }

    public void setCharged() {
        charged = true;
    }

    @Override
    public AxisAlignedBB getBoundingBox() {
        return boundingBox;
    }

    @Override
    public AxisAlignedBB getCollisionBox(Entity entity) {
        if (entity != riddenByEntity)
            return entity.boundingBox;
        else
            return null;
    }

    @Override
    public double getMountedYOffset() {
        return -0.015;
    }

    @Override
    public void onUpdate() {
        super.onUpdate();

        if (!worldObj.isRemote) {
            if (riddenByEntity != null) {
                motionY = 0.2;
            } else if (worldObj.isAirBlock((int) posX, (int) posY - 1, (int) posZ)) {
                motionY = -0.1;
            } else {
                motionY = 0;
            }
        }
        setPosition(posX + motionX, posY + motionY, posZ + motionZ);
    }

    @Override
    public boolean canBeCollidedWith() {
        return !isDead;
    }

    @Override
    public boolean interactFirst(EntityPlayer player) {
        if (!worldObj.isRemote && riddenByEntity == null) {
            player.mountEntity(this);
        }

        return true;
    }

    @Override
    protected void entityInit() {

    }

    @Override
    protected void readEntityFromNBT(NBTTagCompound nbt) {
        charged = nbt.getBoolean("Charged");
    }

    @Override
    protected void writeEntityToNBT(NBTTagCompound nbt) {
        nbt.setBoolean("Charged", charged);
    }

    @Override
    public void writeSpawnData(ByteBuf data) {
        data.writeBoolean(charged);
    }

    @Override
    public void readSpawnData(ByteBuf data) {
        charged = data.readBoolean();
    }

}

@@ -44,95 +44,110 @@
 ort 
-cpw.mods.fml.common.registr
+io.netty.buffer.ByteBuf;%0Aimport net.minecraft.entit
 y.
-I
 Entity
-AdditionalSpawnData;%0Aimport io.netty.buffer.ByteBuf
+;%0Aimport net.minecraft.entity.EntityAgeable
 ;%0Aim
@@ -164,38 +164,55 @@
 inecraft.entity.
-Entity
+SharedMonsterAttributes
 ;%0Aimport net.min
@@ -230,26 +230,27 @@
 ty.p
-layer
+assive
 .Entity
-Player
+Animal
 ;%0Aim
@@ -362,16 +362,80 @@
 d.World;
+%0Aimport cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
 %0A%0Apublic
@@ -467,16 +467,22 @@
 s Entity
+Animal
  impleme
@@ -757,32 +757,323 @@
 ed = true;%0A    %7D
+%0A    %0A    @Override%0A    protected void applyEntityAttributes()%0A    %7B%0A        super.applyEntityAttributes();%0A        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0D);%0A        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.7D);%0A    %7D
 %0A%0A    @Override%0A
@@ -1964,215 +1964,8 @@
  %7D%0A%0A
-    @Override%0A    public boolean interactFirst(EntityPlayer player) %7B%0A        if (!worldObj.isRemote && riddenByEntity == null) %7B%0A            player.mountEntity(this);%0A        %7D%0A%0A        return true;%0A    %7D%0A%0A
     
@@ -2026,37 +2026,31 @@
   @Override%0A
-    protected
+%09public
  void readEn
@@ -2145,37 +2145,31 @@
   @Override%0A
-    protected
+%09public
  void writeE
@@ -2461,10 +2461,96 @@
 %0A    %7D%0A%0A
+%09@Override%0A%09public EntityAgeable createChild(EntityAgeable var1) %7B%0A%09%09return null;%0A%09%7D%0A%0A
 %7D%0A

Update EntityRobot.java