Search in sources :

Example 1 with StoneTypes

use of gregtech.api.unification.ore.StoneTypes in project GregTech by GregTechCE.

the class MetaBlocks method createOreBlock.

private static void createOreBlock(DustMaterial material, StoneType[] stoneTypes, int index) {
    BlockOre block = new BlockOre(material, stoneTypes);
    block.setRegistryName("ore_" + material + "_" + index);
    for (StoneType stoneType : stoneTypes) {
        GregTechAPI.oreBlockTable.computeIfAbsent(material, m -> new HashMap<>()).put(stoneType, block);
    }
    ORES.add(block);
}
Also used : java.util(java.util) GraniteVariant(gregtech.common.blocks.BlockGranite.GraniteVariant) Item(net.minecraft.item.Item) MetaTileEntities(gregtech.common.metatileentities.MetaTileEntities) MetaTileEntityRenderer(gregtech.api.render.MetaTileEntityRenderer) Materials(gregtech.api.unification.material.Materials) StoneType(gregtech.api.unification.ore.StoneType) Material(gregtech.api.unification.material.type.Material) ModelResourceLocation(net.minecraft.client.renderer.block.model.ModelResourceLocation) StoneTypes(gregtech.api.unification.ore.StoneTypes) IProperty(net.minecraft.block.properties.IProperty) GregTechAPI(gregtech.api.GregTechAPI) Block(net.minecraft.block.Block) Minecraft(net.minecraft.client.Minecraft) Side(net.minecraftforge.fml.relauncher.Side) ChiselingVariant(gregtech.common.blocks.StoneBlock.ChiselingVariant) OrePrefix(gregtech.api.unification.ore.OrePrefix) ModelLoader(net.minecraftforge.client.model.ModelLoader) SideOnly(net.minecraftforge.fml.relauncher.SideOnly) DefaultStateMapper(net.minecraft.client.renderer.block.statemap.DefaultStateMapper) ClientProxy(gregtech.common.ClientProxy) Streams(com.google.common.collect.Streams) Collectors(java.util.stream.Collectors) IBlockState(net.minecraft.block.state.IBlockState) DustMaterial(gregtech.api.unification.material.type.DustMaterial) MineralVariant(gregtech.common.blocks.BlockMineral.MineralVariant) BlockMachine(gregtech.api.block.machines.BlockMachine) StoneType(gregtech.api.unification.ore.StoneType)

Aggregations

Streams (com.google.common.collect.Streams)1 GregTechAPI (gregtech.api.GregTechAPI)1 BlockMachine (gregtech.api.block.machines.BlockMachine)1 MetaTileEntityRenderer (gregtech.api.render.MetaTileEntityRenderer)1 Materials (gregtech.api.unification.material.Materials)1 DustMaterial (gregtech.api.unification.material.type.DustMaterial)1 Material (gregtech.api.unification.material.type.Material)1 OrePrefix (gregtech.api.unification.ore.OrePrefix)1 StoneType (gregtech.api.unification.ore.StoneType)1 StoneTypes (gregtech.api.unification.ore.StoneTypes)1 ClientProxy (gregtech.common.ClientProxy)1 GraniteVariant (gregtech.common.blocks.BlockGranite.GraniteVariant)1 MineralVariant (gregtech.common.blocks.BlockMineral.MineralVariant)1 ChiselingVariant (gregtech.common.blocks.StoneBlock.ChiselingVariant)1 MetaTileEntities (gregtech.common.metatileentities.MetaTileEntities)1 java.util (java.util)1 Collectors (java.util.stream.Collectors)1 Block (net.minecraft.block.Block)1 IProperty (net.minecraft.block.properties.IProperty)1 IBlockState (net.minecraft.block.state.IBlockState)1