mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Add a color function to the RenderTileFloatingFlower
Derivative classes can use it (allows for rainbow floating flowers)
This commit is contained in:
1 parent
19e226780d
commit
e174144937
2 files changed
+8
No files matched your search
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.tile;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -52,11 +53,14 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(flower.getIslandType().getResource());
|
||||
Color color = new Color(flower.getIslandType().getColor());
|
||||
GL11.glColor3f(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 1.4F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
model.render();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor3f(1f, 1f, 1f);
|
||||
|
||||
ItemStack stack = flower.getDisplayStack();
|
||||
IIcon icon = stack.getIconIndex();
|
||||
|
||||
@@ -61,6 +61,10 @@ public interface IFloatingFlower {
|
||||
return res;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.typeName;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user