Add in the basic IBlockLiquid interface. The actual block implementation

will follow.
This commit is contained in:
Christian committed 2012-11-13 21:54:57 -05:00
1 parent 5f2d1d1fc0
commit a759353afa
2 files changed
+78 -4

No files matched your search

@@ -0,0 +1,59 @@
package net.minecraftforge.liquids;
import net.minecraft.src.NBTTagCompound;
/**
* Implementors of this interface are a liquid which may receive a block implementation and can be placed in the world.
*
* @author cpw
*
*/
public interface IBlockLiquid extends ILiquid {
/**
* Controls the type of block that is generated by this IBlockLiquid
* @author cpw
*
*/
public enum BlockType {
/**
* No block. Completeness really.
*/
NONE,
/**
* Vanilla style block, up to 8 flowing states. May be able to generate new sources.
*/
VANILLA,
/**
* Finite liquid style, uses cellular automata to model flowing behaviour.
*/
FINITE;
}
/**
* Can this liquid, when placed in a specific configuration, generate new source blocks of the liquid.
* @return
*/
public boolean willGenerateSources();
/**
* @return the distance this liquid will flow if placed in the world. Maximum of 7 levels for vanilla types.
*/
public int getFlowDistance();
/**
* @return the RGB rendering for this liquid
*/
public byte[] getLiquidRGB();
/**
* Get the texture file for rendering the liquid
* @return
*/
public String getLiquidBlockTextureFile();
/**
* Custom properties of the liquid.
* @return
*/
public NBTTagCompound getLiquidProperties();
}
+19 -4
View File
@@ -1,20 +1,35 @@
/**
/**
* Copyright (c) SpaceToad, 2011
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package net.minecraftforge.liquids;
/**
* Liquids implement this interface
*
*/
public interface ILiquid {
/**
* The itemId of the liquid item
* @return
*/
public int stillLiquidId();
/**
* Is this liquid a metadata based liquid
* @return
*/
public boolean isMetaSensitive();
/**
* The item metadata of the liquid
* @return
*/
public int stillLiquidMeta();
}