Minecraft / Data Packs

IDVisor 1.14.4

  • check_circle Functions
  • 5
  • 5
  • comment4
  • playlist_add
  • share
  • more_horiz
avatar Y4nn
Level 22 : Expert Crafter
0
IDVisor [v1.2]




Welcome to a little side project I am working on. This datapack adds the functionality to view blocknames from a 2-block distance using a visor. Useful for on the go block checking with e.g. other resourcepacks or to new players. It holds almost 600 blocks. However, some existent blocks were added but do not count as real blocks, see code. Only works for Minecraft vanilla blocks up untill 1.14.4 or the newest snapshot 19w45b.

Only uses scoreboard and actionbar commands, no additional entities are created like armor stands or area effect clouds. Using the visor will override any incoming actionbar message. The visor will not work in lava as it fictionally overheats, however if the player has an active fire resistance effect, it can function. The visor is naturally waterproof. Minecraft is not perfect, looking through a block is occasionally possible. Nevertheless, as the visor is fastpaced, this is not a problem.

- Make sure to reload your world to fully initiate the datapack with: /reload.
- Begin using the visor by typing: /trigger idvisor

Keep an eye on future updates!



CompatibilityMinecraft 1.14
Tags

9 Update Logs

Version 1.2 : 11/09/2019 11:30:34 amNov 9th

  • Added missing blocks: All hanging wall signs (different from standing signs)
  • Snapshot version available in the .zip folder --> 19w45b
LOAD MORE LOGS

4 replies

2
10/21/2019 7:57 pmhistory
Level 43 : Master Answer
LeonNikolai
not tested, but opened the code, looks cool.

some critique:

dividing into separate functions:
the starting part of each command in "ids_scoreboard_blocks_air_1.mcfunction" is the same. You should try dividing some things into separate functions to decrease file size?
execute as @e[type=player,scores={visor_toggle=1}] at @s anchored eyes positioned ^ ^ ^1 run execute if block ~ ~ ~ minecraft:birch_sapling run scoreboard players set @s visor_facing_id 21to where it only executes the first part then runs a function?:
execute as @e[type=player,scores={visor_toggle=1}] at @s anchored eyes positioned ^ ^ ^1 run function idvisor/blocktestwhere blocktest.mcfucntion is the last part of each command.
execute if block ~ ~ ~ minecraft: run scoreboard players set @s visor_facing_id 1

execute if block ~ ~ ~ minecraft: run scoreboard players set @s visor_facing_id 2

...
this way you probably only need 2 functions/commands deciding block locations, and 1 function for detecting what block. but maybe there is some unforseen consequenses that i dont know, that makes your current solution better?
why is scoreboards needed?
if you’re not planning to increase performance by only running the block check once, and then wait for movement or something before checking again, i see no reason to use scoreboards. you should just out right run the tellraw command after checking the block type?
1
10/22/2019 8:38 am
Level 22 : Expert Crafter
Y4nn
Thanks for the feedback! A lot of things are little tests to see what runs the best and what not. At first, the whole premis of this datapack was not using any extra entities, however the scoreboard can be eliminated as well I understand now. But as you're pointing out, a good structure in functions is helpful for debugging and stuff.

Replying to your blocktest function, I think by using a seperate function the execute command loses its position via anchored eyes positioned. However, I understand your way of removing the repetitiveness from the codes and will try it out!
2
10/26/2019 11:45 am
Level 10 : Journeyman Miner
Willral
does this work with modded blocks :/
1
10/27/2019 10:29 am
Level 22 : Expert Crafter
Y4nn
Nope, sorry. Just blocks up untill 1.14.4. Datapacks are additions to vanilla Minecraft using ingame commands, mods are a different side of Minecraft.

Planet Minecraft

Browse

Website

© 2010 - 2019
www.planetminecraft.com

Welcome