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

Linkage origins mod #1179

Closed
wants to merge 45 commits into from
Closed

Linkage origins mod #1179

wants to merge 45 commits into from

Conversation

gengyoubo
Copy link

Fixes #

Proposed Changes

-Rewrote Phantom's behavior and added LatexPhantom (a variant of Phantom)
-Adding configuration files about origins

Copy link
Owner

@LtxProgrammer LtxProgrammer left a 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/Changed.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);
Copy link
Owner

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.

Copy link
Author

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/resources/data/origins/powers/latextype.json Outdated Show resolved Hide resolved
@LtxProgrammer
Copy link
Owner

Closing as I have implemented config and fixed the issue related to phantoms suffocating when transfurred.

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.

2 participants