Прозрачная текстура для модели

Версия Minecraft
1.12.2
API
Forge
40
4
4
Как сделать прозрачность текстуры для кастомной модели? В игре фон становится белым. В фотошопе создал альфа-канал и вроде в json всё указал, фон всё равно белый.
sign_no_smoking:
{
  "forge_marker": 1,
  "defaults": {
    "custom": { "flip-v": true },
    "model": "exile_z_decorative:sign.obj",
    "textures" : {
      "texture": "exile_z_decorative:blocks/sign_no_smoking"
    },
    "render_type": "cutout",
    "alpha": {
      "func": "blend",
      "value": 1.0
    }
  },
  "variants": {
    "facing=up": { "model": "exile_z_decorative:sign.obj", "x": 90, "y": 0 },
    "facing=down": { "model": "exile_z_decorative:sign.obj", "x": 270, "y": 0 },
    "facing=south": { "model": "exile_z_decorative:sign.obj", "y": 270 },
    "facing=west": { "model": "exile_z_decorative:sign.obj", "y": 0 },
    "facing=north": { "model": "exile_z_decorative:sign.obj", "y": 90 },
    "facing=east": { "model": "exile_z_decorative:sign.obj", "y": 180 },

    "normal": [
      {
        "transform": {
          "translation": [ 0.5, 0.5, 0.5 ]
        }
      }],
    "inventory": [
      {
        "transform": {
          "thirdperson_lefthand": {
            "translation": [ -0.4, 0.5, 0.4 ],
            "scale": 0.65
          },
          "thirdperson_righthand": {
            "translation": [ 0.4, 0.5, 0.4 ],
            "scale": 0.65
          },
          "gui": {
            "translation": [ 0.4, 0.4, 0 ],
            "scale": 0.80
          },
          "firstperson_righthand": {
            "translation": [ 0.8, 0.3, 0 ],
            "scale": 0.80
          },
          "firstperson_lefthand": {
            "translation": [ 0, 0.3, 0 ],
            "scale": 0.80
          },
          "ground": {
            "translation": [0.4, 0.5, 0.4],
            "scale": 0.80
          }
        }
      }]
  }
}

BlockModel:
public class BlockModel extends Block {
    private static final AxisAlignedBB[] BOUNDING_BOXES = {
            new AxisAlignedBB(0.115D, 0.115D, 0.000D, 0.885D, 0.885D, 0.100D), // +SOUTH
            new AxisAlignedBB(0.900D, 0.115D, 0.115D, 1.000D, 0.885D, 0.885D), // +WEST
            new AxisAlignedBB(0.115D, 0.115D, 0.900D, 0.885D, 0.885D, 1.000D), // +NORTH
            new AxisAlignedBB(0.000D, 0.115D, 0.115D, 0.100D, 0.885D, 0.885)  // +EAST
    };

    private static final AxisAlignedBB[] COLLISION_BOXES = {
            new AxisAlignedBB(0.115D, 0.115D, 0.000D, 0.885D, 0.885D, 0.100D), // +SOUTH
            new AxisAlignedBB(0.900D, 0.115D, 0.115D, 1.000D, 0.885D, 0.885D), // +WEST
            new AxisAlignedBB(0.115D, 0.115D, 0.900D, 0.885D, 0.885D, 1.000D), // +NORTH
            new AxisAlignedBB(0.000D, 0.115D, 0.115D, 0.100D, 0.885D, 0.885)  // +EAST
    };

    public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

    public BlockModel(String name, Material material) {
        super(material);
        this.setRegistryName(name);
        this.setUnlocalizedName(name);
        this.setCreativeTab(ExileZDecorative.EZDTAB);
        this.setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
    }

    @SideOnly(Side.CLIENT)
    public void initModel() {
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

    @Override
    @SideOnly(Side.CLIENT)
    public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
        return false;
    }

    @Override
    public boolean isBlockNormalCube(IBlockState blockState) {
        return false;
    }

    @Override
    public boolean isOpaqueCube(IBlockState blockState) {
        return false;
    }

    @Override
    public boolean isFullCube(IBlockState blockState) {
        return false;
    }

    @Override
    public boolean isFullBlock(IBlockState state) { return false; }

    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
        EnumFacing facing = state.getValue(FACING);
        int index = facing.getHorizontalIndex();
        return BOUNDING_BOXES[index];
    }

    @Override
    public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState) {
        EnumFacing facing = state.getValue(FACING);
        int index = facing.getHorizontalIndex();
        addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOXES[index]);
    }

    @Override
    public EnumBlockRenderType getRenderType(IBlockState state) {
        return EnumBlockRenderType.MODEL;
    }

    @Override
    public IBlockState getStateFromMeta(int meta) {
        EnumFacing facing = EnumFacing.getFront(meta);
        if (facing.getAxis() == EnumFacing.Axis.Y) {
            facing = EnumFacing.NORTH;
        }
        return getDefaultState().withProperty(FACING, facing);
    }

    @Override
    public int getMetaFromState(IBlockState state) {
        return state.getValue(FACING).getIndex();
    }

    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, FACING);
    }

    @Override
    public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
        if (placer instanceof EntityPlayer) {
            EntityPlayer player = (EntityPlayer) placer;
            EnumFacing playerFacing = EnumFacing.fromAngle(player.rotationYaw).getOpposite();
            System.out.println("Player Facing: " + playerFacing);
            world.setBlockState(pos, state.withProperty(FACING, playerFacing), 2);
        }
    }
}
 
Решение
добавил
BlockModel:
@Override
public BlockRenderLayer getBlockLayer() {
    return BlockRenderLayer.TRANSLUCENT;
}
убрав 9-13 строки из json и всё заработало
снова сам же разобрался, жаль темы нельзя удалять
682
20
319
жаль темы нельзя удалять
Ты на форуме не один сидишь, другие пользователи так же сталкиваются с проблемами и ищут ответы, я бы сразу банил типов которые темы удаляют
 
Сверху