|
|
WIP |
|
|
\ No newline at end of file |
|
|
## Adding model
|
|
|
|
|
|
```<placeholder>
|
|
|
// Spawn a new entity
|
|
|
Pig pig = location.getWorld().spawn(location, Pig.class);
|
|
|
// Create a new ModeledEntity from the spawned entity
|
|
|
ModeledEntity modeledEntity = ModelEngineAPI.createModeledEntity(pig);
|
|
|
// Create a new ActiveModel using the ID of a model
|
|
|
// Will throw an error if the model does not exist
|
|
|
ActiveModel activeModel = ModelEngineAPI.createActiveModel("test_model");
|
|
|
// Add the model to the entity
|
|
|
modeledEntity.addModel(activeModel, true);
|
|
|
```
|
|
|
|
|
|
## Removing model
|
|
|
|
|
|
```<placeholder>
|
|
|
// Grab the ModeledEntity instance associated with the entity
|
|
|
// Can also use entity ID or entity UUID
|
|
|
ModeledEntity modeledEntity = ModelEngineAPI.getModeledEntity(pig);
|
|
|
// Remove the model
|
|
|
modeledEntity.removeModel("test_model");
|
|
|
``` |
|
|
\ No newline at end of file |