Java Code Examples for net.minecraft.init.Items#glowstone_dust()

The following examples show how to use net.minecraft.init.Items#glowstone_dust() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FireworkRecipeHandler.java    From NotEnoughItems with MIT License 6 votes vote down vote up
private void loadAllFireworks() {
    //charges
    Item[] shapes = new Item[]{null, Items.fire_charge, Items.gold_nugget, Items.feather, Items.skull};
    Item[] effects = new Item[]{null, Items.diamond, Items.glowstone_dust};
    for (Item shape : shapes)
        for (Item effect : effects)
            genRecipe(Items.gunpowder, shape, effect, Items.dye, Items.dye, 0);

    //fireworks
    genRecipe(Items.gunpowder, Items.paper, Items.firework_charge, 2);
    genRecipe(Items.gunpowder, Items.gunpowder, Items.paper, Items.firework_charge, 2);
    genRecipe(Items.gunpowder, Items.gunpowder, Items.gunpowder, Items.paper, Items.firework_charge, 2);

    //setup a valid charge to use for the recolour recipe
    for (int i = 0; i < 9; i++)
        inventoryCrafting.setInventorySlotContents(i, null);
    inventoryCrafting.setInventorySlotContents(0, new ItemStack(Items.gunpowder));
    inventoryCrafting.setInventorySlotContents(1, new ItemStack(Items.dye));
    recipeFireworks.matches(inventoryCrafting, null);
    ItemStack charge = recipeFireworks.getCraftingResult(null);
    genRecipe(charge, Items.dye, Items.dye, 1);
}
 
Example 2
Source File: TileTranslocator.java    From Translocators with MIT License 5 votes vote down vote up
public boolean activate(EntityPlayer player, int subPart)
{
    ItemStack held = player.inventory.getCurrentItem();
    if(held == null && player.isSneaking())
    {
        stripModifiers();
        markUpdate();
    }
    else if(held == null)
    {
        if(subPart == 1)
            invert_redstone = !invert_redstone;
        else
            openGui(player);
    }
    else if(held.getItem() == Items.redstone && !redstone)
    {
        redstone = true;
        if(!player.capabilities.isCreativeMode)
            held.stackSize--;
        
        if((gettingPowered() != invert_redstone) != a_eject)
            invert_redstone = !invert_redstone;
        markUpdate();
    }
    else if(held.getItem() == Items.glowstone_dust && !fast)
    {
        fast = true;
        if(!player.capabilities.isCreativeMode)
            held.stackSize--;
        markUpdate();
    }
    else
        openGui(player);
    
    return true;
}
 
Example 3
Source File: BlockCarvableGlowstone.java    From Chisel-2 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Item getItemDropped(int i, Random random, int a) {
	return Items.glowstone_dust;
}
 
Example 4
Source File: VanillaLanternSource.java    From GardenCollection with MIT License 4 votes vote down vote up
public GlowstoneSource () {
    super(new LanternSourceInfo("glowstone", Items.glowstone_dust, Blocks.glowstone.getLightValue()));
}
 
Example 5
Source File: BlockLightstoneCarvable.java    From Chisel with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Item getItemDropped(int i, Random random, int a)
{
    return Items.glowstone_dust;
}