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