Animefan8888 Posted July 27, 2018 Share Posted July 27, 2018 (edited) 11 minutes ago, Toastyman23 said: if(play.world.getBlockState(blockPos) == Blocks.GRASS.getBlockState()) This won't ever be true. Block#getBlockState returns a BlockStateContainer while World#getBlockState(BlockPos) returns an IBlockState. So instead do Block#getDefaultState() Edited July 27, 2018 by Animefan8888 Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Toastyman23 Posted July 27, 2018 Author Share Posted July 27, 2018 3 minutes ago, Animefan8888 said: This won't ever be true. getBlockState returns a Block#BlockStateContainer while World#getBlockState(BlockPos) returns an IBlockState. So instead do Block#getDefaultState() Am I changing the getBlockState after play.world, the one after Blocks.GRASS, or both? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted July 27, 2018 Share Posted July 27, 2018 Just now, Toastyman23 said: Am I changing the getBlockState after play.world, the one after Blocks.GRASS, or both? Blocks.GRASS Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Toastyman23 Posted July 27, 2018 Author Share Posted July 27, 2018 2 minutes ago, Animefan8888 said: Blocks.GRASS Finally, it works. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.