Commit Graph

561 Commits

Author SHA1 Message Date
Németh Noel
1ac99fa44c Moved parser method to ArgumentRelativeVec.java and made the class package-private 2021-07-09 15:40:19 +02:00
Németh Noel
cfad7a4145 Fix parsing 2021-07-09 15:17:35 +02:00
Németh Noel
732f565489 fix number conversion 2021-07-09 02:56:34 +02:00
Németh Noel
a6b4b17279 Reduced boilerplate, RelativeVec#parse takes a parser function 2021-07-09 02:45:10 +02:00
Németh Noel
0f569d85f0 Fix checks 2021-07-09 01:51:08 +02:00
Németh Noel
86be5ad9c5 Simplify parsing 2021-07-09 01:34:17 +02:00
TheMode
45d7420397 Remove most Position/BlockPosition usage 2021-07-08 18:56:40 +02:00
TheMode
90ce845cdb Allow Point in setInstance 2021-07-08 18:26:26 +02:00
TheMode
c2a84c25b5 Fix RelativeVec 2021-07-08 18:15:57 +02:00
TheMode
fff78cdf94 Move coordinate package 2021-07-08 13:48:28 +02:00
TheMode
ca2a2eb233 Rename with to apply 2021-07-08 13:22:04 +02:00
TheMode
c9b2356a0b Fix entity chunk tracking 2021-07-07 19:20:58 +02:00
TheMode
080efa5eba Add toString impl 2021-07-07 19:04:14 +02:00
TheMode
84eb0a8934 Fix build 2021-07-07 14:59:53 +02:00
TheMode
8a5147c994 More fixes 2021-07-07 01:32:30 +02:00
Németh Noel
4187bc0e4d Add epsilon operator 2021-07-07 00:57:47 +02:00
TheMode
28dca16b29 Initial position api implementation 2021-07-06 20:44:24 +02:00
TheMode
6275154997 Public operator interfaces 2021-07-05 11:39:51 +02:00
TheMode
799dbf4a61 Point interface improvement 2021-07-05 11:38:33 +02:00
TheMode
796b6820ce Start implementing the new coordinate API 2021-07-05 09:10:03 +02:00
TheMode
aa0868f02a Merge branch 'new-position-api' into new-block-api
# Conflicts:
#	src/test/java/demo/PlayerInit.java
2021-07-05 08:27:49 +02:00
TheMode
0d031d4c15 Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/instance/DynamicChunk.java
#	src/main/java/net/minestom/server/instance/Instance.java
#	src/main/java/net/minestom/server/instance/InstanceContainer.java
#	src/main/java/net/minestom/server/instance/SharedInstance.java
#	src/main/java/net/minestom/server/instance/block/CustomBlock.java
#	src/test/java/demo/Main.java
#	src/test/java/demo/blocks/CustomBlockSample.java
#	src/test/java/demo/blocks/UpdatableBlockDemo.java
2021-07-05 08:21:47 +02:00
TheMode
da4acf7966 Deprecate previous coordinate classes 2021-07-05 08:18:14 +02:00
TheMode
4414baf89b Move classes & some methods 2021-07-05 08:01:43 +02:00
MrGazdag
02abb81b85
inline NotNull and add Contract annotations 2021-07-04 18:00:09 +02:00
MrGazdag
118159d354
Add rotation methods
Adds the `rotateAroundX(double)`, `rotateAroundY(double)` and `rotateAroundZ(double)` methods
2021-07-04 17:54:43 +02:00
TheMode
1a55644c5e Merge branch 'master' into new-position-api 2021-07-04 17:40:18 +02:00
MrGazdag
6cba2cb7c7
Fix Vector rotation
The Vector class' rotateAround methods were modifying the used variables during the rotation, which should not be the case. Bukkit's similar Vector class manages to do this correctly.
2021-07-04 17:18:17 +02:00
TheMode
0f98877b95 documentation 2021-07-04 12:10:52 +02:00
Németh Noel
34d2d5892e Remove unnecessary util method 2021-07-03 14:57:45 +02:00
Németh Noel
efb450ce50 Simplify conversion logic and only use java.time 2021-07-03 14:45:31 +02:00
TheMode
5954988498 Use constructors in preparation for jdk16 records 2021-07-03 07:42:56 +02:00
TheMode
a729846eae Remove getter redirection 2021-07-03 07:26:41 +02:00
TheMode
11860040fa Allow points inside some vec methods 2021-07-03 03:25:53 +02:00
TheMode
061b6091e9 Make Pos & Vec proper classes (in the future record then primitive) 2021-07-03 03:07:18 +02:00
TheMode
dd1bf74837 Add missing annotation 2021-07-03 02:45:17 +02:00
TheMode
f44fd0af8c Make Pos an interface 2021-07-03 02:43:09 +02:00
TheMode
0f869f3cf2 Add lengthSquared & #eq 2021-07-03 02:24:45 +02:00
Németh Noel
cda5860440 Use a more logical way to convert to milliseconds 2021-07-02 19:47:15 +02:00
Németh Noel
ba2dcaac43 Deprecate TimeUnit#TICK instead of removing 2021-06-30 13:22:46 +02:00
Németh Noel
c9dd06ba20 Simplified millis calculation 2021-06-30 13:10:22 +02:00
Németh Noel
f4b761c50c Made TimeUnit constructor private 2021-06-30 12:48:42 +02:00
Németh Noel
779e6bd22e Added TimeUnit#getMillis method 2021-06-30 12:45:37 +02:00
TheMode
58dd927afb Add Interpolation interface 2021-06-30 06:03:29 +02:00
TheMode
2f7ba7e514 Reuse equals code 2021-06-30 03:14:18 +02:00
TheMode
408134bd63 Remove unused constructor 2021-06-30 02:58:05 +02:00
TheMode
2eaef3bf64 Add equals/hashCode/toString implementation for Vec 2021-06-30 02:26:29 +02:00
TheMode
c859a8e148 More final 2021-06-30 02:19:11 +02:00
TheMode
34e2f4d022 cleanup 2021-06-30 02:10:56 +02:00
TheMode
b93f1a57cd Create more Vec implementations 2021-06-30 01:53:01 +02:00