Backport. Also fixed an NPE with darts apparently.

This commit is contained in:
bconlon 2020-08-20 20:50:40 -07:00
parent 65a4dfa17f
commit ba375e6a74
2 changed files with 9 additions and 1 deletions

View file

@ -532,6 +532,14 @@ public class EntitySlider extends EntityFlying implements IAetherBoss {
boolean isTCPickaxe = stack.getItem().getClass().getName().equals("tconstruct.items.tools.Pickaxe");
if (!stack.getItem().canHarvestBlock(Blocks.stone, stack))
{
this.sendMessage(player, "Hmm. Perhaps I need to attack it with a Pickaxe?");
return false;
}
if (!isTCPickaxe) {
if (!(stack.getItem() instanceof ItemPickaxe) && !(stack.getItem() instanceof ItemAetherTool)) {
this.sendMessage(player, "Hmm. Perhaps I need to attack it with a Pickaxe?");

View file

@ -393,7 +393,7 @@ public abstract class EntityDartBase extends EntityArrow implements IProjectile,
}
}
if (movingobjectposition.entityHit != null)
if (movingobjectposition.entityHit != null && movingobjectposition.typeOfHit != null && this.shootingEntity != null)
{
if (movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && movingobjectposition.entityHit != this.shootingEntity.riddenByEntity)
{