use of gregtech.api.unification.material.properties.FluidPipeProperties in project GregTech by GregTechCEu.
the class CommonProxy method registerBlocks.
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
GTLog.logger.info("Registering Blocks...");
IForgeRegistry<Block> registry = event.getRegistry();
registry.register(MACHINE);
StoneType.init();
for (Material material : GregTechAPI.MATERIAL_REGISTRY) {
if (material.hasProperty(PropertyKey.ORE)) {
createOreBlock(material);
}
if (material.hasProperty(PropertyKey.WIRE)) {
for (BlockCable cable : CABLES) {
if (!cable.getItemPipeType(null).isCable() || !material.getProperty(PropertyKey.WIRE).isSuperconductor())
cable.addCableMaterial(material, material.getProperty(PropertyKey.WIRE));
}
}
if (material.hasProperty(PropertyKey.FLUID_PIPE)) {
for (BlockFluidPipe pipe : FLUID_PIPES) {
if (!pipe.getItemPipeType(pipe.getItem(material)).getOrePrefix().isIgnored(material)) {
pipe.addPipeMaterial(material, material.getProperty(PropertyKey.FLUID_PIPE));
}
}
}
if (material.hasProperty(PropertyKey.ITEM_PIPE)) {
for (BlockItemPipe pipe : ITEM_PIPES) {
if (!pipe.getItemPipeType(pipe.getItem(material)).getOrePrefix().isIgnored(material)) {
pipe.addPipeMaterial(material, material.getProperty(PropertyKey.ITEM_PIPE));
}
}
}
}
for (BlockFluidPipe pipe : FLUID_PIPES) {
if (!pipe.getItemPipeType(pipe.getItem(Materials.Wood)).getOrePrefix().isIgnored(Materials.Wood) || !pipe.getItemPipeType(pipe.getItem(Materials.TreatedWood)).getOrePrefix().isIgnored(Materials.TreatedWood)) {
pipe.addPipeMaterial(Materials.Wood, new FluidPipeProperties(310, 5, false));
pipe.addPipeMaterial(Materials.TreatedWood, new FluidPipeProperties(310, 8, false));
}
}
for (BlockCable cable : CABLES) registry.register(cable);
for (BlockFluidPipe pipe : FLUID_PIPES) registry.register(pipe);
for (BlockItemPipe pipe : ITEM_PIPES) registry.register(pipe);
registry.register(HERMETIC_CASING);
registry.register(FOAM);
registry.register(REINFORCED_FOAM);
registry.register(PETRIFIED_FOAM);
registry.register(REINFORCED_PETRIFIED_FOAM);
registry.register(BOILER_CASING);
registry.register(BOILER_FIREBOX_CASING);
registry.register(METAL_CASING);
registry.register(TURBINE_CASING);
registry.register(MACHINE_CASING);
registry.register(STEAM_CASING);
registry.register(MULTIBLOCK_CASING);
registry.register(TRANSPARENT_CASING);
registry.register(WIRE_COIL);
registry.register(FUSION_CASING);
registry.register(WARNING_SIGN);
registry.register(ASPHALT);
registry.register(STONE_SMOOTH);
registry.register(STONE_COBBLE);
registry.register(STONE_COBBLE_MOSSY);
registry.register(STONE_POLISHED);
registry.register(STONE_BRICKS);
registry.register(STONE_BRICKS_CRACKED);
registry.register(STONE_BRICKS_MOSSY);
registry.register(STONE_CHISELED);
registry.register(STONE_TILED);
registry.register(STONE_TILED_SMALL);
registry.register(STONE_BRICKS_SMALL);
registry.register(STONE_WINDMILL_A);
registry.register(STONE_WINDMILL_B);
registry.register(STONE_BRICKS_SQUARE);
registry.register(RUBBER_LOG);
registry.register(RUBBER_LEAVES);
registry.register(RUBBER_SAPLING);
registry.register(PLANKS);
COMPRESSED.values().stream().distinct().forEach(registry::register);
FRAMES.values().stream().distinct().forEach(registry::register);
SURFACE_ROCK.values().stream().distinct().forEach(registry::register);
ORES.forEach(registry::register);
}
use of gregtech.api.unification.material.properties.FluidPipeProperties in project GregTech by GregTechCEu.
the class ItemBlockFluidPipe method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(@Nonnull ItemStack stack, @Nullable World worldIn, List<String> tooltip, @Nonnull ITooltipFlag flagIn) {
FluidPipeProperties pipeProperties = blockPipe.createItemProperties(stack);
tooltip.add(I18n.format("gregtech.fluid_pipe.throughput", pipeProperties.getThroughput() * 20));
tooltip.add(I18n.format("gregtech.fluid_pipe.max_temperature", pipeProperties.getMaxFluidTemperature()));
if (!pipeProperties.isGasProof())
tooltip.add(I18n.format("gregtech.fluid_pipe.non_gas_proof"));
if (pipeProperties.getTanks() > 1)
tooltip.add(I18n.format("gregtech.fluid_pipe.channels", pipeProperties.getTanks()));
if (flagIn.isAdvanced()) {
tooltip.add("MetaItem Id: " + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getPrefix().name + ((BlockMaterialPipe<?, ?, ?>) blockPipe).getItemMaterial(stack).toCamelCaseString());
}
}
Aggregations