mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Make the wind generator item spin
This commit is contained in:
1 parent
a6ac90e8e0
commit
e2fd77fc1c
1 file changed
+9
-1
@@ -12,12 +12,20 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class RenderWindGeneratorItem {
|
||||
|
||||
private static ModelWindGenerator windGenerator = new ModelWindGenerator();
|
||||
private static int angle = 0;
|
||||
|
||||
public static void renderStack() {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(180F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.rotate(180F, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.translate(0.0F, 0.4F, 0.0F);
|
||||
MekanismRenderer.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "WindGenerator.png"));
|
||||
windGenerator.render(0.016F, 0);
|
||||
//TODO: Only update angle if the player is not in a blacklisted dimension, one that has no "wind".
|
||||
//The best way to do this would be to add an event listener for dimension change.
|
||||
//The event is server side only so we would need to send a packet to clients to tell them if they are
|
||||
//in a blacklisted dimension or not.
|
||||
angle = (angle + 2) % 360;
|
||||
windGenerator.render(0.016F, angle);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user