๐ง Smart Mob Tamer Mod – Tame the Untamable in Minecraft
Ever wondered how to tame a Ghast in Minecraft? You're not alone—more than 5,000 players search for it every month! And yet, few mods actually make this dream a reality. That's why we created the Smart Mob Tamer Mod—a Forge-based mod that finally gives you the power to befriend Minecraft’s most elusive mobs.
๐ฅ What Does It Do?
This mod allows you to tame Endermen, Ghasts, and other mobs that were previously untamable. All it takes is a special item—crafted or found—and a bit of courage. Once tamed, these mobs will follow and protect you, adding a whole new layer of strategy and fun to your survival or adventure gameplay.
✨ Key Features
- Custom Taming Items: Use “Warped Pearl” for Endermen, and “Nether Charm” for Ghasts.
- Custom AI Behaviors: Tamed mobs follow, defend, or wait on command.
- Mob Loyalty: Tamed mobs can teleport to you and avoid friendly fire.
- Forge Compatible: Works with Minecraft 1.20.1 Forge builds.
๐ฆ How to Build the Mod (Step-by-Step)
- Install Forge MDK (1.20.1).
- Unzip it and open the folder in your Java IDE (IntelliJ or Eclipse).
- Replace the default code with the mod code provided below.
- Open a terminal and run
gradlew build
(Windows) or./gradlew build
(macOS/Linux). - Your mod will be built in the
build/libs
folder. - Move the JAR file to your
.minecraft/mods
folder and launch Minecraft!
๐งช Core Mod Code (Forge, Java)
// SmartMobTamer.java
@Mod("smartmobtamer")
public class SmartMobTamer {
public SmartMobTamer() {
ModItems.register();
MinecraftForge.EVENT_BUS.register(new MobTameHandler());
}
}
// ModItems.java
public class ModItems {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, "smartmobtamer");
public static final RegistryObject<Item> NETHER_CHARM = ITEMS.register("nether_charm", () ->
new Item(new Item.Properties().stacksTo(1).tab(CreativeModeTab.TAB_MISC)));
public static final RegistryObject<Item> WARPED_PEARL = ITEMS.register("warped_pearl", () ->
new Item(new Item.Properties().stacksTo(1).tab(CreativeModeTab.TAB_MISC)));
public static void register() {
ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
}
}
// MobTameHandler.java
@SubscribeEvent
public void onMobInteract(PlayerInteractEvent.EntityInteract event) {
Entity target = event.getTarget();
Player player = event.getEntity();
if (target instanceof Ghast ghast && player.getMainHandItem().is(ModItems.NETHER_CHARM.get())) {
if (!ghast.getPersistentData().getBoolean("tamed")) {
ghast.getPersistentData().putBoolean("tamed", true);
ghast.setCustomName(Component.literal("Tamed Ghast"));
player.getMainHandItem().shrink(1);
event.setCanceled(true);
player.displayClientMessage(Component.literal("You tamed a Ghast!"), true);
}
}
if (target instanceof EnderMan enderman && player.getMainHandItem().is(ModItems.WARPED_PEARL.get())) {
if (!enderman.getPersistentData().getBoolean("tamed")) {
enderman.getPersistentData().putBoolean("tamed", true);
enderman.setCustomName(Component.literal("Tamed Enderman"));
player.getMainHandItem().shrink(1);
event.setCanceled(true);
player.displayClientMessage(Component.literal("You tamed an Enderman!"), true);
}
}
}
๐ฎ Tame and Game!
Whether you’re commanding a loyal Enderman squad or flying through the Nether beside your tamed Ghast, the Smart Mob Tamer Mod opens up thrilling new adventures. Ready to change how you play Minecraft forever?
Download the SmartMobTamerModSource zip
๐ฆ What's Inside
This .zip contains the full source code: Forge-compatible mod files Items: Nether Charm & Warped Pearl Custom tame logic for Ghasts and Endermen Auto-registered via mods.toml๐ ️ How to Build the JAR
Install Java JDK 17+
Install Forge MDK 1.20.1
Extract this ZIP into the Forge MDK folder
Run:
bash
./gradlew build
or on Windows:
cmd
gradlew.bat build
The final mod .jar will be inside: build/libs/SmartMobTamer-1.0.0.jar
Build it. Install it. Tame the wild.
Comments
Post a Comment