aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>2023-01-06 06:46:28 +0000
committerGTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>2023-01-06 06:46:28 +0000
commita74ea66c514a32a28f2fdd42cb5586725bf38650 (patch)
tree5b8864a8399144739c062ed682c5367c9f9301c0 /src/main/java
parented0cf83d91095b275393bc9e4e9dd7579b5adff9 (diff)
downloadGT5-Unofficial-a74ea66c514a32a28f2fdd42cb5586725bf38650.tar.gz
GT5-Unofficial-a74ea66c514a32a28f2fdd42cb5586725bf38650.tar.bz2
GT5-Unofficial-a74ea66c514a32a28f2fdd42cb5586725bf38650.zip
Revert colour system, too complex.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java23
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java33
3 files changed, 5 insertions, 70 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java
index f77d139d32..6676b920f3 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/block/RenderEyeOfHarmony.java
@@ -20,7 +20,6 @@ public class RenderEyeOfHarmony extends TileEntitySpecialRenderer {
private static final ResourceLocation starLayer0 = new ResourceLocation(MODID, "models/StarLayer0.png");
private static final ResourceLocation starLayer1 = new ResourceLocation(MODID, "models/StarLayer1.png");
private static final ResourceLocation starLayer2 = new ResourceLocation(MODID, "models/StarLayer2.png");
- private static final ResourceLocation blackHole = new ResourceLocation(MODID, "models/blackHole.png");
public static IModelCustom modelCustom;
public RenderEyeOfHarmony() {
@@ -48,14 +47,9 @@ public class RenderEyeOfHarmony extends TileEntitySpecialRenderer {
}
// Render star stuff.
- // Render a black hole if the dimension is the deep dark.
- if (EOHRenderTile.getTier() < 9) {
- renderStarLayer(EOHRenderTile, 0, starLayer0, 1.0f);
- renderStarLayer(EOHRenderTile, 1, starLayer1, 0.4f);
- renderStarLayer(EOHRenderTile, 2, starLayer2, 0.2f);
- } else {
- renderStarLayer(EOHRenderTile, 0, blackHole, 1.0f);
- }
+ renderStarLayer(EOHRenderTile, 0, starLayer0, 1.0f);
+ renderStarLayer(EOHRenderTile, 1, starLayer1, 0.4f);
+ renderStarLayer(EOHRenderTile, 2, starLayer2, 0.2f);
GL11.glPopMatrix();
}
}
@@ -101,11 +95,8 @@ public class RenderEyeOfHarmony extends TileEntitySpecialRenderer {
break;
}
- // Set colour and alpha (transparency) of the star layer. Set by the current recipe.
- float starRed = EOHRenderTile.getColour().getRed() / 255.0f;
- float starGreen = EOHRenderTile.getColour().getGreen() / 255.0f;
- float starBlue = EOHRenderTile.getColour().getBlue() / 255.0f;
- GL11.glColor4f(starRed, starGreen, starBlue, alpha);
+ // Set colour and alpha (transparency) of the star layer.
+ GL11.glColor4f(1, 1, 1, alpha);
// Spin the star around according to the multi time dilation tier.
GL11.glRotatef((0.03f * EOHRenderTile.angle * EOHRenderTile.getRotationSpeed()) % 360.0f, 0F, 0F, 1F);
diff --git a/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java
index a0090d9706..31dfc9f170 100644
--- a/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java
@@ -1,8 +1,5 @@
package com.github.technus.tectech.thing.block;
-import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_EyeOfHarmony.errorStar;
-
-import java.awt.*;
import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetworkManager;
@@ -29,7 +26,6 @@ public class TileEyeOfHarmony extends TileEntity {
private float size = 1;
private float rotationSpeed = 0;
- private Color colour = errorStar;
public Block getOrbitingBody() {
return orbitingBody;
@@ -55,14 +51,6 @@ public class TileEyeOfHarmony extends TileEntity {
size += 1.5f;
}
- public void setColour(Color colour) {
- this.colour = colour;
- }
-
- public Color getColour() {
- return colour;
- }
-
public void increaseRotationSpeed() {
rotationSpeed++;
}
@@ -100,11 +88,6 @@ public class TileEyeOfHarmony extends TileEntity {
compound.setFloat(sizeNBTTag, size);
compound.setLong(tierNBTTag, tier);
- // Save colour info.
- compound.setInteger(sizeRedNBTTag, colour.getRed());
- compound.setInteger(sizeGreenNBTTag, colour.getGreen());
- compound.setInteger(sizeBlueNBTTag, colour.getBlue());
-
if (orbitingBody != null) {
int blockID = Block.getIdFromBlock(orbitingBody);
compound.setInteger(orbitingBodyIDNBTTag, blockID);
@@ -120,12 +103,6 @@ public class TileEyeOfHarmony extends TileEntity {
size = compound.getFloat(sizeNBTTag);
tier = compound.getLong(tierNBTTag);
- // Load colour info.
- int red = compound.getInteger(sizeRedNBTTag);
- int green = compound.getInteger(sizeGreenNBTTag);
- int blue = compound.getInteger(sizeBlueNBTTag);
- colour = new Color(red, green, blue);
-
if (compound.hasKey(orbitingBodyIDNBTTag)) {
int blockID = compound.getInteger(orbitingBodyIDNBTTag);
orbitingBody = Block.getBlockById(blockID);
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
index 932798c88f..bbc7de8d6c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
@@ -1795,45 +1795,12 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
// Lower value = faster rotation speed.
rendererTileEntity.setRotationSpeed((1 + timeAccelerationFieldMetadata) / 2.0f);
- // Colour of tier determined by star tier.
- Color colour = getStarColour((int) currentRecipe.getRocketTier());
- rendererTileEntity.setColour(colour);
-
// Set recipe spacetime tier for usage elsewhere.
rendererTileEntity.setTier(currentRecipe.getRocketTier());
rendererTileEntity.setOrbitingBody(
Block.getBlockFromItem(currentRecipe.getRecipeTriggerItem().getItem()));
}
- private static final Color redStar = new Color(155, 9, 38);
- private static final Color orangeStar = new Color(190, 85, 9);
- private static final Color blueStar = new Color(96, 152, 234);
- private static final Color whiteStar = new Color(238, 238, 238);
- private static final Color blackHole = new Color(0, 0, 0);
- public static final Color errorStar = new Color(222, 0, 255);
-
- Color getStarColour(final int tier) {
- switch (tier) {
- case 0:
- case 1:
- return redStar;
- case 2:
- case 3:
- return orangeStar;
- case 4:
- case 5:
- return blueStar;
- case 6:
- case 7:
- case 8:
- return whiteStar;
- case 9:
- return blackHole;
- default:
- return errorStar;
- }
- }
-
private double successChance;
private void outputFailedChance() {