content: package net.minecraft.block;
  
  import de.florianmichael.vialoadingbase.ViaLoadingBase;
  import net.minecraft.block.material.Material;
  import net.minecraft.block.properties.IProperty;
  import net.minecraft.block.properties.PropertyBool;
  import net.minecraft.block.state.BlockState;
  import net.minecraft.block.state.IBlockState;
  import net.minecraft.creativetab.CreativeTabs;
  import net.minecraft.entity.Entity;
  import net.minecraft.init.Blocks;
  import net.minecraft.item.Item;
  import net.minecraft.util.AxisAlignedBB;
  import net.minecraft.util.BlockPos;
  import net.minecraft.util.EnumFacing;
  import net.minecraft.util.EnumWorldBlockLayer;
  import net.minecraft.world.IBlockAccess;
  import net.minecraft.world.World;
  
  import java.util.List;
  import java.util.Random;
  
  public class BlockPane extends Block {
      public static final PropertyBool NORTH = PropertyBool.create("north");
      public static final PropertyBool EAST = PropertyBool.create("east");
      public static final PropertyBool SOUTH = PropertyBool.create("south");
      public static final PropertyBool WEST = PropertyBool.create("west");
      protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] {new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 0.5625D, 1.0D, 0.5625D), new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 0.5625D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.4375D, 0.5625D, 1.0D, 0.5625D), new AxisAlignedBB(0.0D, 0.0D, 0.4375D, 0.5625D, 1.0D, 1.0D), new AxisAlignedBB(0.4375D, 0.0D, 0.0D, 0.5625D, 1.0D, 0.5625D), new AxisAlignedBB(0.4375D, 0.0D, 0.0D, 0.5625D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5625D, 1.0D, 0.5625D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.5625D, 1.0D, 1.0D), new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 1.0D, 1.0D, 0.5625D), new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.4375D, 1.0D, 1.0D, 0.5625D), new AxisAlignedBB(0.0D, 0.0D, 0.4375D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.4375D, 0.0D, 0.0D, 1.0D, 1.0D, 0.5625D), new AxisAlignedBB(0.4375D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.5625D), new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D)};
      private final boolean canDrop;
  
      protected BlockPane(Material materialIn, boolean canDrop) {
          super(materialIn);
          this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false));
          this.canDrop = canDrop;
          this.setCreativeTab(CreativeTabs.tabDecorations);
      }
  
      public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) {
          return state.withProperty(NORTH, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.north()).getBlock()))).withProperty(SOUTH, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.south()).getBlock()))).withProperty(WEST, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.west()).getBlock()))).withProperty(EAST, Boolean.valueOf(this.canPaneConnectToBlock(worldIn.getBlockState(pos.east()).getBlock())));
      }
  
      public Item getItemDropped(IBlockState state, Random rand, int fortune) {
          return !this.canDrop ? null : super.getItemDropped(state, rand, fortune);
      }
  
      public boolean isOpaqueCube() {
          return false;
      }
  
      public boolean isFullCube() {
          return false;
      }
  
      public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
          return worldIn.getBlockState(pos).getBlock() != this && super.shouldSideBeRendered(worldIn, pos, side);
      }
  
      private static int getBoundingBoxIndex(EnumFacing p_185729_0_)
      {
          return 1 << p_185729_0_.getHorizontalIndex();
      }
  
      public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity) {
          if (ViaLoadingBase.getInstance().getTargetVersion().getVersion() <= 47) {
              boolean flag = this.canPaneConnectToBlock(worldIn.getBlockState(pos.north()).getBlock());
              boolean flag1 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.south()).getBlock());
              boolean flag2 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.west()).getBlock());
              boolean flag3 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.east()).getBlock());
  
              if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1)) {
                  if (flag2) {
                      this.setBlockBounds(0.0F, 0.0F, 0.4375F, 0.5F, 1.0F, 0.5625F);
                      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
                  } else if (flag3) {
                      this.setBlockBounds(0.5F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
                      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
                  }
              } else {
                  this.setBlockBounds(0.0F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
                  super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
              }
  
              if ((!flag || !flag1) && (flag2 || flag3 || flag || flag1)) {
                  if (flag) {
                      this.setBlockBounds(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 0.5F);
                      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
                  } else if (flag1) {
                      this.setBlockBounds(0.4375F, 0.0F, 0.5F, 0.5625F, 1.0F, 1.0F);
                      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
                  }
              } else {
                  this.setBlockBounds(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 1.0F);
                  super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
              }
          } else {
              state = this.getActualState(state, worldIn, pos);
  
              addCollisionBoxesToList(pos, mask, list, AABB_BY_INDEX[0]);
  
              if (state.getValue(NORTH))
              {
                  addCollisionBoxesToList(pos, mask, list, AABB_BY_INDEX[getBoundingBoxIndex(EnumFacing.NORTH)]);
              }
  
              if (state.getValue(SOUTH))
              {
                  addCollisionBoxesToList(pos, mask, list, AABB_BY_INDEX[getBoundingBoxIndex(EnumFacing.SOUTH)]);
              }
  
              if (state.getValue(EAST))
              {
                  addCollisionBoxesToList(pos, mask, list, AABB_BY_INDEX[getBoundingBoxIndex(EnumFacing.EAST)]);
              }
  
              if (state.getValue(WEST))
              {
                  addCollisionBoxesToList(pos, mask, list, AABB_BY_INDEX[getBoundingBoxIndex(EnumFacing.WEST)]);
              }
          }
      }
  
      private static int getBoundingBoxIndex(IBlockState state)
      {
          int i = 0;
  
          if (state.getValue(NORTH))
          {
              i |= getBoundingBoxIndex(EnumFacing.NORTH);
          }
  
          if (state.getValue(EAST))
          {
              i |= getBoundingBoxIndex(EnumFacing.EAST);
          }
  
          if (state.getValue(SOUTH))
          {
              i |= getBoundingBoxIndex(EnumFacing.SOUTH);
          }
  
          if (state.getValue(WEST))
          {
              i |= getBoundingBoxIndex(EnumFacing.WEST);
          }
  
          return i;
      }
  
      public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
      {
          state = this.getActualState(state, source, pos);
          return AABB_BY_INDEX[getBoundingBoxIndex(state)];
      }
  
      public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
          if (ViaLoadingBase.getInstance().getTargetVersion().getVersion() <= 47) {
              float f = 0.4375F;
              float f1 = 0.5625F;
              float f2 = 0.4375F;
              float f3 = 0.5625F;
              boolean flag = this.canPaneConnectToBlock(worldIn.getBlockState(pos.north()).getBlock());
              boolean flag1 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.south()).getBlock());
              boolean flag2 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.west()).getBlock());
              boolean flag3 = this.canPaneConnectToBlock(worldIn.getBlockState(pos.east()).getBlock());
  
              if ((!flag2 || !flag3) && (flag2 || flag3 || flag || flag1)) {
                  if (flag2) {
                      f = 0.0F;
                  } else if (flag3) {
                      f1 = 1.0F;
                  }
              } else {
                  f = 0.0F;
                  f1 = 1.0F;
              }
  
              if ((!flag || !flag1) && (flag2 || flag3 || flag || flag1)) {
                  if (flag) {
                      f2 = 0.0F;
                  } else if (flag1) {
                      f3 = 1.0F;
                  }
              } else {
                  f2 = 0.0F;
                  f3 = 1.0F;
              }
              this.setBlockBounds(f, 0.0F, f2, f1, 1.0F, f3);
  
          } else {
              setBlockBounds(getBoundingBox(worldIn.getBlockState(pos), worldIn, pos));
          }
      }
  
      public void setBlockBoundsForItemRender() {
          this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
      }
  
      public final boolean canPaneConnectToBlock(Block blockIn) {
          return blockIn.isFullBlock() || blockIn == Blocks.glass || blockIn == Blocks.stained_glass || blockIn == Blocks.stained_glass_pane || blockIn instanceof BlockPane;
      }
  
      protected boolean canSilkHarvest() {
          return true;
      }
  
      public EnumWorldBlockLayer getBlockLayer() {
          return EnumWorldBlockLayer.CUTOUT_MIPPED;
      }
  
      public int getMetaFromState(IBlockState state) {
          return 0;
      }
  
      protected BlockState createBlockState() {
          return new BlockState(this, NORTH, EAST, WEST, SOUTH);
      }
  }
  