You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can register a custom entity variant like this:
8
+
9
+
```kotlin
10
+
@Init(stage =InitStage.PRE_PACK) // (1)!
11
+
object EntityVariants {
12
+
13
+
valBLUE_COW by ExampleAddon.cowVariant("blue") {
14
+
spawnConditions {
15
+
// (2)!
16
+
}
17
+
18
+
texture(CowModelType.WARM/*(3)!*/) {
19
+
texture("entity/cow/blue")
20
+
}
21
+
}
22
+
23
+
}
24
+
```
25
+
26
+
1. Nova will load this class during addon initialization, causing your variants to be registered.
27
+
2. The conditions for your custom variant to be selected when spawning. See [Minecraft Wiki - Spawn Conditions](https://minecraft.wiki/w/Mob_spawning#Spawn_conditions)
28
+
for more information.
29
+
3. Some entities offer multiple model types. For example, the warm cow has horns. You can select the model type here.
0 commit comments