Commands executed from a book in a lectern use entity's coordinates
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
To reproduce
Steps to reproduce:
- Place a lectern containing a written book with a "run_command" clickEvent:
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:"minecraft:written_book",count:1,components:{"minecraft:written_book_content":{title:"",author:"",pages:['{"text":"Test","clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"}}']}}},Page:1} replace
- Open the book on the lectern while standing a short distance away from it
- Click on the word "Test"
→
A block of stone is placed above your head (rather than above the lectern)
Created Issue:
Commands executed from a book in a lectern use entity's coordinates
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
To reproduce
Steps to reproduce:
- Place a lectern containing a written book with a "run_command" clickEvent:
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:written_book,Count:1,tag:{author:j_p_smith,title:MC-143001,pages:['{"clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"},"text":"Test"}']}}}- Open the book on the lectern while standing a short distance away from it
- Click on the word "Test"
→A block of stone is placed above your head (rather than above the lectern)
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
To reproduce
Steps to reproduce:
- Place a lectern containing a written book with a "run_command" clickEvent:
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:written_book,Count:1,tag:{author:j_p_smith,title:MC-143001,pages:['{"clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"},"text":"Test"}']}}}- Open the book on the lectern while standing a short distance away from it
- Click on the word "Test"
→A block of stone is placed above your head (rather than above the lectern)
When executing a command from a book inside a lectern, instead of executing it in the coordinates of the lectern, it uses the coordinates of the entity reading the book, unlike when executing commands from a sign that uses the coordinates of the sign.
This bug makes it more difficult to use the lectern for mapmakers to use it as a fixed point to calculate relative coordinates.
To reproduce
Steps to reproduce:
- Place a lectern containing a written book with a "run_command" clickEvent:
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:"minecraft:written_book",count:1,components:{"minecraft:written_book_content":{title:"",author:"",pages:['{"text":"Test","clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"}}']}}},Page:1} replace
- Open the book on the lectern while standing a short distance away from it
- Click on the word "Test"
→A block of stone is placed above your head (rather than above the lectern)
https://feedback.minecraft.net/hc/en-us/community/posts/360040356112-Commands-from-a-lectern
May be worth noting.
Confirmed in 1.16.1 and 20w28a.
Steps to reproduce:
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:written_book,Count:1,tag:{author:j_p_smith,title:MC-143001,pages:['{"clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"},"text":"Test"}']}}}→
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Confirmed for 1.16.5
Can confirm in 1.17.1.
Can confirm in 1.18.2 and 22w18a.
Can confirm in 1.19.2.
Can confirm in 24w45a. Also would like to request ownership of this report to maintain it.
The updated command is
/setblock ~ ~ ~ lectern[has_book=true]{Book:{id:"minecraft:written_book",count:1,components:{"minecraft:written_book_content":{title:"",author:"",pages:['{"text":"Test","clickEvent":{"action":"run_command","value":"/setblock ~ ~3 ~ stone"}}']}}},Page:1} replace