content: package thebetweenlands.common.item;
  
  import net.minecraft.block.material.EnumPushReaction;
  import net.minecraft.block.material.MapColor;
  import net.minecraft.block.material.Material;
  
  public class BLMaterial extends Material {
  
  
      private boolean canBurn;
      private boolean replaceable;
      private boolean isTranslucent;
      private boolean requiresNoTool = true;
      private EnumPushReaction mobilityFlag = EnumPushReaction.NORMAL;
      private boolean isAdventureModeExempt;
  
      public BLMaterial(MapColor color) {
          super(color);
      }
  
      /**
       * Marks the material as translucent
       */
      public BLMaterial setTranslucent()
      {
          this.isTranslucent = true;
          return this;
      }
  
      /**
       * Makes blocks with this material require the correct tool to be harvested.
       */
      @Override
      public BLMaterial setRequiresTool()
      {
          this.requiresNoTool = false;
          return this;
      }
  
      /**
       * Set the canBurn bool to True and return the current object.
       */
      @Override
      public BLMaterial setBurning()
      {
          this.canBurn = true;
          return this;
      }
  
      /**
       * Returns if the block can burn or not.
       */
      @Override
      public boolean getCanBurn()
      {
          return this.canBurn;
      }
  
      /**
       * Sets {@link #replaceable} to true.
       */
      @Override
      public BLMaterial setReplaceable()
      {
          this.replaceable = true;
          return this;
      }
  
      /**
       * Returns whether the material can be replaced by other blocks when placed - eg snow, vines and tall grass.
       */
      @Override
      public boolean isReplaceable()
      {
          return this.replaceable;
      }
  
      /**
       * Indicate if the material is opaque
       */
      @Override
      public boolean isOpaque()
      {
          return this.isTranslucent ? false : this.blocksMovement();
      }
  
      /**
       * Returns true if the material can be harvested without a tool (or with the wrong tool)
       */
      @Override
      public boolean isToolNotRequired()
      {
          return this.requiresNoTool;
      }
  
      /**
       * Returns the mobility information of the material, 0 = free, 1 = can't push but can move over, 2 = total
       * immobility and stop pistons.
       */
      @Override
      public EnumPushReaction getPushReaction()
      {
          return this.mobilityFlag;
      }
  
      /**
       * This type of material can't be pushed, but pistons can move over it.
       */
      @Override
      public BLMaterial setNoPushMobility()
      {
          this.mobilityFlag = EnumPushReaction.DESTROY;
          return this;
      }
  
      /**
       * This type of material can't be pushed, and pistons are blocked to move.
       */
      @Override
      public BLMaterial setImmovableMobility()
      {
          this.mobilityFlag = EnumPushReaction.BLOCK;
          return this;
      }
  
      /**
       * @see #isAdventureModeExempt()
       */
      @Override
      public BLMaterial setAdventureModeExempt()
      {
          this.isAdventureModeExempt = true;
          return this;
      }
  
      /**
       * Returns true if blocks with this material can always be mined in adventure mode.
       */
      public boolean isAdventureModeExempt()
      {
          return this.isAdventureModeExempt;
      }
  }
  