mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Check spark liveness before interacting. Closes #2302
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user