Tabnine Logo
BlockFence
Code IndexAdd Tabnine to your IDE (free)

How to use
BlockFence
in
net.minecraft.block

Best Java code snippets using net.minecraft.block.BlockFence (Showing top 10 results out of 315)

origin: ForestryMC/Binnie

@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
  super.breakBlock(world, pos, state);
  world.removeTileEntity(pos);
}
origin: SleepyTrousers/EnderIO

@Override
public int getFireSpreadSpeed(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing face) {
 IBlockState bs = world.getBlockState(pos);
 return bs.getMaterial() == Material.WOOD ? 5 : super.getFireSpreadSpeed(world, pos, face);
}
origin: SleepyTrousers/EnderIO

@Override
public int getFlammability(@Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing face) {
 IBlockState bs = world.getBlockState(pos);
 return bs.getMaterial() == Material.WOOD ? 20 : super.getFlammability(world, pos, face);
}
origin: SleepyTrousers/EnderIO

@Override
public void harvestBlock(@Nonnull World worldIn, @Nonnull EntityPlayer player, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nullable TileEntity te,
  @Nonnull ItemStack stack) {
 super.harvestBlock(worldIn, player, pos, state, te, stack);
 super.removedByPlayer(state, worldIn, pos, player, true);
}
origin: SleepyTrousers/EnderIO

@Override
public boolean removedByPlayer(@Nonnull IBlockState bs, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EntityPlayer player, boolean willHarvest) {
 if (willHarvest) {
  return true;
 }
 return super.removedByPlayer(bs, world, pos, player, willHarvest);
}
origin: MrCrayfish/MrCrayfishFurnitureMod

@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
  if(placer instanceof EntityPlayer)
  {
    Triggers.trigger(Triggers.PLACE_OUTDOOR_FURNITURE, (EntityPlayer) placer);
  }
  super.onBlockPlacedBy(world, pos, state, placer, stack);
}
origin: SleepyTrousers/EnderIO

@Override
public @Nonnull ItemStack getPickBlock(@Nonnull IBlockState state, @Nonnull RayTraceResult target, @Nonnull World world, @Nonnull BlockPos pos,
  @Nonnull EntityPlayer player) {
 final ItemStack pickBlock = super.getPickBlock(state, target, world, pos, player);
 PaintUtil.setSourceBlock(pickBlock, getPaintSource(state, world, pos));
 return pickBlock;
}
origin: SleepyTrousers/EnderIO

@Override
public void getDrops(@Nonnull NonNullList<ItemStack> drops, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull IBlockState state, int fortune) {
 NNList<ItemStack> drops2 = new NNList<>();
 super.getDrops(drops2, world, pos, state, fortune);
 for (ItemStack drop : drops2) {
  PaintUtil.setSourceBlock(NullHelper.notnullM(drop, "null stack from getDrops()"), getPaintSource(state, world, pos));
 }
 drops.addAll(drops2);
}
origin: SleepyTrousers/EnderIO

@Override
public boolean canBeConnectedTo(@Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos, @Nonnull EnumFacing facing) {
 if (super.canBeConnectedTo(worldIn, pos, facing)) {
  return true;
 }
 final IBlockState blockState2 = worldIn.getBlockState(pos);
 final Block block = blockState2.getBlock();
 if (block instanceof BlockPaintedFence) {
  return true;
 }
 if (block instanceof IPaintable.IBlockPaintableBlock) {
  final IBlockState paintSource = ((IPaintable.IBlockPaintableBlock) block).getPaintSource(blockState2, worldIn, pos);
  return paintSource != null && paintSource.getBlock() instanceof BlockFence && paintSource.getMaterial() == blockMaterial;
 }
 return false;
}
origin: SonarSonic/Calculator

amethystPlanks = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "AmethystPlanks", new CalculatorPlanks());
amethystStairs = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "AmethystStairs", new SonarStairs(amethystPlanks));
amethystFence = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "AmethystFence", new BlockFence(Material.WOOD, MapColor.PURPLE));
amethystLeaves = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "AmethystLeaves", new CalculatorLeaves(0));
amethystSapling = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "AmethystSapling", new CalculatorSaplings(0));
tanzanitePlanks = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "TanzanitePlanks", new CalculatorPlanks());
tanzaniteStairs = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "TanzaniteStairs", new SonarStairs(tanzanitePlanks));
tanzaniteFence = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "TanzaniteFence", new BlockFence(Material.WOOD, MapColor.BLUE));
tanzaniteLeaves = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "TanzaniteLeaves", new CalculatorLeaves(1));
tanzaniteSapling = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "TanzaniteSapling", new CalculatorSaplings(1));
pearPlanks = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "PearPlanks", new CalculatorPlanks());
pearStairs = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "PearStairs", new SonarStairs(pearPlanks));
pearFence = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "PearFence", new BlockFence(Material.WOOD, MapColor.BROWN));
pearLeaves = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "PearLeaves", new CalculatorLeaves(2));
pearSapling = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "PearSapling", new CalculatorSaplings(2));
diamondPlanks = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "DiamondPlanks", new CalculatorPlanks());
diamondStairs = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "DiamondStairs", new SonarStairs(diamondPlanks));
diamondFence = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "DiamondFence", new BlockFence(Material.WOOD, MapColor.CYAN));
diamondLeaves = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "DiamondLeaves", new CalculatorLeaves(3));
diamondSapling = SonarRegister.addBlock(CalculatorConstants.MODID, tab, "DiamondSapling", new CalculatorSaplings(3));
net.minecraft.blockBlockFence

Most used methods

  • <init>
  • breakBlock
  • canBeConnectedTo
  • getDrops
  • getFireSpreadSpeed
  • getFlammability
  • getPickBlock
  • harvestBlock
  • onBlockPlacedBy
  • removedByPlayer
  • shouldSideBeRendered
  • shouldSideBeRendered

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now