Check spark liveness before interacting. Closes #2302

This commit is contained in:
Vincent Lee committed 2017-07-13 20:21:11 -05:00
1 parent 891969b569
commit adfc6e41d9
2 files changed
+2 -2

No files matched your search

@@ -262,7 +262,7 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
@Override
public boolean processInitialInteract(EntityPlayer player, EnumHand hand) {
ItemStack stack = player.getHeldItem(hand);
if(!stack.isEmpty()) {
if(!isDead && !stack.isEmpty()) {
if(player.world.isRemote) {
boolean valid = stack.getItem() == ModItems.twigWand || stack.getItem() == ModItems.dye || stack.getItem() == ModItems.phantomInk;
if(valid)
@@ -242,7 +242,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
@Override
public boolean processInitialInteract(EntityPlayer player, EnumHand hand) {
ItemStack stack = player.getHeldItem(hand);
if(!stack.isEmpty()) {
if(!isDead && !stack.isEmpty()) {
if(world.isRemote) {
boolean valid = stack.getItem() == ModItems.twigWand || stack.getItem() == ModItems.sparkUpgrade
|| stack.getItem() == ModItems.phantomInk;