-
Notifications
You must be signed in to change notification settings - Fork 6
/
DefaultedItemGeoModel.java
54 lines (48 loc) · 1.95 KB
/
DefaultedItemGeoModel.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package mod.azure.azurelib.model;
import mod.azure.azurelib.core.animatable.GeoAnimatable;
import net.minecraft.resources.ResourceLocation;
/**
* {@link DefaultedGeoModel} specific to {@link net.minecraft.world.item.Item Items}.
* Using this class pre-sorts provided asset paths into the "item" subdirectory
*/
public class DefaultedItemGeoModel<T extends GeoAnimatable> extends DefaultedGeoModel<T> {
/**
* Create a new instance of this model class.<br>
* The asset path should be the truncated relative path from the base folder.<br>
* E.G.
* <pre>{@code
* new ResourceLocation("myMod", "armor/obsidian")
* }</pre>
*/
public DefaultedItemGeoModel(ResourceLocation assetSubpath) {
super(assetSubpath);
}
@Override
protected String subtype() {
return "item";
}
/**
* Changes the constructor-defined model path for this model to an alternate.<br>
* This is useful if your animatable shares a model path with another animatable that differs in path to the texture and animations for this model
*/
@Override
public DefaultedItemGeoModel<T> withAltModel(ResourceLocation altPath) {
return (DefaultedItemGeoModel<T>)super.withAltModel(altPath);
}
/**
* Changes the constructor-defined animations path for this model to an alternate.<br>
* This is useful if your animatable shares an animations path with another animatable that differs in path to the model and texture for this model
*/
@Override
public DefaultedItemGeoModel<T> withAltAnimations(ResourceLocation altPath) {
return (DefaultedItemGeoModel<T>)super.withAltAnimations(altPath);
}
/**
* Changes the constructor-defined texture path for this model to an alternate.<br>
* This is useful if your animatable shares a texture path with another animatable that differs in path to the model and animations for this model
*/
@Override
public DefaultedItemGeoModel<T> withAltTexture(ResourceLocation altPath) {
return (DefaultedItemGeoModel<T>)super.withAltTexture(altPath);
}
}