Commit Graph

4076 Commits

Author SHA1 Message Date
TheMode
9b9d3f3405 Better chunk packet caching 2021-08-04 16:49:01 +02:00
TheMode
58f0f3ec89 Light cleanup 2021-08-04 14:47:19 +02:00
TheMode
7320d83175 Reduce exception spam 2021-08-04 12:52:49 +02:00
TheMode
174ef14303 Reuse grouped buffers 2021-08-04 12:41:15 +02:00
TheMode
0d91f9efc6 Close the main selector 2021-08-04 05:19:11 +02:00
TheMode
8895e49a52 Improve socket shutdown 2021-08-04 05:15:40 +02:00
TheMode
557d34c378 Reduce allocation count 2021-08-04 04:00:42 +02:00
TheMode
9bb50430d4 Fix memory leak, decrease socket size 2021-08-04 03:53:01 +02:00
TheMode
5adeed392b Flush packet sync
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-04 00:48:35 +02:00
TheMode
66b567597a Fix connection crash
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-04 00:37:17 +02:00
TheMode
548cee55e0 Fix compression
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 21:16:24 +02:00
TheMode
65df72fa82 Remove write branching
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 20:18:38 +02:00
TheMode
6db55ce91f Always flip
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 20:02:27 +02:00
TheMode
9f1efb0932 Fix writer to array conversion
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 19:54:32 +02:00
TheMode
fbf6479135 Fix item meta writing
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 19:44:10 +02:00
TheMode
e4a3a3dbae Removed unused buffer + deflater
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 17:05:21 +02:00
TheMode
b35954c05d Fix ping
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 13:09:03 +02:00
TheMode
1c3bb5b0ff First NIO attempt
Signed-off-by: TheMode <themode@outlook.fr>
2021-08-03 12:57:13 +02:00
TheMode
e0cfd4c33c Improve registry data load 2021-08-01 15:39:11 +02:00
TheMode
515b5358da Simplify forDifferencesBetweenArray 2021-08-01 14:10:47 +02:00
TheMode
9a74051cdb Use jdk method for array comparison 2021-08-01 14:00:57 +02:00
TheMode
db9906d0ae Override Block#toString 2021-08-01 13:01:56 +02:00
TheMode
bf48154aee Cache registry collections 2021-08-01 12:05:10 +02:00
TheMode
aa1fc186f0 Use cursor item in windows packet (thanks mojang) 2021-07-31 18:16:19 +02:00
TheMode
e150a6542a More specific Registry annotation/doc 2021-07-31 17:57:46 +02:00
TheMode
d61174235b Use intrinsics math floor 2021-07-30 18:33:37 +02:00
TheMode
b178a6adac Create velocityTick method 2021-07-30 18:10:35 +02:00
TheMode
d0ace7f10e Simplify BlockImpl 2021-07-30 17:34:39 +02:00
TheMode
0bf275afb2 Use getSafe 2021-07-30 17:17:37 +02:00
TheMode
53dea325f9 Move BlockLoader into impl class 2021-07-30 17:16:52 +02:00
TheMode
f865a7b9dd Reduce registry boilerplate 2021-07-30 15:29:05 +02:00
TheMode
c9f234cb1d Use #getSafe 2021-07-30 15:09:18 +02:00
TheMode
3dd35c1605 Use a single registry-impl class per type 2021-07-30 15:08:06 +02:00
TheMode
d7a6891153 Remove vehicle in Entity#remove 2021-07-30 14:01:54 +02:00
TheMode
184140e341 Remove passengers in Entity#remove 2021-07-30 12:38:15 +02:00
BuildTools
0e8109f259 Fix position desynchronization 2021-07-30 17:09:00 +08:00
TheMode
1baf4a5068 Remove unused method 2021-07-30 11:01:43 +02:00
TheMode
31093cf3f0 Fix fluid tags 2021-07-29 15:51:51 +02:00
TheMode
34c5f5133e Remove loot table api 2021-07-29 13:24:29 +02:00
TheMode
24e4b8765e Remove resource gatherer, retrieve tags from our own data generator 2021-07-29 12:54:16 +02:00
TheMode
16e4b61eb7 Fix unused imports 2021-07-29 00:02:43 +02:00
TheMode
5fe72d4e2b Double lock fix 2021-07-29 00:00:08 +02:00
TheMode
d6dd81b35f Change dimension command to teleport to any different instance 2021-07-28 20:30:45 +02:00
TheMode
16fbc5ea2c Simplify Player#setInstance 2021-07-28 17:28:36 +02:00
TheMode
5ff7667691 Add maxDamage for Material registry 2021-07-28 17:00:16 +02:00
TheMode
6a86e92999 Unload all chunks when changing instance 2021-07-28 16:36:21 +02:00
TheMode
de944edf42 Fix item stack argument 2021-07-28 14:35:07 +02:00
TheMode
13b7039721 Replace most enums 2021-07-28 14:29:28 +02:00
TheMode
fa8bab8191 Revert "Remove Fluid enum"
This reverts commit 3c10d93d9c.
2021-07-28 13:48:24 +02:00
TheMode
3c10d93d9c Remove Fluid enum 2021-07-28 13:46:04 +02:00
TheMode
7df7d3ad74 Reuse code for the generator 2021-07-28 13:43:05 +02:00
TheMode
a6a657b9b8 Make Enchantment an interface 2021-07-28 13:27:49 +02:00
TheMode
8dff4227eb Rename registry resource enum 2021-07-28 13:02:12 +02:00
TheMode
ec6bcf2d01
Merge pull request #383 from MrGazdag/patch-8
Set time to negative when timeRate is 0
2021-07-28 09:31:39 +02:00
TheMode
bf53313c3e Use 0.91 drag when not on ground 2021-07-28 09:20:28 +02:00
MrGazdag
24ee50d69e
use -Math.abs() instead 2021-07-27 20:50:17 +02:00
MrGazdag
f35bcb90b9
update Instance 2021-07-27 18:57:11 +02:00
MrGazdag
d3cacb0f25
remove methods 2021-07-27 12:24:25 +02:00
MrGazdag
a20fb32ef5
fix documentation and add hasFlag 2021-07-27 12:11:30 +02:00
MrGazdag
5b1e06de04
use static fields in Player 2021-07-27 12:08:13 +02:00
MrGazdag
a6c6944e56
Update PlayerAbilitiesPacket 2021-07-27 11:56:51 +02:00
TheMode
274a40ea27 Make EntityType an interface 2021-07-27 11:56:20 +02:00
TheMode
00b991e970 Add translation keys 2021-07-27 10:51:38 +02:00
TheMode
82e5873b4f Protocol interfaces to become sealed in the future 2021-07-27 10:28:06 +02:00
TheMode
c549ec1663 Remove legacy registry methods 2021-07-27 09:55:01 +02:00
TheMode
d685a7b136 Make Material an interface 2021-07-27 09:40:57 +02:00
TheMode
5b044a2d38 Update Registry to retrieve a block material 2021-07-27 08:48:45 +02:00
TheMode
b22d030a6f Ask for the flag directly in PlayerAbilitiesPacket 2021-07-27 07:44:06 +02:00
TheMode
de76ac5aad Add UpdateViewPositionPacket constructor 2021-07-27 07:00:04 +02:00
TheMode
d61b1d48b7 Remove SoundCategory.java 2021-07-27 06:58:42 +02:00
TheMode
5285665939 Remove longly deprecated chat package 2021-07-27 06:55:08 +02:00
TheMode
2cc92e5e3e Simplify login process 2021-07-26 15:49:03 +02:00
TheMode
aaa71f4e9a Fix EntityProjectile 2021-07-26 11:53:30 +02:00
TheMode
87e4d84e4a Fix falling block meta 2021-07-26 10:34:18 +02:00
TheMode
25d645a5cb Remove legacy position objects 2021-07-25 06:30:49 +02:00
TheMode
ad964a0a39 Remove deprecated UpdateOption.java 2021-07-25 06:25:32 +02:00
TheMode
adacf6b8aa Improve mapping/filtering 2021-07-25 05:56:52 +02:00
TheMode
e04a5bc2d8 unused import 2021-07-24 14:38:43 +02:00
TheMode
6ce5e8d310 Inline newposition when physics is disabled 2021-07-24 13:06:28 +02:00
TheMode
fdaac26e72 Fix epsilon 2021-07-24 12:53:55 +02:00
TheMode
e3520f4294 Use a fastutil map to store chunks, will be significantly slower when accessed from multiple threads but without generating any garbage, and better for single-threaded use. 2021-07-24 11:44:50 +02:00
TheMode
3a93ab045a Fix with the latest version of MinestomData 2021-07-24 11:22:59 +02:00
TheMode
7f5ea582c9 More packet constructors 2021-07-24 07:45:08 +02:00
TheMode
2ad8fb1c77 Use instance players when possible 2021-07-24 04:39:57 +02:00
TheMode
19e3bee23c Lambda cleanup 2021-07-24 04:31:35 +02:00
TheMode
f7d30feb7f Cleanup EntityFinder 2021-07-24 04:22:50 +02:00
TheMode
6aa55ad7b6 Cleanup 2021-07-24 03:31:03 +02:00
MrGazdag
4b517244a2
Fix incorrect coordinate encoding 2021-07-23 18:20:01 +02:00
TheMode
d146aacd36 Cleanup 2021-07-23 16:14:42 +02:00
TheMode
11b2426629 Micro optimize block properties map 2021-07-23 15:44:53 +02:00
TheMode
8734478126 More packet constructors
Signed-off-by: TheMode <themode@outlook.fr>
2021-07-23 08:15:25 +02:00
TheMode
991de2d0cc Fix ghost item/block when cancelling interaction 2021-07-23 06:12:57 +02:00
TheMode
66904f2539 Lazily init nbt writer in BinaryWriter 2021-07-23 02:48:50 +02:00
TheMode
7fae70ebc1 Add experimental ItemStack#consume 2021-07-23 01:47:43 +02:00
TheMode
6c4cb66737 Merge branch 'master' into new-block-api 2021-07-23 01:09:22 +02:00
MrGazdag
ac2d61d68b
undeprecate ArgumentType.Long() 2021-07-22 19:49:40 +02:00
MrGazdag
d3515c13c3
Change ArgumentLong to use actual longs
why is this not a thing already
2021-07-22 19:44:39 +02:00
TheMode
9db4ac06cc Even more inline packets 2021-07-22 13:01:00 +02:00
TheMode
081266775c More inline packets 2021-07-22 12:50:38 +02:00
TheMode
ff9ca60a58 Add some inline packet constructors 2021-07-22 09:54:34 +02:00
TheMode
690c5b7614 Remove unused method 2021-07-22 00:21:25 +02:00
TheMode
a0bb437c4c Reduce chunk entities Set allocation 2021-07-21 22:21:43 +02:00
TheMode
266ecd5b64 Fix warning 2021-07-21 20:06:12 +02:00
TheMode
fceafb0b1e Load a single chunk on instance spawn 2021-07-21 09:45:13 +02:00
TheMode
bebdcf59d5 Do not allocate arrays when refreshing a player chunks, optimize array lookup 2021-07-21 08:42:49 +02:00
TheMode
94a96d7df1 Improve entity chunk switch 2021-07-21 08:25:44 +02:00
TheMode
953d84add7 Fix string operation when switching an entity chunk 2021-07-21 08:12:03 +02:00
TheMode
60e22e9df8 Merge branch 'master' into new-block-api 2021-07-21 05:48:45 +02:00
TheMode
efc135f48a Handle empty list case, let the try-catch handle NPE 2021-07-20 23:48:13 +02:00
TheMode
bad206d504 Improve anvil block loading performance 2021-07-20 23:40:23 +02:00
TheMode
8f6f63b2c8
Merge pull request #373 from MrGazdag/patch-3
Modify /gamemode to behave more like vanilla
2021-07-20 22:29:52 +02:00
TheMode
cb21b0baf5 Merge branch 'master' into new-block-api 2021-07-20 22:18:43 +02:00
TheMode
40ae462d89 Fix NPE 2021-07-20 22:18:24 +02:00
TheMode
6079f87b38 Merge branch 'master' into new-block-api 2021-07-20 22:16:00 +02:00
LeoDog896
8a7d13c8ad Make the constant static? 2021-07-20 14:07:16 -04:00
LeoDog896
8e849ad947 Add constant in ItemStack for VanillaStackingRule 2021-07-20 14:03:55 -04:00
LeoDog896
7d55d6db87 Add #equals method 2021-07-20 13:58:40 -04:00
TheMode
a074117ea5 Simplify optionalLoadAll 2021-07-20 19:10:53 +02:00
MrGazdag
4348ce50cf
further polish 2021-07-20 17:01:30 +02:00
MrGazdag
471838a77f
capitalize a single N
i missed that lmao
2021-07-20 13:52:04 +02:00
MrGazdag
037dfc2003
Format and comment code
makes the code look nicer
2021-07-20 13:46:57 +02:00
TheMode
1dc80d6b87 Simplify movement processing 2021-07-20 07:05:08 +02:00
TheMode
bca3324b56 Limit chunk map lookup while moving 2021-07-20 06:17:13 +02:00
MrGazdag
ed97de417e
remove pattern matching 2021-07-20 04:15:43 +02:00
MrGazdag
ecdd0181e0
Modify /gamemode to function more like vanilla
Modifies the /gamemode command in the demo, to function like the vanilla /gamemode command, with the syntax `/gamemode <gamemode> [target]`. It also utilizes translation components for players, and allows the console to run the command as well as players.
2021-07-20 03:56:48 +02:00
TheMode
12e430db69 Inline position packets 2021-07-20 03:06:27 +02:00
TheMode
1ff4b7cb74 Do not call the move event when moving at the same position 2021-07-20 02:33:02 +02:00
TheMode
4d2b925edd Improve block#withProperty/ies performance 2021-07-19 23:59:40 +02:00
TheMode
14e42f7907 Micro optimize block placement 2021-07-19 23:41:28 +02:00
TheMode
111d5b9b66 Reduce ItemMeta allocation 2021-07-19 04:34:42 +02:00
TheMode
a61ff53189 Remove deprecated ItemTag 2021-07-19 04:27:44 +02:00
TheMode
d4398bda5b Merge branch 'master' into new-block-api 2021-07-18 17:20:22 +02:00
TheMode
4e93e52333 New command fix attempt 2021-07-18 17:19:48 +02:00
TheMode
cc1719c3c1 Remove unused method 2021-07-18 16:36:09 +02:00
TheMode
22ac1c4998 Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/utils/ArrayUtils.java
2021-07-18 16:20:08 +02:00
TheMode
a07177fbf0 Prevent IOB 2021-07-18 02:13:20 +02:00
TheMode
97104df793 Potentially fix command node creation 2021-07-18 01:09:59 +02:00
TheMode
93fa65f90b Temporary command node fix 2021-07-17 23:21:31 +02:00
TheMode
2ee1470470 Cleanup ArrayUtils 2021-07-17 21:38:32 +02:00
TheMode
ac3cbce278 Fix BlockHandler#onInteract return, simplify block placement code 2021-07-17 21:28:00 +02:00
MrGazdag
0724b8639b
Fix ArrayUtils#sameStart
Fixes #370, which was a weird occurrence of this bug lmao
2021-07-17 21:20:10 +02:00
TheMode
518aab3a44 Add Block#values 2021-07-16 19:39:56 +02:00
TheMode
b07e912063 Fix build 2021-07-15 22:14:57 +02:00
TheMode
55fa083adf Remove longly deprecated player initialization callback 2021-07-15 22:12:11 +02:00
TheMode
ba6e83b6d1 Fix build 2021-07-15 22:01:46 +02:00
TheMode
1c7cd269ab Remove DataContainer from more classes 2021-07-15 21:58:29 +02:00
TheMode
91a01a23b6 Use for-each instead of lambda 2021-07-15 20:09:13 +02:00
TheMode
ebd17fdf81 Inline EffectPacket 2021-07-15 18:31:10 +02:00
TheMode
d3d809f714 Inline EffectPacket 2021-07-15 18:26:02 +02:00
TheMode
0a84b1c542 Fix test 2021-07-15 05:27:56 +02:00
TheMode
28b034103e Remove deprecated interfaces impl 2021-07-15 05:23:33 +02:00
TheMode
2e4975eb9a Fix ClientEditBookPacket 2021-07-14 16:51:22 +02:00
TheMode
a565ee77aa Fix build 2021-07-14 16:30:48 +02:00
TheMode
ea231bf52e Add 1.17.1 support 2021-07-14 16:26:32 +02:00
TheMode
e76d7486b3 Fix build 2021-07-14 03:12:20 +02:00
TheMode
1915722d02 Fix generator, use namespace instead of mojang field name 2021-07-14 03:06:49 +02:00
TheMode
2dceab7743 Improve #getBlock performance
Signed-off-by: TheMode <themode@outlook.fr>
2021-07-13 21:27:58 +02:00
TheMode
404852b0b1 Make ArgumentSyntaxException a RuntimeException 2021-07-13 19:21:29 +02:00
TheMode
eea0c7e1eb Add block face to PlayerBlockPlaceEvent 2021-07-13 18:27:45 +02:00
TheMode
520c85fcdb Fix passenger position refresh 2021-07-13 18:21:32 +02:00
TheMode
86376d431e Remove unused method 2021-07-13 18:12:46 +02:00
TheMode
2ad0263101 Inline ChunkUtils#retrieve to avoid computing chunk coordinate twice 2021-07-13 18:10:34 +02:00
TheMode
a7b0b2685b Only synchronize position if entity has been affected by its velocity 2021-07-13 17:51:29 +02:00
TheMode
86472003f8 Reuse fields 2021-07-13 15:16:18 +02:00
TheMode
fe28ba6f04 Fast exit in CollisionUtils 2021-07-13 02:32:44 +02:00
TheMode
66bac1b532 Small math improvement 2021-07-13 02:26:30 +02:00
TheMode
c643ecaeb1 Add Argument#parse 2021-07-13 01:07:02 +02:00
TheMode
838472b6c5 Added toString for Vec 2021-07-12 23:26:09 +02:00
TheMode
690b5bff57 Nitpicking 2021-07-12 21:30:32 +02:00
TheMode
722b04cbce Inline chunk getter 2021-07-11 22:01:21 +02:00
TheMode
b3f78b4706 Fix chunk refresh being broken in unloaded chunk 2021-07-11 21:57:04 +02:00
TheMode
3031895ea8 Fix return types 2021-07-11 21:30:36 +02:00
TheMode
8597d93e22 Optimize block collision check 2021-07-11 20:44:37 +02:00
TheMode
9e8d0c9ce0 Micro collision optimization + style 2021-07-11 20:20:01 +02:00
TheMode
96c7fc9147 Add Vec#fromPoint 2021-07-11 19:56:15 +02:00
TheMode
a9e78d5583 Add comments 2021-07-11 19:35:07 +02:00
TheMode
cd090e13d0 Fix test 2021-07-11 19:22:21 +02:00
TheMode
9db185f8a1 Catch exceptions in instance/chunk/entity ticks 2021-07-11 16:56:27 +02:00
TheMode
2bdc403fd0 Add Vec#rotateAroundAxis 2021-07-11 15:33:22 +02:00
TheMode
13768d35cf Add Vec#rotateFromView 2021-07-11 15:09:14 +02:00
TheMode
fe3505a6fd Add Vec#rotate 2021-07-11 14:56:48 +02:00
TheMode
b0c2b6d1b6 Merge branch 'master' into new-block-api 2021-07-11 14:07:50 +02:00
TheMode
44edeb585d
Merge pull request #366 from Minestom/new-block-future
Initial future commit
2021-07-11 14:07:34 +02:00
TheMode
b35ab0b667 Fix second setInstance method 2021-07-11 13:45:28 +02:00
TheMode
693a5f3d72 Move methods around 2021-07-11 03:56:01 +02:00
TheMode
6cdf8a9ab9 Add constant for null future 2021-07-11 03:35:17 +02:00
TheMode
7cf5821341 Annotations 2021-07-11 03:26:08 +02:00
TheMode
37b5575484 Support async chunk loading 2021-07-11 03:14:17 +02:00
TheMode
1ead7c923a Change setInstance 2021-07-11 02:59:24 +02:00
TheMode
b9679bc1ac Initial future commit 2021-07-11 02:54:02 +02:00
TheMode
6c9cef35c0
Merge pull request #365 from Kebab11noel/coordinatetype-cleanup
Cleanup CoordinateType
2021-07-11 01:11:04 +02:00
Németh Noel
8122b6673a Cleanup CoordinateType 2021-07-11 00:59:59 +02:00
TheMode
560b450b3e Use fastutil treemap 2021-07-11 00:56:54 +02:00
TheMode
99d4682655 Prevent nbt copy when placing a block 2021-07-10 20:41:22 +02:00
TheMode
4abc6dd9eb Ooops 2021-07-10 20:30:35 +02:00
TheMode
98f645b344 Micro cleanup 2021-07-10 20:26:30 +02:00
TheMode
a8a9f59715 Remove BlockEntry 2021-07-10 18:42:02 +02:00
TheMode
fc52b502dd Use proper neg method 2021-07-09 21:04:28 +02:00
TheMode
d8b92d23ba Improve collision 2021-07-09 20:43:12 +02:00
TheMode
4f20580482 Use block position for intersection check 2021-07-09 20:25:22 +02:00
Németh Noel
0793ccefc8 remove undefined type 2021-07-09 20:13:40 +02:00
Németh Noel
d6221ab212 fix boolean order 2021-07-09 20:05:46 +02:00
Németh Noel
47a0447f12 Merge remote-tracking branch 'upstream/improvement/relative-vec' into improvement/relative-vec 2021-07-09 20:03:07 +02:00
Németh Noel
8e5d2f0dfe fix mix check 2021-07-09 19:57:59 +02:00
TheMode
f829aea534 Add entity eye height 2021-07-09 19:28:08 +02:00
TheMode
2efefe25b3 Improve RelativeVec api 2021-07-09 18:53:13 +02:00
TheMode
f9689bc1f3 Merge branch 'new-block-api' into improvement/relative-vec 2021-07-09 18:38:09 +02:00
Németh Noel
e1d1f52c3d Implement local coordinate parsing 2021-07-09 18:18:52 +02:00
TheMode
ec440f778b Remove nullable annotation 2021-07-09 17:15:28 +02:00
TheMode
b9864a1a28
Merge pull request #360 from djytw/master
Fix extension resource load in Windows
2021-07-09 15:44:08 +02:00
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
5992d52429 Update /setblock command 2021-07-09 15:27:36 +02:00
Németh Noel
782620466b Fix parse call 2021-07-09 15:24:32 +02:00
Németh Noel
cfad7a4145 Fix parsing 2021-07-09 15:17:35 +02:00
TheMode
0ff69503c5 Add Point#isZero 2021-07-09 12:42:36 +02:00
TheMode
95a2805723 Merge branch 'master' into new-block-api 2021-07-09 11:54:15 +02:00
TheMode
b546a873e3 Remove unnecessary cast 2021-07-09 11:23:18 +02:00
TheMode
37ab206cb1 ThreadProvider cleanup 2021-07-09 11:20:49 +02:00
Németh Noel
dff8bc61f6 add new line to end of file 2021-07-09 02:59:42 +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
7f215ac899 Don't hardcode number count 2021-07-09 01:54:04 +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
b419ce88c1 Improve block getter performance 2021-07-09 00:42:43 +02:00
TheMode
295b3e24dd Merge branch 'master' into new-block-api 2021-07-09 00:29:31 +02:00
TheMode
e1e1ec775e Remove confusing comment 2021-07-09 00:21:41 +02:00
djytw
8f771bb867 more 2021-07-08 20:25:10 +02:00
TheMode
29b4fefb1a Remove Vector usage 2021-07-08 18:59:40 +02:00
TheMode
45d7420397 Remove most Position/BlockPosition usage 2021-07-08 18:56:40 +02:00
djytw
694d05e78a Fix resource load in Windows 2021-07-08 18:42:38 +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
dc89b180fb Support dynamic tick rate & prevent call from being delayed 2021-07-08 15:40:27 +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
30464d903d Fix position packet being sent twice 2021-07-07 19:38:43 +02:00
TheMode
faae59ff44 Remove some teleport call 2021-07-07 19:34:46 +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
Németh Noel
ce8e14ede1 Use proper method for refreshing position 2021-07-07 18:36:24 +02:00
Németh Noel
8b35e0db9a Use remaining length when needed 2021-07-07 18:07:27 +02:00
Németh Noel
5ae26c44e1 Initial npe fix 2021-07-07 17:56:17 +02:00
TheMode
84eb0a8934 Fix build 2021-07-07 14:59:53 +02:00
TheMode
eb0f7379ea Fix intersect 2021-07-07 01:45:20 +02:00
TheMode
8a5147c994 More fixes 2021-07-07 01:32:30 +02:00
Németh Noel
6f6b15fa96 Update part of Entity.java 2021-07-07 01:06:32 +02:00
Németh Noel
4187bc0e4d Add epsilon operator 2021-07-07 00:57:47 +02:00
Németh Noel
8849b6eec8 Fix teleport packet not being sent 2021-07-06 23:44:30 +02:00
Németh Noel
f29ed48da9 update getter names 2021-07-06 23:03:01 +02:00
Németh Noel
da5abd3d4e rename getters 2021-07-06 22:59:45 +02:00
Németh Noel
65a97e5b00 Initial collision update 2021-07-06 22:26:11 +02:00
TheMode
28dca16b29 Initial position api implementation 2021-07-06 20:44:24 +02:00
LeoDog896
abace56778 Correct packet reading/writing 2021-07-06 09:54:26 -04: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
579c5fd13c Fix rebase 2021-07-05 08:22:51 +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
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
6a27a9d932 Update javadoc 2021-07-03 15:05:14 +02:00
Németh Noel
1e390d5efb Add alternative to GLFWCapableBuffer#setupRenderLoop that takes Duration instead of amount and unit 2021-07-03 15:02:43 +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
92cbc4727c Fix javadoc and optimize imports 2021-06-30 13:37:37 +02: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
8bd54dd300 Updated GLFWCapableBuffer.java 2021-06-30 12:52:41 +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
58bae20f10 Updated Main.java 2021-06-30 00:47:57 +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
f8d1f8e067 Add unary operators 2021-06-29 06:40:15 +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
1afd4b4328 Use knockback method 2021-06-27 23:09:23 +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
f2300714eb Temporarily fix block placement 2021-06-24 20:53:33 +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
10ca44bfd8 Update BlockConstants 2021-06-23 17:39:21 +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
TheMode
804f11c87b Potentially fix explosion packet 2021-06-23 02:20:51 +02:00
TheMode
77ef11ef30 Rename destroySpeed to hardness 2021-06-23 01:53:04 +02:00
TheMode
1ba1a336b1 Fix block destroy listener 2021-06-23 00:37:11 +02:00
TheMode
e3942e68d3 Fix block destruction 2021-06-22 23:55:27 +02:00
TheMode
2b89fa1527 Add Placement/Destroy implementation for player 2021-06-22 23:51:01 +02:00
TheMode
22ba15f390 Add Unmodifiable annotation 2021-06-22 23:31:07 +02:00
TheMode
f17355a972 Cleanup 2021-06-22 23:26:12 +02:00
TheMode
eca380a3a4 use world coord to save block entities 2021-06-22 23:14:26 +02:00
TheMode
9e6b3d5ac9 Add support for block entity loading (from anvil) 2021-06-22 22:59:25 +02:00
TheMode
eeb8f3fd65 Update to latest block file 2021-06-22 22:38:36 +02:00
TheMode
a255abf0dd Move nbt cache into block implementation 2021-06-22 19:07:44 +02:00
TheMode
d365373775 Keep get prefix when a parameter is required 2021-06-22 18:46:16 +02:00
TheMode
58ec228f70 Reuse block properties parsing 2021-06-22 18:43:48 +02:00
TheMode
f0a73f25eb Potentially fix lighting 2021-06-22 18:32:46 +02:00
TheMode
a641c2415a Fix block index computation 2021-06-22 18:28:52 +02:00
TheMode
5f2b3df20e Support for tile entities saving (BlockHandler) 2021-06-22 18:02:50 +02:00
TheMode
fc6e147919 Cache blocks nbt 2021-06-22 17:28:12 +02:00
TheMode
62a7de49dc Merge branch 'master' into new-block-api 2021-06-22 14:14:50 +02:00
TheMode
3b6b1e9859 Improve block indexing 2021-06-22 14:13:51 +02:00
TheMode
f183c76afa Fix npe when reading block tag 2021-06-22 14:06:28 +02:00
TheMode
0f02be4b2b Add tag api to CommandSender 2021-06-22 13:30:47 +02:00
TheMode
2b817e5590 Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/tag/Tag.java
2021-06-22 03:09:02 +02:00
TheMode
43c2b48b68 Add backward compatible method 2021-06-22 03:05:22 +02:00
TheMode
b5c7106f9b Use the tag api inside Entity, deprecate DataContainer 2021-06-22 02:56:00 +02:00
TheMode
a9086e83f2 Improve tag API 2021-06-22 02:51:04 +02:00
TheMode
3ded16f6e5 Fix negative sections 2021-06-22 00:11:47 +02:00
TheMode
2af150c1f0 Forget anvil chunk after load 2021-06-21 21:33:37 +02:00
TheMode
66145a53c6 Add generic to Tag#NBT 2021-06-21 20:34:34 +02:00
TheMode
36e2c2b78a Remove legacy chunk serialization code 2021-06-21 20:07:22 +02:00
TheMode
735ea152f9 Initial light support 2021-06-21 16:32:46 +02:00
TheMode
d27b1ff1a4 Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/instance/InstanceContainer.java
#	src/main/java/net/minestom/server/listener/BlockPlacementListener.java
#	src/main/java/net/minestom/server/listener/PlayerDiggingListener.java
2021-06-21 15:27:55 +02:00
TheMode
1f2dc0cd9f Add some inline packet initialization 2021-06-21 15:01:50 +02:00
TheMode
8a2f68812c Cleanup demo servers 2021-06-21 00:14:28 +02:00
TheMode
e79b5ce41d Fix exception when forgetting ] 2021-06-20 23:54:00 +02:00
TheMode
c2270f8922 Merge branch 'master' into new-block-api 2021-06-20 23:52:08 +02:00
TheMode
e635e29a16 Replace guava cache to caffeine 2021-06-20 22:32:06 +02:00
TheMode
c90bae063a Update netty 2021-06-20 22:19:03 +02:00
TheMode
14afa0fbf4 Less google 2021-06-20 22:06:19 +02:00
TheMode
0be2addbd8 Remove most unnecessary uses of google common 2021-06-20 22:03:14 +02:00
TheMode
4db3b9317d Replace google Beta annotation to jetbrains ApiStatus.Experimental 2021-06-20 21:48:07 +02:00
TheMode
887c567c78 Fast exit if no world folder is available 2021-06-20 21:23:18 +02:00
TheMode
3bb5801ec7 Merge branch 'master' into new-block-api 2021-06-20 21:00:39 +02:00
TheMode
1e9046d792 Remove velocity compression library 2021-06-20 20:59:53 +02:00
TheMode
94923c4b3a Nothing 2021-06-20 20:50:54 +02:00
TheMode
8bc9bc7de5 Rename StorageChunkLoader 2021-06-20 20:46:57 +02:00
TheMode
08ce627db7 Remove rocksdb 2021-06-20 20:43:57 +02:00
TheMode
3bdc842393 Default to minecraft namespace 2021-06-20 20:33:39 +02:00
TheMode
94ee21a02a Initial anvil saving support 2021-06-20 20:28:43 +02:00
TheMode
fc14d01e78 Initial anvil support 2021-06-20 20:12:07 +02:00
TheMode
31a7413531
Merge pull request #334 from Project-Cepi/safe-missing-extension
Ensure proper error when extension.json is missing
2021-06-20 18:30:05 +02:00
TheMode
602472fc65 Pos improvements 2021-06-20 18:27:58 +02:00
TheMode
13a64c7315 Merge branch 'master' into new-block-api 2021-06-20 18:16:42 +02:00
TheMode
f4f4a63860 Replace deprecated serializer 2021-06-20 18:05:46 +02:00
TheMode
a2f828986d Add RelativeLocation#fromView 2021-06-20 17:40:37 +02:00
TheMode
ab9e16dfe7 Add Vec#apply 2021-06-20 14:56:00 +02:00
TheMode
5a01c041cf Remove duplicate method, trust escape analysis to prevent unnecessary allocations 2021-06-20 14:42:46 +02:00
TheMode
5f2b06ffe7 Rename to Vec 2021-06-20 03:43:18 +02:00
LeoDog896
4b4c3cda32 Ensure proper error when extension.json is missing 2021-06-19 18:12:56 -04:00
TheMode
62146352a1 Add Coordinate simple impl 2021-06-19 22:43:59 +02:00
TheMode
b9114ef5fe Initial discussion commit 2021-06-19 21:43:43 +02:00
TheMode
f040f882e5 remove redundant allocation 2021-06-19 21:04:02 +02:00
TheMode
0d96ad5483 Use namespace object instead of string inside block registry 2021-06-19 21:02:47 +02:00
TheMode
106125319a Remove get prefixes for protocol objects to be more record-friendly 2021-06-19 21:01:54 +02:00
TheMode
15cfea6f9a Fix ResourcePackSendPacket 2021-06-19 17:44:11 +02:00
TheMode
123f0bec04 Intern property map values 2021-06-19 16:45:09 +02:00
TheMode
61bd28b298 Reduce property map allocation 2021-06-19 16:12:36 +02:00
TheMode
06ebb14991 Merge branch 'master' into new-block-api 2021-06-18 20:36:32 +02:00
TheMode
787162bbe2 Fix Eventlistener#of not ignoring cancelled events 2021-06-18 18:24:35 +02:00
TheMode
d7fd079288 Reuse palette code 2021-06-18 14:50:10 +02:00
TheMode
7032645c63 Cleanup 2021-06-18 14:43:14 +02:00
TheMode
e25f521253 BlockHandler tick support 2021-06-18 14:36:03 +02:00
TheMode
e913170575 Remove unused code 2021-06-18 11:52:10 +02:00
TheMode
2dc4673b4f Properties map should never be null 2021-06-18 11:46:09 +02:00
TheMode
e3fdadb564 Remove wrong hasTag impl 2021-06-18 03:57:23 +02:00
TheMode
41cb35782e Reduce implementation code 2021-06-18 03:44:15 +02:00
TheMode
e002890a91 Deprecate #addPlayerInitialization 2021-06-18 03:21:03 +02:00
TheMode
c0c19a1e44 Fix block change packet 2021-06-17 15:59:48 +02:00
TheMode
26b9ebc3f5 Fix compile 2021-06-17 15:57:10 +02:00
TheMode
6e0598c16a Remove custom break delay code 2021-06-17 15:50:28 +02:00
TheMode
b978eba0fd Palette cleanup 2021-06-17 15:37:38 +02:00
TheMode
ddae239e30 Rename onTouch 2021-06-17 15:11:19 +02:00
TheMode
b612f3c257 Add block entity getter 2021-06-17 15:02:54 +02:00
TheMode
894b1a68a7 Make BlockHandler more flexible and future-proof for incoming amber language features 2021-06-17 14:34:55 +02:00
TheMode
de22a76e9f Merge branch 'master' into new-block-api
# Conflicts:
#	build.gradle
2021-06-17 13:58:01 +02:00
LeoDog896
ad83849f91 Fix entity compile error 2021-06-16 15:55:21 -04:00
TheMode
fd5f45adcd Remove unused method 2021-06-16 21:46:13 +02:00
LeoDog896
b8c1e72e4a Remove deprecated DynamicWords 2021-06-16 15:37:33 -04:00
TheMode
12848a08f2 Cache recurrent values 2021-06-16 18:11:42 +02:00
TheMode
3e4a99a80c Add default impl for hasTag 2021-06-16 16:51:44 +02:00
TheMode
d1babd25dc Fix ItemEntity physics 2021-06-16 15:50:54 +02:00
TheMode
f41733e338
Merge pull request #326 from Project-Cepi/remove-deprecated-entity-classes
Refactor and remove classes from entity package.
2021-06-16 15:46:22 +02:00
LeoDog896
c11662c3ed Remove errored import 2021-06-16 09:45:21 -04:00
TheMode
85d4fd83f4
Merge pull request #327 from Minestom/bossbar-removal
Remove legacy boss bars
2021-06-16 15:40:02 +02:00
LeoDog896
97ebf6923e Fix boat listener 2021-06-16 09:39:55 -04:00
LeoDog896
9e23085c34 Refactor and remove classes 2021-06-16 09:17:13 -04:00
TheMode
2b5b11a483 Cleanup 2021-06-16 15:08:07 +02:00
TheMode
a4b99c60dc Fix property parsing 2021-06-16 14:49:56 +02:00
TheMode
9c97302a06 Add demo SetBlockCommand 2021-06-16 14:39:11 +02:00
TheMode
65e4aad416 Add pure annotations 2021-06-16 14:08:02 +02:00
TheMode
34b7133f17 Reduce subclass impl 2021-06-16 14:04:22 +02:00
TheMode
84f22a6ed4 Replace float to double 2021-06-16 12:26:27 +02:00
Articdive
925c2d6090
NamespaceID should be compatible with other Key Implementations. 2021-06-16 09:53:01 +02:00
TheMode
0bdc84558f Optimize block getter 2021-06-16 01:01:27 +02:00
TheMode
235100e87b Small cleanup 2021-06-16 00:46:39 +02:00
TheMode
2d57235198 Remove legacy methods 2021-06-16 00:33:25 +02:00
TheMode
3324fd1e21 Fix BlockTest immutability 2021-06-16 00:19:36 +02:00
Kieran Wallbanks
5abf71e323 Remove legacy boss bars 2021-06-15 14:26:24 +01:00
Kieran Wallbanks
dd82635c6f Don't lazily initialise pointers 2021-06-15 14:06:56 +01:00
Kieran Wallbanks
58e108bd37 Fix deprecated API usages 2021-06-15 13:19:49 +01:00
Kieran Wallbanks
0ba27939d9 Implement new sound changes 2021-06-15 13:19:48 +01:00
Kieran Wallbanks
e5ca8d992e Create providers for Adventure serializers 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
ee1ca5e03b Deprecate AdventureSerializer 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
e532f16735 Fix default locale 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
b1f72faa67 Implement pointer feature 2021-06-15 13:19:36 +01:00
Kieran Wallbanks
e7e0d4cb0d Implement Sound.Source.Provider 2021-06-15 13:19:36 +01:00
TheMode
a83482efb8 Improve memory usage 2021-06-15 13:45:23 +02:00
TheMode
65f92bf071 No need for block properties file 2021-06-15 11:20:05 +02:00
TheMode
df38061c6b Inline condition 2021-06-15 02:54:03 +02:00
TheMode
0c0b387345 Use a for-each loop, and prevent iterator allocation when empty 2021-06-15 02:29:58 +02:00
TheMode
051fbcb34b Potentially fix map packet 2021-06-14 22:01:12 +02:00
TheMode
27f30fa394 Remove a few magic metadata indexes 2021-06-14 21:49:16 +02:00
TheMode
679030e75b Add BlockEvent 2021-06-14 15:30:05 +02:00
TheMode
a70fe174bf Fix rebase 2021-06-14 15:26:16 +02:00
TheMode
63004cf4ba Merge branch 'master' into new-block-api
# Conflicts:
#	src/main/java/net/minestom/server/event/player/PlayerBlockBreakEvent.java
#	src/main/java/net/minestom/server/event/player/PlayerBlockInteractEvent.java
#	src/main/java/net/minestom/server/event/player/PlayerBlockPlaceEvent.java
#	src/main/java/net/minestom/server/event/player/PlayerStartDiggingEvent.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/listener/BlockPlacementListener.java
#	src/main/java/net/minestom/server/listener/PlayerDiggingListener.java
#	src/test/java/demo/PlayerInit.java
2021-06-14 15:22:54 +02:00
TheMode
6315bd5c61 Add try-catch for EventNode condition 2021-06-14 14:42:10 +02:00
TheMode
9c77ab267e Rework Block implementation (BlockTest) 2021-06-14 13:31:14 +02:00
TheMode
f2bf27c86e Fix rebase 2021-06-14 00:18:53 +02:00
TheMode
eadb32eba3 Merge branch 'master' into event-api 2021-06-14 00:17:42 +02:00
TheMode
911c983957 Merge branch 'master' into event-api
# Conflicts:
#	src/main/java/net/minestom/server/entity/Player.java
#	src/main/java/net/minestom/server/event/player/UpdateTagListEvent.java
#	src/main/java/net/minestom/server/instance/Chunk.java
2021-06-14 00:11:41 +02:00
TheMode
adba6c3d40 WIP block loading 2021-06-14 00:07:51 +02:00
TheMode
af61c77a26
Merge pull request #319 from Minestom/resource_gatherer_java
Resource gatherer fixes
2021-06-13 14:58:49 +02:00
TheMode
6cd3952fb5
Merge pull request #316 from thiccaxe/server-list-ping-update
Updated Server List Ping
2021-06-13 14:58:05 +02:00
TheMode
b464b637a4 BlockHandler default impl 2021-06-13 13:41:01 +02:00
TheMode
c312bf59fc Revamp tag api 2021-06-13 13:38:26 +02:00
TheMode
d6a2a5b316 Added CampfireHandler demo 2021-06-12 19:17:50 +02:00
TheMode
54b6868b2e Comments 2021-06-12 16:02:35 +02:00
Matt Worzala
a84bc7be46
add stderr print 2021-06-12 09:29:00 -04:00
Matt Worzala
831dd6d610
use java home for resource gatherer. Should cause the same jdk to be used for resource gatherer and work if you dont have java in the path. 2021-06-12 09:17:18 -04:00
Matt Worzala
e5076832b1
Change to have an actual option which can be changed before startup 2021-06-12 09:07:09 -04:00
TheMode
342554cb36 Remove BlockHandler#drag 2021-06-12 15:06:52 +02:00
TheMode
ab51b50072 Use per-block handler 2021-06-12 13:57:59 +02:00
TheMode
a2bd0f7906 end line 2021-06-12 13:52:44 +02:00
TheMode
94e92741c8 Reuse chunk code 2021-06-12 13:37:37 +02:00
TheMode
1b31a81619 Fix single-section chunk packet 2021-06-12 10:46:50 +02:00
TheMode
3b14fe12a3 Proper naming for Section/Palette 2021-06-12 10:39:44 +02:00
thiccaxe
6ff5f7e93c Fix Grammar in ResponseData 2021-06-11 23:08:57 -07:00
Matt Worzala
8529249b85
Add option to start server without terminal enabled 2021-06-11 20:03:16 -04:00
thiccaxe
7641b8a75d Updated Server List Ping
Added playersHidden field to ResponseData; shows "???" in Vanilla.
Added event for ping/pong packet
2021-06-11 13:54:52 -07:00
TheMode
f95b6121fe Cleanup 2021-06-11 21:57:51 +02:00
Articdive
f3f854feaa
Fix TagsPacket 2021-06-11 21:55:30 +02:00
TheMode
9dffc7658c Added registry loader 2021-06-11 20:13:20 +02:00
TheMode
08684d075a Temporarily remove tags packet 2021-06-11 18:53:35 +02:00
TheMode
099b031875 Registry should use a JsonObject 2021-06-11 18:05:21 +02:00
TheMode
4ec59b4bc9 Temporarily fix block count 2021-06-11 17:55:47 +02:00
TheMode
9bf57b8c13 Remove unused fields 2021-06-11 17:52:52 +02:00
Articdive
1a67ab806a
Update BlockGenerator and add the 1.17 blocks. 2021-06-11 17:47:26 +02:00
TheMode
7a76040457 Cleanup 2021-06-11 17:38:45 +02:00
TheMode
7079225045 Remove BlockData.java 2021-06-11 17:33:18 +02:00
TheMode
64907ebb34 Added some properties to BlockEntry 2021-06-11 17:23:38 +02:00
TheMode
a1fac0f5cb Add Block.registry 2021-06-11 17:00:26 +02:00
TheMode
70aad159b9 Add BlockEntry 2021-06-11 16:50:37 +02:00
TheMode
70cd3891cf Added WIP Registry 2021-06-11 16:48:00 +02:00
TheMode
82eec1072c Create ProtocolObject 2021-06-11 16:45:01 +02:00
TheMode
35baf1e772 Remove unsafe prefix from Chunk#setBlock 2021-06-11 16:40:37 +02:00
TheMode
7f8120a334 Rebase 2021-06-11 16:37:07 +02:00
TheMode
457ef9df17 Merge branch 'master' into new-block-api
# Conflicts:
#	src/autogenerated/java/net/minestom/server/instance/block/Block.java
#	src/main/java/net/minestom/server/MinecraftServer.java
#	src/main/java/net/minestom/server/entity/Player.java
#	src/main/java/net/minestom/server/entity/pathfinding/PFBlockDescription.java
#	src/main/java/net/minestom/server/entity/pathfinding/PFBlockObject.java
#	src/main/java/net/minestom/server/instance/Chunk.java
#	src/main/java/net/minestom/server/instance/palette/PaletteStorage.java
#	src/main/java/net/minestom/server/network/packet/server/play/ChunkDataPacket.java
#	src/main/java/net/minestom/server/network/packet/server/play/TagsPacket.java
2021-06-11 16:31:01 +02:00
TheMode
37f8306fb4 Use dedicated component write method 2021-06-11 16:23:07 +02:00
TheMode
0200788b22 Add dedicated method to ignore string/component size 2021-06-11 16:19:17 +02:00
TheMode
9fed96abe2
Merge pull request #307 from Minestom/1.17
1.17 Update
2021-06-11 16:08:08 +02:00
TheMode
265ae83b4d Fix tags packet 2021-06-11 16:00:14 +02:00
TheMode
72bf894162 Fix chunk packet read 2021-06-11 15:41:02 +02:00
TheMode
97d17f9b8b Fix Light & window click test 2021-06-11 15:38:46 +02:00
TheMode
88052576b3 Support for forced resource packs 2021-06-11 12:32:24 +02:00
TheMode
f31639c45c Fix rebase 2021-06-10 16:12:42 +02:00
TheMode
14879636f1 Merge branch 'master' into new-block-api
# Conflicts:
#	.gitignore
#	build.gradle
#	code-generators/build.gradle
#	code-generators/src/main/java/net/minestom/codegen/Generators.java
#	code-generators/src/main/java/net/minestom/codegen/MinestomCodeGenerator.java
#	code-generators/src/main/java/net/minestom/codegen/blocks/BlockGenerator.java
#	gradle.properties
#	src/autogenerated/java/net/minestom/server/instance/block/Block.java
#	src/autogenerated/java/net/minestom/server/registry/Registries.java
#	src/generators/java/net/minestom/codegen/AllGenerators.java
#	src/generators/java/net/minestom/codegen/RegistriesGenerator.java
#	src/generators/java/net/minestom/codegen/items/ItemEnumGenerator.java
#	src/main/java/net/minestom/server/entity/Player.java
2021-06-10 16:05:19 +02:00
TheMode
78cc392007 Merge branch 'master' into event-api 2021-06-10 14:42:07 +02:00
TheMode
c0e956bef5 Fix javadoc 2021-06-10 14:41:44 +02:00
TheMode
ea05a6f784 Add trait to ItemDropEvent 2021-06-10 11:58:48 +02:00
TheMode
74d323126f Add traits to EntityEquipEvent 2021-06-10 11:57:13 +02:00
TheMode
3b80335134 Avoid foreach for sensitive code 2021-06-10 11:53:50 +02:00
Articdive
9ae8c96091
Finish TagsPacket read method 2021-06-10 09:45:30 +02:00