mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
28 lines
1.1 KiB
Java
28 lines
1.1 KiB
Java
package com.hbm.render.model;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import com.hbm.lib.RefStrings;
|
|
|
|
import net.minecraft.client.model.ModelBase;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraftforge.client.model.AdvancedModelLoader;
|
|
import net.minecraftforge.client.model.IModelCustom;
|
|
|
|
public class ModelWormHead extends ModelBase {
|
|
|
|
public static final IModelCustom head = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/bot_prime_head.obj"));
|
|
|
|
@Override
|
|
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
|
|
|
super.render(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
|
|
|
|
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * scaleFactor - 90.0F, 0.0F, 1.0F, 0.0F);
|
|
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * scaleFactor - 90, 0.0F, 0.0F, 1.0F);
|
|
|
|
head.renderAll();
|
|
}
|
|
}
|