mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
glowier molten materials, mat colors
This commit is contained in:
parent
377108166d
commit
4479b8bcb9
@ -14,6 +14,7 @@ import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityCrucible;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -87,6 +88,8 @@ public class GUICrucible extends GuiInfoContainer {
|
||||
int lastHeight = 0;
|
||||
int lastQuant = 0;
|
||||
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
|
||||
for(MaterialStack sta : stack) {
|
||||
|
||||
int targetHeight = (lastQuant + sta.amount) * 79 / capacity;
|
||||
@ -95,14 +98,21 @@ public class GUICrucible extends GuiInfoContainer {
|
||||
|
||||
int offset = sta.material.smeltable == SmeltingBehavior.ADDITIVE ? 34 : 0; //additives use a differnt texture
|
||||
|
||||
Color color = new Color(sta.material.moltenColor);
|
||||
int hex = sta.material.moltenColor;
|
||||
//hex = 0xC18336;
|
||||
Color color = new Color(hex);
|
||||
GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F);
|
||||
drawTexturedModalRect(guiLeft + x, guiTop + y - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight - lastHeight);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.3F);
|
||||
drawTexturedModalRect(guiLeft + x, guiTop + y - targetHeight, 176 + offset, 89 - targetHeight, 34, targetHeight - lastHeight);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
lastQuant += sta.amount;
|
||||
lastHeight = targetHeight;
|
||||
}
|
||||
|
||||
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor3f(255, 255, 255);
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,16 +43,16 @@ public class Mats {
|
||||
public static final int _AS = 30;
|
||||
|
||||
//Vanilla and vanilla-like
|
||||
public static final NTMMaterial MAT_STONE = makeSmeltable(_VS + 00, df("Stone"), 0);
|
||||
public static final NTMMaterial MAT_COAL = makeAdditive( 1400, COAL, 0);
|
||||
public static final NTMMaterial MAT_LIGNITE = makeAdditive( 1401, LIGNITE, 0);
|
||||
public static final NTMMaterial MAT_STONE = makeSmeltable(_VS + 00, df("Stone"), 0x4D2F23);
|
||||
public static final NTMMaterial MAT_COAL = makeAdditive( 1400, COAL, 0x583434);
|
||||
public static final NTMMaterial MAT_LIGNITE = makeAdditive( 1401, LIGNITE, 0x715444);
|
||||
public static final NTMMaterial MAT_COALCOKE = makeAdditive( 1410, COALCOKE, 0);
|
||||
public static final NTMMaterial MAT_PETCOKE = makeAdditive( 1411, PETCOKE, 0);
|
||||
public static final NTMMaterial MAT_LIGCOKE = makeAdditive( 1412, LIGCOKE, 0);
|
||||
public static final NTMMaterial MAT_GRAPHITE = makeAdditive( 1420, GRAPHITE, 0);
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0).omitAutoGen();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0).omitAutoGen();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0).omitAutoGen();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFA259).omitAutoGen();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xE8D754).omitAutoGen();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0x7A0300).omitAutoGen();
|
||||
|
||||
//Radioactive
|
||||
public static final NTMMaterial MAT_URANIUM = makeSmeltable(9200, U, 0).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK);
|
||||
@ -61,8 +61,8 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK);
|
||||
|
||||
//Base metals
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0).setShapes(INGOT, DUST, PLATE, BLOCK);
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0).setShapes(WIRE, INGOT, DUST, PLATE, BLOCK);
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xA99E79).setShapes(INGOT, DUST, PLATE, BLOCK);
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xC18336).setShapes(WIRE, INGOT, DUST, PLATE, BLOCK);
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0).setShapes(WIRE, INGOT, DUST, BLOCK);
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0).setShapes(WIRE, INGOT, DUST, PLATE, BLOCK);
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0).setShapes(NUGGET, INGOT, DUST, PLATE, BLOCK);
|
||||
|
||||
@ -271,12 +271,16 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
|
||||
}
|
||||
|
||||
public int getQuantaFromType(List<MaterialStack> stacks, NTMMaterial mat) {
|
||||
int sum = 0;
|
||||
for(MaterialStack stack : stacks) {
|
||||
if(mat == null || stack.material == mat) {
|
||||
if(stack.material == mat) {
|
||||
return stack.amount;
|
||||
}
|
||||
if(mat == null) {
|
||||
return sum += stack.amount;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return sum;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user