• 0

    posted a message on Thaumcraft 6.1.BETA26 [no longer being developed]

    Azanor, sorry! I make a modification in which there will be a copy of your ore (ore_amber, ore_quartz, ore_cinnabar) can you use your code in which their drop is registered?
    I'm talking about this one:

     public Item getItemDropped(IBlockState state, Random rand, int fortune)
      {
        return state.getBlock() == BlocksTC.oreAmber ? ItemsTC.amber : state.getBlock() == BlocksTC.oreQuartz ? Items.QUARTZ : Item.getItemFromBlock(state.getBlock());
      }
      
      public int quantityDropped(Random random)
      {
        return this == BlocksTC.oreAmber ? 1 + random.nextInt(2) : 1;
      }
      
      public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
      {
        List<ItemStack> drops = super.getDrops(world, pos, state, fortune);
        if ((this == BlocksTC.oreAmber) && (drops != null))
        {
          Random rand = (world instanceof World) ? ((World)world).rand : RANDOM;
          for (int a = 0; a < drops.size(); a++)
          {
            ItemStack is = (ItemStack)drops.get(a);
            if ((is != null) && (!is.isEmpty()) && (is.getItem() == ItemsTC.amber) && (rand.nextFloat() < 0.066D)) {
              drops.set(a, new ItemStack(ItemsTC.curio, 1, 1));
            }
          }
        }
        return drops;
      }
      
      public int getExpDrop(IBlockState state, IBlockAccess world, BlockPos pos, int fortune)
      {
        Random rand = (world instanceof World) ? ((World)world).rand : new Random();
        if (getItemDropped(state, rand, fortune) != Item.getItemFromBlock(this))
        {
          int j = 0;
          if ((this == BlocksTC.oreAmber) || (this == BlocksTC.oreQuartz)) {
            j = MathHelper.getInt(rand, 1, 4);
          }
          return j;
        }
        return 0;
      }
      
      public int quantityDroppedWithBonus(int fortune, Random random)
      {
        if ((fortune > 0) && (Item.getItemFromBlock(this) != getItemDropped((IBlockState)getBlockState().getValidStates().iterator().next(), random, fortune)))
        {
          int j = random.nextInt(fortune + 2) - 1;
          if (j < 0) {
            j = 0;
          }
          return quantityDropped(random) * (j + 1);
        }
        return quantityDropped(random);
      }
    Posted in: Minecraft Mods
  • 0

    posted a message on DELIT

    DELIT

    Posted in: Mods Discussion
  • To post a comment, please or register a new account.