The bug
Now that endermen copy block states exactly when picking up and placing blocks, they can grab and place snowy grass (and mycelium, podzol...). They appear with the strange top texture (MC-109531) and when placed, exist as an invalid block state (snowy, but with no snow on top).
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 20
Attachments
Comments 16
Hold up, theirs a texture for the top of the snowy grass block?, learn new things every day and this is confirmed on 18w30b
This can be fixed by calling Block#getValidBlockForPosition for iblockstate2 in Enderman#AIPlaceBlock#updateTask() to place the correct BlockState.
From this:
IBlockState iblockstate2 = this.enderman.func_195405_dq();
To this:
IBlockState iblockstate2 = Block.getValidBlockForPosition(this.enderman.func_195405_dq(), this.enderman.world, blockpos);
Also to fix the block in the enderman's hands make the change in AITakeBlock in addition to swapping the order of these two lines:
if (block.isIn(BlockTags.ENDERMAN_HOLDABLE) && flag) {
this.enderman.func_195406_b(iblockstate);
world.setBlockToAir(blockpos);
}
To:
if (block.isIn(BlockTags.ENDERMAN_HOLDABLE) && flag) {
world.setBlockToAir(blockpos);
this.enderman.func_195406_b(Block.getValidBlockForPosition(iblockstate, this.enderman.world, blockpos));
}
Please don't fix this. Make it a nice easter egg. That block state is impossible to get on survival, so having this makes that now possible. These blocks should be an unique generation with endermans.
A distinction should be made between block states that rely only on the block itself, such as the mode of a comparator, and block states that rely on blocks placed nearby in the world, such as a redstone lamp's powered state, fences' connections and grass' snowy state mentioned in this ticket.