23 lines
731 B
Java
23 lines
731 B
Java
package openonyx.utilities;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemBlock;
|
|
import net.minecraft.item.ItemStack;
|
|
import openonyx.core.MinecraftAccess;
|
|
|
|
public class BlockItemUtils implements MinecraftAccess {
|
|
public static Block L(ItemStack itemStack) {
|
|
ItemStack itemStack1 = itemStack;
|
|
ItemBlock itemBlock;
|
|
Item item;
|
|
return itemStack1 != null && (item = itemStack1.getItem()) instanceof ItemBlock ? (itemBlock = (ItemBlock)item).getBlock() : null;
|
|
}
|
|
|
|
public static boolean L(ItemStack itemStack) {
|
|
ItemStack itemStack1 = itemStack;
|
|
Block block;
|
|
return (block = L(itemStack1)) == null ? false : block.isFullCube();
|
|
}
|
|
}
|