05-19-2017, 04:33 PM
(This post was last modified: 05-19-2017, 04:33 PM by Seadragon91.)
Fixed a bug with generation of englisch language file, it was not generated for new installations.
SkyBlock v3
|
||||||||
05-19-2017, 04:33 PM
(This post was last modified: 05-19-2017, 04:33 PM by Seadragon91.)
Fixed a bug with generation of englisch language file, it was not generated for new installations.
07-29-2017, 04:06 AM
(This post was last modified: 07-29-2017, 04:07 AM by Seadragon91.)
Updated:
- Fixed cBlockArea:Write call - Player was not send to island on "/skyblock play"
10-06-2019, 06:00 AM
(This post was last modified: 10-06-2019, 07:16 AM by Seadragon91.)
Doing a rework of my plugin:
Be aware, that I am still reworking this. Also this version is not compatible with the old one, to many changes. The changes are in a own branch named rework on github: https://github.com/Seadragon91/SkyBlock/tree/rework @xoft Would it be okay to add a function to cBlockArea that would count all blocks and return a lua table in that format?
I thought when I would get all blocks from the chunk. I could do this above, but the result was much worse then the current solution and that uses cBlockArea:CountSpecificBlocks to count all blocks, and it does that currently 147 times.. If that would be okay, how can I export a lua table that contains a lua table in c++ ![]()
10-06-2019, 08:38 AM
Any reason why you can't implement the function in the plugin itself? WorldEdit is able to do large actions on a cBlockArea, so I'm sure SkyBlock van as well.
10-06-2019, 05:31 PM
(This post was last modified: 10-06-2019, 05:36 PM by Seadragon91.)
This are the results from my skyblock plugin for a single chunk, all in milliseconds. The difference is that sykblock is mostly of air and with that I don't need let cuberite count the air blocks and this is much faster.
Function CountAllNonAirBlocksAndMetas in cBlockArea
The reason for 147 times with CountSpecificBlocks is that I check for 147 block id / metas in the island area to calculate the points of a island area. Tested that function in WorldEdit in a normal generated world, the amount of air blocks I can get by just subtracting the found blocks with the volume: Changes in WorldEdit
That's the results I have.
10-06-2019, 08:16 PM
This seems to work pretty well to count all the blocks:
10-06-2019, 08:38 PM
I have already tested something like that and it's slower than the solution where I use CountSpecificBlocks that will be called 147 times
![]()
10-06-2019, 08:41 PM
Could you try that again but with `tbCounted` as a local variable instead of global?
10-06-2019, 08:47 PM
This variable will be cleared before the blocks are counted. There will be no change.
10-06-2019, 09:02 PM
Global variables are saved in _G (a table) which means the tbCounted variable has to be fetched again every time in the loop. Local variables are written to a register which is much faster.
| ||||||||
« Next Oldest | Next Newest »
|