Skip to content

Issue: Uses a lot of each server tick. - #1

Open
TheMatt2 wants to merge 8 commits into
MadCatHoG:masterfrom
TheMatt2:master
Open

Issue: Uses a lot of each server tick.#1
TheMatt2 wants to merge 8 commits into
MadCatHoG:masterfrom
TheMatt2:master

Conversation

@TheMatt2

Copy link
Copy Markdown

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.

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.
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