-
Notifications
You must be signed in to change notification settings - Fork 101
Optimized Spell Circles #908
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
base: main
Are you sure you want to change the base?
Conversation
Decreased saving/loading times
…that was made obsolete by Playerless Casting
…ptimization # Conflicts: # Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java
@@ -110,29 +122,34 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, Set<Bl | |||
} | |||
|
|||
if (seenGoodPosSet.add(herePos)) { | |||
lastBlockPos.set(herePos); | |||
// Checks to see if it should update the most positive/negative block pos |
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.
using Math.max() here would be more readable, i.e.
positiveBlock.setX(Math.max( herePos.getX(), positiveBlock.getX() ));
public BlockPos currentPos; | ||
public Direction enteredFrom; | ||
public CastingImage currentImage; | ||
public @Nullable UUID caster; | ||
public @Nullable FrozenPigment casterPigment; | ||
// This controls the speed of the current slate |
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.
variable names aren't too descriptive here, something better might be slateWait
, and greaterCorner
/ lesserCorner
Replaced
knownPositions
with 2 Block Positions, so a AABB list would not need to be saved and loaded.Made
reachedPositions
into a long; this is to remove a chunk ban and memory leak issue that happen when a Spell Circle loops for too long.