promotional bannermobile promotional banner
premium banner
A library mod for Tensura Reincarnated, designed to allow others to add their own custom models to races.

Description

Shin's Tensura Race Models allows others to add their own custom models to Tensura: Reincarnated races.

Currently built for T:R 1.0.2.5, Forge version 43.5.0


HOW TO USE

 

The following is a link to a github workspace which has an example created: https://github.com/ShinNoShinigami/ExampleTensuraModeledRace
The example here adds a race with a custom model alongside giving the Lizardmen race a model. Its a very basic mod to give people an idea of how the code for it looks and to see it in action.

 

Using it is simple. First, add it to your addon as a dependency using CurseMaven or any other method
Following that, the race you wish to give a model to needs to implement the IModeledRaces class. Doing so will add several new functions which need to be filled in within the race, such as the class name of the model the race will use, the size of its shadow, and the eye height. 

Additionally, 2 functions need to be created. They are as follows:

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = {Dist.CLIENT})
public class LayerEvents {
@SubscribeEvent
public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDefinitions event) {
event.registerLayerDefinition(ExampleModel.LAYER_LOCATION, ExampleModel::createBodyLayer);
}
@SubscribeEvent
public static void construct(EntityRenderersEvent.AddLayers event) {

EntityModelSet modelSet = Minecraft.getInstance().getEntityModels();
TensuraModelsRegistry.register(new ExampleModel<>(modelSet.bakeLayer(ExampleModel.LAYER_LOCATION)));
}
}

The model file itself also needs several edits, however a working example model is included within the mod itself which you are free to look at to edit your entities code to match it. 

That should be all you need to do, only other things to note would be that, even though the model is using the Hierarchical format, i have not yet finished allowing you to use hierarchical animations properly. There is a partially implemented crouch and running keyframe start however i am unsure if it fully works yet. 


ADDITIONAL INFO

Tensura addons that started it:

This mod is fine to be used to utilise when making addons provided the addon is used and the code is not simply copied exactly and taken to be used within your mod itself.