mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Update CoFH API, implement IBlockAppearance
This commit is contained in:
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();
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user