-
Notifications
You must be signed in to change notification settings - Fork 17
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
Strange freeze upon using the origins:action_on_being_used
power
#353
Comments
Looking into this now. |
I'm unable to reproduce this with just vanilla items and Origins Forge and its dependencies alone. |
I'll look into creating a repo with a minimal reproduction, then. |
Done, what remains is pretty much just a datapack packaged as a mod. The Java part of the mod is empty. https://github.com/LadyAelita/dark-origins-public/tree/sunscreen-bug-min-repro I've made the |
I'll take a look a little later. |
I've recently found a fix for it for the purposes of my mod, by replacing the following part: "bientity_action": {
"type": "origins:and",
"actions": [
{
"type": "origins:target_action",
"action": {
"type": "origins:change_resource",
"resource": "*:*_stacks",
"change": 2
}
},
{
"type": "origins:actor_action",
"action": {
"type": "origins:give",
"stack": {
"item": "minecraft:glass_bottle",
"amount": 1
}
}
}
]
}, with: "bientity_action": {
"type": "origins:target_action",
"action": {
"type": "origins:change_resource",
"resource": "*:*_stacks",
"change": 2
}
},
"result_stack": {
"item": "minecraft:glass_bottle",
"amount": 1
}, |
I am able to reproduce this with the 1.18.2 version of Origins (Forge), but not the 1.19.2 version. Regardless of what actions or conditions I use (or even none), the freeze you described happens consistently. |
Nevermind, I was also able to replicate this issue in 1.19.2 Forge, but the massive lag-then-crash only happens on the second time Action On Being Used is triggered. |
At least on my end, I have pinpointed the issue to |
I'll be looking into this now on 1.20.1, I might backport the bugfixes too, but I'm a little unsure when I'll get to that. |
I think it was a recursion error with setting the stack to what was already in the hand, so I've modified this by making it so it will only manually set the stack in the hand if there is a result stack. |
EDIT: Forgot to give these:
Origins version: 1.19.2-1.7.1.1
Forge version: 43.2.0
In my mod, I have an item,
aelitas_dark_origins:sunscreen_bottle
. It's just an extension of the basicItem
class, but at the moment it doesn't actually override any methods, so, origins aside, it doesn't have any "on use" functionality that could get in the way.I have the following power:
The issue is - when a player (actor), holding a
sunscreen_bottle
, right-clicks another player (target) who has the above power:stop
- the Java process running the server has to be terminated the hard wayThe kicker is that it only happens sometimes. There are times that it works correctly and nothing bad happens. I haven't been able to find any notable differences between cases where it works and cases where it breaks.
For the record, here is the whole
origins:multiple
power. Theself_apply
subpower doesn't have the same issue (apologies for a rather naive implementation, but I haven't managed to find a cleaner way to do it within the Origins JSON API):The text was updated successfully, but these errors were encountered: