Java Code Examples for net.minecraft.block.material.MapColor#grayColor()

The following examples show how to use net.minecraft.block.material.MapColor#grayColor() . 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: 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 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;
	}
}