net.minecraft.block.material.MapColor Java Examples

The following examples show how to use net.minecraft.block.material.MapColor. 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: BlockTofuGemOre.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public BlockTofuGemOre() {
    super(MapColor.CLOTH);

    this.setCreativeTab(CommonProxy.tab);
    this.setHardness(3.0F);
    this.setResistance(5.0F);
    this.setHarvestLevel("pickaxe", 1);
    this.setSoundType(SoundType.STONE);
}
 
Example #2
Source File: FWBlock.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static Material getMcMaterial(BlockFactory factory) {
	Block dummy = factory.build();
	if (dummy.components.has(BlockProperty.Opacity.class) || dummy.components.has(BlockProperty.Replaceable.class)) {
		// TODO allow color selection
		return new ProxyMaterial(MapColor.grayColor,
			dummy.components.getOp(BlockProperty.Opacity.class),
			dummy.components.getOp(BlockProperty.Replaceable.class));
	} else {
		return Material.piston;
	}
}
 
Example #3
Source File: FWBlock.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static Material getMcMaterial(Block dummy) {
	if (dummy.components.has(BlockProperty.Opacity.class) || dummy.components.has(BlockProperty.Replaceable.class)) {
		// TODO allow color selection
		return new ProxyMaterial(MapColor.GRAY,
			dummy.components.getOp(BlockProperty.Opacity.class),
			dummy.components.getOp(BlockProperty.Replaceable.class));
	} else {
		return Material.PISTON;
	}
}
 
Example #4
Source File: FWBlock.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static Material getMcMaterial(BlockFactory factory) {
	Block dummy = factory.build();
	if (dummy.components.has(BlockProperty.Opacity.class) || dummy.components.has(BlockProperty.Replaceable.class)) {
		// TODO allow color selection
		return new ProxyMaterial(MapColor.grayColor,
			dummy.components.getOp(BlockProperty.Opacity.class),
			dummy.components.getOp(BlockProperty.Replaceable.class));
	} else {
		return Material.piston;
	}
}
 
Example #5
Source File: BlockCrystal.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
private EnumCrystal(int meta, int color, String name, MapColor mapColorIn)
{
	this.color = color;
    this.meta = meta;
    this.name = name;
    this.mapColor = mapColorIn;
}
 
Example #6
Source File: MapColorDeserializerTests.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
@Test
public void test_noArray()
{
    Map<String, MapColor> map = gson.fromJson("{ \"color\": \"light_blue\" }", new TypeToken<Map<String, MapColor>>() {}.getType());

    MapColor color = map.get("color");
    assertNotNull(color);
    assertSame(MapColor.LIGHT_BLUE, color);
}
 
Example #7
Source File: BlockSlab.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
public BlockSlab(Material material, ContentBlockSlab content)
{
    super(material, MapColor.AIR); // that map color is being overridden

    this.content = content;
    mapper = StateMetaMapper.create(Collections.singleton(HALF));

    useNeighborBrightness = true;
}
 
Example #8
Source File: BlockFenceGate.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
public BlockFenceGate(Material material, ContentBlockFenceGate content)
{
    super(material, MapColor.AIR);
    this.content = content;

    setDefaultState(this.blockState.getBaseState()
                                   .withProperty(OPEN, Boolean.FALSE)
                                   .withProperty(POWERED, Boolean.FALSE)
                                   .withProperty(IN_WALL, Boolean.FALSE));
    setCreativeTab(CreativeTabs.REDSTONE);
}
 
Example #9
Source File: BlockCarpet.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
public BlockCarpet(Material material, ContentBlockCarpet content)
{
    super(material, MapColor.AIR);

    this.content = content;

    setTickRandomly(true);
}
 
Example #10
Source File: BlockAlienPlank.java    From AdvancedRocketry with MIT License 5 votes vote down vote up
private EnumType(int metaIn, String nameIn, String unlocalizedNameIn, MapColor mapColorIn)
{
    this.meta = metaIn;
    this.name = nameIn;
    this.unlocalizedName = unlocalizedNameIn;
    this.mapColor = mapColorIn;
}
 
Example #11
Source File: BlockTraverseWoodFence.java    From Traverse-Legacy-1-12-2 with MIT License 5 votes vote down vote up
public BlockTraverseWoodFence(String name) {
    super(Material.WOOD, MapColor.WOOD);
    setRegistryName(new ResourceLocation(TraverseConstants.MOD_ID, name + "_fence"));
    setUnlocalizedName(getRegistryName().toString());
    setCreativeTab(TraverseTab.TAB);
    setSoundType(SoundType.WOOD);
    setHardness(2.0F);
    setResistance(5.0F);
    ShootingStar.registerModel(new ModelCompound(TraverseConstants.MOD_ID, this, "fence"));
}
 
Example #12
Source File: BlockTofuOreDiamond.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public BlockTofuOreDiamond() {
    super(MapColor.CLOTH);

    this.setCreativeTab(CommonProxy.tab);
    this.setHardness(0.8F);
    this.setResistance(4.0F);
    this.setHarvestLevel("shovel", 2);
    this.setSoundType(SoundType.CLOTH);
}
 
Example #13
Source File: BlockTofuFarmLand.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public BlockTofuFarmLand()
{
    super(Material.GROUND, MapColor.SNOW);
    this.setSoundType(SoundType.CLOTH);
    this.setHardness(0.35F);
    this.setResistance(1.0F);
    this.setHarvestLevel("shovel", 0);
    this.setDefaultState(this.blockState.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)));
    this.setTickRandomly(true);
    this.setLightOpacity(255);
}
 
Example #14
Source File: BlockBambooLantern.java    From Sakura_mod with MIT License 5 votes vote down vote up
public BlockBambooLantern() {
    super(Material.CIRCUITS, MapColor.GREEN);
    this.setTickRandomly(true);
    this.setCreativeTab(CommonProxy.tab);
    this.setHardness(1.0F);
    this.setResistance(5.0F);
    this.setLightLevel(0.9F);
}
 
Example #15
Source File: BlockTraverseWoodFence.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
public BlockTraverseWoodFence(String name) {
    super(Material.WOOD, MapColor.WOOD);
    setRegistryName(new ResourceLocation(TraverseConstants.MOD_ID, name + "_fence"));
    setTranslationKey(getRegistryName().toString());
    setCreativeTab(TraverseTab.TAB);
    setSoundType(SoundType.WOOD);
    setHardness(2.0F);
    setResistance(5.0F);
    ShootingStar.registerModel(new ModelCompound(TraverseConstants.MOD_ID, this, "fence"));
}
 
Example #16
Source File: BlockFluidEtchingAcid.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
public BlockFluidEtchingAcid(){
    super(Fluids.etchingAcid, new MaterialLiquid(MapColor.waterColor){
        @Override
        public int getMaterialMobility(){
            return 1;
        }
    });
    setBlockName("etchingAcid");
}
 
Example #17
Source File: ArchimedesShipMod.java    From archimedes-ships with MIT License 5 votes vote down vote up
private void createBlocksAndItems()
{
	materialFloater = new Material(MapColor.clothColor);
	
	blockMarkShip = (BlockHelm) new BlockHelm().setCreativeTab(CreativeTabs.tabTransport);
	blockMarkShip.setStepSound(Block.soundTypeWood).setHardness(1F).setResistance(1F);
	registerBlock("marker", blockMarkShip);
	
	blockFloater = new BlockAS(materialFloater).setCreativeTab(CreativeTabs.tabTransport);
	blockFloater.setStepSound(Block.soundTypeWood).setHardness(1F).setResistance(1F);
	registerBlock("floater", blockFloater);
	
	blockBalloon = new BlockColored(Material.cloth).setCreativeTab(CreativeTabs.tabTransport);
	blockBalloon.setStepSound(Block.soundTypeCloth).setHardness(0.35F).setResistance(1F);
	registerBlock("balloon", blockBalloon, ItemCloth.class);
	
	blockGauge = (BlockGauge) new BlockGauge().setCreativeTab(CreativeTabs.tabTransport);
	blockGauge.setStepSound(Block.soundTypeMetal).setHardness(1F).setResistance(1F);
	registerBlock("gauge", blockGauge, ItemGaugeBlock.class);
	
	blockSeat = (BlockSeat) new BlockSeat().setHardness(1F).setResistance(1F).setCreativeTab(CreativeTabs.tabTransport);
	blockSeat.setStepSound(Block.soundTypeCloth);
	registerBlock("seat", blockSeat);
	
	blockBuffer = new BlockAS(Material.cloth).setHardness(1F).setResistance(1F).setCreativeTab(CreativeTabs.tabTransport);
	blockBuffer.setStepSound(Block.soundTypeWood);
	registerBlock("buffer", blockBuffer);
	
	blockEngine = new BlockEngine(Material.iron, 1f, 10).setHardness(2F).setResistance(3F).setCreativeTab(CreativeTabs.tabTransport);
	blockEngine.setStepSound(Block.soundTypeMetal);
	registerBlock("engine", blockEngine);
	
	blockCrateWood = new BlockCrate(Material.wood).setHardness(1f).setResistance(1f).setCreativeTab(CreativeTabs.tabTransport);
	blockCrateWood.setStepSound(Block.soundTypeWood);
	registerBlock("crate_wood", blockCrateWood);
}
 
Example #18
Source File: BlockSakuraDiamondOre.java    From Sakura_mod with MIT License 5 votes vote down vote up
public BlockSakuraDiamondOre() {
    super(MapColor.STONE);

    this.setCreativeTab(CommonProxy.tab);
    this.setHardness(3.0F);
    this.setResistance(5.0F);
    this.setHarvestLevel("pickaxe", 1);
    this.setSoundType(SoundType.STONE);
}
 
Example #19
Source File: BlockPlantBamboo.java    From Sakura_mod with MIT License 5 votes vote down vote up
public BlockPlantBamboo() {
    super(Material.WOOD, MapColor.GREEN);
    this.setTickRandomly(true);
    this.setCreativeTab(CommonProxy.tab);
    this.setHardness(1.0F);
    this.setResistance(4.0F);
}
 
Example #20
Source File: BlockAlienPlank.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
/**
 * Get the MapColor for this Block and the given BlockState
 */
public MapColor getMapColor(IBlockState state)
{
    return ((BlockAlienPlank.EnumType)state.getValue(VARIANT)).getMapColor();
}
 
Example #21
Source File: MetaBlock.java    From minecraft-roguelike with GNU General Public License v3.0 4 votes vote down vote up
@Override
public MapColor getMapColor(IBlockAccess p_185909_1_, BlockPos p_185909_2_) {
	return this.state.getMapColor(p_185909_1_, p_185909_2_);
}
 
Example #22
Source File: SeaLantern.java    From Et-Futurum with The Unlicense 4 votes vote down vote up
@Override
public MapColor getMapColor(int meta) {
	return MapColor.quartzColor;
}
 
Example #23
Source File: MaterialGeode.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public MaterialGeode(MapColor p_i2116_1_) {
	super(p_i2116_1_);
	this.setRequiresTool();
}
 
Example #24
Source File: BlockCrystal.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public MapColor getMapColor()
{
    return this.mapColor;
}
 
Example #25
Source File: BlockPlanetSoil.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
public Block setMapColor(MapColor color) {
	extraMapColor = color;
	return this;
}
 
Example #26
Source File: BlockSmallFire.java    From GardenCollection with MIT License 4 votes vote down vote up
@Override
public MapColor getMapColor (int meta) {
    return MapColor.tntColor;
}
 
Example #27
Source File: BlockAlienPlank.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
private EnumType(int metaIn, String nameIn, MapColor mapColorIn)
{
    this(metaIn, nameIn, nameIn, mapColorIn);
}
 
Example #28
Source File: BlockAlienPlank.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
/**
 * The color which represents this entry on a map.
 */
public MapColor getMapColor()
{
    return this.mapColor;
}
 
Example #29
Source File: ModBlocks.java    From GardenCollection with MIT License 4 votes vote down vote up
public void init () {
    heavyChain = new BlockHeavyChain(makeName("heavyChain"));
    lightChain = new BlockLightChain(makeName("lightChain"));
    largeMountingPlate = new BlockLargeMountingPlate(makeName("largeMountingPlate"));
    latticeMetal = new BlockLatticeMetal(makeName("latticeMetal"));
    latticeWood = new BlockLatticeWood(makeName("latticeWood"));
    rootCover = new BlockRootCover(makeName("rootCover"));
    lantern = new BlockLantern(makeName("lantern"));
    metalBlock = new BlockCompressed(MapColor.blackColor).setBlockName(makeName("metalBlock")).setCreativeTab(ModCreativeTabs.tabGardenCore).setBlockTextureName(GardenStuff.MOD_ID + ":wrought_iron_block").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal);
    stoneBlock = new BlockStoneType(makeName("stoneBlock"));
    fence = new BlockFence(makeName("fence"));
    bloomeryFurnace = new BlockBloomeryFurnace(makeName("bloomeryFurnace"));
    mossBrick = new BlockMossBrick(makeName("mossBrick"));
    candelabra = new BlockCandelabra(makeName("candelabra"));
    hoop = new BlockHoop(makeName("hoop"));

    GameRegistry.registerBlock(heavyChain, ItemHeavyChain.class, "heavy_chain");
    GameRegistry.registerBlock(lightChain, ItemLightChain.class, "light_chain");
    GameRegistry.registerBlock(latticeMetal, ItemLatticeMetal.class, "lattice");
    GameRegistry.registerBlock(latticeWood, ItemLatticeWood.class, "lattice_wood");
    GameRegistry.registerBlock(rootCover, "root_cover");
    GameRegistry.registerBlock(lantern, ItemLantern.class, "lantern");
    GameRegistry.registerBlock(metalBlock, "metal_block");
    GameRegistry.registerBlock(stoneBlock, "stone_block");
    GameRegistry.registerBlock(fence, ItemFence.class, "fence");
    GameRegistry.registerBlock(bloomeryFurnace, "bloomery_furnace");
    GameRegistry.registerBlock(mossBrick, ItemMossBrick.class, "moss_brick");
    GameRegistry.registerBlock(candelabra, ItemCandelabra.class, "candelabra");
    GameRegistry.registerBlock(hoop, "hoop");
    //GameRegistry.registerBlock(largeMountingPlate, "large_mounting_plate");

    GameRegistry.registerTileEntity(TileEntityLatticeMetal.class, ModBlocks.getQualifiedName(latticeMetal));
    GameRegistry.registerTileEntity(TileEntityLatticeWood.class, ModBlocks.getQualifiedName(latticeWood));
    GameRegistry.registerTileEntity(TileEntityLantern.class, ModBlocks.getQualifiedName(lantern));
    GameRegistry.registerTileEntity(TileEntityBloomeryFurnace.class, ModBlocks.getQualifiedName(bloomeryFurnace));
    GameRegistry.registerTileEntity(TileEntityCandelabra.class, ModBlocks.getQualifiedName(candelabra));

    OreDictionary.registerOre("blockWroughtIron", metalBlock);
    OreDictionary.registerOre("blockCharcoal", stoneBlock);

    GameRegistry.registerFuelHandler(stoneBlock);
}
 
Example #30
Source File: BlockMetalBlock.java    From BaseMetals with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public MapColor getMapColor(final IBlockState p_getMapColor_1_) {
       return MapColor.IRON;
   }