-
Notifications
You must be signed in to change notification settings - Fork 51
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
Expand logging capabilities #197
Expand logging capabilities #197
Conversation
Co-authored-by: Altirix <[email protected]>
# Conflicts: # src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemChangeActionType.kt # src/main/kotlin/com/github/quiltservertools/ledger/utility/NbtUtils.kt # src/main/resources/ledger.mixins.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! This is a pretty big PR with a lot of changes.
I have added some small reviews to some parts of the code. I am putting some other things I would like to mention that didn't fit a specific piece of code here:
@ModifyArgs
is used in a couple of Mixins to get easy access to arguments. According to the Java Doc of ModifyArgs, it is pretty inefficient and this isn't really its intended use-case. I suggest using LocalCapture instead.- This PR added a couple of mixins for plants breaking. Their source is
Gravity
, I think it would be great to add a separate source type for this, to allow better user blacklists (This would apply to CactusBlockMixin, SugarCaneBlockMixin, BambooBlockMixin, ChorusPlantBlock, and PointedDripstoneBlockMixin) - This is probably a design choice, but since entity modify actions store entity positions, the entity is moved back to the action pos when rolling back (even if the position doesn't really matter, like dyeing).
- Item frame logging didn't work properly when I tried rolling back
@equip
actions - When placing carved pumpkins (and probably wither skeleton skull) it first logs the block being broken by snowman spawning and then tries to log the placed block, but since it's no longer there it logs placing air (so the order is incorrect and the placed block is wrong)
ItemDropActionType
andItemPickUpActionType
should implement rollback / restore
Thanks for the PR!
src/main/java/com/github/quiltservertools/ledger/mixin/blocks/CarvedPumpkinBlockMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/github/quiltservertools/ledger/mixin/blocks/ChorusPlantBlockMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/github/quiltservertools/ledger/mixin/entities/ArmorStandMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/github/quiltservertools/ledger/mixin/entities/ArmorStandMixin.java
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/github/quiltservertools/ledger/database/Tables.kt
Outdated
Show resolved
Hide resolved
I think on this Pull Request, there should also be the #202 projectile shoot event |
# Conflicts: # src/main/resources/ledger.mixins.json
I honestly don't see much point in it. After all, the remaining parts of the plants are destroyed just by gravity, which is exactly what fits this source.
Fixed, now only custom entity data is rolled back.
When using
I don't know how to fix it.
Implemented, but without returning items to the player's inventory, as I consider it unnecessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new changes look pretty good 👍. I have left some more change request on some minor issues.
I have also noticed an issue, when rolling back an armorstand that was first equipped and then killed. (The killing gets rolled back, but equipping doesn't, if both are rolled back in one operation)! I don't know what might cause this atm.
I think you should also remove the code duplication in ItemDropActionType
and ItemPickUpActionType
rollback
/restore
.
Sorry for the slow responses, I was/am kind of busy currently
src/main/kotlin/com/github/quiltservertools/ledger/utility/PlayerLecternHook.kt
Show resolved
Hide resolved
src/main/java/com/github/quiltservertools/ledger/mixin/entities/EnderDragonEntityMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/github/quiltservertools/ledger/mixin/entities/VillagerEntityMixin.java
Outdated
Show resolved
Hide resolved
# Conflicts: # src/main/java/com/github/quiltservertools/ledger/mixin/SnowGolemEntityMixin.java # src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemChangeActionType.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
# Conflicts: # src/main/resources/ledger.mixins.json
Any news on this? |
any updates? |
Would it be possible for this to be merged soon? Had an issue on my server that this would've solved but instead I had to go and move region files from an old backup as ledger hadn't logged the destruction. |
i hope it will have 1.20.1 version |
I've done some testing and can confirm that this branch works on 1.20.2 by just merging in 1.2.9. There are, however, a couple of issues when merging in update to 1.20.4. First, The Second, the Those are the only 2 errors I encountered with 1.20.4. Fixing them locally gets the mod running, and everything still seems to work. Hope this PR gets merged soon, it has some really nice features! |
src/main/java/com/github/quiltservertools/ledger/mixin/entities/CatEntityMixin.java
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/github/quiltservertools/ledger/actions/ActionType.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/github/quiltservertools/ledger/actions/ItemDropActionType.kt
Outdated
Show resolved
Hide resolved
I can't help but feel that |
This PR expands logging capabilities and fixes some bugs. This also includes changes from #119 by Altirix.
Added logging of: