Add radiant totem spell

This commit is contained in:
Electroblob77
2020-06-26 17:46:47 +01:00
parent 1ea6355a9e
commit 080022127c
29 changed files with 351 additions and 56 deletions
@@ -241,23 +241,12 @@ public class EntityHammer extends EntityMagicConstruct {
public void writeSpawnData(ByteBuf data){
super.writeSpawnData(data);
data.writeBoolean(spin);
if(getCaster() != null) data.writeInt(getCaster().getEntityId());
}
@Override
public void readSpawnData(ByteBuf data){
super.readSpawnData(data);
spin = data.readBoolean();
if(!data.isReadable()) return;
Entity entity = world.getEntityByID(data.readInt());
if(entity instanceof EntityLivingBase){
setCaster((EntityLivingBase)entity);
}else{
Wizardry.logger.warn("Lightning hammer caster with ID in spawn data not found");
}
}
@Override