I'm trying to test the new capability system by adding a pig spawner capability that allows items to spawn a pig when right clicked on a block. There are two types of spawner: finite (has charges that are used up when spawning pigs, pigs can't be spawned if there aren't any charges left) and infinite (can always spawn pigs).
I've got the actual spawning of pigs working without issue, but now I'm trying to sync the remaining charges of finite pig spawners to the client so that they can be us