IXBOB
- IXBOB
- JIRAUSER603621
- Asia/Shanghai
- Yes
- No
I added a custom block in the behavior pack, the function I want is to right click to get 64 tnt. I use run_command in events to run "say get tnt" and "give @s tnt 64". When this box is clicked by the player in the game, the "say" command runs successfully, but something goes wrong with the "give" command: For example, if the player selects the third item box from left to right in the item bar at this time , then when the player’s first two item bars are filled, no matter how the player right-clicks the custom block, although the chat box displays “You have been given TNT * 64”, the player will no longer get tnt. If the player selects the eighth item from left to right in the item bar at this time, then when the player's first seven item bars are filled, the player will no longer get tnt. Others are the same.
Steps to Reproduce:
1. Create a new custom block in behavior_pack and use the run_command event. Write "say get tnt" and "give @s tnt 64" in the command under run_command, and set the target to player
2. Load this behavior_pack correctly into a world
3. Use the method written in behavior_pack to execute the run_command event (the right-click execution in the given figure).Observed Results:
The "say" command works successfully, but the "give" command has a problem: when the slots to the left of the player's selected hotbar slot are all filled with items, the player no longer gets tnt. (For example, if the player selects the 4th hotbar slot, and the current 3 hotbar slots are all filled with the obtained items, although the "give" command prompt "successfully gave the player TNT*64, the player will no longer get TNT )Expected Results:
The player successfully gets the item specified in the "give" command, and is not affected by the currently selected hotbar slot.
Steps to Reproduce:
1. Create a new custom block in behavior_pack and use the run_command event. Write "say get tnt" and "give @s tnt 64" in the command under run_command, and set the target to player
2. Load this behavior_pack correctly into a world (Turn on the Holiday Creator Features)
3. Use the method written in behavior_pack to execute the run_command event (the right-click execution in the given figure)(If you use the example addon I provided, enter /give @s example:buy_tnt_block in game).Observed Results:
The "say" command works successfully, but the "give" command has a problem: when the slots to the left of the player's selected hotbar slot are all filled with items, the player no longer gets tnt. (For example, if the player selects the 4th hotbar slot, and the current 3 hotbar slots are all filled with the obtained items, although the "give" command prompt "successfully gave the player TNT*64, the player will no longer get TNT )Expected Results:
The player successfully gets the item specified in the "give" command, and is not affected by the currently selected hotbar slot.
Custom blockissueblock behavior "run_command" component issue
block behavior "run_command" componentissueblock behavior "run_command" component does not work correctly when executing the "give" command

Turn on Holiday Creator Features when using the example pack.
who can check this ?