Camden Polltard

Make an Minecraft mod were you spawn as a catboy and girls try to grab and pet you or sit you on there lap with is own custom effects

Kodari AI
KodariOct 5 at 3:32 am 1
CatboyChaos
A Fabric mod where the player spawns as a catboy with cat ears and a tail. NPC girls roam the world and actively chase the player, attempting to grab, pet, or sit the player on their lap. Each interaction triggers custom visual and audio effects, including heart particles, purring sounds, and a first-person view shift when seated. The mod includes configurable spawn rates, chase AI, and interaction cooldowns to balance gameplay.
  1. Set up the Fabric 26.3 project and entrypoint.

  2. Add a persistent catboy effect on player join.

  3. Add custom petting/lap effects triggered by villager interaction.

[Generation stopped]

Camden Polltard

make an minecraft mod where you spawn as an catboy and girls try to grab, hug, pet and sit you on their lap which will eventually cause you to fall asleep. make so that can turn you into a pet by putting an collar, leash and more on you

Kodari AI
KodariOct 5 at 4:10 am 3
  • Register the Fabric 26.3 mod and a custom pet collar item.

  • Mark joining players as catboys and save pet, leash, and interaction progress on their player data.

  • Add villager-triggered petting, hugging, lap-nap effects, particles, sounds, and nearby-bed sleeping.

Created Catboy Chaos for Fabric 26.3. Joining players get a persistent catboy tag; villagers can pet, hug, and settle them into a lap-nap sequence. The mod adds heart particles, sound and status effects, actual sleeping when a bed is nearby, a custom collar item, and vanilla lead interactions.

Current scope: Villagers only react when you interact with them—they don’t autonomously chase or grab you. The catboy tag doesn’t add visible ears or a tail, and without a nearby bed the final stage is a sleepy effect rather than actual sleep.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
7 242
src/main/java/com/kodari/catboychaos/CatboyChaos.java
package com.kodari.catboychaos;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.creativetab.v1.CreativeModeTabEvents;
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.Identifier;
import net.minecraft.resources.ResourceKey;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.npc.Villager;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.network.chat.Component;
import net.minecraft.sounds.SoundEvents;

public class CatboyChaos implements ModInitializer {
	public static final String MOD_ID = "catboychaos";
	private static final String CATBOY_TAG = MOD_ID + ":catboy";
	private static final String PET_TAG = MOD_ID + ":pet";
	private static final String LEASHED_TAG = MOD_ID + ":leashed";
	private static final String PET_STAGE_TAG = MOD_ID + ":stage_pet";
	private static final String HUG_STAGE_TAG = MOD_ID + ":stage_hug";
	private static final String LAP_STAGE_TAG = MOD_ID + ":stage_lap";
	private static final ResourceKey<CreativeModeTab> TOOLS_TAB = ResourceKey.create(
			Registries.CREATIVE_MODE_TAB,
			Identifier.withDefaultNamespace("tools_and_utilities")
	);
	private static Item PET_COLLAR;

	@Override
	public void onInitialize() {
		ResourceKey<Item> collarKey = ResourceKey.create(
				Registries.ITEM,
				Identifier.fromNamespaceAndPath(MOD_ID, "pet_collar")
		);
		PET_COLLAR = Registry.register(
				BuiltInRegistries.ITEM,
				collarKey,
				new Item(new Item.Properties().setId(collarKey))
		);

		CreativeModeTabEvents.modifyOutputEvent(TOOLS_TAB).register(output -> output.accept(PET_COLLAR));

		ServerPlayConnectionEvents.JOIN.register((listener, sender, server) -> {
			ServerPlayer player = listener.getPlayer();
			player.addTag(CATBOY_TAG);
			player.sendOverlayMessage(Component.literal("Your catboy adventure begins. Find a villager for cozy interactions."));
		});

		UseEntityCallback.EVENT.register((player, level, hand, entity, hitResult) -> {
			if (level.isClientSide() || !(level instanceof ServerLevel serverLevel)
					|| !(player instanceof ServerPlayer serverPlayer) || !(entity instanceof Villager)) {
				return InteractionResult.PASS;
			}

			serverPlayer.addTag(CATBOY_TAG);
			Item heldItem = serverPlayer.getItemInHand(hand).getItem();

			if (heldItem == PET_COLLAR) {
				togglePetCollar(serverPlayer, serverLevel);
				return InteractionResult.SUCCESS;
			}

			if (heldItem == Items.LEAD && serverPlayer.entityTags().contains(PET_TAG)) {
				serverPlayer.addTag(LEASHED_TAG);
				serverPlayer.sendOverlayMessage(Component.literal("The villager clips on your leash and gently leads you closer."));
				serverPlayer.playSound(SoundEvents.PLAYER_LEVELUP, 0.5F, 1.15F);
			}

			progressAffection(serverPlayer, serverLevel);
			return InteractionResult.SUCCESS;
		});
	}

	private static void togglePetCollar(ServerPlayer player, ServerLevel level) {
		if (player.entityTags().contains(PET_TAG)) {
			player.removeTag(PET_TAG);
			player.removeTag(LEASHED_TAG);
			player.sendOverlayMessage(Component.literal("You take off the pet collar."));
			return;
		}

		player.addTag(PET_TAG);
		player.sendOverlayMessage(Component.literal("The villager gently fastens the cozy collar around your neck."));
		showHearts(player, level, 8);
		player.playSound(SoundEvents.PLAYER_LEVELUP, 0.6F, 1.35F);
	}

	private static void progressAffection(ServerPlayer player, ServerLevel level) {
		boolean petted = player.entityTags().contains(PET_STAGE_TAG);
		boolean hugged = player.entityTags().contains(HUG_STAGE_TAG);
		boolean seated = player.entityTags().contains(LAP_STAGE_TAG);
		player.removeTag(PET_STAGE_TAG);
		player.removeTag(HUG_STAGE_TAG);
		player.removeTag(LAP_STAGE_TAG);

		if (!petted && !hugged && !seated) {
			player.addTag(PET_STAGE_TAG);
			player.sendOverlayMessage(Component.literal("A villager gently pets your hair and ears."));
			showHearts(player, level, 5);
			player.playSound(SoundEvents.PLAYER_LEVELUP, 0.45F, 1.55F);
		} else if (petted) {
			player.addTag(HUG_STAGE_TAG);
			player.addEffect(new MobEffectInstance(MobEffects.SLOW_FALLING, 100, 0));
			player.sendOverlayMessage(Component.literal("You are gathered into a warm, gentle hug."));
			showHearts(player, level, 8);
			player.playSound(SoundEvents.PLAYER_LEVELUP, 0.55F, 1.3F);
		} else if (hugged) {
			player.addTag(LAP_STAGE_TAG);
			player.addEffect(new MobEffectInstance(MobEffects.SLOWNESS, 120, 0));
			player.sendOverlayMessage(Component.literal("The villager settles you on their lap and softly strokes your hair."));
			showHearts(player, level, 10);
			player.playSound(SoundEvents.PLAYER_LEVELUP, 0.6F, 1.1F);
		} else {
			player.addEffect(new MobEffectInstance(MobEffects.SLOWNESS, 160, 1));
			player.addEffect(new MobEffectInstance(MobEffects.BLINDNESS, 80, 0));
			boolean fellAsleep = trySleepNearby(player, level);
			player.sendOverlayMessage(Component.literal(fellAsleep
					? "You curl up on a nearby bed and drift into a cozy sleep."
					: "Your eyelids grow heavy as you doze off in the villager's lap."));
			showHearts(player, level, 12);
			player.playSound(SoundEvents.PLAYER_LEVELUP, 0.65F, 0.85F);
		}
	}

	private static boolean trySleepNearby(ServerPlayer player, ServerLevel level) {
		BlockPos origin = player.blockPosition();
		for (int y = -1; y <= 1; y++) {
			for (int x = -3; x <= 3; x++) {
				for (int z = -3; z <= 3; z++) {
					BlockPos bed = origin.offset(x, y, z);
					if (level.getBlockState(bed).is(BlockTags.BEDS) && player.startSleeping(bed)) {
						return true;
					}
				}
			}
		}
		return false;
	}

	private static void showHearts(ServerPlayer player, ServerLevel level, int count) {
		level.sendParticles(
				ParticleTypes.HEART,
				player.getX(),
				player.getY() + 1.0,
				player.getZ(),
				count,
				0.45,
				0.55,
				0.45,
				0.02
		);
	}
}