Initial 1.11.2 update
This commit is contained in:
@@ -17,34 +17,35 @@ import net.minecraft.world.World;
|
||||
|
||||
public class SummonIronGolem extends Spell {
|
||||
|
||||
public SummonIronGolem() {
|
||||
public SummonIronGolem(){
|
||||
super(Tier.MASTER, 175, Element.SORCERY, "summon_iron_golem", SpellType.MINION, 400, EnumAction.BOW, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cast(World world, EntityPlayer caster, EnumHand hand, int ticksInUse, SpellModifiers modifiers) {
|
||||
public boolean cast(World world, EntityPlayer caster, EnumHand hand, int ticksInUse, SpellModifiers modifiers){
|
||||
|
||||
BlockPos pos = WizardryUtilities.findNearbyFloorSpace(caster, 2, 4);
|
||||
if(pos == null) return false;
|
||||
|
||||
|
||||
if(!world.isRemote){
|
||||
EntityIronGolem golem = new EntityIronGolem(world);
|
||||
golem.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5);
|
||||
world.spawnEntityInWorld(golem);
|
||||
world.spawnEntity(golem);
|
||||
}
|
||||
|
||||
for(int i=0; i<10; i++){
|
||||
double x1 = (double)((float)pos.getX() + world.rand.nextFloat()*2 - 1.0F);
|
||||
|
||||
for(int i = 0; i < 10; i++){
|
||||
double x1 = (double)((float)pos.getX() + world.rand.nextFloat() * 2 - 1.0F);
|
||||
double y1 = (double)((float)pos.getY() + 0.5F + world.rand.nextFloat());
|
||||
double z1 = (double)((float)pos.getZ() + world.rand.nextFloat()*2 - 1.0F);
|
||||
double z1 = (double)((float)pos.getZ() + world.rand.nextFloat() * 2 - 1.0F);
|
||||
if(world.isRemote){
|
||||
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, x1, y1, z1, 0, 0, 0, 48 + world.rand.nextInt(12), 0.6f, 0.6f, 1.0f);
|
||||
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, x1, y1, z1, 0, 0, 0,
|
||||
48 + world.rand.nextInt(12), 0.6f, 0.6f, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
WizardryUtilities.playSoundAtPlayer(caster, SoundEvents.ENTITY_WITHER_SPAWN, 1.0F, world.rand.nextFloat() * 0.2F + 1.0F);
|
||||
|
||||
WizardryUtilities.playSoundAtPlayer(caster, SoundEvents.ENTITY_WITHER_SPAWN, 1.0F,
|
||||
world.rand.nextFloat() * 0.2F + 1.0F);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user