Описание
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