I wanted to make a plugin when player Interact any blocks with $item === ''ID'' then it will shoot out tnt that take damage but does not explode :I how do i do that?
Have a look: https://github.com/LegionPE/LegionP...rc/legionpe/theta/utils/PrimedTNTParticle.php I use this as a primed TNT particle. Spawn it like FloatingTextParticle, then $particle->exploded = true, then addParticle again, just like setVisible(false) for FloatingTextParticle.
It is possible to change the block the player is interacting with to an entity. PHP: $level->setBlock(new Vector3($event->getBlock(), Entity::PrimedTNT)); Although i havent tested it, It should be possible. EDIT: Tested and its not possible.
A block is an static object in a world bound by integral coordinates. An entity is an object bound by double precision coordinates. How could they be the same?
You can either set the affect blocks in a primed TNT explosion to an empty array or you could send a primed TNT packet to the player and apple a specific amount of damage to them.