forked from TAIGA/TAIGA
[1.2] Material rework (#60)
* Developement tests for nbt data in traits * Lot of trait changes and better balancing * Traits reworked a bit, new traits added. * First correction of NBT Data in Trait (Soulbound). Is shown twice. Still needs corrections. * Few fixes in traits and new trait "catcher" * Small fix, needs workaround * fixed some catch issues * Fixed Catcher and Reviving Traits, new Trait: Souleater. Updated build.gradle for new TiC Version. * Splitted SoulEater to get the bad touch to an extra trait "Cursed". Added method for using nbt more easily. Changed declaration names of fluids * Some minor changes in Traits, Registry and Utils. * Iron_nugget is replaced with oreDict Item when not loaded via TAIGA. * Beginning of new material integration. Lot of names changed, lot more work to do here. Many null pointer exceptions and no changes of values up to now. * Some Small changes in names, registry and recipes * Some weird stuff I don't remember :D * fixed some things I missed while merging * Rollback to something * More Stuff * fixed some merging stuff * Fixed some misspelled names. Actually working with lots of restrictions. * Rearranged alloys, tried to add blocks / ingots for non-tinker-materials, but they won't work. * Again tried to fix the melting issue, but non-tinker materials still are not able to be casted as a block, ingot or nugget... * Fixed integration of materials without tools. * changed IMC to direct lib calls * removed more IMC, removed redundant code * some reformatting * Alloy integration reworked, needs to be balanced. * updated deps, renamed some func's, added duplicate material check * some more renaming * some reformatting, fixed wrong import, fixed string cmp's * Added images for blocks, ingots, nuggets and dust. Json changes do not work yet. * some reformatting * Removed old json files. Placeholder needed. * Fixed block json, items not working yet. * Fixed my own derp (missing json files) * Reduced materials to ensure unique traits for most of them. Still 30 though, but reduced by 20 more :'( RIP * Changed some generator stuff, not working properly right now! * rewrote offset generation, added some debug command, fixed some stuff * fixed on-surface-generation, made dependencies more flexible * reverted gen-weight back to its normal value * Meteor generator implemented. * fixed generating on ground * optimized a thing * Replaced Uru with Osram, replaced Meteorite with Uru, added Meteorite again for Hull-Material and late game alloy. * Some changes in generation of ores, not ready yet. * Added Cobble Meteorite. Added debug command. Implemented rest of ore generation. Some minor fixes left for generation including balancing. * Some changes for ore generation. Added 2 separate Generic Blocks for meteorite and their cobble variant. * some cleanup in Generator class, added meteor world save handler * Added Textures. Added blockstates and item models. Fixed fluid rendering. * renamed world save data file to be little more specific, removed a unused method * some preps for the upcoming release * First attempt of well balancing material stats. Renamed TiberiumX to Triberium. * Final changes... ready for beta testing * Added missing alloys. * Corrected balancing of ore generation. Still WIP * removed some last debug out * one last reformat
This commit is contained in:
@@ -23,8 +23,10 @@ import slimeknights.tconstruct.library.materials.Material;
|
||||
import javax.annotation.Nonnull;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import static com.sosnitzka.taiga.Fluids.*;
|
||||
import static com.sosnitzka.taiga.MaterialTraits.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
private static void registerBlockModel(Block block) {
|
||||
@@ -65,33 +67,34 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
|
||||
public void setRenderInfo(final Material material) {
|
||||
|
||||
if (material.equals(adamantite)) specialRender(material, 0xd55cdf, 0.5f, 0.6f, 0.2f);
|
||||
else if (material.equals(solarium)) specialRender(material, 0xFFDD11, 0.7f, 0.3f, 0.1f);
|
||||
else if (material.equals(proxideum)) specialRender(material, 0x2d8f8b, 0.4f, 0.3f, 0.1f);
|
||||
else if (material.equals(meteorite)) specialRender(material, 0xaaaaaa, 0.6f, 0.8f, 0.0f);
|
||||
else if (material.equals(tiberium)) specialRender(material, 0x33ff33, 0.5f, 0.2f, 0.1f);
|
||||
else if (material.equals(bismuth)) specialRender(material, 0xffffff, 0.3f, 0.0f, 0.0f);
|
||||
else if (material.equals(bysmuid)) specialRender(material, 0xccccee, 0.6f, 0.2f, 0.0f);
|
||||
else if (material.equals(imperomite)) specialRender(material, 0x8decaf, 0.8f, 0.5f, -0.0f);
|
||||
else if (material.equals(noctunyx)) specialRender(material, 0xce70e8, 0.5f, 0.2f, 0.3f);
|
||||
else if (material.equals(nucleum)) specialRender(material, 0xd9f446, 1.0f, 0.4f, 0.3f);
|
||||
else if (material.equals(dyonite)) specialRender(material, 0xffe240, 0.6f, 1.0f, 0.2f);
|
||||
else if (material.equals(arcanite)) specialRender(material, 0x5e5499, 0.6f, 0.8f, 0.2f);
|
||||
if (material.equals(adamant)) metalRender(material, adamantFluid.getColor(), 1f, 0.8f, 0f);
|
||||
else if (material.equals(duranite)) metalRender(material, duraniteFluid.getColor(), .4f, .4f, 0);
|
||||
else if (material.equals(tiberium)) metalRender(material, tiberiumFluid.getColor(), 1f, .3f, 0f);
|
||||
else if (material.equals(palladium)) metalRender(material, palladiumFluid.getColor(), .7f, .6f, 0f);
|
||||
else if (material.equals(osram)) metalRender(material, osramFluid.getColor(), .7f, .6f, 0f);
|
||||
else if (material.equals(tritonite)) metalRender(material, tritoniteFluid.getColor(), .3f, .3f, 0f);
|
||||
else if (material.equals(nucleum)) metalRender(material, nucleumFluid.getColor(), .4f, .6f, .2f);
|
||||
else if (material.equals(triberium)) metalRender(material, triberiumFluid.getColor(), 2f, 2f, 0.5f);
|
||||
else if (material.equals(solarium)) metalRender(material, solariumFluid.getColor(), 1.5f, 1.5f, 0.5f);
|
||||
else if (material.equals(uru)) metalRender(material, uruFluid.getColor(), 1.0f, 1.0f, 0.3f);
|
||||
else if (material.equals(imperomite)) metalRender(material, imperomiteFluid.getColor(), 0.4f, 1.0f, 0.7f);
|
||||
else if (material.equals(vibranium)) metalRender(material, vibraniumFluid.getColor(), 0.6f, .8f, 1f);
|
||||
else if (material.equals(valyrium)) metalRender(material, valyriumFluid.getColor(), .8f, 1.5f, -0.1f);
|
||||
else {
|
||||
material.setRenderInfo(new MaterialRenderInfo.BlockTexture("taiga:blocks/" + material.getIdentifier() + "_block"));
|
||||
material.setRenderInfo(new MaterialRenderInfo.BlockTexture("taiga:blocks/block/" + material.getIdentifier()));
|
||||
}
|
||||
}
|
||||
|
||||
private void specialRender(final Material material, final int f, final float shine, final float brightness, final float hueshift) {
|
||||
private void metalRender(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/" + material.getIdentifier(), baseTexture, location, f, shine, brightness, hueshift);
|
||||
return new MetalTextureTexture("taiga:materials/" + material.getIdentifier(), baseTexture, location, f, shine, brightness, hueshift);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerFluidModels(Fluid fluid) {
|
||||
if (fluid == null) {
|
||||
|
Reference in New Issue
Block a user