Fix construct spells crashing the game when cast by dispensers, fixes #182

This commit is contained in:
Electroblob77
2019-09-03 18:37:56 +01:00
parent 23fccaac9c
commit 97c72685bb
6 changed files with 46 additions and 25 deletions
@@ -149,7 +149,7 @@ public class SpellConstruct<T extends EntityMagicConstruct> extends Spell {
* @param modifiers The modifiers with which the spell was cast.
* @return false to cause the spell to fail, true to continue with casting.
*/
protected boolean spawnConstruct(World world, double x, double y, double z, @Nullable EnumFacing side, EntityLivingBase caster, SpellModifiers modifiers){
protected boolean spawnConstruct(World world, double x, double y, double z, @Nullable EnumFacing side, @Nullable EntityLivingBase caster, SpellModifiers modifiers){
if(!world.isRemote){
// Creates a new construct using the supplied factory