Search in sources :

Example 1 with MaterialLayerList

use of net.silentchaos512.gear.api.material.MaterialLayerList in project Silent-Gear by SilentChaos512.

the class MaterialDisplay method fromNetwork.

public static MaterialDisplay fromNetwork(ResourceLocation materialId, FriendlyByteBuf buf) {
    Map<PartGearKey, MaterialLayerList> map = new LinkedHashMap<>();
    int count = buf.readVarInt();
    for (int i = 0; i < count; ++i) {
        PartGearKey key = PartGearKey.fromNetwork(buf);
        MaterialLayerList layerList = MaterialLayerList.read(buf);
        map.put(key, layerList);
    }
    return of(materialId, map);
}
Also used : PartGearKey(net.silentchaos512.gear.api.util.PartGearKey) MaterialLayerList(net.silentchaos512.gear.api.material.MaterialLayerList) IMaterialLayerList(net.silentchaos512.gear.api.material.IMaterialLayerList) LinkedHashMap(java.util.LinkedHashMap)

Example 2 with MaterialLayerList

use of net.silentchaos512.gear.api.material.MaterialLayerList in project Silent-Gear by SilentChaos512.

the class MaterialBuilder method displayAdornment.

public MaterialBuilder displayAdornment(PartTextureSet textures, int color) {
    display(PartType.ADORNMENT, GearType.ALL, new MaterialLayerList(PartType.ADORNMENT, textures, color));
    display(PartType.ADORNMENT, GearType.PART, new MaterialLayer(SilentGear.getId("adornment"), color), new MaterialLayer(SilentGear.getId("adornment_highlight"), Color.VALUE_WHITE));
    return this;
}
Also used : MaterialLayerList(net.silentchaos512.gear.api.material.MaterialLayerList) MaterialLayer(net.silentchaos512.gear.api.material.MaterialLayer)

Example 3 with MaterialLayerList

use of net.silentchaos512.gear.api.material.MaterialLayerList in project Silent-Gear by SilentChaos512.

the class MaterialBuilder method displayCoating.

public MaterialBuilder displayCoating(PartTextureSet textures, int color) {
    display(PartType.COATING, GearType.ALL, new MaterialLayerList(PartType.MAIN, textures, color));
    display(PartType.COATING, GearType.PART, new MaterialLayer(SilentGear.getId("coating_material"), color), new MaterialLayer(SilentGear.getId("coating_jar"), Color.VALUE_WHITE));
    return this;
}
Also used : MaterialLayerList(net.silentchaos512.gear.api.material.MaterialLayerList) MaterialLayer(net.silentchaos512.gear.api.material.MaterialLayer)

Example 4 with MaterialLayerList

use of net.silentchaos512.gear.api.material.MaterialLayerList in project Silent-Gear by SilentChaos512.

the class MaterialDisplay method of.

public static MaterialDisplay of(ResourceLocation id, Map<PartGearKey, MaterialLayerList> display) {
    MaterialDisplay model = new MaterialDisplay(id);
    model.map.putAll(display);
    return model;
}
Also used : IMaterialDisplay(net.silentchaos512.gear.api.material.IMaterialDisplay)

Aggregations

MaterialLayerList (net.silentchaos512.gear.api.material.MaterialLayerList)3 MaterialLayer (net.silentchaos512.gear.api.material.MaterialLayer)2 LinkedHashMap (java.util.LinkedHashMap)1 IMaterialDisplay (net.silentchaos512.gear.api.material.IMaterialDisplay)1 IMaterialLayerList (net.silentchaos512.gear.api.material.IMaterialLayerList)1 PartGearKey (net.silentchaos512.gear.api.util.PartGearKey)1