CustomModels - MarkusBordihn/BOs-Easy-NPC GitHub Wiki

Custom Models 🕺

The Easy NPC mod supports the rendering of custom models, but with a few caveats. To ensure compatibility and prevent issues some features are restricted or disabled when using custom models.

Model Requirements 📏

The custom model must extend a PathfinderMob entity and their renderer needs to be an instance of the LivingEntityRenderer or EntityRenderer. They need to provide their own entity type and register it within the EntityTypes class.

Custom models that don't meet these requirements are not supported.

Configuration Restrictions 🚫

When using a custom model, the following features are disabled or restricted:

  • Pose Screen: The pose screen is disabled for custom models.
  • Custom Skin: Custom skins are disabled for custom models.
  • Scaling Screen: The scaling screen is disabled for custom models.
  • Rotation Screen: The rotation screen is disabled for custom models.

Performance Restrictions 🐢

Custom models may impact performance, especially if the model is complex or has a high polygon count. Consider the impact on performance when using custom models, especially in large numbers.

The custom model renderer will try to re-use the same model instance and renderer instance for all NPCs using the same model to reduce the impact on performance. AI tasks and other features are disabled for custom models to reduce the impact on performance.

General Restrictions 🚷

Custom models will be only rendered on the client-side and the server will use the default model for any calculations. This means that the server-side AI and other features will use the default model and not the custom model on the client-side. Hitboxes and other features will use the default model and not the custom model, which may lead to inaccurate hitboxes and other issues.

Configuration File 📄

There is a predefined configuration file for custom models that can be found in the config/easy_npc/render_entity_type_support.cfg file. This file includes a list of entity types that are supported by the custom model renderer.

If you want to exclude a entity type from the custom model renderer, you can add it to the list with a false value.

This makes sure that the mod is not trying to automatically detecting if the entity type is supported by the custom model renderer.

Using Custom Models 🛠️

Change Model 🔄

The main configuration screen includes a "Change Model" button that allows you to switch between the default model and a custom model easily.

Change Model

This screen includes a search bar to filter the available models, the models will be automatically detected and added to the list as long as they meet the requirements and this screen is opened.

If an model produces any errors, it will be automatically removed until the client is restarted.

Commands 📜

There are two commands available to enable and disable custom models. This allows you to switch between the default model and a custom model and define the entity type for the custom model.

Enable Custom Models

To use a custom model, use the following command:

/easy_npc render set entity <NPC UUID> <EntityType>

Example:

/easy_npc render set entity ed3cec26-a657-4064-8436-8564fb722d6f "minecraft:spider"

This command will try to render the NPC using the minecraft:spider entity type.

Disable Custom Models 🚫

To disable a custom model and revert to the default model, use the following command:

/easy_npc render set type <NPC UUID> DEFAULT

Compatibility 🔄

There are some mods that provide custom models that are compatible with Easy NPC like:

Incompatibility 🚫

There are some mods which modify the rendering system in a way that is incompatible with Easy NPC custom models. These mods may cause issues with custom models or prevent them from rendering / animated correctly.

  • Epic Fight Mod: This mod modifies the rendering system so that animations / movements are not rendered correctly.

Reporting Issues 🐞

With custom models enabled, Easy NPC is no longer responsible for rendering the model. If you encounter issues with a custom model, please check them first with the mod author responsible for the custom model.

I'm not able to provide support for custom models, as they are not part of the Easy NPC mod or its code base.

Please also check the incompatibility list above to ensure that the custom model is compatible with Easy NPC.

⚠️ **GitHub.com Fallback** ⚠️