Codota Logo
BlockFluidBase
Code IndexAdd Codota to your IDE (free)

How to use
BlockFluidBase
in
net.minecraftforge.fluids

Best Java code snippets using net.minecraftforge.fluids.BlockFluidBase (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: squeek502/VeganOption

public static int getStillFluidLevel(Block block)
{
  return block instanceof BlockFluidBase ? ((BlockFluidBase) block).getMaxRenderHeightMeta() : 0;
}
origin: GregTechCE/GregTech

public static void initPotionFluids() {
  MinecraftForge.EVENT_BUS.register(new PotionFluids());
  for(ResourceLocation registryName : ForgeRegistries.POTION_TYPES.getKeys()) {
    if(registryName.getResourceDomain().equals("minecraft") &&
      registryName.getResourcePath().equals("empty")) continue;
    PotionType potion = ForgeRegistries.POTION_TYPES.getValue(registryName);
    Preconditions.checkNotNull(potion);
    Fluid potionFluid;
    if(potion != PotionTypes.WATER) {
      String fluidName = String.format("potion.%s.%s", registryName.getResourceDomain(), registryName.getResourcePath());
      potionFluid = new Fluid(fluidName, AUTO_GENERATED_FLUID_TEXTURE, AUTO_GENERATED_FLUID_TEXTURE) {
        @Override
        public String getUnlocalizedName() {
          return potion.getNamePrefixed("potion.effect.");
        }
      };
      potionFluid.setColor(GTUtility.convertRGBtoOpaqueRGBA_MC(PotionUtils.getPotionColor(potion)));
      FluidRegistry.registerFluid(potionFluid);
      FluidRegistry.addBucketForFluid(potionFluid);
      BlockFluidBase fluidBlock = new BlockPotionFluid(potionFluid, potion);
      fluidBlock.setRegistryName("fluid." + fluidName);
      MetaBlocks.FLUID_BLOCKS.add(fluidBlock);
    } else {
      potionFluid = FluidRegistry.WATER;
    }
    potionFluidMap.put(potion.getRegistryName(), potionFluid);
  }
}
origin: TerraFirmaCraft/TerraFirmaCraft

@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void registerColorHandlerBlocks(ColorHandlerEvent.Block event)
{
  BlockColors blockcolors = event.getBlockColors();
  blockcolors.registerBlockColorHandler((state, worldIn, pos, tintIndex) ->
      worldIn != null && pos != null ? BiomeColorHelper.getGrassColorAtPos(worldIn, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D),
    BlocksTFC.getAllBlockRockVariants().stream().filter(x -> x.type.isGrass).toArray(BlockRockVariant[]::new));
  blockcolors.registerBlockColorHandler((state, worldIn, pos, tintIndex) -> BlockFarmlandTFC.TINT[state.getValue(BlockFarmlandTFC.MOISTURE)],
    BlocksTFC.getAllBlockRockVariants().stream().filter(x -> x.type == Rock.Type.FARMLAND).toArray(BlockRockVariant[]::new));
  blockcolors.registerBlockColorHandler((state, worldIn, pos, tintIndex) ->
      worldIn != null && pos != null ? BiomeColorHelper.getGrassColorAtPos(worldIn, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D),
    BlocksTFC.PEAT_GRASS);
  blockcolors.registerBlockColorHandler((state, worldIn, pos, tintIndex) ->
      worldIn != null && pos != null ? BiomeColorHelper.getWaterColorAtPos(worldIn, pos) : 0,
    BlocksTFC.getAllFluidBlocks().stream().filter(x -> x.getDefaultState().getMaterial() == Material.WATER).toArray(BlockFluidBase[]::new));
  blockcolors.registerBlockColorHandler((state, worldIn, pos, tintIndex) ->
      worldIn != null && pos != null ? BiomeColorHelper.getFoliageColorAtPos(worldIn, pos) : ColorizerFoliage.getFoliageColorBasic(),
    BlocksTFC.getAllLeafBlocks().toArray(new Block[0]));
}
origin: sinkillerj/ProjectE

event.getToolTip().add("Fluid: " + ((BlockFluidBase) currentBlock).getFluid().getName());
origin: GregTechCE/GregTech

fluidBlock.setRegistryName("fluid." + materialName);
MetaBlocks.FLUID_BLOCKS.add(fluidBlock);
net.minecraftforge.fluidsBlockFluidBase

Most used methods

  • getDefaultState
  • getFluid
  • getMaxRenderHeightMeta
  • setRegistryName

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now