Search in sources :

Example 1 with SpawnOrgWeaponParticles

use of uk.co.wehavecookies56.kk.common.network.packet.client.SpawnOrgWeaponParticles in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class SummonOrgWeapon method process.

@Override
public void process(EntityPlayer player, Side side) {
    if (hand == EnumHand.MAIN_HAND)
        player.inventory.setInventorySlotContents(player.inventory.currentItem, stack);
    else
        player.inventory.offHandInventory.set(0, stack);
    player.world.playSound((EntityPlayer) null, player.getPosition(), ModSounds.summon, SoundCategory.MASTER, 1.0f, 1.0f);
    IOrganizationXIII ORG = player.getCapability(ModCapabilities.ORGANIZATION_XIII, null);
    ORG.setWeaponSummoned(hand, true);
    PacketDispatcher.sendToAllAround(new SpawnOrgWeaponParticles(player, ORG.getMember().ordinal()), player, 64.0D);
    PacketDispatcher.sendTo(new SyncOrgXIIIData(player.getCapability(ModCapabilities.ORGANIZATION_XIII, null)), (EntityPlayerMP) player);
}
Also used : SyncOrgXIIIData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncOrgXIIIData) SpawnOrgWeaponParticles(uk.co.wehavecookies56.kk.common.network.packet.client.SpawnOrgWeaponParticles) IOrganizationXIII(uk.co.wehavecookies56.kk.common.capability.OrganizationXIIICapability.IOrganizationXIII)

Aggregations

IOrganizationXIII (uk.co.wehavecookies56.kk.common.capability.OrganizationXIIICapability.IOrganizationXIII)1 SpawnOrgWeaponParticles (uk.co.wehavecookies56.kk.common.network.packet.client.SpawnOrgWeaponParticles)1 SyncOrgXIIIData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncOrgXIIIData)1