-
Notifications
You must be signed in to change notification settings - Fork 6
/
RenderSpriteling.java
38 lines (31 loc) · 1.4 KB
/
RenderSpriteling.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
package teamroots.emberroot.entity.spriteling;
//import elucent.roots.model.entity.ModelSpriteling;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.registry.IRenderFactory;
import teamroots.emberroot.Const;
import teamroots.emberroot.config.ConfigManager;
import teamroots.emberroot.util.RenderUtil;
public class RenderSpriteling extends RenderLiving<EntitySpriteling> {
public RenderSpriteling(RenderManager renderManager, ModelBase modelBase, float shadowSize) {
super(renderManager, modelBase, shadowSize);
}
@Override
protected ResourceLocation getEntityTexture(EntitySpriteling entity) {
return new ResourceLocation(Const.MODID, "textures/entity/spriteling.png");
}
@Override
public void doRender(EntitySpriteling entity, double x, double y, double z, float entityYaw, float partialTicks) {
super.doRender(entity, x, y, z, entityYaw, partialTicks);
if (ConfigManager.renderDebugHitboxes)
RenderUtil.renderEntityBoundingBox(entity, x, y, z);
}
public static class Factory implements IRenderFactory<EntitySpriteling> {
@Override
public RenderSpriteling createRenderFor(RenderManager manager) {
return new RenderSpriteling(manager, ModelSpriteling.instance, 0);
}
}
}