Update CoFH API, implement IBlockAppearance

This commit is contained in:
tterrag1098 committed 2015-06-08 02:41:03 -04:00
1 parent 9aa903f196
commit 34c7f19f3a
41 files changed
+458 -145

No files matched your search

@@ -0,0 +1,51 @@
package cofh.api.block;
import net.minecraft.block.Block;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Implement this interface on blocks that can mimic the appearance of other blocks. Note that this is meant to be available server-side, so ensure the code is
* server-safe and doesn't use client-side code.
*
*/
public interface IBlockAppearance {
/**
* This function returns the block that is being shown on a given side.
*
* @param world
* Reference to the world.
* @param x
* X coordinate of the block.
* @param y
* Y coordinate of the block.
* @param z
* Z coordinate of the block.
* @param side
* The side of the block.
*/
public Block getVisualBlock(IBlockAccess world, int x, int y, int z, ForgeDirection side);
/**
* This function returns metadata of the block that is being shown on a given side.
*
* @param world
* Reference to the world.
* @param x
* X coordinate of the block.
* @param y
* Y coordinate of the block.
* @param z
* Z coordinate of the block.
* @param side
* The side of the block.
*/
public int getVisualMeta(IBlockAccess world, int x, int y, int z, ForgeDirection side);
/**
* This function returns whether the block's renderer will visually connect to other blocks implementing IBlockAppearance.
*/
public boolean supportsVisualConnections();
}