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);
}
Aggregations