Comments (6)
Yeye will be adding slot locker in next update
from skyblockaddons.
I wrote a way to disable inventory drag + dropping of ItemStack's that have a lore containing a rarity of a certain amount, the UI framework you use doesn't seem to support dropdowns, so currently it's a very hacky /sba setrarity {1,2,3,4,5} etc.
Happy to push it to my fork and submit a PR, unless you'd rather implement it yourself, I'm slightly concerned about WatchDog detecting it though, I'm not sending any custom packets but it's not clear atm if the InventoryDragEvent is client side, so cancelling it won't cause WatchDog to see an anomaly. I joined the discord, would love to chat more about this.
from skyblockaddons.
@fsckmc
To be honest I'm not a fan of the idea, especially since it involves checking strings all the time. There is already too much of that imho. I play on a laptop. :/
but eh if you have the code you can always make a pull request and just reference the id here
from skyblockaddons.
It only checks strings on a drop event, which happens rarely. I've profiled it and it's not that bad, I haven't added the drop event to the branch yet, due to ItemTossEvent not cancelling properly, I may need to write a custom mixin Injection to handle that.
https://github.com/fsckmc/SkyblockAddons/tree/feature-rarity-detection-antidrop
You can see how I'm checking, also added a small utility "library" to check rarity of items.
Could you elaborate what you mean by "involves checking strings all the time" perhaps I'm missing something. (I also play on a laptop, and writing code that doesn't bottleneck is super important for me)
from skyblockaddons.
Could you elaborate what you mean by "involves checking strings all the time"
Sure thing. here is a String "I am a string."
here is a method
@override public Boolean equals(String theString) {
if (theString == null)
return false;
if (theString == this)
return true;
if (theString.length != this.length)
return false;
char[] theStringAsArray = theString.toCharArray();
char[] thisAsArray = this.toCharArray();
for (int i = 0; i < this.length; ++i) {
if (thisAsArray[i] != theStringAsArray[i])
return false;
}
return true;
}
That method is linear O(n). You no doubt understand the implications.
Here is another example of a linear algorithm: sleep sort
All that being said, the fact that you used the drop event makes this whole passive-aggressive rambling unnecessary… I did work hard on it though, so I put this disclaimer at the end.
from skyblockaddons.
Really not entirely sure what to say other than I guess this may have provided some useful links to people who are interested in algorithms?
from skyblockaddons.
Related Issues (20)
- Zealot Counter not increasing with ranged kills HOT 3
- [Bug] Fishing sound indicator not working HOT 1
- [Bug] Almost all warps are greyed out (Even Hub) HOT 2
- [Bug] Crash from Tesselating Block Model (Dwarven Mines)
- [Bug] HP-bar is frozen when wearing End Armor in The End HOT 2
- [Bug] No Trapper's den warp in Fancy warp menu
- [Bug] Trapper cooldown displays the wrong cooldown when Finnegan is not mayor
- [Bug] <Fullscreen crashing>
- [Bug] Zealots do not count towards Zealot Counter when using Arcane Staff
- Dungeon milestone not showing up[Bug] HOT 1
- [Bug] Red Attributes
- [Bug] Skytils hub's warp isn't avalable on hypixel skyblock menu HOT 3
- [Error] Minecraft crashed HOT 1
- [Bug] pls help HOT 1
- [Bug] Incompatible with april fools HOT 2
- [Bug] The translation file could not be found HOT 2
- [Bug] discord status in garden broken HOT 1
- This project appears to be RATTED, if you see this and you are using it PLEASE uninstall it! this is malware and a RAT. HOT 2
- [Bug] Minecraft Crashed HOT 2
- [Bug] Resizing Features and Bars is VERY buggy
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 skyblockaddons.