Commit Graph

3261 Commits

Author SHA1 Message Date
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
fe1bfaee93
Merge pull request #346 from Kebab11noel/fix/issue-258
Deprecate `UpdateOption`
2021-07-04 13:37:15 +02:00
TheMode
0f98877b95 documentation 2021-07-04 12:10:52 +02:00
TheMode
677ec61f74
Merge pull request #338 from Moulberry/master
Changes to Hologram API
2021-07-04 08:12:07 +02:00
BuildTools
323fcbe114 Remove MarkerHologram class, add parameter to Hologram constructor 2021-07-04 14:04:55 +08:00
BuildTools
6a2846a9c6 Check whether entityMeta is an instanceof ArmorStandMeta, instead of checking entity type 2021-07-04 13:58:57 +08:00
jglrxavpok
18771386c0 Slightly less restrictive package protection in MinestomRootClassLoader.
Should fix issue with Configurate not loading.
2021-07-03 18:52:21 +02:00
Németh Noel
cd65085df2 Use Duration 2021-07-03 15:29:28 +02:00
Németh Noel
b012ffbff3 Use Duration 2021-07-03 15:27:23 +02:00
Németh Noel
67860d5afb Use Duration 2021-07-03 15:25:41 +02:00
Németh Noel
34d2d5892e Remove unnecessary util method 2021-07-03 14:57:45 +02:00
Németh Noel
39dd5bfbf9 Removed duplicated code 2021-07-03 14:56:22 +02:00
Németh Noel
663e53c875 Add alternative to LivingEntity#setFireDamagePeriod that takes Duration 2021-07-03 14:52:51 +02:00
Németh Noel
efb450ce50 Simplify conversion logic and only use java.time 2021-07-03 14:45:31 +02:00
Németh Noel
3f1c433c94 Removed unnecessary deprecations 2021-07-03 14:41:57 +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
de51970965 Experimental inverse batch option 2021-07-03 06:42:06 +02:00
TheMode
7fcd4039cb Add batch option to do not send chunk packet 2021-07-03 05:45:55 +02:00
TheMode
10aeb32b45 Merge branch 'master' into new-block-api 2021-07-03 04:24:01 +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
75ee08821f
Merge pull request #347 from GreenpixDev/master
Fix automatic component translation
2021-07-03 02:43:43 +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
3e0486cfd3 Added #setFireForDuration(Duration) 2021-07-02 19:58:59 +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
075dab79c9 Use ChronoUnit instead of TimeUnit 2021-07-02 19:35:19 +02:00
Németh Noel
a5f2705118 Fix hasUpdate check 2021-07-01 15:16:10 +02:00
Németh Noel
157eb6357a Deprecated net.minestom.server.entity.ItemEntity.setPickupDelay(long, java.time.temporal.TemporalUnit) 2021-07-01 15:08:31 +02:00
Németh Noel
bcc1132ed7 Deprecated net.minestom.server.entity.Entity.scheduleRemove(long, java.time.temporal.TemporalUnit) 2021-07-01 15:03:16 +02:00
TheMode
5969ec1709 Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/item/ItemMetaBuilder.java
2021-07-01 02:22:20 +02:00
TheMode
2e8b3477bf Improve tick scheduling 2021-07-01 00:34:58 +02:00
TheMode
997e35459e Do not use the thread as blocker 2021-06-30 23:34:21 +02:00
Németh Noel
fdf7153986 Flip ?: null check 2021-06-30 22:28:54 +02:00
Németh Noel
059565b397 Flip ?: null checks 2021-06-30 22:25:24 +02:00
Németh Noel
ec4d24b9a8 Add null check 2021-06-30 22:14:58 +02:00
Németh Noel
a5a370783d Removed redundant check 2021-06-30 22:00:05 +02:00
Greenpix
bc768c32af Fix automatic component translation
Removed modifier "final" from the field "AUTOMATIC_COMPONENT_TRANSLATION" in MinestomAdventure.java
2021-06-30 19:34:51 +07:00
Németh Noel
373ef90535 Fix javadoc 2021-06-30 13:36:26 +02:00
Németh Noel
c683acaf6e Fix PotionMeta.java 2021-06-30 13:26:45 +02:00
Németh Noel
d735ba5fff Fix missing Deprecated annotation 2021-06-30 13:25:24 +02:00
Németh Noel
7ff5173e03 Fix PingPacket.java 2021-06-30 13:23:32 +02:00
Németh Noel
ba2dcaac43 Deprecate TimeUnit#TICK instead of removing 2021-06-30 13:22:46 +02:00
Németh Noel
f9c9b4c1eb Fix old usage of TimeUnit 2021-06-30 13:20:02 +02:00
Németh Noel
ca78305d40 Fix OpenToLAN.java 2021-06-30 13:19:03 +02:00
Németh Noel
c9dd06ba20 Simplified millis calculation 2021-06-30 13:10:22 +02:00
Németh Noel
01dfe2f48d Replaced ChronoUnit with TimeUnit for consistency 2021-06-30 13:05:52 +02:00
Németh Noel
c037ea9d84 Replaced Tick and ChronoUnit with TimeUnit for consistency 2021-06-30 13:04:59 +02:00
Németh Noel
117bcb467a Replaced Tick and ChronoUnit with TimeUnit for consistency 2021-06-30 13:02:42 +02:00
Németh Noel
b0af01ee89 Updated multiple files 2021-06-30 12:59:38 +02:00
Németh Noel
b8441a0fd7 Updated TaskBuilder.java 2021-06-30 12:51:20 +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
Németh Noel
aaa3b91424 Updated multiple files 2021-06-30 01:54:11 +02:00
TheMode
b93f1a57cd Create more Vec implementations 2021-06-30 01:53:01 +02:00
TheMode
c42b494a62 Add shortcuts for math with a single value vector 2021-06-30 01:46:20 +02:00
Németh Noel
25183973dc Updated Instance.java 2021-06-30 01:46:03 +02:00
Németh Noel
2c9f0c5e67 Updated ClientPingServerEvent.java 2021-06-30 01:42:54 +02:00
Németh Noel
6a4de332a6 Updated RangedAttackGoal.java 2021-06-30 01:35:33 +02:00
Németh Noel
68b94674d0 Updated MeleeAttackGoal.java 2021-06-30 01:34:27 +02:00
Németh Noel
b8b8a40a99 Updated CombinedAttackGoal.java 2021-06-30 01:33:13 +02:00
Németh Noel
7e82c02536 Updated Player.java 2021-06-30 01:31:09 +02:00
Németh Noel
56017b90e2 Updated ItemEntity.java 2021-06-30 01:29:02 +02:00
Németh Noel
6db9ba63f4 Updated EntityFireEvent.java 2021-06-30 01:20:52 +02:00
TheMode
156e89e490 Add Component title constructor for inventory types 2021-06-30 01:19:17 +02:00
Németh Noel
d522730cd7 Updated FollowTargetGoal.java 2021-06-30 01:15:54 +02:00
Németh Noel
30abfce554 Updated Cooldown.java 2021-06-30 01:07:38 +02:00
Németh Noel
580509c420 Added UpdateOption#toDuration method 2021-06-30 01:05:20 +02:00
Németh Noel
67dc8bf996 Updated Entity.java 2021-06-30 00:59:26 +02:00
Németh Noel
0c849c005b Optimized imports of LivingEntity.java 2021-06-30 00:52:16 +02:00
Németh Noel
384c556caf Updated LivingEntity.java 2021-06-30 00:51:22 +02:00
Németh Noel
7f9737d866 Updated UpdateOption.java so it doesn't break with the TimeUnit.java change 2021-06-30 00:46:08 +02:00
Németh Noel
7b126f5d13 Updated BenchmarkManager.java 2021-06-30 00:32:06 +02:00
Németh Noel
e23b65c2df Updated OpenToLANConfig.java 2021-06-30 00:29:44 +02:00
Németh Noel
ff4bb20a04 Repurpose TimeUnit.java 2021-06-30 00:14:26 +02:00
Németh Noel
4b04539086 Included Tick.java from PR#205 with slight modifications 2021-06-29 23:44:19 +02:00
Németh Noel
5e731e5ba9 Updated EntityFireEvent.java 2021-06-29 23:04:25 +02:00
Németh Noel
ab80ffcd0e Updated ArgumentTime.java 2021-06-29 22:38:37 +02:00
Németh Noel
0a4166faf2 Made duration final 2021-06-29 22:25:32 +02:00
Németh Noel
b98abe8dd5 Updated Cooldown.java 2021-06-29 22:24:34 +02:00
Németh Noel
8f906d80d0 Added tick as a TemporalUnit 2021-06-29 22:22:30 +02:00
Németh Noel
7e82edcbd9 Marked classes deprecated for removal 2021-06-29 22:21:30 +02:00
TheMode
95e69c6f53 Remove float cast 2021-06-29 21:14:27 +02:00
TheMode
fda7b8cda1 Add boring math methods 2021-06-29 20:15:37 +02:00
TheMode
f8a9664fd9 Merge branch 'master' into new-position-api 2021-06-29 20:10:52 +02:00
TheMode
dab17f44d5 Add unary operators 2021-06-29 19:59:38 +02:00
TheMode
6cc7ae5b23 Add unary operators 2021-06-29 04:11:02 +02:00
TheMode
43ac1c53e3 Add block position conversion 2021-06-29 00:08:56 +02:00
TheMode
fbb8c1a819
Merge pull request #344 from Kebab11noel/fix/gravity
Fix gravity
2021-06-29 00:08:40 +02:00
TheMode
5dfecce5d5 Cleanup 2021-06-28 23:31:01 +02:00
TheMode
790e99bce3 Simplify synchronization 2021-06-28 23:27:12 +02:00
Németh Noel
f6425d9fb2 Reduce the visibility of Entity#initializeDefaultGravity 2021-06-28 21:58:59 +02:00
Németh Noel
796d296f0d Removed terminal velocity 2021-06-28 19:24:53 +02:00
Németh Noel
13779aabde Fix knockback 2021-06-28 19:23:36 +02:00
Németh Noel
1ea526aa89 Fix gravity acceleration 2021-06-27 23:29:28 +02:00
Németh Noel
6c60c4d0fc Implement knockback 2021-06-27 23:05:54 +02:00
Németh Noel
17aa606037 Added javadoc to gravity related fields 2021-06-27 22:48:58 +02:00
Németh Noel
811531da70 Remove unit conversion 2021-06-27 22:45:05 +02:00
Németh Noel
adf0e06888 Changed gravity calculation 2021-06-27 22:44:04 +02:00
Németh Noel
e66fc2d200 Removed usages of Entity#setGravity 2021-06-27 22:32:56 +02:00
Németh Noel
b900d0e73d Introduced Entity#initializeDefaultGravity method 2021-06-27 22:29:25 +02:00
TheMode
018a9263ee Remove all direct volatile reads 2021-06-27 17:41:07 +02:00
TheMode
e772aace71 Initial reusable meta builder 2021-06-27 17:36:37 +02:00
TheMode
a29f5f1274 Add static parse for ArgumentBlockState 2021-06-27 17:05:57 +02:00
TheMode
e95cc4d295 Merge branch 'master' into new-block-api 2021-06-27 16:17:26 +02:00
TheMode
edaec0cb6d Fix double click inside player inventory 2021-06-27 05:44:24 +02:00
TheMode
b541ef4a74 Simplify block implementation 2021-06-26 20:23:56 +02:00
TheMode
4f4afbbe6d Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/instance/Chunk.java
#	src/main/java/net/minestom/server/instance/Instance.java
2021-06-26 20:09:47 +02:00
TheMode
fbf8ddefce Add Tag#SNBT write support 2021-06-26 19:52:35 +02:00
TheMode
5ddfff22f2 Add Tag#NBT write support 2021-06-26 19:44:35 +02:00
BuildTools
efbb2b6338 Marker Armor Stands no longer prevent block placement 2021-06-26 19:47:29 +08:00
BuildTools
eb4d29628e Create MarkerHologram.java, modify Hologram.java to support subclasses overriding metadata easily 2021-06-26 19:39:53 +08:00
TheMode
bf44625730 Add experimental tags 2021-06-26 05:08:33 +02:00
TheMode
60042effba Merge remote-tracking branch 'origin/master' 2021-06-26 00:31:13 +02:00
TheMode
76bec54254 Add more TagHandler implementations 2021-06-26 00:31:04 +02:00
TheMode
3c04da9ae9 Add dummy block handler 2021-06-25 19:10:41 +02:00
TheMode
74073f13b5 Use classes instead of interfaces for BlockHandler type 2021-06-25 19:00:50 +02:00
BuildTools
e69c02f46d Change other usages of PacketUtils#sendGroupedPacket to use new convenience method 2021-06-25 20:41:54 +08:00
BuildTools
07a2b37f35 Add Javadoc 2021-06-25 20:34:19 +08:00
BuildTools
d84964d55b Add sendGroupedPacket convenience method to PacketGroupingAudience 2021-06-25 20:32:13 +08:00
TheMode
6526a2658a Replace netty to jdk thread local random 2021-06-25 06:45:02 +02:00
TheMode
5d8c9cbd23 Fix chunk border freeze by not sending UnloadChunkPacket 2021-06-24 23:40:09 +02:00
TheMode
b155fb6720 Micro-optimization for BlockLoader 2021-06-24 23:13:31 +02:00
TheMode
778dda08d6 Add more information about block tag<->nbt 2021-06-24 23:02:40 +02:00
TheMode
4ef056dfed Fix block comparison in placement rules 2021-06-24 20:59:58 +02:00
TheMode
b49ccadadc Save blocks nbt without handler 2021-06-24 16:16:41 +02:00
TheMode
8ff7eed45c Ensure that the block entity has nbt 2021-06-24 16:13:00 +02:00
TheMode
faa7c512af Support block nbt without handler 2021-06-24 16:06:11 +02:00
TheMode
ddba34712e Call BlockHandler#onInteract 2021-06-23 22:39:17 +02:00
TheMode
78898bfa9b Simplify pathfinding block 2021-06-23 22:24:40 +02:00
TheMode
48b1aa90db Improve BlockHanlder placement listener 2021-06-23 20:18:34 +02:00
TheMode
af9e102ec1 Add documentation to Block 2021-06-23 18:29:19 +02:00
TheMode
aa2347bf9c Remove BlockProperty.java 2021-06-23 17:54:34 +02:00
TheMode
4bbd89f78d Rename BlockImpl 2021-06-23 17:41:46 +02:00
TheMode
33300e978c Reduce lighting issues 2021-06-23 15:52:27 +02:00
TheMode
1ae057428b Remove unused methods 2021-06-23 15:25:05 +02:00
TheMode
408e80799e Fix Block#withProperty 2021-06-23 14:13:28 +02:00