001 package net.minecraftforge.liquids;
002
003 import net.minecraft.nbt.NBTTagCompound;
004
005 /**
006 * Implementors of this interface are a liquid which may receive a block implementation and can be placed in the world.
007 *
008 * @author cpw
009 *
010 */
011 public interface IBlockLiquid extends ILiquid {
012 /**
013 * Controls the type of block that is generated by this IBlockLiquid
014 * @author cpw
015 *
016 */
017 public enum BlockType {
018 /**
019 * No block. Completeness really.
020 */
021 NONE,
022 /**
023 * Vanilla style block, up to 8 flowing states. May be able to generate new sources.
024 */
025 VANILLA,
026 /**
027 * Finite liquid style, uses cellular automata to model flowing behaviour.
028 */
029 FINITE;
030 }
031
032 /**
033 * Can this liquid, when placed in a specific configuration, generate new source blocks of the liquid.
034 * @return
035 */
036 public boolean willGenerateSources();
037
038 /**
039 * @return the distance this liquid will flow if placed in the world. Maximum of 7 levels for vanilla types.
040 */
041 public int getFlowDistance();
042
043 /**
044 * @return the RGB rendering for this liquid
045 */
046 public byte[] getLiquidRGB();
047
048 /**
049 * Get the texture file for rendering the liquid
050 * @return
051 */
052 public String getLiquidBlockTextureFile();
053 /**
054 * Custom properties of the liquid.
055 * @return
056 */
057 public NBTTagCompound getLiquidProperties();
058
059 }