Issue: Uses a lot of each server tick. - #1
Open
TheMatt2 wants to merge 8 commits into
Open
Conversation
Changed the format label from 1 to 4. 4 Appears to be the number used in Minecraft by default. However, this does not actually change anything.
Add a little more explanation and fixed a typo.
This uses the new modulo function to remove the need for a counter incrementing every tick. This also removes the need for the #kick_message and #sleep_message players, both being replaced by the already existing #query_time. This also changes how #sleep_messages ops.sleep and #kick_messages ops.sleep so that they should be the number of sleep/kick messages, not n-1.
Now this is just two players named #messages and #query_time. Now #sleep_messages ops.sleep is #messages ops.sleep and #kick_messages ops.sleep is #messages ops.kick Also added #messages to the uninstall.mcfunction and added the old fake names to the old_version.mcfunction
The messages are no longer (n-1) but just the number of messages. Removed comment refering to this older behavior.
Removed trailing whitespace and makes sure each file ends with a newline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Meanwhile the problem is not severe, by changing how the randomization is handled, this data pack should use even less time each tick.
This replaces the incrementing counters every tick by using daytime. The scoreboard modulo is then used to make the daytime into a number in the range 0 to n-1 where n is the number of possible kick/sleep messages.