[SPIGOT-4046] targetting @e not possible from datapack function Created: 18/Jul/18  Updated: 19/Jul/18  Resolved: 19/Jul/18

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Zedadias Wick Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.13, 1.13-pre7, @e, commands, minecraft:tick

Attachments: Zip Archive test.zip    
Version: CraftBukkit version git-Spigot-83d9d09-3e5fe3e (MC: 1.13-pre7) (Implementing API version 1.13-pre7-R0.1-SNAPSHOT)

 Description   

Targetting @e directly from a function run via #minecraft:tick does not appear to work in spigot, but does in vanilla.

function with the following commands in:

execute as @a run say I'm a player
execute as @p run say I'm a close player
execute as @e run say I'm an entity
execute as @r run say I'm random
execute as @s run say I'm a tick!

Will output something like the following in spigot

[18:55:28] [Server thread/INFO]: [Zedwick] I'm a player
[18:55:28] [Server thread/INFO]: [Dax23333] I'm a player
[18:55:28] [Server thread/INFO]: [Dax23333] I'm a close player
[18:55:28] [Server thread/INFO]: [Zedwick] I'm random

and something like the following in vanilla (singleplayer)

[18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm a player
[18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm a close player
[18:02:31] [Client thread/INFO]: [CHAT] [Bat] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Creeper] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Bat] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Zombie] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Zombie] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Creeper] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Skeleton] I'm an entity
[18:02:31] [Client thread/INFO]: [CHAT] [Zedwick] I'm random

if the function or commands are ran by a player in chat, or in a command block, in spigot/vanilla it will output as expected in the vanilla sample above (with the addition of the running player saying "I'm a tick!")

Test datapack provided, will spam chat with output as it is set to run on minecraft:tick.


Generated at Tue Apr 15 08:23:01 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.