Modscraper Modscraper Minecraft
Temporal API logo

Temporal API

Mod

by Cyber_Rat

Temporal API is the library for Team Temporal mods, other projects may use it as well.

Type

Mod

CurseForge Downloads

15,302,107

CurseForge ID

970291

Modrinth Downloads

148,165

Modrinth ID

JDtt43My

Last Updated

Sep 5, 2026

Description

Temporal API is the official library for the Team Temporal mods other projects and modders and modpack creators may use it for their projects as much as they like. The main goal of this mod is to make creating mods easier and more flexible! For working with our library you need to go to build.gradle and add this: ``` repositories { maven { url "https://cursemaven.com" } } dependencies { implementation fg.deobf("curse.maven:temporalapi-970291:") ... } ``` You need to replace with file id that can be found in the end of link of needed version of the mod file. The library for current state adds factories, tag utils, creative tab utils, trading with villagers and wanderers customizer, world features utils, item properties utils, fov modifier etc Factory and Extensions Factories are used to create RegistryObject objects and make their creation a lot easier. For using ItemFactory from API you need to create ItemFactoryFacade class like here: ``` public class ModItemFactoryFacade extends ItemFactory { public ModItemFactoryFacade() { super(ModItems.ITEMS); } } ``` Also you can extend your Factory Facade with Extensions from API or create your own Extension. Here are 2 examples of using SwordExtension (with this Extension creating of Sword becomes a lot easier): Like this: ``` public class ModItemFactoryFacade extends ItemFactory implements SwordExtension { public ModItemFactoryFacade() { super(ModItems.ITEMS); } } ``` Or like this: ``` public class ModItemFactoryFacade extends ItemFactory implements SwordExtension { public ModItemFactoryFacade() { super(ModItems.ITEMS); } public RegistryObject createSword(String name, Object... args) { return SwordExtension.super.createSword(name, this, args); } public RegistryObject<? extends SwordItem> createSword(String name, Supplier<? extends SwordItem> tTypedSupplier) { return SwordExtension.super.createSword(name, this, tTypedSupplier); } } ``` So what about creating our object using this Facade class: ``` public class ModItems { public static final DeferredRegister ITEMS = DeferredRegister.create(Registries.ITEM, "MOD_ID"); public static final ModItemFactoryFacade ITEM_FACTORY = new ModItemFactoryFacade(); public static final RegistryObject MY_ITEM_1 = ITEM_FACTORY.create("my_item_1"); public static final RegistryObject MY_ITEM_2 = ITEM_FACTORY.create("my_item_2", new Item.Properties()); public static final RegistryObject MY_ITEM_3 = ITEM_FACTORY.create("my_item_3", () -> new Item(new Item.Properties())); //First example of creating Facade object from up public static final RegistryObject MY_SWORD_1 = ITEM_FACTORY.createSword("my_sword_1", ITEM_FACTORY, Tiers.STONE, 3, -2.4F); public static final RegistryObject<? extends SwordItem> MY_SWORD_2 = ITEM_FACTORY.createSword("my_sword_2", ITEM_FACTORY, () -> new SwordItem(Tiers.STONE, 3, -2.4F, new Item.Properties())); //Second example of creating Facade object from up public static final RegistryObject MY_SWORD_3 = ITEM_FACTORY.createSword("my_sword_3", Tiers.STONE, 3, -2.4F); public static final RegistryObject<? extends SwordItem> MY_SWORD_4 = ITEM_FACTORY.createSword("my_sword_4", () -> new SwordItem(Tiers.STONE, 3, -2.4F, new Item.Properties())); } ``` Now lets's look on args... array. It is an array of arguments for creating an object (Will be changed in future for better readability). Currently available Factories and extensions: ``` ItemFactory (ArrowExtension, BowExtension, BowlExtension, MusicDiscExtension, SmithingTemplateExtension, SwordExtension, AxeExtension, PickaxeExtension, ShovelExtension, HoeExtension) BlockFactory (BushExtension, FlowerExtension, PottedFlowerExtension) ParticleFactory EffectFactory PaintingFactory PotionFactory SoundEventFactory CreativeTabFactory EntityFactory Tag Utils Tag utils focus on tag creating and making using tags easier. ``` For example if you want to create item tag you need to use ItemTagFactory: ``` public class MyItemTags { public static final TagFactory TAG_FACTORY = new ItemTagFactory("MY_MOD_ID"); public static final TagKey MY_TAG = TAG_FACTORY.createTag("my_tag"); } Creative Tab Utils Creative tab utils are used to add items to Creative Tab that you need. ``` Firstly we need to go to our class that subscribed for mod events and add this function (inner part of method is just example): ``` @SubscribeEvent public void addCreativeTabs(BuildCreativeModeTabContentsEvent event) { new SimpleTabAdder(event) .addAllToTab(CreativeModeTabs.INGREDIENTS, ModItems.MY_ITEM_1, ModItems.MY_ITEM_2, ModItems.MY_ITEM_3) .addAllToTab(CreativeModeTabs.COMBAT, ModItems.MY_SWORD_1, ModItems.MY_SWORD_2, ModItems.MY_SWORD_3); } ``` Trading with Villagers and Wanderers Utils TemporalAPI makes trading a lot easier. Here is an example of it: ``` public static final TradeCustomizer tradeCustomizer = new SimpleTradeCustomizer(); @SubscribeEvent public void customizeTradesWithVillagers(VillagerTradesEvent event) { tradeCustomizer.customize(event, new VillagerTrade( new TradingItemHolder(Items.ANDESITE, 2), new TradingItemHolder(Items.EMERALD, 3), new VillagerTradeDescription( VillagerProfession.ARMORER, 1, 5, 5, 0.5f ) )); } @SubscribeEvent public void customizeTradesWithWanderers(WandererTradesEvent event) { tradeCustomizer.customize(event, new WandererTrade( new TradingItemHolder(Items.ANDESITE, 2), new TradingItemHolder(Items.EMERALD, 3), new WandererTradeDescription( WandererTradeDescription.TradeRarity.RARE, 5, 5, 0.5f ) )); } ``` World Features Utils Will be expanded in the next updates. Item Properties Utils Adding needed properties to bows, shields, etc. ``` @SubscribeEvent public void clientSetup(final FMLClientSetupEvent event) { event.enqueueWork(() -> { TemporalItemProperties.makeBow(ModItems.MY_BOW_1); TemporalItemProperties.makeShield(ModItems.MY_SHIELD_1); TemporalItemProperties.makeCrossbow(ModItems.MY_CROSSBOW_1); TemporalItemProperties.putCompostable(ModBlocks.MY_FLOWER_1, 4); }); } ``` FAQ: Will This Mod Be Getting A Fabric Version: No a fabric version is not planned Can I use this mod in my Modpacks: Yes, feel free to use this mod in any modpack! How Do I suggest features or report Bugs: Join our discord above for any comments, questions, suggestions, or problems!

Compatibility

Mod Loaders

Forge

Game Versions

1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6

Recommended Gear

Affiliate

Hardware and extras that pair well with this mod.

As an Amazon Associate I earn from qualifying purchases.

Similar Mods

Included in Modpacks (87)

Show fewer
Better MC [FORGE] - BMC4 Better MC [FORGE] - BMC4 Cursed Walking - A Modern Zombie Apocalypse Cursed Walking - A Modern Zombie Apocalypse Beyond Depth Beyond Depth Biohazard: Project Genesis - The Ultimate Apocalypse Biohazard: Project Genesis - The Ultimate Apocalypse Slightly Flavoured Slightly Flavoured Age of Fate Age of Fate Monumental Experience Monumental Experience Over Stars Over Stars GenCraft - Forge your world, Create your destiny! GenCraft - Forge your world, Create your destiny! BETTER FANTASY - Overture BETTER FANTASY - Overture Beyond Ocean Beyond Ocean Bountiful Farming - (formerly A Farmer's Delight) Bountiful Farming - (formerly A Farmer's Delight) Rhinocraft Rhinocraft Beyond Depth Insanity Beyond Depth Insanity Lees Zombie Apocalypse - Fallen Earth Lees Zombie Apocalypse - Fallen Earth Silly Seals - A Cozy Adventure Silly Seals - A Cozy Adventure Monumental Experience - In the Sky Monumental Experience - In the Sky Shadow Awakening Shadow Awakening Towns & Kingdoms 2 | A New World Towns & Kingdoms 2 | A New World White Shrimp's Great Adventure White Shrimp's Great Adventure Mysticlouds - Cuteness and Chaos Mysticlouds - Cuteness and Chaos Enchanted Genesis Enchanted Genesis Monumental Experience - Creatures Across the World Monumental Experience - Creatures Across the World Steller: The Rise of the Kingdom Steller: The Rise of the Kingdom World Destroying - Apocalipse Zombie World Destroying - Apocalipse Zombie You Like Food? You Like Food? The Clash of Epochs The Clash of Epochs UMA New World UMA New World Z Apocalypse - A Modern Zombie Apocalypse Z Apocalypse - A Modern Zombie Apocalypse Monumental Experience - In space Monumental Experience - In space Creatopia Unbound Creatopia Unbound Beyond Zombie Beyond Zombie Create Eternal Journey Create Eternal Journey A Journey's End - RPG A Journey's End - RPG After Humans Retouched+ After Humans Retouched+ Endless RPG Endless RPG HLStuff - Adventure & Exploration HLStuff - Adventure & Exploration Crafted Madness: Modern Era Crafted Madness: Modern Era DeezCraft Skibidi Edition DeezCraft Skibidi Edition MC EXPEDITIONS MC EXPEDITIONS Afterfall - Zombie Apocalypse Survival | Inspired by DeceasedCraft Afterfall - Zombie Apocalypse Survival | Inspired by DeceasedCraft Cozy Cooking: Reborn Cozy Cooking: Reborn Monumental Experience VI - Rise of the Dinosaurs Monumental Experience VI - Rise of the Dinosaurs ArcaneAxis - ARS ArcaneAxis - ARS NO STRINGS ATTACHED A Survival Horror Pack NO STRINGS ATTACHED A Survival Horror Pack Elarion Elarion Project Infinity - Infinite possibilities, one world Project Infinity - Infinite possibilities, one world Grand Odyssey Grand Odyssey Reqium Reqium [PNAA] Pandemonium Nexus: Anarchic Aeon [PNAA] Pandemonium Nexus: Anarchic Aeon Farming Across the Skies Farming Across the Skies Dragonlands Dragonlands Alfheim | Guns & Monsters Alfheim | Guns & Monsters Valiant RPG Valiant RPG The Real One On Jah II The Real One On Jah II Cottagecore Delight Cottagecore Delight Virtu's Hack and Slash Virtu's Hack and Slash Beyond Shenanigans Beyond Shenanigans 'Monster Looker' 'Monster Looker' Mechanical suffering Mechanical suffering TACZ DreadOverhaul the horror modpack TACZ DreadOverhaul the horror modpack Myths & Ruins (RPG) Myths & Ruins (RPG) Project Z - Zombie Apocalypse Project Z - Zombie Apocalypse Monumental Experience - Beneath the Surface Monumental Experience - Beneath the Surface Natures Odyssey Natures Odyssey Mystic's Monstrosity - Avaricious Edition Mystic's Monstrosity - Avaricious Edition Dre Friends Dre Friends The Adventure of 1000 - Hunters of Evil The Adventure of 1000 - Hunters of Evil Collectionist Collectionist Donna's Odyssey Fantasy RPG Donna's Odyssey Fantasy RPG MysteriaSMP MysteriaSMP Forge & Frontier [FORGE] Forge & Frontier [FORGE] The last awakene The last awakene Winter Leveling Winter Leveling GUILTY'S MEGAPACK GUILTY'S MEGAPACK Ride & Reign Ride & Reign So This Is Life As A Freak. So This Is Life As A Freak. DLI Moderately Modded Minecraft, Meals, Magic & Machinery DLI Moderately Modded Minecraft, Meals, Magic & Machinery GoatCraft BMC++ 4 [Forge] GoatCraft BMC++ 4 [Forge] Adventure & Horror Adventure & Horror Beyond Depth ( Zenith's Way ) Beyond Depth ( Zenith's Way ) DarkSol DarkSol Sorcerer's Blade Sorcerer's Blade BoraLances Craft BoraLances Craft Mantecraft Mantecraft team pkb pack team pkb pack Qilby Industries Qilby Industries

External Resources