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

Started by minheragon12345 on

Topic category: Help with Minecraft modding (Java Edition)

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.