70 Commits
Author SHA1 Message Date
chill 6517272910 remove commented-out code and obscure comments 2023-06-18 14:13:52 +02:00
chill 2ecc5e7c35 fix typos and formatting in Readme 2023-06-18 12:47:23 +02:00
chill 801a7f78a3 remove unused TileVortex imports
During the rebase, some commit brought the imports back.
They were removed by Spotless when the project was built.
2023-06-18 12:45:48 +02:00
chill 71df83d933 use pattern variables in instanceof 2023-06-18 12:13:10 +02:00
chill fc923e182c use enhanced switch 2023-06-18 12:13:10 +02:00
chill 6984aaead7 enable modern syntax through Jabel 2023-06-18 12:13:10 +02:00
chill df47180317 remove redundant type casts
Also apply missing diamond operator because resolving a merge conflict messed
up with TileVortex.
2023-06-18 12:12:22 +02:00
chill 325fa23585 remove redundant array creation 2023-06-18 12:06:54 +02:00
chill 785bb27638 replace substring call by startsWith 2023-06-18 12:06:54 +02:00
chill 08fe020650 replace same values with a variable 2023-06-18 12:06:54 +02:00
chill 9f769476a6 rename adjusted critter health 2023-06-18 12:06:54 +02:00
chill d3fd6376dc rename adjusted selfInfusionHealth 2023-06-18 12:06:54 +02:00
chill f16650e95a replace manual min and max calculations 2023-06-18 12:06:54 +02:00
chill 3215c7c47a replace manual array filling 2023-06-18 12:06:54 +02:00
chill 7112eb8f41 merge duplicate switch branches 2023-06-18 12:06:54 +02:00
chill 17e20e08fc remove conditions that are covered by further conditions 2023-06-18 12:06:54 +02:00
chill 9fb1d4b332 add todo to check the correctness of the call 2023-06-18 12:06:54 +02:00
chill e6f2db0139 fix incorrect string comparison 2023-06-18 12:06:54 +02:00
chill 7d0738de7a variable already assigned to this value 2023-06-18 12:06:54 +02:00
chill 39a295f3e5 rename stack in slot 2023-06-18 12:06:54 +02:00
chill d8fbdd145d rename crafting inventory 2023-06-18 12:06:54 +02:00
chill 87baa5963f update type to a primitive where possible 2023-06-18 12:06:54 +02:00
chill 673f37a1ec replace string by StringBuilder 2023-06-18 12:06:54 +02:00
chill 75a5c8be44 simplify array copy 2023-06-18 12:06:54 +02:00
chill 6be38cc693 simplify array population 2023-06-18 12:06:54 +02:00
chill f0dfce4c27 remove pointless arithmetic expressions 2023-06-18 12:06:54 +02:00
chill 25de863764 cast integer multiplication to long 2023-06-18 12:06:54 +02:00
chill 29d3d2d25a simplify Map operations 2023-06-18 12:06:54 +02:00
chill 26debe826f replace override with lambda 2023-06-18 12:06:54 +02:00
chill 1e8cc79148 replace explicit types with diamond operators 2023-06-18 12:06:48 +02:00
chill 2012f27d74 remove unnecessary boxing 2023-06-18 12:05:41 +02:00
chill ed7913739a refactor addInformation: rename hashmap into what it probably is for 2023-06-18 12:05:41 +02:00
chill ff212745a3 refactor addInformation: rename probably converted amount 2023-06-18 12:05:41 +02:00
chill 43d5d94c92 refactor addInformation: rename value amount 2023-06-18 12:05:41 +02:00
chill a21d447ed0 refactor addInformation: remove redundant cast 2023-06-18 12:05:41 +02:00
chill 3f84e365e3 refactor addInformation: rename entry value 2023-06-18 12:05:41 +02:00
chill f9c2aa5c10 refactor addInformation: rename map entry 2023-06-18 12:05:41 +02:00
chill d7c261316f refactor addInformation: remove redundant string 2023-06-18 12:05:41 +02:00
chill 0bdbbb0d11 refactor addInformation: use map.isEmpty instead of map.size 2023-06-18 12:05:41 +02:00
chill 8323771c10 refactor addInformation: rename attribute modifier 2023-06-18 12:05:41 +02:00
chill db13268550 refactor addInformation: remove redundant cast 2023-06-18 12:05:41 +02:00
chill e8e8ae934f refactor addInformation: rename entry value 2023-06-18 12:05:40 +02:00
chill 33402b81ae refactor addInformation: add empty lines for visual clarity 2023-06-18 12:05:40 +02:00
chill 9a0b266519 refactor addInformation: rename message variable 2023-06-18 12:05:40 +02:00
chill d3ecb3eab6 refactor addInformation: use typed generics rather than raw ones 2023-06-18 12:05:40 +02:00
chill 6a6952cb29 refactor addInformation: rename potion-effects list 2023-06-18 12:05:40 +02:00
chill 0cd8f3ecc2 refactor addInformation: rename input parameters 2023-06-18 12:05:40 +02:00
chill 8634f9e288 refactor While into For 2023-06-18 12:05:40 +02:00
chill d01fd12b68 refactor EventHandlerEntity.applyNewAI 2023-06-18 12:05:40 +02:00
chill 932c06c396 remove redundant casts 2023-06-18 12:05:40 +02:00
chill 8b23575edb fix raw use of parameterized types where possible 2023-06-18 12:05:40 +02:00
chill 69d63f22b5 enhanced for loops 2023-06-18 12:05:40 +02:00
chill cbf90c89d3 make nested classes static where possible
A static inner class does not keep an implicit reference to its enclosing
instance. This prevents a common cause of memory leaks and uses less memory
per instance of the class.
2023-06-18 12:05:40 +02:00
chill ec3d51f69a properly access static fields by referencing the class 2023-06-18 12:05:40 +02:00
chill 69c22b51bc remove unused local variables 2023-06-18 12:05:40 +02:00
chill 90bb0b6621 inline variables 2023-06-18 12:05:40 +02:00
chill 3ff1e2ae3d simplify IFs 2023-06-18 12:05:40 +02:00
chill f768215031 explicitly state that the exception is ignored 2023-06-18 12:05:40 +02:00
chill c4ec1dadd3 replace 1-branch switches with if 2023-06-18 12:05:40 +02:00
chill 3444b1132f extract common parts from ifs 2023-06-18 12:05:40 +02:00
chill 9e7cfebeca remove private modifier from an enum constructor
Enum constructors are private by definition.
2023-06-18 12:05:40 +02:00
chill 89dd677196 make private fields final where fitting 2023-06-18 12:05:40 +02:00
chill e3945f8e84 rename method parameters 2023-06-18 12:05:39 +02:00
chill cda63c4433 rename private class field 2023-06-18 12:05:39 +02:00
chill 38c7e8d005 remove commented code 2023-06-18 12:05:39 +02:00
chill 65d603bf6f update fields from private to private static final
That is done to retain the explanation of what this value does.
Alternatively, the variable could be inlined, but then it would be harder to
understand what exactly this value is for.
2023-06-18 12:05:39 +02:00
chill 4cf447e0a0 update dependencies to api from compile 2023-06-18 12:05:39 +02:00
chill 5032732d9a Remove unsafe not-working threading
The threading was not working because `Thread.run()` does not start a new
thread. `Thread.start()` should've been used for that.

First two `if`s can be summarized as "if dimension is not created then create
it, and if it's already created then handle it".

Because `createDimension` is now single-threaded, we can call it without
checking if it's already in the process of creating a dimension.

The handling of creating a dimension was put in `createDimension`.
2023-06-16 15:24:07 +02:00
chill e229b31ef9 gradle spotlessApply 2023-06-14 21:30:05 +02:00
chill e7c5c19bb3 gradle updateBuildScript 2023-06-14 21:29:00 +02:00