mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-28 07:35:44 +00:00
Moved sources and reverted mappings
This commit is contained in:
1 parent
eca0729231
commit
12a0722e28
106 files changed
+29
-29
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package mantle.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
|
||||
public class BlockUtils
|
||||
{
|
||||
public static Block getBlockFromItem (Item item)
|
||||
{
|
||||
return Block.getBlockFromItem(item);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static Block getBlockFromItemStack (ItemStack itemStack)
|
||||
{
|
||||
return getBlockFromItem(itemStack.getItem());
|
||||
}
|
||||
|
||||
public static String getUniqueName (Block block)
|
||||
{
|
||||
return GameData.getBlockRegistry().getNameForObject(block);
|
||||
}
|
||||
|
||||
public static Block getBlockFromUniqueName (String uniqueName)
|
||||
{
|
||||
return GameData.getBlockRegistry().getObject(uniqueName);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user