Merge pull request #1314 from GirafiStudios/BOP-1.12.x-7.0.x

Fixed BoP boats not being breakable by hand, Fixed #1197
This commit is contained in:
Forstride 2018-10-01 21:02:33 -04:00 committed by GitHub
commit 0aafba6424
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,7 @@ package biomesoplenty.common.entities.item;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.collect.Lists;
@ -42,10 +43,7 @@ import net.minecraft.util.EntitySelectors;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.*;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -144,7 +142,7 @@ public class EntityBOPBoat extends EntityBoat
}
@Override
public boolean attackEntityFrom(DamageSource source, float amount)
public boolean attackEntityFrom(@Nonnull DamageSource source, float amount)
{
if (this.isEntityInvulnerable(source))
{
@ -160,7 +158,7 @@ public class EntityBOPBoat extends EntityBoat
{
this.setForwardDirection(-this.getForwardDirection());
this.setTimeSinceHit(10);
this.setDamageTaken(this.getDamageTaken() + amount * 10.0F);
this.setDamageTaken(this.getDamageTaken() + (amount * 1.5F) * 10.0F);
this.markVelocityChanged();
boolean flag = source.getTrueSource() instanceof EntityPlayer && ((EntityPlayer)source.getTrueSource()).capabilities.isCreativeMode;
@ -240,6 +238,13 @@ public class EntityBOPBoat extends EntityBoat
}
}
@Override
@Nonnull
public ItemStack getPickedResult(RayTraceResult target)
{
return new ItemStack(this.getItemBoat());
}
@SideOnly(Side.CLIENT)
@Override
public void performHurtAnimation()