Skip to content

Commit

Permalink
fix: Fixed battlemage spawns
Browse files Browse the repository at this point in the history
  • Loading branch information
WinDanesz committed Apr 1, 2024
1 parent c733448 commit c88afef
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import com.google.common.collect.ImmutableMap;
import com.windanesz.ancientspellcraft.AncientSpellcraft;
import com.windanesz.ancientspellcraft.Settings;
import com.windanesz.ancientspellcraft.entity.living.EntityClassWizard;
import com.windanesz.ancientspellcraft.entity.living.EntityEvilClassWizard;
import com.windanesz.ancientspellcraft.integration.antiqueatlas.ASAntiqueAtlasIntegration;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.entity.living.EntityWizard;
import electroblob.wizardry.item.ItemWizardArmour;
import electroblob.wizardry.registry.WizardryAdvancementTriggers;
import electroblob.wizardry.util.BlockUtils;
import electroblob.wizardry.util.GeometryUtils;
Expand Down Expand Up @@ -128,15 +130,17 @@ public void spawnStructure(Random random, World world, BlockPos origin, Template

if (entry.getValue().equals(WIZARD_DATA_BLOCK_TAG)) {

EntityWizard wizard = new EntityWizard(world);
EntityClassWizard wizard = new EntityClassWizard(world);
wizard.setLocationAndAngles(vec.x, vec.y, vec.z, 0, 0);
wizard.setArmourClass(ItemWizardArmour.ArmourClass.BATTLEMAGE);
wizard.onInitialSpawn(world.getDifficultyForLocation(origin), null);
wizard.setTowerBlocks(blocksPlaced);
world.spawnEntity(wizard);

} else if (entry.getValue().equals(EVIL_WIZARD_DATA_BLOCK_TAG)) {

EntityEvilClassWizard wizard = new EntityEvilClassWizard(world);
wizard.setArmourClass(ItemWizardArmour.ArmourClass.BATTLEMAGE);
wizard.setLocationAndAngles(vec.x, vec.y, vec.z, 0, 0);
wizard.hasStructure = true; // Stops it despawning
wizard.onInitialSpawn(world.getDifficultyForLocation(origin), null);
Expand Down

0 comments on commit c88afef

Please sign in to comment.