Comments (4)
Though my solution seems very hack, it's performance efficient and it works.
from iridiumskyblock.
Starting a thread for every spawner is not efficient imo
from iridiumskyblock.
Starting a thread for every spawner is not efficient imo
The code I wrote creates a runnable which is executed by an existing scheduler thread in bukkit. There is no new thread created, only a runnable. That is relatively a very inexpensive instruction. All the code is doing is putting an instruction into a list that is executed either the next game tick or at the end of the current tick on the main game thread. Either of thoseThis is good enough because all entity spawns will be executed before this happens.
from iridiumskyblock.
Alternatively, we could check if the spawner already spawned a monster during the current tick using Bukkit.getCurrentTick(). But I can't quickly think of a way to store when the last tick was the spawner spawned something, since there are not any methods in java that I know of that have expiring data objects which would run more efficiently than this
from iridiumskyblock.
Related Issues (20)
- How to edit an island as an admin HOT 4
- Often some daily missions do not give rewards in /is rewards HOT 3
- Deleting island can remove itens from visiting players
- Placeholders are bad optimized HOT 1
- Players can lavacast outside the island boundries and reach the right next island and grief it. HOT 1
- Critical menu bad optimization HOT 4
- Stealing obsidians HOT 3
- Bad optimization when there are a lot of players HOT 2
- High timings problem (low tps) HOT 6
- the iridiumskyblock.fly true permission gives you the /is fly active in executable in all worlds HOT 6
- Rewards infinitely clickable in /is rewards HOT 1
- Placing and interacting without permission HOT 1
- Regen cost applies to first island creation HOT 1
- [1.16] Appache commons library missing HOT 1
- Placeholders are missing for when you dont have an island HOT 4
- XSeries changed their Enchantment enum's so the old configs will break HOT 1
- Movement Bug/Glitch on Latest Version 4.0.9.1 for Bedrock clients HOT 16
- Placeholders for Experience and BlockValue are backwards
- Problem with block placement HOT 1
- [Bug] Test
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 iridiumskyblock.