mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 19:49:12 +00:00
Clean up in Carving API, add support for new API classes in Carving
This commit is contained in:
1 parent
f0e11d8eee
commit
a110c4e8ef
7 files changed
+53
-38
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package com.cricketcraft.chisel.api.carving;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class CarvingUtils {
|
||||
|
||||
/**
|
||||
@@ -14,4 +16,15 @@ public class CarvingUtils {
|
||||
public static int compare(ICarvingVariation v1, ICarvingVariation v2) {
|
||||
return v1.getOrder() - v2.getOrder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an {@link ItemStack} representing the passed {@link ICarvingVariation}.
|
||||
*
|
||||
* @param variation
|
||||
* An {@link ICarvingVariation}
|
||||
* @return An {@link ItemStack}
|
||||
*/
|
||||
public static ItemStack getStack(ICarvingVariation variation) {
|
||||
return new ItemStack(variation.getBlock(), 1, variation.getItemMeta());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user