mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 02:45:13 +00:00
Fixed a crash when right clicking a spark with an empty hand. Closes #1621
This commit is contained in:
1 parent
d026920573
commit
9ff67ffd7d
2 files changed
+2
-2
No files matched your search
@@ -286,7 +286,7 @@ public class EntityCorporeaSpark extends Entity implements ICorporeaSpark {
|
||||
}
|
||||
|
||||
public boolean doPhantomInk(ItemStack stack) {
|
||||
if(stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
|
||||
if(stack != null && stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
|
||||
int invis = dataWatcher.getWatchableObjectInt(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY);
|
||||
dataWatcher.updateObject(EntitySpark.INVISIBILITY_DATA_WATCHER_KEY, ~invis & 1);
|
||||
return true;
|
||||
|
||||
@@ -285,7 +285,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
}
|
||||
|
||||
public boolean doPhantomInk(ItemStack stack) {
|
||||
if(stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
|
||||
if(stack != null && stack.getItem() == ModItems.phantomInk && !worldObj.isRemote) {
|
||||
int invis = dataWatcher.getWatchableObjectInt(INVISIBILITY_DATA_WATCHER_KEY);
|
||||
dataWatcher.updateObject(INVISIBILITY_DATA_WATCHER_KEY, ~invis & 1);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user