Started by
AlexTron
on
Topic category: Advanced modding
I was writing some render code for a custom mod that used the GlStateManager class for rotation and translation:
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch,
float scale) {
GlStateManager.pushMatrix();
GlStateManager.scaled(2.0F, 2.0F, 2.0F);
GlStateManager.translated(0.0F, -0.5F, 0.0F);
GlStateManager.rotate(limbSwingAmount, 0.0F, 1.0F, 0.0F);
GlStateManager.translated(0.0F, 0.8F + ageInTicks, 0.0F);
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
this.glass.render(scale);
float f = 0.875F;
GlStateManager.scaled(0.875F, 0.875F, 0.875F);
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
GlStateManager.rotate(limbSwingAmount, 0.0F, 1.0F, 0.0F);
this.glass.render(scale);
GlStateManager.scaled(0.875F, 0.875F, 0.875F);
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
GlStateManager.rotate(limbSwingAmount, 0.0F, 1.0F, 0.0F);
this.cube.render(scale);
GlStateManager.popMatrix();
}
However, I have had errors importing net.minecraft.client.renderer.GlStateManager
I looked at the decompiled classes in the file viewer and noticed that the GlStateManager class is not listed.
Is there any way to use this class in my code?
Use 1.14.4 models for 1.14.4 and 1.15.2 models for 1.15.2.
Blockbench: File -> Project
That is a copy of the ender crystal render code, and as such I don't see another way to make it rotate every tick by a controlled amount.
I shall look into other ways to make this model. Thanks.