/
Belyash5
/
Flu
Обзор
Документация
Войти
/
Belyash5
/
Flu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/main/java/com/hbm/render/model/ModelWormHead.java
27 строк
1 KB
ItsMakar
Refactor models, fix ModelArmorBase compatibility with SkinPort and Galacticraft
01 апр 2025, 13:06
01 апр 2025, 13:06
bfede6d
Код
Авторство
О чём код?
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(); } }