Client side stuff#8704
Conversation
This comment has been minimized.
This comment has been minimized.
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…Stuff # Conflicts: # src/main/java/org/skriptlang/skript/bukkit/entity/player/elements/effects/EffSendBlockDamage.java
…e & ExprWeather to use newer registry & be in SkriptLang folder.
|
This is ready-for-review now |
| public static void register(SyntaxRegistry syntaxRegistry) { | ||
| syntaxRegistry.register(SyntaxRegistry.EFFECT, SyntaxInfo.builder(EffSendExperienceChange.class) | ||
| .supplier(EffSendExperienceChange::new) | ||
| .addPatterns("make %players% see their [own] (experience|exp|xp) as level %integer% with %number% progress") |
There was a problem hiding this comment.
Thoughts on allowing only level and only progress?
Changing only the level could set the progress to 0 perhaps?
Changing progress could keep the player's current level?
There was a problem hiding this comment.
I could make progress optional but I think level should be required
There was a problem hiding this comment.
The API does allow only sending progress though. Another pattern might not hurt IMO. Maybe a pattern to reset it too? Like the other syntaxes have.
There was a problem hiding this comment.
could make the level optional & put progress before level & add a pattern for reset which would simply just set the experience to the player's current
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
…nts/effects/EffSendBlockDamage.java Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
…nts/effects/EffSendBlockDamage.java Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
| @Example("add 54 real seconds to time of world \"world\" # approximately 1 minecraft hour") | ||
| @Example("set client time of player to 2:00") | ||
| @Since("1.0, INSERT VERSION (player support)") | ||
| public class ExprTime extends PropertyExpression<Object, Time> { |
There was a problem hiding this comment.
This could probably be a SimplePropertyExpression
There was a problem hiding this comment.
aren't SimplePropertyExpressions more for simpler stuff this doesn't really seem simple considering its handling time of worlds & players with an object
| public static void register(SyntaxRegistry syntaxRegistry) { | ||
| syntaxRegistry.register(SyntaxRegistry.EFFECT, SyntaxInfo.builder(EffSendExperienceChange.class) | ||
| .supplier(EffSendExperienceChange::new) | ||
| .addPatterns("make %players% see their [own] (experience|exp|xp) as level %integer% with %number% progress") |
There was a problem hiding this comment.
The API does allow only sending progress though. Another pattern might not hurt IMO. Maybe a pattern to reset it too? Like the other syntaxes have.
Co-authored-by: Patrick Miller <apickledwalrus@icloud.com>

Problem
Skript was missing what small stuff bukkit/paper offers for client side stuff & on top of that EffSendBlockChange was running on deprecated methods & class was a tad bit messy (atleast in my opinion)
Solution
Changes to EffSendBlockChange made the syntaxstringbuilder a bit more clean changed it to use SendMultiBlockChange which is much more efficient than sending a whole new packet for every single location provided (this is an up for debate thing as paper has marked
Position(which it uses) as experimental so I will revert changes back for this if needed)Progress:
Testing Completed
Manual testing completed everything appears to work flawlessly
Supporting Information
Completes: #8490
Related: none
AI assistance: just some for debugging issues