use of uk.co.wehavecookies56.kk.common.network.packet.client.SpawnDriveFormParticles in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class DriveForm method initDrive.
public void initDrive(EntityPlayer player) {
String form = getName();
if (!summonKeyblades(player)) {
player.world.playSound(player, player.getPosition(), ModSounds.error, SoundCategory.MASTER, 1.0f, 1.0f);
return;
}
player.getCapability(ModCapabilities.DRIVE_STATE, null).setActiveDriveName(getName());
player.getCapability(ModCapabilities.DRIVE_STATE, null).setInDrive(true);
player.getCapability(ModCapabilities.DRIVE_STATE, null).setFP(player.getCapability(ModCapabilities.DRIVE_STATE, null).getFormGaugeLevel(getName()) * 100);
PacketDispatcher.sendTo(new SyncDriveData(player.getCapability(ModCapabilities.DRIVE_STATE, null)), (EntityPlayerMP) player);
PacketDispatcher.sendToAllAround(new SpawnDriveFormParticles(player), player, 64.0D);
player.world.playSound((EntityPlayer) null, player.getPosition(), ModSounds.drive, SoundCategory.MASTER, 1.0f, 1.0f);
}
Aggregations