Balloons can be popped by arrows/etc, touched up Robit GUI bleeding text

This commit is contained in:
Aidan C. Brady committed 2014-01-26 02:01:44 -05:00
1 parent 3cf9b2cff0
commit ac008506e7
2 files changed
+23 -1

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ public class GuiRobitMain extends GuiMekanism
fontRenderer.drawString("Energy: " + MekanismUtils.getEnergyDisplay(robit.getEnergy()), 29, 36-4, 0x00CD00);
fontRenderer.drawString("Following: " + robit.getFollowing(), 29, 45-4, 0x00CD00);
fontRenderer.drawString("Drop pickup: " + robit.getDropPickup(), 29, 54-4, 0x00CD00);
fontRenderer.drawString("Owner: " + robit.getOwnerName(), 29, 63-4, 0x00CD00);
fontRenderer.drawString("Owner: " + robit.getOwnerName().subSequence(0, 14), 29, 63-4, 0x00CD00);
}
int xAxis = (mouseX - (width - xSize) / 2);
@@ -10,7 +10,9 @@ import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.particle.EntityReddustFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@@ -413,6 +415,26 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
return true;
}
@Override
public boolean attackEntityFrom(DamageSource dmgSource, float damage)
{
if(isEntityInvulnerable())
{
return false;
}
else {
setBeenAttacked();
if(dmgSource != DamageSource.magic && dmgSource != DamageSource.drown && dmgSource != DamageSource.fall)
{
pop();
return true;
}
return false;
}
}
public boolean isLatched()
{
if(!worldObj.isRemote)