Commit Graph

4995 Commits

Author SHA1 Message Date
Zak Shearman
e160cbdecd
Fixes cat color (variant) metadata, adds frog meta (#1833)
* Add frog & cat meta types

* Rename Color -> Variant in CatMeta, use DyeColor
2023-05-13 22:39:33 +10:00
Not Flamgop
01ffec6614
Add Cancel and Finish digging events (#1846)
* Add Cancel and Finish digging events

* Add a function for setting the block which was dug in PlayerFinishDiggingEvent.java
2023-05-12 19:15:49 +10:00
Hydrogen
2c3e38b178
Null verifier wildcard fix (#1849)
* fix hasPermission(String, PermissionVerifier) Behavior

* add test cases
2023-05-10 08:51:06 +10:00
Hydrogen
1d6ff874f8
Add permissions wildcard support to no-verifier hasPermission (#1319)
* Add permission wildcard support to no-verifier hasPermission

* add one more assertion

* check permissionLoop NOT permission

* Add all permissions wildcard test

* Add proper pattern matching with tests

* Sanitize regex

* Clean up code

* Add to other hasPermission method aswell
2023-05-09 22:43:44 +10:00
Zak Shearman
85febebd09
Fix nullability for Player shoulder entity data (#1834) 2023-05-01 16:06:48 +03:00
iam
79ce9570ea
Allow event node handle to be garbage collected (#1835) 2023-04-23 13:07:40 +02:00
iam
8ad2c7701f
Fix physics not checking nearest block (#1815) 2023-04-03 22:08:49 +02:00
EpicPlayerA10
4f3c35ee87
Instance register and unregister events (#608)
* Added InstanceRegisterEvent and InstanceUnregisterEvent

* Add unit test
2023-03-31 07:35:24 +10:00
GreatWyrm
0b77fb805b
Add Death Location variable to Player and update Death Location on death (#1807)
* Add Death location variable to Player and update on death

* Add death location test

* Fix test
2023-03-29 21:03:36 -04:00
TogAr2
9abb3079f6
Fix item attributes not being read correctly (#1806) 2023-03-29 15:09:24 +02:00
Tomáš Hůla
ec8034750a
Fix method javadoc (#1802)
* FIx Point#sameBlock(Point) javadoc

* Fix grammar of Point's methods javadocs
2023-03-25 19:35:33 -04:00
Alexander
c496ee3572
Update to JoinGamePacket and RespawnPacket (#1640)
* Add death location support to JoinGamePacket
2023-03-21 23:22:24 -04:00
FourteenBrush
784875943a
Fix client not finding recipe serializer for minecraft:stonecutter (#1794) 2023-03-20 15:19:24 -04:00
Zak Shearman
067227421f
Fix/mojang utils long name (#1792) 2023-03-18 01:02:18 +01:00
Obyvante
7b0b314707
Wrong generated window id for newly created inventories. (#1784)
* chore(Inventory): Fixed generated window id sometimes becomes 0 or -128(out of int) which causes empty inventories.

* chore(InventoryTest): Updated inventory window id creation test.

* chore(InventoryTest): Updated inventory window id creation test. (iam's suggestion.)

* chore(Inventory): Updated inventory window id generation that is more thread safe compare to the old one. (iam's suggestion)

* chore(InventoryTest): int window id to byte.
2023-03-15 13:44:41 -04:00
Zak Shearman
a9e319f961
Add javadocs for Potion (#1763) 2023-02-26 10:55:34 -07:00
Tyreece Rozycki
aebf72de90
Correctly send the player's main hand setting. (#1724)
* Update Player.java

* Use setNotifyAboutChanges and add integration test
2023-01-29 07:05:28 -05:00
Steank
51ef4779c9
Fix for #1712 (#1713) 2023-01-25 15:13:15 +01:00
emortaldev
c995f9c3a9
Block event changes (#1675)
* Add cursor position to interact events

* Add block face to digging events

* Expose interact position in interact event
2023-01-16 18:57:18 -05:00
emortaldev
8eb089bf3e
Add playSound with position to Player (#1676) 2023-01-08 19:38:30 -05:00
emortaldev
84846f663b
Add nullability for LivingEntity methods (#1668) 2023-01-07 22:10:53 -05:00
NitrinCloud
aa621021e2
Support dynamic selection of a port using '0' (#1661) 2023-01-07 08:39:32 +01:00
HEROOSTECH
f291437ada
Hand in PlayerItemAnimationEvent (#1650)
* Hand in PlayerItemAnimationEvent

* Hand in PlayerItemAnimationEvent
2023-01-03 19:11:17 -05:00
Kezz
24cc458659
Implement some Adventure methods into ConsoleSender (#336)
* Implement some Adventure methods into ConsoleSender

* Remove getUuid from CommandSender/ConsoleSender

* rebase and review fixes

Co-authored-by: mworzala <mattheworzala@gmail.com>
2022-12-30 22:24:01 -05:00
off-by-0point5
6870c37b94
Add commit info from JitPack into Minestom's jar (#1272)
* Compile git info into Git.java

* Move blossom task into tasks block

* Fix javadoc task

* Improve readability

* Remove version field

* Hopefully preventing inline by javac

* Make Git class final

* Remove prefixes for getters

* Make getters static
2022-12-30 22:09:07 -05:00
GreatWyrm
9890d71347
Minor Property Tweaks (#1591)
* Add System Property for changing Portal Teleport boundry, remove unnecessary PropertyUtils method

* Remove unneeded imports on changed files

* Restore getString in PropertyUtils, change to use JDK method
2022-12-30 21:52:16 -05:00
TheMode
c04028336d
Entity viewable tracking (#1494) 2022-12-31 02:47:18 +01:00
George Linkovsky
91a344aa92
Fix player dimension packages (#1630) 2022-12-28 15:29:02 +01:00
Freddi
eb06ba8664
Update FakePlayer.java (#1603) 2022-12-21 07:12:31 +01:00
Jesse
809d9516b2
Fix incorrect arrow no clip mask bit (#1574) 2022-12-14 10:51:51 +01:00
GoldenStack
8585e0ceb0
Fix incorrect lectern inventory size (#1566) 2022-12-12 19:09:27 +01:00
iam
7361bf0825
Improve consistency of team packets (#1556) 2022-12-07 11:13:12 +01:00
Obyvante
ee7ac62b75
Prevent unsafe velocity packet (#1550) 2022-12-05 13:06:18 +01:00
tahmid-23
e5d0a43ba4
add BungeeGuard authentication (#1502) 2022-11-28 06:13:09 +01:00
Zak Shearman
84f4ae040e
Re-word docs for Entity#lookAt(Entity) (#1543) 2022-11-27 23:01:50 +01:00
Zak Shearman
a81fca948e
Fix coordinate_scale type (int -> double) (#1542) 2022-11-27 20:20:36 +01:00
Noel Németh
d37f40a1bb Fix missing chunk history update 2022-11-26 22:08:08 +01:00
GreatWyrm
27f3b5d4ee
Fix entities vanishing upon respawn (#1497) 2022-11-26 21:23:39 +01:00
Noel Németh
77be05085d Clear chunk history on teleport and instance change, initialize history with less common chunk coordinate; fixes #1536 2022-11-26 11:10:44 +01:00
iam
1a013728fd
Blockiterator fix 4 (#1513) 2022-11-10 06:31:04 +01:00
iam
d496fcfe4a
Misc fix + more tests (#1511) 2022-11-09 23:46:53 +01:00
iam
88dd901438
Rewrite BlockIterator (#1509) 2022-11-09 23:07:31 +01:00
iam
361849c155
Blockiterator fix (#1508) 2022-11-07 23:35:32 +01:00
TheMode
42195c536b Fix broken buffer resize
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-31 10:06:05 +01:00
Huynh Tien
93718276c5
Strong Ref for child EventNode (#1491) 2022-10-29 12:33:24 +02:00
Huynh Tien
01e2c43b5d
try fixing EOF on ClientClick (#1490) 2022-10-29 12:06:18 +02:00
TheMode
993af51556
Use NetworkBuffer in packets (#1487) 2022-10-29 11:02:22 +02:00
TheMode
ba2816fc74
Buffer API rework (#1485) 2022-10-28 19:27:48 +02:00
TheMode
c3df2af306 Unused EventCallback
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-28 11:03:24 +02:00
TheMode
e11d15af0d Fix event node child/map leak
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-27 22:32:22 +02:00
TheMode
b4af87b8a4 Fix event node leak
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-27 21:02:27 +02:00
TheMode
caa150d923 Use constant default anvil loader
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-27 15:52:59 +02:00
TheMode
c95ced9493 Misc intellij suggestions
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-27 15:25:51 +02:00
TheMode
3e2ac14048
Dedicated GameProfile record (#1482) 2022-10-27 14:33:48 +02:00
Huynh Tien
d7e958fa07
ComponentLogger & Colored Terminal (#1460) 2022-10-26 19:52:01 +02:00
TheMode
46f3fede8a Fix test file name
Signed-off-by: TheMode <themode@outlook.fr>
2022-10-26 09:40:44 +02:00
Huynh Tien
632922bce5
move reflect fields in Extension to ExtensionClassLoader (#1478) 2022-10-25 17:11:59 +02:00
GreatWyrm
6316eeb90e
Fix respawning players falling into the void (#1454) 2022-10-25 03:04:41 +02:00
GreatWyrm
60751d546e
Update the list of entity poses to 1.19 (#1439) 2022-10-10 23:40:10 +02:00
TheMode
0b0dc83ffe
Make separate module for testing framework (#1428) 2022-10-10 20:44:50 +02:00
Omny
5537faabac
add new 1.19.2 effects (#1437) 2022-10-10 20:41:43 +02:00
Zak Shearman
7eb9d3fdd7
Fix yaw/pitch order in SpawnEntityPacket (#1436) 2022-10-09 22:50:18 +02:00
Arektor
17ef1c2f57
Reduce velocity update rate (#1426) 2022-10-07 17:19:29 +02:00
GreatWyrm
87c3dc3f76
Replace char literal with unicode literal (#1430) 2022-10-07 12:40:58 +02:00
Arektor
95fa6607ed
Small improvements to entity movement (#1421) 2022-10-02 04:12:54 +02:00
Vendo
caaad1693e
Skip loading empty sections (#1409) 2022-09-30 11:28:47 +02:00
Koding
18c46481f4
Fix incorrect functionality of ClientSpectatePacket (#1402) 2022-09-14 13:44:43 +02:00
TheMode
fc90fe8852 Remove some Collections usage
Signed-off-by: TheMode <themode@outlook.fr>
2022-09-06 15:08:36 +02:00
Koding
4a5736cc7c
Fix unnecessary allocations with block properties function (#1387) 2022-09-06 14:55:21 +02:00
TheMode
b3d81f274c Fix translation tests
Signed-off-by: TheMode <themode@outlook.fr>
2022-09-05 14:02:05 +02:00
TheMode
1dd2cc72ee
1.19.2 (#774) 2022-09-05 13:54:58 +02:00
Marfien
eef95ae5d1
Add ComponentHolderServerPacket to some packets (#1275) 2022-09-02 22:23:42 +02:00
TomJuri
c270712798
Make the start log use BrandName instead of hardcoded "Minestom" (#1380) 2022-09-02 22:21:47 +02:00
Obyvante
c694c4074e
Fixed metadata issue. (#1378) 2022-08-30 21:37:25 +02:00
Ilya @ Gloryx
978a398f64
Fix a harmful javadoc typo (#1372)
Original: kill if health is **> (more)** or equal to 0 and is not yet dead
2022-08-29 12:43:36 +02:00
KrystilizeNevaDies
83011eb903
fix written book meta to allow modern components (#1359) 2022-08-23 09:35:37 +10:00
iam
f5f323fef9
Physics improvement (#1320) 2022-08-10 01:49:42 +02:00
iam
4a79a3af26
Refactor physics to simplify code (#1315) 2022-08-08 00:25:08 +02:00
Xavier Niochaut
f62d4e47fc
Heavily reduce memory consumption of AnvilLoader (#1005)
* (Heavily) Reduce memory consumption of AnvilLoader
/!\ requires building and publishing Hephaistos master to local Maven for now

* Cache biome mapping per chunk instead of per section

* Starting work on integration tests

* [AnvilLoader] Address issue #423

* [AnvilLoader] Use new Hephaistos saving API

* Use MavenCentral version of Hephaistos
2022-08-05 21:05:23 +02:00
GreatWyrm
af9dcf258a Move convenience method to PackeetGroupingAudience 2022-08-02 06:23:20 -04:00
GreatWyrm
5aa8b97c60 Add convinence playSound method in instance 2022-08-02 06:23:20 -04:00
Konstantin Shandurenko
89a09f326e
Fix for inventory window id generation (#1292) 2022-07-30 18:54:10 +02:00
TheMode
edbef66f8e Add updateStructureConversionPathDouble
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-30 13:20:21 +02:00
TheMode
648232c344 Add updateStructureConversionPath
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-30 04:01:47 +02:00
TheMode
92b11eabbd Move traversePathWrite call
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-29 19:30:09 +02:00
TheMode
0e082634d5 Fix conversion during tag update
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-29 16:51:45 +02:00
TheMode
5b8cc12108 More TagUpdateTest tests
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-29 16:23:16 +02:00
TheMode
7aec259520 Add updateInner test
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-29 16:11:13 +02:00
TheMode
660112dca6 Rename TagUpdateTest
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-29 16:04:06 +02:00
TheMode
614559bcdb Unnecessary TagHandlerImpl getters
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-28 13:57:13 +02:00
TheMode
0db5993bfb Use array for metadata lookup instead of map
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-26 16:40:31 +02:00
Noel Németh
9e5de35fa7
New command parser (#1235) 2022-07-25 19:34:40 +02:00
Huynh Tien
58a7a59036
add default tinylog writer (#1245) 2022-07-25 08:54:07 +02:00
tahmid-23
3690ad1623
fix component flattening (#1266) 2022-07-25 05:58:03 +02:00
TheMode
d596992c0e
Include command aliases in graph (#1244) 2022-07-17 23:13:25 +02:00
TheMode
07a0fb129c Rename node executor
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-17 22:41:28 +02:00
Noel Németh
c885ca1d7c
Fix index out of bounds when creating a command packet (#1243) 2022-07-17 20:28:14 +02:00
Konstantin Shandurenko
284da06578
Fix for breaking blocks of mismatching properties in adventure mode (#1242) 2022-07-17 20:08:04 +02:00
TheMode
366f08f7f9
Graph api (#1233) 2022-07-13 22:45:38 +02:00
TheMode
1cdee4a8e1
Revert "Initial graph api (#1230)" (#1231)
This reverts commit 3999c30961.
2022-07-13 01:16:18 +02:00
TheMode
3999c30961
Initial graph api (#1230) 2022-07-13 01:14:23 +02:00
TheMode
e713cf62a7 Make ArgumentTypeTest more flexible
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-09 11:38:50 +02:00
TheMode
7141fea928 Oops test
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-09 11:01:20 +02:00
TheMode
3a7dc50e7b Test loop arg with multiple groups
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-09 10:57:06 +02:00
Steank
0989c220f6
Fix NullPointerException, deadlock when stopping the server (#1220) 2022-07-08 21:31:54 +02:00
Konstantin Shandurenko
de5a396c15
Do not send CloseWindowPacket if inventory was reopened during closing (#1218) 2022-07-08 17:37:56 +02:00
Konstantin Shandurenko
4feac211c7
Item pickup fix (#1216) 2022-07-08 17:37:24 +02:00
TheMode
1bf750a603 Make PlayerPacketOutEvent cancellable
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-07 18:12:54 +02:00
Konstantin Shandurenko
0c6599fee6
Checking that payload length is positive on packets reading (#1211) 2022-07-07 04:18:24 +02:00
Konstantin Shandurenko
4884051c6a
BlockCollision#canPlaceBlockAt player check fix (#1213) 2022-07-07 04:16:56 +02:00
Noel Németh
ba73c742f4 Fix syntax condition isn't checked when building the graph 2022-07-06 17:01:11 +02:00
Kieran Wallbanks
8b789e0f30
Allow changing the extensions folder via a system property 2022-07-06 15:34:40 +01:00
TheMode
0309d12540 Test loop/group arguments
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-06 11:12:08 +02:00
TheMode
5193529702 Simplify command tests
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-06 10:09:31 +02:00
Konstantin Shandurenko
23f03258b9
Item and experience orbs pickup fix (#1208) 2022-07-06 01:28:15 +02:00
Konstantin Shandurenko
90fa4e46ea
Catching everything in Worker's selector (#1207) 2022-07-06 01:27:24 +02:00
Noel Németh
10a2967f33 Fix wrapper arguments not forwarding node properties 2022-07-05 20:25:09 +02:00
Noel Németh
c4479dabbd Fix BinaryReader#extractBytes 2022-07-05 20:02:27 +02:00
Noel Németh
3e7719b6d1 Add missing parsers 2022-07-05 20:01:51 +02:00
Noel Németh
81c978ee9b Fix parser namespaces 2022-07-05 19:24:41 +02:00
Noel Németh
6be30d803c More tests 2022-07-05 01:59:27 +02:00
Noel Németh
2a1abdbaf4 Fix subcommands not being added to the graph and (maybe) better separate responsibilities of the relevant classes 2022-07-05 01:36:42 +02:00
TheMode
ab5734334c Separate syntax test in single & multi variants
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-02 07:40:01 +02:00
Noel Németh
793561e0cb
Simplify command graph generation (#1200) 2022-07-02 05:39:39 +02:00
TheMode
d47e761bf7 Allow testing for argument values + some utils
Signed-off-by: TheMode <themode@outlook.fr>
2022-07-02 02:58:24 +02:00
GoldenStack
54a6bcd2af
Command Tests (#1199) 2022-07-02 02:12:07 +02:00
Steank
18ab44706b
Fix floating point precision issue with RayUtils method (#1196) 2022-07-01 19:00:40 +02:00
TheMode
4a40805ca0 Fix attribute nbt
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-30 23:21:32 +02:00
TheMode
9a28e6ba87 Fix chunk invalidation during generation forking
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-30 23:12:42 +02:00
TheMode
a04012d9bf Fix npe
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-25 13:01:16 +02:00
TheMode
cda46d184e Move item impl code to the impl class
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-25 11:34:09 +02:00
TheMode
19bb23fe3d callCancellable style
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-25 11:24:36 +02:00
TheMode
9f1fcd89ef Cleanup optionalLoadAll
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-25 11:02:10 +02:00
TheMode
6ecede145e
Improve tag performance + concurrency tests (#1165) 2022-06-25 10:36:50 +02:00
SuperKael
1d469ca6a6
Add missing enum values to Biome.Category. (#1168) 2022-06-18 02:26:52 +02:00
Johnnywoof
bab2c22a51
Use predicate for entity targeting (#1099)
* Use predicate for entity targeting

* Change range variable in deprecated constructor from double to float

* Use distance squared
2022-06-15 03:07:42 +10:00
Cody
3821d204cf
Allow for 'F' to be pressed in inventories (Fixes #585) (#1164) 2022-06-14 07:38:44 +02:00
Ativendus
bb3c232256
Added annotations (#1161) 2022-06-12 20:41:50 +02:00
themode
7be96b7679 Allow tag write without allocation if compatible with the previous entry 2022-06-11 17:38:37 +02:00
Cody
af28caad9e
Fix native images not detecting MinestomConsoleWriter (#1159) 2022-06-10 04:54:38 +02:00
TheMode
ef20430e54 Use ofEntries for EntityType meta
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-09 21:41:28 +02:00
TheMode
8789a6c1f0 Add arrayCopy
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-09 21:35:18 +02:00
TheMode
20dcf91f4a Do not write packet after disconnection
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-09 16:40:51 +02:00
Noel Németh
b112248ae8
Fix by checking if the connection uses inet socket (#1152) 2022-06-05 14:53:28 +02:00
TheMode
2289cf32e1 Fix unnecessary allocation on ping
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-04 22:43:02 +02:00
Noel Németh
bcab1b199b
Limit chunk update packets (#1128) 2022-06-04 22:04:57 +02:00
TheMode
ff712575ad Fix velocity packets being sent for flying players
Signed-off-by: TheMode <themode@outlook.fr>
2022-06-04 20:38:31 +02:00
Dominik Strebinger
58b6e90142
Add PlayerInstanceEvent (#1135) 2022-05-29 20:42:45 +02:00
Zak Shearman
a01ff09563
Return null, don't throw NullPointerException (#1131) 2022-05-28 11:39:50 +02:00
Huynh Tien
a4f392d116
BungeeCordProxy: skip if the name is not textures or the value & signature does not exist (#1127) 2022-05-26 16:41:50 +02:00