#1.20.1 Raycast Doesn't Work in 1.20.4

1 messages · Page 1 of 1 (latest)

white rain
#

My Portal Gun Mod uses a raycast to spawn portals where I look. Now, it just spawns portals on top of the players head for some reason. How do I fix this? I think maybe it has something to do with my tags? I'll link a download to the datapack if that will help.
#main

  • execute as @a[scores={use.portal_gun=1},nbt={SelectedItemSlot:0,Inventory:[{Slot:-106b,tag:{portal:1b}}]}] at @s anchored eyes positioned ^ ^ ^ run function portal_gun:shoot_portal1

#shoot_portal1

  • particle dust 0 0.4 0.8 1 ~ ~ ~ 0.769 0.486 0.000 1 0 force
  • execute unless block ~ ~ ~ #portal_gun:ignore run function portal_gun:spawn_portal1
  • execute if entity @e[type=#portal_gun:hit,distance=..2] run function portal_gun:spawn_portal1
  • execute if entity @s[distance=..256] unless entity @e[type=#portal_gun:hit,distance=..2] if block ~ ~ ~ #portal_gun:ignore positioned ^ ^ ^.25 run function portal_gun:shoot_portal1

https://modrinth.com/datapack/simple-portal-gun/

elfin kayakBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

spice sun
#

Ah, the classic grass change

#

Yep it's the tags

#

In 1.20.4 they changed grass to short_grass, which would break your tag

civic bladeBOT
#
:information_source: Default Launcher Logs

The logs are where Minecraft displays errors when something goes wrong and can thus help you gain information about why something isn't working for you!
To open the logs:

  1. Enable logs in the Minecraft Launcher
  2. Start your game (or restart it if you already have an open instance)
  3. Enjoy spotting errors getting much easier!
red girder
#

The logs will tell you if something doesn’t load and what the error is

#

(Most of the time)

#

So it’s good to check it when facing any error

white rain
spice sun
#

shouldn't have

#

Not that I know of anyway

white rain
#

well

#

it is still not working

spice sun
#

What do the logs say?

white rain
#

do you now how to check those on modrinth app?

spice sun
#

No, but there's probably an option for it somewhere in instance settings

civic bladeBOT
#
:information_source: Other Launcher Logs

The logs are where Minecraft displays errors when something goes wrong and can thus help you gain information about why something isn't working for you! Opening logs works different for different 3rd party launchers, here's a quick summary for the most popular ones

Prism Launcher
Rightclick Instance > Edit > Settings > Console Settings: Show console while the game is running?

Multi MC
Rightclick Instance > Edit Instance > Settings > Console Settings: Show console while the game is running?

Lunar Client
Settings > Open Logs in File Explorer

spice sun
#

Hmm that hasn't been updated yet

white rain
#

gimme a second

#

[Render thread/WARN]:
Not all defined tags for registry ResourceKey[minecraft:root / minecraft:block] are present in data pack: portal_gun:ignore, techno_gow_weapons:pass_through

#

that looks like something

spice sun
#

yep

#

What does the portal_gun:ignore file look like now?

white rain
#

that

spice sun
#

That looks correct to me

#

let me test it rq

white rain
#

thanks

spice sun
#

Hmm all those seem to work

white rain
#

so it works for you?

spice sun
#

Yep

#

Stupid question but did you make sure to save the file and /reload?

white rain
#

yes

spice sun
#

It must be a problem with something else then

white rain
#

lemme make a new world and try it

#

maybe it is my modded instance

#

im using 1.20.4 simply optimized

#

ill try vanill ainstance

#

yeah

#

it is one of the mods

#

these damn optimization mods be tripping me out i swear bro

spice sun
#

Optimisation mods shouldn't cause those issues

white rain
#

yeah ik

spice sun
#

But somebody else had a weird issue like that too, so idk

white rain
#

oh ok

#

well it is working now,

#

thanks for the help anyway

#

the grass one could've been a potential issue

elfin kayakBOT
# white rain well it is working now,
🎗️ Is your question resolved?

If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D