Search in sources :

Example 51 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project ImmersiveEngineering by BluSunrize.

the class IESounds method registerSound.

private static SoundEvent registerSound(String name) {
    ResourceLocation location = new ResourceLocation(ImmersiveEngineering.MODID, name);
    SoundEvent event = new SoundEvent(location);
    registeredEvents.add(event.setRegistryName(location));
    return event;
}
Also used : SoundEvent(net.minecraft.util.SoundEvent) ResourceLocation(net.minecraft.util.ResourceLocation)

Example 52 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project ImmersiveEngineering by BluSunrize.

the class IEPotions method init.

public static void init() {
    flammable = new IEPotion(new ResourceLocation("ie.flammable"), true, 0x8f3f1f, 0, false, 0, true, true).setPotionName("immersiveengineering.potion.flammable");
    slippery = new IEPotion(new ResourceLocation("ie.slippery"), true, 0x171003, 0, false, 1, true, true).setPotionName("immersiveengineering.potion.slippery");
    conductive = new IEPotion(new ResourceLocation("ie.conductive"), true, 0x690000, 0, false, 2, true, true).setPotionName("immersiveengineering.potion.conductive");
    sticky = new IEPotion(new ResourceLocation("ie.sticky"), true, 0x9c6800, 0, false, 3, true, true).setPotionName("immersiveengineering.potion.sticky").registerPotionAttributeModifier(SharedMonsterAttributes.MOVEMENT_SPEED, Utils.generateNewUUID().toString(), -0.50000000298023224D, 2);
    stunned = new IEPotion(new ResourceLocation("ie.stunned"), true, 0x624a98, 0, false, 4, true, true).setPotionName("immersiveengineering.potion.stunned");
    concreteFeet = new IEPotion(new ResourceLocation("ie.concreteFeet"), true, 0x624a98, 0, false, 5, true, true).setPotionName("immersiveengineering.potion.concreteFeet").registerPotionAttributeModifier(SharedMonsterAttributes.MOVEMENT_SPEED, Utils.generateNewUUID().toString(), -2D, 2);
    IEApi.potions = new Potion[] { flammable, slippery, conductive, sticky, stunned, concreteFeet };
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation)

Example 53 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project RFToolsDimensions by McJty.

the class ModCrafting method initCosmeticRecipes.

private static void initCosmeticRecipes() {
    Item dimensionalShard = ForgeRegistries.ITEMS.getValue(new ResourceLocation("rftools", "dimensional_shard"));
    ItemStack inkSac = new ItemStack(Items.DYE, 1, 0);
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalBlankBlock, 8), "bbb", "b*b", "bbb", 'b', Blocks.STONE, '*', dimensionalShard);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.dimensionalBlock), new ItemStack(ModBlocks.dimensionalBlankBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalSmallBlocks, 4), "bb ", "bb ", "   ", 'b', ModBlocks.dimensionalBlankBlock);
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalCrossBlock, 5), " b ", "bbb", " b ", 'b', ModBlocks.dimensionalBlankBlock);
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalCross2Block, 5), "b b", " b ", "b b", 'b', ModBlocks.dimensionalBlankBlock);
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalPattern1Block, 7), "bxb", "bbb", "bxb", 'b', ModBlocks.dimensionalBlankBlock, 'x', inkSac);
    ItemStack bonemealStack = new ItemStack(Items.DYE, 1, 15);
    GameRegistry.addRecipe(new ItemStack(ModBlocks.dimensionalPattern2Block, 7), "bxb", "bbb", "bxb", 'b', ModBlocks.dimensionalBlankBlock, 'x', bonemealStack);
}
Also used : Item(net.minecraft.item.Item) ResourceLocation(net.minecraft.util.ResourceLocation) ItemStack(net.minecraft.item.ItemStack)

Example 54 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project RFToolsDimensions by McJty.

the class ModCrafting method initAbsorberRecipes.

private static void initAbsorberRecipes() {
    Block machineFrame = ForgeRegistries.BLOCKS.getValue(new ResourceLocation("rftools", "machine_frame"));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.featureAbsorberBlock), "dws", "wMw", "swd", 'M', machineFrame, 'd', Items.DIAMOND, 's', Items.EMERALD, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.featureAbsorberBlock), new ItemStack(ModBlocks.featureAbsorberBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.terrainAbsorberBlock), "dws", "wMw", "swd", 'M', machineFrame, 'd', Blocks.STONE, 's', Blocks.DIRT, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.terrainAbsorberBlock), new ItemStack(ModBlocks.terrainAbsorberBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.biomeAbsorberBlock), "dws", "wMw", "swd", 'M', machineFrame, 'd', Blocks.DIRT, 's', Blocks.SAPLING, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.biomeAbsorberBlock), new ItemStack(ModBlocks.biomeAbsorberBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.materialAbsorberBlock), "dwc", "wMw", "swg", 'M', machineFrame, 'd', Blocks.DIRT, 'c', Blocks.COBBLESTONE, 's', Blocks.SAND, 'g', Blocks.GRAVEL, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.materialAbsorberBlock), new ItemStack(ModBlocks.materialAbsorberBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.liquidAbsorberBlock), "bwb", "wMw", "bwb", 'M', machineFrame, 'b', Items.BUCKET, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.liquidAbsorberBlock), new ItemStack(ModBlocks.liquidAbsorberBlock));
    GameRegistry.addRecipe(new ItemStack(ModBlocks.timeAbsorberBlock), "cwc", "wMw", "cwc", 'M', machineFrame, 'c', Items.CLOCK, 'w', Blocks.WOOL);
    GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.timeAbsorberBlock), new ItemStack(ModBlocks.timeAbsorberBlock));
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) Block(net.minecraft.block.Block) ItemStack(net.minecraft.item.ItemStack)

Example 55 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project RFToolsDimensions by McJty.

the class ModCrafting method init.

public static void init() {
    initDimletRecipes();
    initMachineRecipes();
    initCosmeticRecipes();
    initAbsorberRecipes();
    initEssenceRecipes();
    Item dimensionalShard = ForgeRegistries.ITEMS.getValue(new ResourceLocation("rftools", "dimensional_shard"));
    GameRegistry.addRecipe(new ItemStack(ModItems.emptyDimensionTabItem), "prp", "rpr", "prp", 'p', Items.PAPER, 'r', Items.REDSTONE);
    GameRegistry.addRecipe(new ItemStack(ModItems.dimletTemplateItem), "sss", "sps", "sss", 's', dimensionalShard, 'p', Items.PAPER);
    GameRegistry.addRecipe(new ItemStack(ModItems.rfToolsDimensionManualItem), "r r", " b ", "r r", 'r', Items.REDSTONE, 'b', Items.BOOK);
    GameRegistry.addRecipe(new ItemStack(ModItems.dimensionMonitorItem), " u ", "rCr", " r ", 'u', dimensionalShard, 'r', Items.REDSTONE, 'C', Items.COMPARATOR);
    GameRegistry.addRecipe(new ItemStack(ModItems.phasedFieldGeneratorItem), "rsr", "sEs", "rsr", 'E', Items.ENDER_EYE, 'r', Items.REDSTONE, 's', dimensionalShard);
    ItemStack inkSac = new ItemStack(Items.DYE, 1, 0);
    GameRegistry.addRecipe(new ItemStack(ModItems.dimensionModuleItem), " c ", "rir", " b ", 'c', Items.ENDER_PEARL, 'r', Items.REDSTONE, 'i', Items.IRON_INGOT, 'b', inkSac);
}
Also used : Item(net.minecraft.item.Item) ResourceLocation(net.minecraft.util.ResourceLocation) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ResourceLocation (net.minecraft.util.ResourceLocation)272 ItemStack (net.minecraft.item.ItemStack)51 Block (net.minecraft.block.Block)47 Item (net.minecraft.item.Item)32 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)31 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)30 IBlockState (net.minecraft.block.state.IBlockState)17 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)15 ArrayList (java.util.ArrayList)14 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)14 Map (java.util.Map)11 EntityPlayer (net.minecraft.entity.player.EntityPlayer)11 ShaderLayer (blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer)10 IOException (java.io.IOException)10 TileEntity (net.minecraft.tileentity.TileEntity)9 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)8 EnumFacing (net.minecraft.util.EnumFacing)8 BlockPos (net.minecraft.util.math.BlockPos)8 Random (java.util.Random)7 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)7