forked from TAIGA/TAIGA
Cleaned code. Added nugget icons. Fixed some textures. TODO: metal texture rendering
This commit is contained in:
@@ -93,12 +93,12 @@ public class TAIGA {
|
||||
* @param craft Can craft parts in part builder
|
||||
* @param cast Can craft parts by casting with fluid (smeltery)
|
||||
*/
|
||||
|
||||
private void registerTinkerMaterial(String oreSuffix, Material material, Fluid fluid, int headDura, float headSpeed, float headAttack, float handleMod, int handleDura, int extra, int headLevel, boolean craft, boolean cast) {
|
||||
TinkerRegistry.addMaterialStats(material, new HeadMaterialStats(headDura, headSpeed, headAttack, headLevel));
|
||||
TinkerRegistry.addMaterialStats(material, new HandleMaterialStats(handleMod, handleDura));
|
||||
TinkerRegistry.addMaterialStats(material, new ExtraMaterialStats(extra));
|
||||
|
||||
System.out.println(material.getRepresentativeItem());
|
||||
Item item = null;
|
||||
Field[] items = Items.class.getDeclaredFields();
|
||||
for (Field i : items) {
|
||||
@@ -113,12 +113,9 @@ public class TAIGA {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
material.setFluid(fluid).setCraftable(craft).setCastable(cast).addItem(item, 1, Material.VALUE_Ingot);
|
||||
material.setRepresentativeItem(item);
|
||||
|
||||
System.out.println(material.getRepresentativeItem());
|
||||
|
||||
proxy.setRenderInfo(material);
|
||||
MaterialIntegration integration = new MaterialIntegration(material, fluid, oreSuffix);
|
||||
integration.integrate();
|
||||
@@ -136,7 +133,6 @@ public class TAIGA {
|
||||
registerTinkerMaterial("Prometheum", prometheum, prometheumFluid, 539, 3.6f, 6.60f, 0.90f, 0, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Arcanite", arcanite, arcaniteFluid, 698, 4.3f, 7.88f, 0.85f, -50, 150, METEORITE, false, true);
|
||||
// SOLIDE ORES
|
||||
|
||||
registerTinkerMaterial("Titanite", titanite, titaniteFluid, 811, 4.8f, 6.40f, 1.00f, -50, 150, TITANITE, false, true);
|
||||
registerTinkerMaterial("Meteorite", meteorite, meteoriteFluid, 823, 6.1f, 6.83f, 1.20f, -50, 200, METEORITE, false, true);
|
||||
registerTinkerMaterial("Vibranium", vibranium, vibraniumFluid, 917, 7.45f, 7.17f, 1.15f, 50, 150, VIBRANIUM, false, true);
|
||||
|
@@ -64,26 +64,24 @@ public class ClientProxy extends ServerProxy {
|
||||
}
|
||||
|
||||
public void setRenderInfo(final Material material) {
|
||||
/* if (material != bismuth) {
|
||||
material.setRenderInfo(new MaterialRenderInfo.Metal(fluid.getColor(), 0.4f, 0.2f, 0f));
|
||||
} else bismuth.setRenderInfo(new MaterialRenderInfo.BlockTexture("taiga:blocks/bismuth_block")); */
|
||||
|
||||
if (material == adamantite) renderTo(material, 0xd55cdf, 0.5f, 0.8f, 0.2f);
|
||||
else if (material == solarium) renderTo(material, 0xffff00, 0.6f, 1.8f, 0.0f);
|
||||
else if (material == proxideum) renderTo(material, 0x2d8f8b, 0.4f, 0.3f, 0.1f);
|
||||
else if (material == tiberium) renderTo(material, 0x33ff33, 0.5f, 0.2f, 0.1f);
|
||||
else if (material == bismuth) renderTo(material, 0xffffff, 0.4f, 0.2f, 0.0f);
|
||||
else if (material == dyonite) renderTo(material, 0xffe240, 0.6f, 0.8f, 0.2f);
|
||||
if (material == adamantite) specialRender(material, 0xd55cdf, 0.5f, 2.0f, 0.2f);
|
||||
else if (material == solarium) specialRender(material, 0xffff00, 0.3f, 1.0f, 0.0f);
|
||||
else if (material == proxideum) specialRender(material, 0x2d8f8b, 0.4f, 0.3f, 0.1f);
|
||||
else if (material == tiberium) specialRender(material, 0x33ff33, 0.5f, 0.2f, 0.1f);
|
||||
else if (material == bismuth) specialRender(material, 0xffffff, 0.3f, 0.0f, 0.0f);
|
||||
else if (material == dyonite) specialRender(material, 0xffe240, 0.6f, 1.8f, 0.2f);
|
||||
else if (material == arcanite) specialRender(material, 0xBBBBBB, 0.6f, 1.8f, 0.2f); // TODO: Fix Textures
|
||||
else {
|
||||
material.setRenderInfo(new MaterialRenderInfo.BlockTexture("taiga:blocks/" + material.getFluid().getName() + "_block"));
|
||||
material.setRenderInfo(new MaterialRenderInfo.BlockTexture("taiga:blocks/" + material.getIdentifier() + "_block"));
|
||||
}
|
||||
}
|
||||
|
||||
private void renderTo(Material material, final int f, final float shine, final float brightness, final float hueshift) {
|
||||
private void specialRender(final Material material, final int f, final float shine, final float brightness, final float hueshift) {
|
||||
material.setRenderInfo(new MaterialRenderInfo.AbstractMaterialRenderInfo() {
|
||||
@Override
|
||||
public TextureAtlasSprite getTexture(TextureAtlasSprite baseTexture, String location) {
|
||||
return new MetalTextureTexture("taiga:blocks/materials/adamantite", baseTexture, location, f, shine, brightness, hueshift);
|
||||
return new MetalTextureTexture("taiga:blocks/materials/" + material.getIdentifier(), baseTexture, location, f, shine, brightness, hueshift);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user