tutorial:events: Mixin @At target string invalid. #100

Open
opened 2021-05-11 04:44:41 +00:00 by SirEnder125 · 2 comments
SirEnder125 commented 2021-05-11 04:44:41 +00:00 (Migrated from github.com)

Hello. I was following the event tutorial and the line:

@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/SheepEntity;dropItems()V"), method = "interactMob", cancellable = true)

is invalid because the string "Lnet/minecraft/entity/passive/SheepEntity;dropItems()V" can not be resolved. At least that's what IntelliJ IDEA MC Development plugin says

Hello. I was following the [event tutorial](https://fabricmc.net/wiki/tutorial:events) and the line: ```Java @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/SheepEntity;dropItems()V"), method = "interactMob", cancellable = true) ``` is invalid because the string `"Lnet/minecraft/entity/passive/SheepEntity;dropItems()V"` can not be resolved. At least that's what IntelliJ IDEA MC Development plugin says
ByMartrixx commented 2021-05-11 04:53:24 +00:00 (Migrated from github.com)

Looks like the wiki article is outdated: #dropItems isn't called from #interactMob, but from #sheared. You can change the At target to SheepEntity#sheared, which should have the same effect

Looks like the wiki article is outdated: `#dropItems` isn't called from `#interactMob`, but from `#sheared`. You can change the At target to SheepEntity#sheared, which should have the same effect
SirEnder125 commented 2021-05-11 04:55:21 +00:00 (Migrated from github.com)

Okay. Thanks for the quick reply! :D

Okay. Thanks for the quick reply! :D
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Steven/fabric-example-mod#100
No description provided.