Comments (13)
Yes please update it
from autoreconnect.
@Bstn1802 publish 1.19.3 to CF please
from autoreconnect.
I found an issue while testing and I manged to fix it quickly but it's not very clean, so I'll try to improve that and hope that I don't find more issues
from autoreconnect.
I found an issue while testing and I manged to fix it quickly but it's not very clean, so I'll try to improve that and hope that I don't find more issues
What was the issue and what fix did you implement?
from autoreconnect.
Clicking the cancel button on the disconnect screens (which would cancel the countdown, remove the cancel button and enlargen the reconnect button) would also trigger the reconnect button (since that is right below it after that)
I currently fixed that by disabling the reconnect button and re-enabling it after a delay, but it's currently just a Thread with a sleep(100) in it xD
You don't happen to know if there's something fabric is providing to schedule something for the next tick? I think that would be exactly what I need. I think the events are handled differently now, maybe due to the new ui elements and that's why putting the reconnect button over the cancel button while clicking it also triggers that, but it would not if that happens in the next tick (or at least the re-enabling part) because I think events as well as pretty much everything else is handled per tick, not entirely sure, but I think so.
EDIT: Now using AutoReconnect.EXECUTOR_SERVICE
(exposed it) and schedule re-enabling with a delay of 10ms, which already seems sufficient, but raises the question if events are really tick based and what is really the issue behind it. Will do further investigation and testing alongside to hopefully find no more issues.
from autoreconnect.
Clicking the cancel button on the disconnect screens (which would cancel the countdown, remove the cancel button and enlargen the reconnect button) would also trigger the reconnect button (since that is right below it after that) I currently fixed that by disabling the reconnect button and re-enabling it after a delay, but it's currently just a Thread with a sleep(100) in it xD You don't happen to know if there's something fabric is providing to schedule something for the next tick? I think that would be exactly what I need. I think the events are handled differently now, maybe due to the new ui elements and that's why putting the reconnect button over the cancel button while clicking it also triggers that, but it would not if that happens in the next tick (or at least the re-enabling part) because I think events as well as pretty much everything else is handled per tick, not entirely sure, but I think so. EDIT: Now using
AutoReconnect.EXECUTOR_SERVICE
(exposed it) and schedule re-enabling with a delay of 10ms, which already seems sufficient, but raises the question if events are really tick based and what is really the issue behind it. Will do further investigation and testing alongside to hopefully find no more issues.
👍 Please keep me updated!
You don't happen to know if there's something fabric is providing to schedule something for the next tick?
I don't know, but I will search to see if it can be done in Fabric
from autoreconnect.
You don't happen to know if there's something fabric is providing to schedule something for the next tick?
https://discord.com/channels/507304429255393322/523633816078647296/1083014200814751755
(use !!timer
command) in the Fabric Discord
Fabric itself does not include APIs to schedule something in the future.
DO NOT use threads or java.util.Timer. (This can cause a crash!) Instead:
- If you are making a block do something in the future: world.scheduleBlockTick + override scheduledTick in your Block.
- If you are making a custom tickable stuff (usually block entity/entity) do something in the future/periodically: see below, but instead of Mixin just implement yourself
- If you are making a vanilla tickable thing (world, server, etc) do something in the future/periodically: use the following mixin.
@Mixin(StuffToTick.class) // ServerWorld, MinecraftServer, etc public class StuffTimer implements StuffTimerAccess { @Unique private long ticksUntilSomething; @Inject(method = "tick", at = @At("TAIL")) private void onTick(CallbackInfo ci) { // Fix parameters as needed if (--this.ticksUntilSomething == 0L) { doSomething(); // If you want to repeat this, reset ticksUntilSomething here. } } @Override public void yourmod_setTimer(long ticksUntilSomething) { this.ticksUntilSomething = ticksUntilSomething; } }public interface StuffTimerAccess { void yourmod_setTimer(long ticksUntilSomething); }Usage:
MinecraftServer server; ((StuffTimerAccess) server).yourmod_setTimer(100L); // do something after 100 ticks
Maybe this will help you out
from autoreconnect.
@Bstn1802 Any updates on this?
from autoreconnect.
Things weren't working correctly for some reason, kind of frustrating and I haven't had the time yet to fix it. Either I get to do that in the near future or I might just release it with that quick fix which is not as bad but not good either, it should work tho. If there's no other issues it could actually work
from autoreconnect.
Things weren't working correctly for some reason, kind of frustrating and I haven't had the time yet to fix it. Either I get to do that in the near future or I might just release it with that quick fix which is not as bad but not good either, it should work tho. If there's no other issues it could actually work
Even in the new PR?
If so, can you please create a branch on GH which contains your quick fix so I can understand the problem better?
from autoreconnect.
Things weren't working correctly for some reason, kind of frustrating and I haven't had the time yet to fix it. Either I get to do that in the near future or I might just release it with that quick fix which is not as bad but not good either, it should work tho. If there's no other issues it could actually work
Even in the new PR? If so, can you please create a branch on GH which contains your quick fix so I can understand the problem better?
from autoreconnect.
Things weren't working correctly for some reason, kind of frustrating and I haven't had the time yet to fix it. Either I get to do that in the near future or I might just release it with that quick fix which is not as bad but not good either, it should work tho. If there's no other issues it could actually work
Even in the new PR? If so, can you please create a branch on GH which contains your quick fix so I can understand the problem better?
(Also maybe we should make a new issue for 1.19.4, opening one)
from autoreconnect.
@TechPro424 I totally forgot I didn't make a release for 1.19.3 at all, thought I at least made one with that quick fix I had.
Sorry I haven't answered to any of the messages here. I am now working on the 1.20 release, just merged the PR, I think I might just skipp 1.19.3/4 then. Also browsing through open issues and came across this one too, I accidentally cleared my notifications some time ago, usually leave everything there as kind of a todo list.
Anyways, for 1.20 it doesn't even seem to be a problem, at least it works fine and I don't see any changes regarding the cancel button in the PR I just merged and I apparently never actually pushed the one I had, which was to just delay the removal of the cancel button by like 100ms or so, so that it wouldn't trigger the reconnect button, that would otherwise be extended below it instantly. Apparently event handling has been changed again. Maybe mojang saw that as an issue too.
from autoreconnect.
Related Issues (20)
- Error with it trying to reconnect, but unable HOT 1
- Q: How to i get this mod to work in 1.19.4 HOT 3
- 1.19.4 support HOT 11
- How to use auto Message HOT 1
- 1.20 Compatibility HOT 3
- 1.19.4 finish code for connect HOT 2
- Issue with QuickPlay and other methods of joining without using the GUI
- Can I use your config code in my mod? HOT 2
- autoreconnect-2.2.0: Can't reconect message if connecting with command line --server --port HOT 6
- [Feature request] Close game when failed to login due to expired token HOT 1
- Button placement messes up when the window is resized HOT 1
- AutoMessages send old sent message in 1.20.2 and that is kind of dangerous HOT 1
- 1.20.2 HOT 1
- [Feature Request] Add compatibility with safe afk mods, if i get gicked by one of those it tries to reconnect HOT 4
- [Feature Request] Add a keybind to toggle the mod on/off HOT 1
- [feature request] command when rejoining HOT 1
- 1.20.4 HOT 1
- [Feature Request] Make AutoMessage sent on manual connection
- 1.19.4
- 1.20.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoreconnect.