I am trying to create handheld torches in vanilla minecraft with command blocks. I already have the way to detect a torch in hand and everything, now all i need is a way to get the lighting to that player.
The problem i have here is when i setblock a torch (setblock ~ ~ ~ torch
), i have to fill an area around them with air (air 0 replace torch
) to prevent them getting free torches. This does not fix that problem, as they can look down and break that torch and get the item. Is there a better way?
(PS. with end rod in 1.9 snapshots, they can't be passed through so you get stopped while walking.)
EDIT: to clarify, I am trying to get this working in a survival scenario, a player is going through a cave mining, so instead of placing torches they just switch to the torch to get light when they need it.
replace
that causes the torch not to drop. I'll look into these things, because this sounds really cool