-
Notifications
You must be signed in to change notification settings - Fork 8
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
Move everything to a tick loop #170
Conversation
9a1b70b
to
564a8f7
Compare
564a8f7
to
4f248c6
Compare
22aa285
to
aa06fe9
Compare
def using_hand_delay_for(slot) | ||
if slot.edible? | ||
32 | ||
else | ||
4 | ||
end | ||
end |
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 is not how vanilla does this code-wise, but I think it actually works in context
@@ -46,8 +46,8 @@ class Rosegold::Block | |||
best_tool?(slot) || harvest_tools.try &.keys.includes? slot.item_id_int.to_s | |||
end | |||
|
|||
def break_time(main_hand : Slot, player : Player, creative : Bool = false) : Int32 | |||
return 0 if creative | |||
def break_damage(main_hand : Slot, player : Player, creative : Bool = false) : Float64 |
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 change is because blocks take "damage" every tick (fraction of 1) until you get to 1.0
5225b95
to
574c414
Compare
Only digging, use hand, change hotbar slot, and physics are part of this
loops sofar
Speed up the specs greatly using event emitter callbacks
Add apple to eating
Fix a ton of random anti-cheat issues
Fix a few inventory desync issues
Resolves #98
Resolves #97