Commit Graph

19 Commits

Author SHA1 Message Date
tastybento aaa1504dc6 WIP multipaper 2024-04-07 17:05:21 -07:00
tastybento 23857501f5
Static code analysis (#1844)
* StringBuffer (Java 5) may be declared as StringBuilder

* Replace map with flatMap

* Use instanceof naming

* No need to specify paramter types.

* Remove verbose code

* Fix JavaDoc issues

* Make internal class a record.

* Remove unused import.

* Make internal class a record.

* Made internal class a record.

* Removed unused import

* Fix typos

* Fix typo in test.
2021-08-29 18:17:38 -07:00
tastybento 9dc4ebc2d1
Make variables final if they can be. (#1843)
* Make variables final if they can be.

* Do not use final so that test can pass.

For testing, we use a trick to set this variable, but it won't work if
it is final. Right now, I'd like to keep the test.
2021-08-29 18:17:21 -07:00
Florian CUNY c0a38fb9eb Fixed another bunch of code smells (Sonarcloud) 2019-12-30 15:36:17 +01:00
Florian CUNY 704c249b49 Fixed some code smells (Sonarcloud) 2019-12-30 14:54:11 +01:00
tastybento 4b6ec575be Fixes bug when loaded a large number of islands.
Also attempts to fix duplicate islands during loading.

See https://github.com/BentoBoxWorld/BSkyBlock/issues/144
2019-06-19 20:44:59 -07:00
Florian CUNY c0c2b63af6 Fixed spacing in "cannot add island to grid" error in IslandGrid 2019-02-21 18:29:41 +01:00
tastybento 68873e033f Added defensive code to handle island adding to grid.
When an island cannot be added to the grid, it should show some helpful
console error.

Related to https://github.com/BentoBoxWorld/bentobox/issues/326
2018-11-10 10:04:37 -08:00
tastybento 68624d2879 Removed unused imports. Removed unused classes InventorySave/Store 2018-08-15 20:30:34 -07:00
Florian CUNY 0a0d66eebf Fix for the two last revert commits. 2018-08-15 09:58:01 +02:00
Florian CUNY bce73a551d Revert "Rewrote IslandGrid to use Table<> from Guava"
This reverts commit b54c7ad662.
2018-08-15 09:53:25 +02:00
Florian CUNY 82ebc8b018 Revert "Fixed IslandCacheTest"
This reverts commit 8fb4e58994.
2018-08-15 09:51:41 +02:00
Florian CUNY d926873992 Revert "Rewrote IslandGrid.Cell"
This reverts commit bfff61e6a1.
2018-08-15 09:51:12 +02:00
tastybento fc066a04a3 Added SuppressWarnings to classes using deprecated regenerateChunk 2018-08-14 19:09:14 -07:00
Florian CUNY bfff61e6a1 Rewrote IslandGrid.Cell
Removed CellState.RESERVED for now
Made the Object an Island for now
Validate#notNull() in constructor
Made state and island variables final

Also updated the filters
2018-08-14 20:49:05 +02:00
Florian CUNY 8fb4e58994 Fixed IslandCacheTest
Also commented out CellState.RESERVED.

That was a tough one. I had to rewrite IslandGrid#getIslandAt(int, int) quite a few times before using the stream() thing. I tested it a bit - it seems it is working like a charm.
I just hope that it won't be something useless - another plumbing change that adds nothing. It shouldn't - because of the "RESERVED" thing - but, well... it's been quite a hard thing!
2018-08-14 11:38:44 +02:00
Florian CUNY b54c7ad662 Rewrote IslandGrid to use Table<> from Guava
It also prepares further implementation for reserved "locations"
2018-08-13 21:45:43 +02:00
tastybento 4fab167d10 Fixed build errors.
Reverted back the generic commands for use by addons.

WIP - some tests need fixing for 1.13.
2018-08-01 08:55:48 -07:00
Florian CUNY 3473fb48e6 Renamed 'world.bentobox.bbox' to 'world.bentobox.bentobox' 2018-07-31 18:03:32 +02:00