Moved sources and reverted mappings

This commit is contained in:
Johann Bernhardt committed 2021-11-22 09:55:45 +01:00
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);
}
}