Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for playerless block raycasts #719

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

vgskye
Copy link
Contributor

@vgskye vgskye commented Aug 19, 2024

fixes #668.
this was made in Codespaces, so this is untested code; it should work but testing may be advisable

@vgskye vgskye force-pushed the playerless-raycast branch from 85f6093 to 90ca0e8 Compare August 19, 2024 06:03
@vgskye vgskye force-pushed the playerless-raycast branch from 90ca0e8 to 54f7dcc Compare August 19, 2024 06:16
@object-Object
Copy link
Member

huh.

@Redirect(method = "<init>",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/phys/shapes/CollisionContext;of" +
"(Lnet/minecraft/world/entity/Entity;)Lnet/minecraft/world/phys/shapes/CollisionContext;"))
public CollisionContext hex$getCollisionContext(Entity entity) {
if (entity == null)
return CollisionContext.empty();
return CollisionContext.of(entity);
}

@object-Object
Copy link
Member

So it turns out this was already fixed, actually. Talia added an equivalent mixin last year in 717dd3e. This issue was introduced in 1a44b31; the actual bug is just the unchecked cast in OpBlockRaycast. It works fine on both Forge and Fabric if that cast is removed. I guess Forge does something like this mixin already? Not sure why it's not needed on Forge.

Copy link
Member

@SamsTheNerd SamsTheNerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

joyous

@object-Object object-Object merged commit 2759689 into FallingColors:main Aug 20, 2024
3 checks passed
Master-Bw3 pushed a commit to Master-Bw3/HexMod that referenced this pull request Aug 29, 2024
navarchus pushed a commit to navarchus/HexMod that referenced this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.20.1 unbound circles unable to cast archers distillation
3 participants