Skip to content
Permalink
Browse files

To reset reflective block textures, the player must be sneaking while…

… right clicking with an empty hand
  • Loading branch information...
Ri5ux committed Mar 15, 2019
1 parent b52c373 commit 162c44d28253c1ad042bfc5e2000589a9ef95e54
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/main/java/org/avp/block/BlockReflective.java
@@ -102,6 +102,13 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state,
Item itemHeld = playerIn.getHeldItemMainhand().getItem();
Block blockHeld = Block.getBlockFromItem(itemHeld);
int metadata = playerIn.getHeldItemMainhand().getMetadata();

if (playerIn.isSneaking() && blockHeld == Blocks.AIR)
{
reflective.setReflection(Blocks.AIR, 0);
worldIn.notifyBlockUpdate(pos, state, state, 3);
return true;
}

if (blockHeld != Blocks.AIR)
{

0 comments on commit 162c44d

Please sign in to comment.
You can’t perform that action at this time.