Recipe instance
This commit is contained in:
parent
98b714827a
commit
911fa8ee6d
9 changed files with 33 additions and 28 deletions
|
@ -4,17 +4,16 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import ru.betterend.registry.BlockRegistry;
|
||||
|
||||
public class CraftingRecipes {
|
||||
public static void register() {
|
||||
if (blockExists(BlockRegistry.ENDER_BLOCK)) {
|
||||
new RecipeBuilder("be_ender_pearl_to_block", BlockRegistry.ENDER_BLOCK)
|
||||
RecipeBuilder.make("be_ender_pearl_to_block", BlockRegistry.ENDER_BLOCK)
|
||||
.setShape(new String[] { "OO", "OO" })
|
||||
.addMaterial('O', Items.ENDER_PEARL)
|
||||
.build();
|
||||
new RecipeBuilder("be_ender_block_to_pearl", Items.ENDER_PEARL)
|
||||
RecipeBuilder.make("be_ender_block_to_pearl", Items.ENDER_PEARL)
|
||||
.addMaterial('#', BlockRegistry.ENDER_BLOCK)
|
||||
.setOutputCount(4)
|
||||
.setList("#")
|
||||
|
@ -22,12 +21,12 @@ public class CraftingRecipes {
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean itemExists(Item item)
|
||||
protected static boolean itemExists(Item item)
|
||||
{
|
||||
return Registry.ITEM.getId(item) != Registry.ITEM.getDefaultId();
|
||||
}
|
||||
|
||||
private static boolean blockExists(Block block)
|
||||
protected static boolean blockExists(Block block)
|
||||
{
|
||||
return Registry.BLOCK.getId(block) != Registry.BLOCK.getDefaultId();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue