-
Notifications
You must be signed in to change notification settings - Fork 39
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
Linkage origins mod #1179
Linkage origins mod #1179
Conversation
# Conflicts: # src/main/resources/assets/changed/lang/zh_cn.json
# Conflicts: # src/main/resources/assets/changed/lang/zh_cn.json
# Conflicts: # src/main/resources/assets/changed/lang/zh_cn.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.
I'm not a fan of the classes that are initialized for a single condition check (CheckCondition
, LatexPhantom
). I've attempted to communicate this in the previous PRs but that hasn't been successful. There is also no consistency between function names or line spacings.
This code is also not that efficient, with the creation of the check classes and the static map tracking burn cooldowns.
src/main/java/net/ltxprogrammer/changed/latexvariant/origins/LatexPhantom.java
Outdated
Show resolved
Hide resolved
src/main/java/net/ltxprogrammer/changed/latexvariant/origins/LatexPhantom.java
Outdated
Show resolved
Hide resolved
if (serverPlayer.level.isDay()) { | ||
long currentTime = serverPlayer.level.getGameTime(); | ||
if (!playerCooldown.containsKey(serverPlayer) || currentTime - playerCooldown.get(serverPlayer) >= 100) { | ||
serverPlayer.setSecondsOnFire(5); |
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.
This does not need to track cooldowns. Repeatedly setting ticks on fire has less overhead cost than checking a map to see if the player should be set on fire.
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.
What do you want me to do?
src/main/java/net/ltxprogrammer/changed/latexvariant/origins/LatexPhantom.java
Outdated
Show resolved
Hide resolved
src/main/java/net/ltxprogrammer/changed/latexvariant/CheckCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/net/ltxprogrammer/changed/latexvariant/CheckCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/net/ltxprogrammer/changed/latexvariant/CheckCondition.java
Outdated
Show resolved
Hide resolved
src/main/java/net/ltxprogrammer/changed/latexvariant/CheckCondition.java
Outdated
Show resolved
Hide resolved
Closing as I have implemented config and fixed the issue related to phantoms suffocating when transfurred. |
Fixes #
Proposed Changes
-Rewrote Phantom's behavior and added LatexPhantom (a variant of Phantom)
-Adding configuration files about origins