Skip to content

[1.12] Mining Level Suggestion for different stone types #20

Open

Description

@Morpheus1101

Different hardness mining level required the further down the Y level you go, perhaps have it as a config option

Activity

  1. dshadowwolf commented on Nov 30, 2017

    @dshadowwolf

    net.minecraft.block.Block#getActualState and net.minecraft.block.Block#getHardness both take an IBlockState, a World and a BlockPos - this shows promise, but both are also marked as Deprecated.

    Lastly there is net.minecraft.block.Block#onBlockAdded - which has the following comment:

        /**
         * Called after the block is set in the Chunk data, but before the Tile Entity is set
         */```
    I don't know if this means that it is only called for blocks with TE's but it seems like it could be used to set the hardness for a specific block. Issue is that each block is just an IBlockState linked to a single instance and that could be an issue.
  2. dshadowwolf commented on Nov 30, 2017

    @dshadowwolf

    Even better is that we can do it in the Block#getBlockHardness and also in the proper place in the block state (people should be doing world.getBlockState(BlockPos).getBlockHardness(world, pos) and not the old "ask the block" version anyway, but...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions