Is there any way you can detect if a player has picked up a chicken and/or they are currently carrying one?
Bonus Points: Is there any way to detect when a player drops a chicken at a certain point? I tried a Capture Area Device, but I could not get it to work.
As always, any help anyone could offer would be greatly appreciated. thanks!
without any context, my first guess would be to listen for a “ba-gawk!”, lol
if picking up chickens is something that happens in your program, a simple thing to do is call an event dispatch at the same time the chicken is picked up. you might name the dispatch “chicken picked up”. then any other systems can listen for that event and do something when it fires by “binding” to the event.
same goes for dropping the chickens.
just look for some tutorials or documentation on Event Dispatchers.
Does either the TamedEvent or RiddenEvent event on wildlife_spawner_device fire when a chicken is picked up? If not I can think of one slightly awkward workaround where you get the relative position of a chicken and your player and check if it’s approximately in the position the player holds the chicken relative to the player.
@le-8g7e I set up some message feed devices linked to Tamed and Ridden events. Both did not fire. (As a check, I also set up Damaged and Eliminated message events, and those worked)
Just a thought, But I wonder if you could place a mutator zone at the players head height and have it effected by creatures only. Then listen to the enter and exit events?
For the trigger, I set it to be triggered by creatures, and then I was able to work with that event by dropping the chicken onto the trigger. This is the method I ended up using in my game