Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Morpheus1101 opened this issue Nov 29, 2017 · 2 comments
Open

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

Morpheus1101 opened this issue Nov 29, 2017 · 2 comments

Comments

@Morpheus1101
Copy link

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

@dshadowwolf
Copy link

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.

@dshadowwolf
Copy link

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
Projects
None yet
Development

No branches or pull requests

3 participants