Got it to work with EntityType.spawn;
@SubscribeEvent
public static void onKill(LivingDeathEvent event) {
Entity source = event.getSource().getTrueSource();
if(source instanceof PlayerEntity && !((PlayerEntity) source).isCreative()) {
if (event.getEntity() instanceof ChickenEntity && event.getEntity() != null) {
World world = event.getEntity().world;
BlockPos pos = event.getEntity().getPosition();
if (Math.chance(Config.CHICKEN_CHANCE.get())) {
Chat.fromServer(onKilledMessage(source), false);
EntityType.CREEPER.spawn(world, new ItemStack(Items.DIRT), (PlayerEntity)null, pos, SpawnReason.MOB_SUMMONED, true, false);
}
} else {
Criterion.LOGGER.debug("Oh no, player killed something else!");
}
}
}