Refactor ICarvable to receive world and pos references. Closes #147.

This commit is contained in:
tterrag1098 committed 2015-01-15 13:09:34 -05:00
1 parent 2658e099a3
commit 1292a68d8d
19 files changed
+163 -81

No files matched your search

@@ -1,5 +1,8 @@
package com.cricketcraft.chisel.api;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import com.cricketcraft.chisel.carving.CarvableHelper;
import com.cricketcraft.chisel.carving.CarvableVariation;
@@ -12,6 +15,26 @@ public interface ICarvable {
*
* @param metadata
* The metadata of the block
* @param world
* {@link IBlockAccess} object, usually a world. Use of {@link IBlockAccess} Is necessary due to this method's use in rendering.
* @param x
* X coord of the block
* @param y
* Y coord of the block
* @param z
* Z coord of the block
* @param metadata
* The metadata of the block
* @return The {@link CarvableVariation} that represents this block in the world.
*/
public CarvableVariation getVariation(int metadata);
public CarvableVariation getVariation(IBlockAccess world, int x, int y, int z, int metadata);
/**
* Gets the {@link CarvableVariation} for this block when it is in item form.
*
* @param stack
* The {@link ItemStack} representing this block;
* @return A {@link CarvableVariation}
*/
public CarvableVariation getVariation(ItemStack stack);
}