use of blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer in project ImmersiveEngineering by BluSunrize.
the class ShaderRegistry method registerShader_Item.
/**
* Method to register a default implementation of Item Shaders<br>
* It is used for the colour and layers of the base shader item
* @param name name of the shader
* @param rarity Rarity of the shader item
* @param colour0 grip colour
* @param colour1 base colour
* @param colour2 design colour
* @return the registered ShaderCase
*/
public static ShaderCaseItem registerShader_Item(String name, EnumRarity rarity, int colour0, int colour1, int colour2) {
ArrayList<ShaderLayer> list = new ArrayList();
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shader_0"), colour0));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shader_1"), colour1));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shader_2"), colour2));
ShaderCaseItem shader = new ShaderCaseItem(list);
return registerShaderCase(name, shader, rarity);
}
use of blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer in project ImmersiveEngineering by BluSunrize.
the class ClientProxy method textureStich.
@SubscribeEvent
public void textureStich(TextureStitchEvent.Pre event) {
IELogger.info("Stitching Revolver Textures!");
((ItemRevolver) IEContent.itemRevolver).stichRevolverTextures(event.getMap());
for (ShaderRegistry.ShaderRegistryEntry entry : ShaderRegistry.shaderRegistry.values()) for (ShaderCase sCase : entry.getCases()) if (sCase.stitchIntoSheet())
for (ShaderLayer layer : sCase.getLayers()) if (layer.getTexture() != null)
ApiUtils.getRegisterSprite(event.getMap(), layer.getTexture());
for (DrillHeadPerm p : ((ItemDrillhead) IEContent.itemDrillhead).perms) p.sprite = ApiUtils.getRegisterSprite(event.getMap(), p.texture);
WireType.iconDefaultWire = ApiUtils.getRegisterSprite(event.getMap(), "immersiveengineering:blocks/wire");
ApiUtils.getRegisterSprite(event.getMap(), "immersiveengineering:blocks/shaders/greyscaleFire");
for (BulletHandler.IBullet bullet : BulletHandler.registry.values()) for (ResourceLocation rl : bullet.getTextures()) ApiUtils.getRegisterSprite(event.getMap(), rl);
for (ResourceLocation rl : ModelConveyor.rl_casing) ApiUtils.getRegisterSprite(event.getMap(), rl);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorHandler.textureConveyorColour);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorBasic.texture_off);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorBasic.texture_on);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorDrop.texture_off);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorDrop.texture_on);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorVertical.texture_off);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorVertical.texture_on);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorSplit.texture_off);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorSplit.texture_on);
ApiUtils.getRegisterSprite(event.getMap(), ConveyorSplit.texture_casing);
ApiUtils.getRegisterSprite(event.getMap(), IEContent.fluidPotion.getStill());
ApiUtils.getRegisterSprite(event.getMap(), IEContent.fluidPotion.getFlowing());
ApiUtils.getRegisterSprite(event.getMap(), "immersiveengineering:items/shader_slot");
}
use of blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer in project ImmersiveEngineering by BluSunrize.
the class ShaderRegistry method registerShader_Drill.
/**
* Method to register a default implementation of Drill Shaders<br>
* Note that they have an extra layer with null for the ResourceLocation, for the drill head and augers
* @param name name of the shader
* @param overlayType uses IE's existing overlays. To use custom ones, you'll need your own method.
* @param rarity Rarity of the shader item
* @param colour0 grip colour
* @param colour1 base colour
* @param colour2 design colour
* @param additionalTexture additional overlay texture. Null if not needed.
* @param colourAddtional colour for the additional texture, if present
* @return the registered ShaderCase
*/
public static ShaderCaseDrill registerShader_Drill(String name, String overlayType, EnumRarity rarity, int colour0, int colour1, int colour2, String additionalTexture, int colourAddtional) {
ArrayList<ShaderLayer> list = new ArrayList();
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/drill_diesel_0"), colour0));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/drill_diesel_0"), colour1));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/drill_diesel_1_" + overlayType), colour2));
if (additionalTexture != null) {
ResourceLocation rl = new ResourceLocation("immersiveengineering:items/shaders/drill_diesel_" + additionalTexture);
list.add(new ShaderLayer(rl, colourAddtional).setTextureBounds(defaultLayerBounds.get(rl)));
}
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/drill_diesel_uncoloured"), 0xffffffff));
//final pass is for drill head and augers
list.add(new ShaderLayer(null, 0xffffffff));
ShaderCaseDrill shader = new ShaderCaseDrill(list);
return registerShaderCase(name, shader, rarity);
}
use of blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer in project ImmersiveEngineering by BluSunrize.
the class ShaderRegistry method registerShader_Minecart.
/**
* Method to register a default implementation of Minecart Shaders
* @param name name of the shader
* @param overlayType uses IE's existing overlays. To use custom ones, you'll need your own method.
* @param rarity Rarity of the shader item
* @param colour0 base colour
* @param colour1 design colour
* @param additionalTexture additional overlay texture. Null if not needed.
* @param colourAddtional colour for the additional texture, if present
* @return the registered ShaderCase
*/
public static ShaderCaseMinecart registerShader_Minecart(String name, String overlayType, EnumRarity rarity, int colour0, int colour1, String additionalTexture, int colourAddtional) {
ArrayList<ShaderLayer> list = new ArrayList();
//Minecart textures need .png behind them, since they are used for direct binding, not stitching >_>
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:textures/models/shaders/minecart_0.png"), colour0));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:textures/models/shaders/minecart_1_" + overlayType + ".png"), colour1));
if (additionalTexture != null)
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:textures/models/shaders/minecart_" + additionalTexture + ".png"), colourAddtional));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:textures/models/shaders/minecart_uncoloured.png"), 0xffffffff));
ShaderCaseMinecart shader = new ShaderCaseMinecart(list);
if (overlayType.equals("1") || overlayType.equals("2") || overlayType.equals("7")) {
shader.renderSides[1][1] = false;
shader.renderSides[1][2] = false;
}
if (additionalTexture != null) {
shader.renderSides[2][1] = false;
shader.renderSides[2][2] = false;
}
return registerShaderCase(name, shader, rarity);
}
use of blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer in project ImmersiveEngineering by BluSunrize.
the class ShaderRegistry method registerShader_Chemthrower.
/**
* Method to register a default implementation of Chemthrower Shaders<br>
* @param name name of the shader
* @param overlayType uses IE's existing overlays. To use custom ones, you'll need your own method.
* @param rarity Rarity of the shader item
* @param colour0 grip colour
* @param colour1 base colour
* @param colour2 design colour
* @param additionalTexture additional overlay texture. Null if not needed.
* @param colourAddtional colour for the additional texture, if present
* @return the registered ShaderCase
*/
public static ShaderCaseChemthrower registerShader_Chemthrower(String name, String overlayType, EnumRarity rarity, int colour0, int colour1, int colour2, String additionalTexture, int colourAddtional) {
ArrayList<ShaderLayer> list = new ArrayList();
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/chemthrower_0"), colour0));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/chemthrower_0"), colour1));
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/chemthrower_1_" + overlayType), colour2));
if (additionalTexture != null) {
ResourceLocation rl = new ResourceLocation("immersiveengineering:items/shaders/chemthrower_" + additionalTexture);
list.add(new ShaderLayer(rl, colourAddtional).setTextureBounds(defaultLayerBounds.get(rl)));
}
list.add(new ShaderLayer(new ResourceLocation("immersiveengineering:items/shaders/chemthrower_uncoloured"), 0xffffffff));
ShaderCaseChemthrower shader = new ShaderCaseChemthrower(list);
return registerShaderCase(name, shader, rarity);
}
Aggregations