aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/ITextureBuilder.java
blob: 8a4d715ccbac91b98d2ca0ec47bdf286c1f63a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package gregtech.api.interfaces;

import gregtech.api.render.TextureFactory;
import net.minecraft.block.Block;
import net.minecraftforge.common.util.ForgeDirection;

/**
 * <p>This Interface defines operations to configure and build instances of the {@link ITexture} implementations</p>
 * <p>Use the {@link TextureFactory#builder()} method to get an instance of the {@link ITextureBuilder} implementation.</p>
 */
public interface ITextureBuilder {
    /**
     * Build the {@link ITexture}
     *
     * @return The built {@link ITexture}
     */
    ITexture build();

    /**
     * @param block The {@link Block}
     * @param meta The meta value for the Block
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder setFromBlock(final Block block, final int meta);

    /**
     * @param side <p>The {@link ForgeDirection} side providing the texture</p>
     *             <p>Default is {@link ForgeDirection#UNKNOWN} to use same side as rendered</p>
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder setFromSide(final ForgeDirection side);

    /**
     * @param iconContainers The {@link IIconContainer}s to add
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder addIcon(final IIconContainer... iconContainers);

    /**
     * @param rgba The RGBA tint for this {@link ITexture}
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder setRGBA(final short[] rgba);

    /**
     * @param iTextures The {@link ITexture} layers to add
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder addLayer(final ITexture... iTextures);

    /**
     * Set alpha blending
     * @param allowAlpha to set
     *
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder setAllowAlpha(final boolean allowAlpha);

    /**
     * Texture will render with same orientation as with vanilla blocks
     *
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder stdOrient();

    /**
     * Texture always render with full brightness to glow in the dark
     *
     * @return {@link ITextureBuilder} for chaining
     */
    ITextureBuilder glow();
}