Is there a way to check if block has NBT or Tile Entity?

Started by minheragon12345 on

Topic category: Help with modding (Java Edition)

Last seen on 09:48, 26. Sep 2022
Joined Jun 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to check if block has NBT or Tile Entity?

I'm making a mod that has an item with the ability to instantly break the block I right-click then put the block in my inventory, But I don't want players to just take those blocks that have NBT/Tile entity already like Chest, Redstone Repeater,... or those blocks with right-click usage like trapdoors, doors,... I know I can just detect those blocks, but I want this to work with other mods too, and I cant detect other mod's blocks.