Commit Graph

2060 Commits

Author SHA1 Message Date
themode
bde027432a Small code cleanup for packet caching 2021-03-02 20:42:36 +01:00
themode
25c2dc661f Fix position yaw/pitch not being copied 2021-03-02 19:36:11 +01:00
themode
a927938677 Fix cached packets being outdated 2021-03-02 19:14:52 +01:00
TheMode
85998cabd9
Merge pull request #154 from Kebab11noel/master
Added CanPlaceOn and CanDestroy for ItemStacks
2021-03-02 18:30:23 +01:00
TheMode
29a8542d3e
Merge pull request #129 from Minestom/improve-extension-system
Improve extension system
2021-03-02 18:22:21 +01:00
TheMode
3971777e56
Merge pull request #155 from RinesThaix/entities
Projectile improvements, custom entity position synchronization cooldown support
2021-03-02 13:38:50 +01:00
Konstantin Shandurenko
4be54651c6 Added javadoc for GoalSelectorsArrayList 2021-03-02 15:15:39 +03:00
Konstantin Shandurenko
0e027bc62f Comments for CombinedAttackGoal 2021-03-02 14:58:32 +03:00
Konstantin Shandurenko
818299db74 CombinedAttackGoal 2021-03-01 19:47:29 +03:00
Konstantin Shandurenko
e1e546d9fa EntityAIGroup typo fix 2021-03-01 16:52:19 +03:00
Konstantin Shandurenko
412de5de20 Merge branch 'master' into ai 2021-03-01 16:17:24 +03:00
Konstantin Shandurenko
1ae2cf78af Added support of custom entity position synchronization cooldown 2021-03-01 13:09:08 +03:00
Konstantin Shandurenko
de15c4b6c5 Rewriting projectiles 2021-03-01 12:59:16 +03:00
Németh Noel
2f725becf2 canPlaceOn and canDestroy getters no longer return an unmodifiable list, methods for additions and removals are therefore removed 2021-02-28 22:39:38 +01:00
Németh Noel
bcfaf71c7c Added checks for canPlaceOn and canDestroy sets in #isSimilar, changed emptiness check to Collection#isEmpty from != 0 in #hasNbtTag 2021-02-28 21:01:23 +01:00
Németh Noel
10ece83d75 Cleaned up imports and removed unnecessary .toString() calls 2021-02-28 20:35:10 +01:00
Németh Noel
7abf6ba9e7 Added CanPlaceOn and CanDestroy properties for ItemStacks and implemented checks for them 2021-02-28 19:37:31 +01:00
Konstantin Shandurenko
2b6a081c0d Now devs have to explicitly instantiate EntityAIGroupBuilder 2021-02-28 20:07:34 +03:00
Konstantin Shandurenko
57e2bdb5d6 Slightly rewritten EntityAIGroupBuilder 2021-02-27 17:57:30 +03:00
themode
419ebe7553 Use soft references for cached packet instead of weak 2021-02-26 12:48:53 +01:00
Konstantin Shandurenko
20f581cc11 Merged with master 2021-02-26 06:58:12 +03:00
TheMode
d3bea57ddc Packet caching cleanup
Signed-off-by: TheMode <themode@outlook.fr>
2021-02-25 20:14:13 +01:00
themode
882720c822 Added RawJsonMessage constructor taking a json object as a string to reduce boilerplate code 2021-02-25 19:01:29 +01:00
themode
e8e8022ec6 Fix pathfinding + cleanup 2021-02-25 15:48:48 +01:00
themode
a0d5ac12bc Small literal argument cleanup 2021-02-25 15:38:59 +01:00
themode
7da3a16978 Fix connection loop 2021-02-25 15:35:31 +01:00
TheMode
77ed13abd9
Merge pull request #152 from RinesThaix/entities
EntityMeta
2021-02-25 15:30:35 +01:00
Konstantin Shandurenko
6192d1fead removed duplicating code piece 2021-02-25 14:40:14 +03:00
Konstantin Shandurenko
23ee4c7fdf Deprecated Entity constructors accepting spawnPosition and introduces Entity#setInstance(Instance, Position) 2021-02-25 13:56:10 +03:00
Konstantin Shandurenko
3c5b76c0a8 Tiny improvement for Entity#switchEntityType 2021-02-25 13:39:22 +03:00
Konstantin Shandurenko
e13bca1fdd default scope to EAST case in EntitySpawnType.PAINTING 2021-02-25 13:37:40 +03:00
Konstantin Shandurenko
046ebc03f6 AbstractProjectile now extends Entity and not ObjectEntity 2021-02-25 13:07:55 +03:00
Konstantin Shandurenko
8ca43c4caa Entity is not abstract anymore 2021-02-25 13:00:02 +03:00
Konstantin Shandurenko
8a57918fe9 LivingEntity is not abstract anymore 2021-02-25 11:39:37 +03:00
Konstantin Shandurenko
83c5d3c95f Marked Entity#getEntityType as NotNull 2021-02-25 10:38:53 +03:00
Konstantin Shandurenko
18da3e0168 Moved switchEntityType from EntityCreature to Entity 2021-02-25 10:37:02 +03:00
Konstantin Shandurenko
ca6546eb7d Removed obsolete metadata type values inside Entity 2021-02-25 10:00:29 +03:00
Konstantin Shandurenko
1308f81678 Switched all direct spawn packets interactions to EntityType#getSpawnType#getSpawnPacket 2021-02-25 09:15:51 +03:00
Konstantin Shandurenko
7db7dab4b9 EntitySpawnType initial commit 2021-02-25 08:59:55 +03:00
Konstantin Shandurenko
49c92883cd ArgumentEnum 2021-02-25 07:03:26 +03:00
themode
d60118d5f6 Improve block breaking code, to fix issue when breaking a block should immediately place a new one 2021-02-24 12:18:27 +01:00
Konstantin Shandurenko
1115b829a1 EntityAIGroupBuilder 2021-02-24 13:38:42 +03:00
Konstantin Shandurenko
f8634171f7 Metadata#setNotifyAboutChanges 2021-02-24 13:28:23 +03:00
Konstantin Shandurenko
3f941d51bb Fixed initial BoundingBox of Pufferfish 2021-02-23 20:04:30 +03:00
Konstantin Shandurenko
405390640b Switched LivingEntity's explicit usage of metadata to LivingEntityMeta 2021-02-23 19:57:45 +03:00
Konstantin Shandurenko
60fcd43f18 Removed ParticleWrapper 2021-02-23 19:30:26 +03:00
Konstantin Shandurenko
c9f7ee5546 Renamed ParticleType back to Particle 2021-02-23 19:29:21 +03:00
Konstantin Shandurenko
6e950ab170 BaseEntityMeta is now an EntityMeta 2021-02-23 19:18:53 +03:00
Konstantin Shandurenko
ebb061ae39 Removed LambdaMetafactoryUtils 2021-02-23 18:45:24 +03:00
Konstantin Shandurenko
692dcfed4c Setting default entity BoundingBox from EntityType data 2021-02-23 18:41:24 +03:00
Konstantin Shandurenko
bbe143520e A bit more changes to EntityMeta 2021-02-23 18:37:00 +03:00
Konstantin Shandurenko
eb274ce95e Added default meta constructor to EntityTypes 2021-02-23 18:07:57 +03:00
themode
2843da6b26 Small comment cleanup 2021-02-23 15:11:21 +01:00
TheMode
ebed118ee2
Merge pull request #139 from LeoDog896/sound
Add Position PlaySound methods
2021-02-23 15:08:43 +01:00
Konstantin Shandurenko
237466c90e Removed new entity classes and marked previously existing ones as deprecated 2021-02-23 16:10:14 +03:00
LeoDog896
f7fc7240f6 Reduce boilerplate in convience methods 2021-02-23 07:53:10 -05:00
Konstantin Shandurenko
0915858df3 Meta wrappers for all the entities 2021-02-23 15:11:10 +03:00
Konstantin Shandurenko
6eda8f97db Removed @author javadocs 2021-02-23 09:14:38 +03:00
Konstantin Shandurenko
b409eadffa ArgumentEnum and /horse command for demo scene 2021-02-23 09:06:19 +03:00
Konstantin Shandurenko
cfc5f860e9 Fishes 2021-02-23 08:47:09 +03:00
Konstantin Shandurenko
07be9d449b Much more entities 2021-02-23 08:25:35 +03:00
Konstantin Shandurenko
ca3d36ac0c Villagers and Ageable 2021-02-23 07:11:54 +03:00
Konstantin Shandurenko
2a55ed654d Zombies 2021-02-23 06:45:04 +03:00
Konstantin Shandurenko
7a7c63afc2 Horses 2021-02-23 06:38:54 +03:00
Konstantin Shandurenko
d2c5d87582 EntityType improvements 2021-02-23 06:02:52 +03:00
Konstantin Shandurenko
3bba4ea704 New Entity AI 2021-02-23 02:28:24 +03:00
Kieran Wallbanks
a3f388a88b Add events for player sneaking and sprinting changes 2021-02-22 16:36:40 +00:00
TheMode
7bd9283e17
Merge pull request #148 from RinesThaix/goals
Switched TargetSelectors result caching from EntityCreature field to local one in GoalSelectors
2021-02-22 15:15:18 +01:00
Konstantin Shandurenko
fbddffec32 Switched TargetSelectors result caching from EntityCreature field to local one in GoalSelectors 2021-02-22 17:08:15 +03:00
TheMode
20a23a4ebc
Merge pull request #147 from RinesThaix/goals
AbstractProjectile and arrows now call EntityAttackEvent, without damaging entities
2021-02-22 14:46:20 +01:00
Konstantin Shandurenko
1053cb33b1 Tiny comment for Projectile#getShooter 2021-02-22 16:42:52 +03:00
Konstantin Shandurenko
bcdd1bb70a AbstractProjectile and arrows now call EntityAttackEvent, without damaging entities 2021-02-22 16:41:39 +03:00
themode
0cef390ff2 Fix null check 2021-02-22 14:06:47 +01:00
TheMode
60385c0887
Merge pull request #141 from MrBretze/master
Fixed somme read for NBT Tag to ItemStack
2021-02-22 14:03:48 +01:00
themode
549eb6b6e1 Fix javadoc 2021-02-22 14:02:33 +01:00
TheMode
71f1e51df3
Merge pull request #146 from RinesThaix/goals
Arrows and RangedAttackGoal
2021-02-22 13:58:43 +01:00
Konstantin Shandurenko
dbd0e472c2 Added power param for projectiles shooting 2021-02-22 15:54:35 +03:00
Konstantin Shandurenko
504e8cafb4 Codestyle formatting and several comments 2021-02-22 15:33:03 +03:00
Konstantin Shandurenko
6e23552d9a Not calculating entity collisions for arrows in first 3 ticks of its life 2021-02-22 14:58:26 +03:00
Konstantin Shandurenko
714e107eb3 Removed @author javadocs 2021-02-22 14:53:04 +03:00
Konstantin Shandurenko
b475a4cd78 Entity collisions for arrows 2021-02-22 14:51:17 +03:00
Konstantin Shandurenko
dbfebc50ec Block collisions for arrows 2021-02-22 14:42:46 +03:00
themode
b0185aa7e1 Cache command result, increases performance by an order of magnitude 2021-02-22 11:49:28 +01:00
themode
732fa0434a Properly return the command result UNKNOWN 2021-02-22 11:26:16 +01:00
themode
b4508692a5 Fix situation where no command executor is chosen when there is ambiguity. Also fix subcommand default executor not being used as backup 2021-02-22 09:42:48 +01:00
themode
b4d9cecdce Fix build & remove deprecated method 2021-02-22 08:46:30 +01:00
themode
3d585825b2 Use weak references for cached values 2021-02-22 08:43:06 +01:00
themode
04b5a4f166 Use google common cache instead of our own dirty solution 2021-02-22 08:41:38 +01:00
Konstantin Shandurenko
3a251934ec Projectiles shooting 2021-02-22 09:45:19 +03:00
Konstantin Shandurenko
3d14b614ce EntityArrow and EntitySpectralArrow 2021-02-22 09:05:54 +03:00
Konstantin Shandurenko
3c8824c7b0 RangedAttackGoal implementation initial commit 2021-02-22 08:46:37 +03:00
themode
77148338b9 Added Entity#clearEffects 2021-02-22 06:00:49 +01:00
TheMode
1fda2aba6d
Merge pull request #145 from RinesThaix/goalTargetsCaching
Caching entity target found by goal selectors
2021-02-22 05:36:26 +01:00
Konstantin Shandurenko
54da48fd3e Caching entity target found by goal selectors 2021-02-22 07:33:11 +03:00
TheMode
5014cd7ba9
Merge pull request #143 from MrBretze/optifineFix
Added OptifineSupport.isEnabled()
2021-02-22 05:32:54 +01:00
Konstantin Shandurenko
e01a92c92c Fixing armor equip with right clicking 2021-02-22 05:17:14 +03:00
themode
85a8396c9d UUID & player name cannot contain space 2021-02-21 17:44:38 +01:00
themode
78e37258ed Improve ArgumentEntity to support entity UUID & pre-check for player name 2021-02-21 17:43:30 +01:00
MrBretzel
f7ec0dbc1f Added OptifineSupport.isEnabled() 2021-02-21 17:25:35 +01:00
ALS
fb6c51204b getAsByte 2021-02-21 16:59:50 +01:00
ALS
12f0190f97 Revert AttributeSlot.parse(String string) 2021-02-21 16:56:06 +01:00
themode
200b244224 Fix JSON string not being displayable using ColoredText, remove unnecessary fields in PlayerListHeaderAndFooterPacket 2021-02-21 16:49:25 +01:00
themode
728107b0fe Added convenient EntityFinder#findFirstEntity 2021-02-21 12:35:04 +01:00
ALS
b842f07c3c Use getAsInt and getAsDouble 2021-02-20 23:54:25 +01:00
ALS
0f9a2b5b4f Fixed a possible null for attributeSlot 2021-02-20 20:39:49 +01:00
ALS
01ff9e2123 Fix failed issue 2021-02-20 19:51:45 +01:00
themode
99be06f571 Revert to check shared command arguments 2021-02-20 19:18:28 +01:00
ALS
ac7ca6f8e4 Fixed somme read for NBT Tag to ItemStack 2021-02-20 17:35:02 +01:00
MrBretzel
2c45103b2c
Update Arguments.java 2021-02-20 15:43:22 +01:00
MrBretzel
1ad1f06e33
Adding has(Argument<T> argument) to Arguments.java 2021-02-20 15:31:30 +01:00
themode
bd840a868f Improve optional argument support & client-side brigadier suggestion 2021-02-20 13:10:12 +01:00
themode
721f9abc08 FakePlayer now implements NavigableEntity 2021-02-20 09:15:08 +01:00
themode
a419d7eb3f Add subcommand support for fast parsing & proper separation between logics 2021-02-20 08:59:15 +01:00
LeoDog896
4daa55d27e Add Position playsound methods 2021-02-19 18:43:35 -05:00
themode
06abbcb7fb Fix chunks being sent 2 times on first spawn 2021-02-19 13:52:27 +01:00
jglrxavpok
e40186a2aa Periodically remove extension observers (every minute at the moment) 2021-02-17 17:37:54 +01:00
themode
9ed3bd929c Only flush when the channel is active 2021-02-17 05:12:43 +01:00
themode
590e6cb939 Add write water mark, reduce debug prints, update netty to latest 2021-02-17 05:03:31 +01:00
themode
16ad864c09 Disable TCP_NO_DELAY by default 2021-02-16 04:17:38 +01:00
themode
437afc28ff Enable suggestion by default for ArgumentEntityType 2021-02-14 07:52:27 +01:00
themode
f1448c8c89 Renamed RelativeLocation#from 2021-02-14 00:31:49 +01:00
themode
beaf25ff47 Added convenient Arguments#has 2021-02-14 00:25:08 +01:00
themode
df2ee23a7c ArgumentLoop cleanup 2021-02-13 08:43:38 +01:00
themode
e0d0c14933 Fix ArgumentLong and don't set default min/max for number arguments 2021-02-13 07:35:53 +01:00
TheMode
6c4454e9fb
Merge pull request #137 from LeoDog896/command
Enhance Command System
2021-02-13 06:28:54 +01:00
themode
1d64cafcf2 Move some CommandDispatcher methods 2021-02-13 00:34:25 +01:00
LeoDog896
367889a374 No magic strings in ArgumentString 2021-02-12 15:27:18 -05:00
themode
33a26b80f5 Added CommandData#has and allow #set chaining 2021-02-12 08:34:05 +01:00
themode
c9ab710be2 Fix argument callback being overridden 2021-02-12 05:24:40 +01:00
themode
efd2dbc021 Fix command argument sharing 2021-02-12 04:34:37 +01:00
KrystilizeNevaDies
427632d29b Use primitives in BlockBatch#flush 2021-02-12 11:34:45 +10:00
LeoDog896
2f99567edf Use slf4j logger instead of direct print 2021-02-11 20:18:02 -05:00
KrystilizeNevaDies
ee8815d2f8 Add shouldLoadChunks in BlockBatch#flush 2021-02-12 10:37:53 +10:00
themode
5610b1a72a Added ArgumentLoop parsing 2021-02-12 00:25:12 +01:00
themode
84da72d798 Fix command aliases + cleanup 2021-02-12 00:00:44 +01:00
themode
f0105d7058 Added WIP ArgumentLoop (no parsing yet) 2021-02-11 20:36:02 +01:00
themode
f639ac83f7 Rewrite of the command nodes creation 2021-02-11 06:37:09 +01:00
themode
ab9ddebfea WIP ArgumentGroup nodes, renamed NodeMaker#addNodes 2021-02-11 05:08:49 +01:00
themode
b34b490504 Added ArgumentGroup parsing, WIP nodes 2021-02-11 04:47:48 +01:00
themode
e9d91fd21e Separate the dispatcher from the parsing algorithm 2021-02-11 04:18:19 +01:00
themode
86908fbd0e Remove Argument redirect API (should use NodeMaker instead) 2021-02-11 03:09:00 +01:00
themode
053ef06ee1 Cleanup (moved some packet methods to DeclareCommandsPacket) and added CommandResult#getInput 2021-02-11 03:00:13 +01:00
themode
1a2fd4f743 Added NodeMaker + ArgumentCommand 2021-02-11 02:51:42 +01:00
themode
601ee71744 Fix invalid argument being considered as "successful" execution 2021-02-11 01:45:35 +01:00
themode
779490064e Root node should be at index 0 (to facilitate the future ArgumentCommand) 2021-02-11 00:58:10 +01:00
themode
dffb90e1b4 Fix CommandDispatcher#findCommandResult never returning null, + cleanup 2021-02-11 00:33:55 +01:00
themode
266c4d9bed ArgumentEntity static fields naming fix 2021-02-11 00:29:31 +01:00
themode
eda821c3d8 Cleanup + don't verify player name in ArgumentEntity 2021-02-11 00:25:38 +01:00
themode
c11151360b Added ArgumentLiteral 2021-02-11 00:14:29 +01:00
themode
c6e15d4bda Added getters in CommandResult 2021-02-11 00:06:22 +01:00
themode
9fc10bc051 Added CommandResult & moved ParsedCommand 2021-02-11 00:04:42 +01:00
themode
12c0b604db Added boolean for node redirection 2021-02-10 23:09:38 +01:00
themode
2547972459 Deprecate Arguments#getObject 2021-02-10 21:35:18 +01:00
LeoDog896
0ce88102ed Get, has, and set argument redirects 2021-02-09 19:11:27 -05:00
LeoDog896
2330cb7037 And declare it as a set 2021-02-09 18:27:41 -05:00
LeoDog896
c4e6d18ee4 Get commands from appropiate set 2021-02-09 18:26:26 -05:00
LeoDog896
3f5fe7bbd9 Revert command set removal 2021-02-09 18:24:23 -05:00
LeoDog896
7854602a04 Remove unnecessary toNodes wrapper 2021-02-09 13:21:25 -05:00
LeoDog896
de5e8e3e67 Cleanup 2021-02-09 12:24:50 -05:00
LeoDog896
becd876dcd Put getNumberProperties into Number arg 2021-02-09 10:58:27 -05:00
LeoDog896
bedc91427e Remove repetitive Set
The Map of commands already stores 2 lists, and making another one for the sake of it actually decreases readability.
2021-02-09 10:40:04 -05:00
LeoDog896
79ec9e6569 Add null checks for aliases 2021-02-09 09:26:53 -05:00
LeoDog896
3d74e74b9e Use redirection for aliases instead of repetition 2021-02-09 09:25:18 -05:00
LeoDog896
6b4c514254 Fix imports 2021-02-09 07:26:32 -05:00
LeoDog896
f20d8941a5 Put simpleArgumentNode into Argument 2021-02-08 21:03:55 -05:00
LeoDog896
b770710e0d Redo argsValues
(Until / if theres a better solution)
2021-02-08 20:59:46 -05:00
LeoDog896
01b4a1b582 Allow time unit to be omittable 2021-02-08 19:45:25 -05:00
LeoDog896
7705c03500 Use Array for validation
Unless something goes absolutely terribly and in fact void wrong the ArgumentValidation should be fine.
2021-02-08 19:33:56 -05:00
LeoDog896
8d7cce3044 Use collections for the correct situations 2021-02-08 19:11:47 -05:00
LeoDog896
e809e69a07 Use protected COMMAND_MANAGER field 2021-02-08 18:54:55 -05:00
LeoDog896
f300d60411 Prefer primitives over list 2021-02-08 18:33:01 -05:00
LeoDog896
4379f4b1e1 Outsource node building to other classes 2021-02-08 18:25:10 -05:00
themode
04c792c302 Fix javadoc 2021-02-08 04:10:43 +01:00
themode
004b4563c2 Replace NbtCompound to CommandData 2021-02-08 04:08:22 +01:00
themode
3c7bbc9d2d Added initial command return support 2021-02-08 03:42:35 +01:00
themode
8334e100cf Don't send packet to disconnected clients 2021-02-07 22:02:03 +01:00
themode
2d7e16fa8e change UpdateOption value from int to long 2021-02-07 20:14:40 +01:00
themode
f7aeeabe9c Override ItemStack#equals 2021-02-07 19:38:14 +01:00
themode
5a308f0ced Added deprecation warning for most Arguments methods 2021-02-06 19:38:59 +01:00
themode
1af8ea5303 Added comment about broken bedrock client skin using Geyser 2021-02-06 03:51:17 +01:00
jglrxavpok
8a992b3e45 New constructor to give UUID as argument in LivingEntity, now used to specify player UUID 2021-02-05 14:32:28 +01:00
jglrxavpok
da3a8b17b2 Add FireworkMeta#getFlightDuration 2021-02-05 12:18:05 +01:00
jglrxavpok
6addd63396 Fix extension subdependencies not being loaded + Test that J9 modules are supported 2021-02-04 20:40:12 +01:00
jglrxavpok
9ce7a08d12 Extension can check if their code modifiers (including Mixins) loaded correctly 2021-02-04 19:11:43 +01:00
jglrxavpok
ee158c0dea Use Nullable string instead of Optional in MinestomRootClassLoader#findExtensionObjectOwner 2021-02-04 11:57:43 +01:00
jglrxavpok
2a96beb819 Extensions will be unloaded when server is stopped 2021-02-03 20:56:36 +01:00
jglrxavpok
a63e9462c2 All EventHandler remove extension callback when the extension unloads 2021-02-03 20:47:01 +01:00
jglrxavpok
c9d2edef3a Tests for shutdown and delay tasks 2021-02-03 19:35:59 +01:00
jglrxavpok
c8e311855f Auto-unschedule and cancel tasks from extensions 2021-02-03 17:51:14 +01:00
themode
9fe2b8359c Added convenient EntityFinder#findFirstPlayer(CommandSender) 2021-02-03 17:21:49 +01:00
jglrxavpok
4f39498ef5 Remove debug code no longer relevant 2021-02-03 17:12:20 +01:00
jglrxavpok
eadd4a2b39 Automatically unload GlobalEventHandler callbacks 2021-02-03 17:11:06 +01:00
themode
b5d03cb7a9 Added convenient EntityFinder#find(CommandSender) 2021-02-03 16:57:58 +01:00
KrystilizeNevaDies
a92ab6ea47 Add comment on Instance#setTime 2021-02-03 16:31:15 +10:00
themode
1146d50f24 Cleanup 2021-02-02 21:14:01 +01:00
themode
c6cafb19a4 Added all missing metadata (except Particle) 2021-02-02 21:13:31 +01:00
themode
cb41b2e3d7 Added villager data metadata 2021-02-02 21:03:25 +01:00
jglrxavpok
2b5d67a3ca Don't crash the server if Mixin can't be loaded due to identical file names inside the JAR file.
But please spam the console.
2021-02-02 14:49:19 +01:00
jglrxavpok
9b9565dbbd Early loading of Mixin and code modifiers
+ System property to disable early loading if necessary
2021-02-02 12:44:57 +01:00
themode
b6cce091e8 Remove magic values from ColoredText 2021-02-02 07:04:16 +01:00
themode
f17a518e92 Fix color not being displayed after a forward slash 2021-02-02 06:56:45 +01:00
themode
7843f74b4b Fix string encoding to UTF-8 2021-02-01 23:39:44 +01:00
themode
dd1b67e5de Enable netty error processing by default 2021-02-01 18:22:36 +01:00
themode
735dd50f4e Fix optional metadata 2021-01-31 15:26:51 +01:00
themode
1707cc73f5 rename to #legacyToFormat 2021-01-31 00:42:21 +01:00
themode
2f326aeaae Rename #toLegacy to #toFormat since it didn't make sense 2021-01-31 00:25:49 +01:00
themode
8f174f2c87 Update ChangeGameStatePacket to reflect wikivg documentation 2021-01-30 16:03:04 +01:00
themode
3026e46220 Added new metadata API 2021-01-30 04:44:44 +01:00
themode
59c4cd9382 Reorder Direction enum to support entity metadata 2021-01-29 21:05:18 +01:00
themode
66817eb9c4 Fixed Team#removeMember 2021-01-29 00:02:43 +01:00
themode
edd880ceb6 Allow to update both the block state and custom ids using PlayerBlockBreakEvent#setResultCustomBlock 2021-01-28 22:53:02 +01:00
themode
b321a10caa Change the algorithm order of InstanceContainer#setBlock 2021-01-28 16:19:06 +01:00
themode
da2286de74 Make the FakePlayer constructor protected instead of private 2021-01-28 15:42:11 +01:00
themode
c607a7a2cb Small style cleanup 2021-01-28 15:41:11 +01:00
themode
fa0c5050e4 Prevent entities from moving during death animation 2021-01-28 15:37:55 +01:00
themode
522b4edc7a New Navigator class to properly separate pathfinder functionalities 2021-01-28 15:33:52 +01:00
themode
e0c8e94bc1 Limit the number of velocity packet used for entities 2021-01-27 19:35:53 +01:00
themode
9775262c6a Fix velocity for netty clients 2021-01-27 19:20:52 +01:00
themode
626d48a0fb Fix Sidebar line score not being removed client-side 2021-01-27 17:46:26 +01:00
themode
7a54b4162d Style cleanup 2021-01-26 15:53:03 +01:00
iamceph
ded8a4b4f8 Move getBlock to Instance only 2021-01-26 09:51:19 +01:00
iamceph
564d549f81 Merge remote-tracking branch 'upstream/master' 2021-01-26 09:46:41 +01:00
themode
a9e638b93f Fix infinite recursion with Instance#getBlockStateId 2021-01-25 21:58:06 +01:00
themode
0da4f96e7e Allow gravity values to be doubles 2021-01-25 21:30:56 +01:00
themode
5f75ea7d3a Remove unnecessary casts 2021-01-25 19:33:53 +01:00
themode
3067f1daaa Merge with master 2021-01-25 19:27:04 +01:00
themode
9ee25ee8ce Merge branch 'master' into double-position 2021-01-25 19:24:19 +01:00
themode
f4a3a9e733 Change Sidebar's queue into a Set, added Sidebar#getLines 2021-01-25 17:48:08 +01:00
themode
fa02a12c1e More math 2021-01-25 14:09:36 +01:00
themode
f48c291929 More math methods in Vector 2021-01-25 13:56:17 +01:00
themode
c01736f863 Use doubles instead of floats to represent Position and Vector 2021-01-25 13:47:13 +01:00
themode
886c4ca9c9 Improve InstanceManager#getInstance comment 2021-01-25 10:21:10 +01:00
iamceph
e74d3ca0f6 Merge remote-tracking branch 'upstream/master' 2021-01-25 09:56:35 +01:00
KrystilizeNevaDies
d733dbbc3f Upate getInstance(UUID) to return nullable instance 2021-01-25 17:25:51 +10:00
iamceph
324c72002f Fix oopsie 2021-01-25 01:17:24 +01:00
iamceph
028241e069 Add ability to get Block from Instance 2021-01-25 01:16:07 +01:00
iamceph
6807217608
Add ability to get Instance by UUID (#114) 2021-01-25 09:52:08 +10:00
iamceph
60cd25e07f Add ability to get Instance by UUID 2021-01-25 00:23:44 +01:00
themode
b37670e1c7 Override PlayerSkin#toString 2021-01-24 16:32:42 +01:00
themode
3e990bb716 Ignore INTERACT_AT packet, remove buggy console prefix 2021-01-24 15:44:18 +01:00
themode
a0f5317292 Remove unnecessary unmodifiable collection 2021-01-23 22:06:41 +01:00
Tyan
7d7c65aa70 Set the last location at the end of refreshPosition 2021-01-23 15:51:07 +01:00
themode
bf692d8043 Clone the teleport position to prevent object sharing 2021-01-23 08:42:49 +01:00
themode
36933fe4b3 Ensure synchronization of the location field 2021-01-23 08:23:24 +01:00
themode
7de0067a13 Small utility methods for EntityRotationPacket 2021-01-22 21:28:33 +01:00
TheMode
5eb5f32095
Merge pull request #110 from MrBretze/patch-1
Added withProperties in BlockAlternative.java
2021-01-21 17:22:59 +01:00
MrBretzel
840eb1a27e
Update BlockAlternative.java 2021-01-21 17:21:36 +01:00
themode
4bb27c305f Cleanup & remove unnecessary calls in PlayerDiggingListener 2021-01-21 16:53:20 +01:00
themode
7a4f3672de Send creeper metadata on spawn 2021-01-21 12:33:04 +01:00
themode
b5a01d6571 Add indicator in the console to display command support 2021-01-21 11:37:54 +01:00
TheMode
1cd3228c06
Merge pull request #109 from DerTyan/exception-handling
Added ExceptionManager for custom exception handling
2021-01-21 06:06:27 +01:00
MrBretzel
18ce3625c7
Added withProperties in BlockAlternative.java
Example: 

blockAlternative.withProperties("facing");

Return the facing of the block a empty string
2021-01-20 20:22:54 +01:00
Tyan
855c8af455 Added ExceptionManager for custom exception handling 2021-01-20 11:43:45 +01:00
themode
d83abcef85 Fix inventory click on size non-divisible by 9 2021-01-20 08:18:00 +01:00
themode
023431e32a Use ordinal as the id in InventoryType 2021-01-20 05:35:41 +01:00
KrystilizeNevaDies
feb1d8f0e9
missing comma 2021-01-20 13:31:45 +10:00
KrystilizeNevaDies
b08a75fc03
Add SMITHING to InventoryType 2021-01-20 13:31:01 +10:00
themode
240a745830 Prevent runtime exception when passing an array with null values in ArgumentWord 2021-01-19 06:27:58 +01:00
themode
7d72d48a5a Fix keep alive packet 2021-01-18 21:47:00 +01:00
LeoDog896
fa7fe1398f Change remove to poll 2021-01-18 10:45:22 -05:00
LeoDog896
78abfb9657 Make init function UNSAFE 2021-01-18 10:44:12 -05:00
LeoDog896
4aed6ffa5c Revert ConcurrentStack 2021-01-18 10:42:01 -05:00
LeoDog896
83111cb8bb Add javadocs to ConcurrentStack 2021-01-18 10:35:43 -05:00
LeoDog896
ac68c094ce Better keepalive and connection handling 2021-01-17 19:26:20 -05:00
TheMode
1eea505da0 Update version name 2021-01-17 08:29:23 +01:00
TheMode
b00824d053
Merge pull request #104 from LeoDog896/master
Microoptimization cleanup
2021-01-17 07:20:51 +01:00
LeoDog896
5419530125 Enchanted book and Colored StringBuilder 2021-01-15 22:03:44 -05:00
Alexander
8f130b5dd9 Fix missing field bug 2021-01-15 21:25:16 +00:00
LeoDog896
fec05d6838 More fastutil usages 2021-01-15 16:04:57 -05:00
LeoDog896
3b3a86a402 Prefer nullable over optional 2021-01-15 13:39:12 -05:00
LeoDog896
3514547610 Fix isEmpty check in ColoredText 2021-01-15 13:26:12 -05:00
LeoDog896
8633797420 Use a StringBuilder for ColoredText 2021-01-15 13:16:09 -05:00
LeoDog896
0c1b93a82b Return non-fastutil type 2021-01-15 13:08:55 -05:00
LeoDog896
12adb9a965 *Actually important Microoptimization*
Anything that handles every single connected player should be optimized
2021-01-15 13:05:21 -05:00
LeoDog896
3536bdc856 Microoptimization cleanup
Just some small microoptimizations including preferring fastutils, Removing unnecessary checks already dealt with using @NotNull, all since I had extra unplanned free time.
2021-01-15 11:08:11 -05:00
themode
238ea649ab Cleanup Team class 2021-01-14 04:33:23 +01:00
TheMode
e6706ec327
Merge pull request #102 from LeoDog896/master
Add EatBlockGoal instance check & MeleeAttackGoal range.
2021-01-13 20:01:02 +01:00
LeoDog896
97b7e122e9 Add instance check to NavigableEntity 2021-01-13 07:54:06 -05:00
LeoDog896
96d581a49f Optimize EatBlockGoal with fastutil 2021-01-13 07:50:41 -05:00
LeoDog896
2cd5a362a4 Add eating check for instances. 2021-01-13 07:37:20 -05:00
LeoDog896
85a84dbea6 Add range to MeleeAttackGoal 2021-01-13 07:33:51 -05:00
KrystilizeNevaDies
7bc1f37e80 Add a direct way to set the bounding box in Entity 2021-01-13 21:57:55 +10:00
themode
098ba1a6a4 Fix client crash when receiving packets before playing state 2021-01-13 09:16:22 +01:00
themode
e0afe62c66 Comment about getItemStacks() array modification 2021-01-13 08:39:33 +01:00
themode
9d8e9276f6 Added the convenient InventoryModifier#copyContents 2021-01-13 08:28:37 +01:00
themode
8e1ffdff7d Prevent double intersect check 2021-01-13 06:34:09 +01:00
themode
7d8ce32ba9 Fix block placement collision on chunk border 2021-01-13 06:32:42 +01:00
themode
d5da334c25 Item lore cannot be null (but empty) 2021-01-13 03:42:31 +01:00
themode
ea8b8ea41e Fix getChunkAt 2021-01-13 00:56:53 +01:00
LeoDog896
37d528c5a2 Check for removed entity before targeting 2021-01-12 15:16:24 -05:00
themode
fcc5bc4381 Improve bootstrap warning 2021-01-12 04:22:24 +01:00
themode
29c8f924fa Added missing metadata types 2021-01-11 21:21:19 +01:00
themode
c5d56ae820 Small velocity code cleanup 2021-01-11 08:44:38 +01:00
themode
fc694f4b49 Override JsonMessage#toString 2021-01-11 04:42:50 +01:00
themode
14d0149276 Fix boolean argument 2021-01-11 02:57:18 +01:00
themode
d7fec0297f Fix argument callback with 0 correct argument 2021-01-11 01:54:59 +01:00
KrystilizeNevaDies
23e70208a8
Fix EntityDamageEvent not being cancellable 2021-01-10 14:18:16 +10:00
themode
1859f513e5 Added convenient EntityFinder#findFirstPlayer 2021-01-10 02:39:05 +01:00
themode
b1db46f575 Allow null instance for entity query 2021-01-10 02:30:57 +01:00
R0bbyYT
71ca9414e4 Makes the HologramEntity accessible and adds documentation. 2021-01-09 22:20:08 +01:00
themode
2cf9e55f7b Trim argument name 2021-01-09 06:53:55 +01:00
themode
85390662b7 Merge remote-tracking branch 'origin/master' 2021-01-09 03:42:14 +01:00
themode
4a0302892e Added static parser for ArgumentEntity 2021-01-09 03:40:53 +01:00
Matt Worzala
ef35a39388
Add Player#openBook (#99) 2021-01-09 12:40:22 +10:00
themode
9aaecceb01 Added support for player name only 2021-01-09 03:31:24 +01:00
themode
d0bf6d9f0d Improve ArgumentString parsing + add apache commons-text dependency 2021-01-09 03:14:10 +01:00
themode
8871cf16c0 Don't default the permission level 2021-01-09 02:38:26 +01:00
themode
a6e5dbc60e Fix permission level to use the target selector 2021-01-09 02:20:55 +01:00
themode
ac1fa4cb9e Fix selector variables list and use a switch 2021-01-09 01:13:44 +01:00
themode
8f99753235 WIP entity selector argument 2021-01-09 00:59:03 +01:00
themode
ef1afb9cd9 WIP EntityFinder 2021-01-08 23:47:31 +01:00
themode
8fef648221 Fix chunk packets from being wrongly sent when switching instance 2021-01-08 17:17:36 +01:00
themode
90006ac48d Prevent compression from blocking the thread too much 2021-01-08 16:20:04 +01:00
Tyan
c702e94937 Made some field in PlayerInventory protected for allowing usage in child classes 2021-01-08 12:29:59 +01:00
themode
066b3dc417 Cleanup 2021-01-08 08:32:33 +01:00
themode
35973c227e Attempt to prevent exception during first connection 2021-01-08 03:16:59 +01:00
themode
1c65b36087 Rework of ArgumentCallback to be more robust, allowing to simplify all argument types in order to be used out of the command framework for general parsing.
Also removed magic space string, replaced with constant from commons apache library
2021-01-08 03:07:37 +01:00
themode
e4e564ab07 Add info in chunk comment about safe access 2021-01-07 16:51:10 +01:00
themode
d4f61eb152 Improve thread safety in Instance 2021-01-07 16:49:43 +01:00
themode
7c5bb7126a Added PlayerBlockPlaceEvent#setBlockData 2021-01-07 16:12:56 +01:00
themode
349364e15d Provide the proper dimensiontype in the JoinGamePacket 2021-01-07 04:21:34 +01:00
themode
0fa82aff1f Fix default dimension 2021-01-07 03:49:55 +01:00
themode
706a36b30a Fix dimension not being sent for the first instance & force dimensions to be registered in the manager 2021-01-07 03:46:58 +01:00
themode
cfe6178e46 Added "effects" support for DimensionType 2021-01-07 03:11:51 +01:00
themode
596b9eedb9 Don't ignore entity yaw in EntityCreature#addViewer 2021-01-07 02:30:46 +01:00
themode
709cc064e5 Added FIXME comment for future bugfix 2021-01-06 21:34:59 +01:00
themode
8d1dda74d0 Increase bpe to 15 as a temporary fix 2021-01-06 21:33:38 +01:00
themode
4107c768a3 Fix test 2021-01-06 21:19:09 +01:00
themode
84fd568c0c Fix attributes not being fully sent for the first player login 2021-01-06 21:09:27 +01:00
themode
459e65da72 Fix build 2021-01-06 20:49:31 +01:00
themode
f5d550cda9 Fix attributes not being refreshed client side 2021-01-06 20:45:40 +01:00
themode
d6a3b18f04 Fix bits per entry value during palette resize 2021-01-06 20:33:01 +01:00
themode
97a29c6ccf Player#setInstance cleanup 2021-01-06 19:06:37 +01:00
themode
6b39cb1e32 Execute the async login event before sending the login success packet 2021-01-06 19:02:35 +01:00
themode
deb8cab03a Remove unnecessary checks 2021-01-06 18:01:39 +01:00
themode
6c813e9c26 Made FramedPacket immutable 2021-01-06 03:18:55 +01:00
themode
7347c8df68 Prevent exception when connecting using an older client 2021-01-06 03:16:46 +01:00
themode
2634105ad1 ArgumentWord restrictions should be part of the correction instead of the condition 2021-01-05 21:54:17 +01:00
themode
9546caca04 Fix build 2021-01-05 18:16:44 +01:00
themode
852391f210 Fix packet listeners not being called if there is no default listener 2021-01-05 18:10:25 +01:00
themode
3a7ae11c56 Add CommandSender as param in onDynamicWrite 2021-01-05 18:04:28 +01:00
themode
45c148974e A bunch of client packets 2021-01-05 13:58:38 +01:00
themode
261d734740 Added all missing server packets 2021-01-05 13:44:14 +01:00
themode
388caefa34 Added BlockEntityDataPacket 2021-01-05 13:38:35 +01:00
themode
47447706b0 Fix Player#kick ignoring the kicking text 2021-01-04 23:15:41 +01:00
themode
0a0d19128c Added BlockManager#getCustomBlocks 2021-01-04 22:29:44 +01:00
themode
5c2b7f38f6 Update Hydrazine library 2021-01-04 21:37:34 +01:00
themode
640521e6dc Fix item hide flags and custom model data not being saved in the creative packet 2021-01-04 20:26:17 +01:00
themode
7019b7da85 Fix onGround field and gravityTickCount 2021-01-04 03:04:45 +01:00
themode
f2f9cbc5fa Prevent NPE when creating a Team without any entity 2021-01-03 23:01:41 +01:00
themode
f13646fd0d Allow null target in EntityCreature#setTarget 2021-01-03 22:42:15 +01:00
themode
edab21baa6 Allow null target in EntityCreature#setTarget 2021-01-03 22:41:50 +01:00
themode
c52b86822b Optimize equipment packet creation 2021-01-03 22:05:18 +01:00
themode
5ba68be4a1 Update equipments when clearing a player inventory 2021-01-03 21:59:58 +01:00
themode
765c5be642 Small synchronization optimization 2021-01-03 20:00:00 +01:00
themode
317432460e Entity cleanup 2021-01-03 00:23:41 +01:00
ThatCreeper
993b936e4e reorder imports 2021-01-02 17:12:38 -06:00
ThatCreeper
30868df243 Remove unused imports 2021-01-02 17:08:59 -06:00
ThatCreeper
30be7b5b81 Add Potion Add and Remove events 2021-01-02 16:59:17 -06:00
themode
dad642a6a2 Allow retrieving argument value using the argument object instead of the String id 2021-01-02 17:24:26 +01:00
themode
bfad3b8d7c Allow wrappers for Arguments by making the Map protected 2021-01-02 17:11:27 +01:00
themode
8155845c90 Fix AIOB exception when placing a block in y=256 2021-01-02 16:18:26 +01:00
themode
82631fc6f8 Comments for the optional argument support 2021-01-02 16:09:20 +01:00
themode
0faaea2c1b Added option to disable the grouped packet feature 2021-01-02 15:44:50 +01:00
themode
1c916b92fa Use offset constant 2021-01-02 13:16:02 +01:00
Matt Worzala
dc4d7d63e2
fix formatting 2021-01-02 07:03:39 -05:00
Matt Worzala
720422c031
remove irrelevant comment 2021-01-02 07:02:39 -05:00
Matt Worzala
0b9b95e6cb
remove debugging code & use inventory offset constant 2021-01-02 06:51:21 -05:00
Matt Worzala
1f60330abe
Fix double click result handling 2021-01-02 04:40:24 -05:00
themode
4d2dd7d256 Fix javadoc build 2021-01-01 23:40:22 +01:00
themode
4f5847ff10 Little detail about FramedPacket 2021-01-01 23:37:20 +01:00
themode
4bf120b714 Added support for command syntaxes with optional arguments (default values) 2021-01-01 23:36:53 +01:00
themode
2ec727d5f8 Fix InventoryClickResult not using the proper items 2021-01-01 13:43:43 +01:00
Matt Worzala
46ac38d5b3
Change ColoredText usages to JsonMessage 2020-12-31 13:53:21 -05:00
themode
2141792fcf Fixed math 2020-12-31 12:07:16 +01:00
themode
fd920ffdfe Potion cleanup 2020-12-31 12:05:36 +01:00
ThatCreeper
0ce094567b Fix most checkstyle warnings 2020-12-30 19:27:29 -06:00
ThatCreeper
c3d6af3afe make removeEffect send a packet
Make Potion immutable, and use long instead of Long
2020-12-30 19:07:07 -06:00
ThatCreeper
c01b57ed9b removed scheduledPotions 2020-12-30 18:55:20 -06:00
ThatCreeper
fa41aabaed Make Potions use time instead of nanoTime 2020-12-30 18:47:43 -06:00
ThatCreeper
d7883d29ff Rewrite Potions 2020-12-30 18:29:07 -06:00
ThatCreeper
50b44e46e0 Add PotionEffectManager 2020-12-30 17:12:03 -06:00
themode
d4110632a4 Increase readability when using static fields instead of local ones 2020-12-30 20:30:48 +01:00
themode
23fc19430a Fix entity uuid map memory leak 2020-12-30 20:29:46 +01:00
themode
835a769080 Implement entity eye height based on boundingbox 2020-12-29 20:42:41 +01:00
themode
78ed12887d Implement client spectate packet 2020-12-29 19:58:40 +01:00
themode
a7a6210f65 Register ClientSpectatePacket 2020-12-29 19:50:29 +01:00
themode
8b9836d82a Set Player eye height to 1.62 2020-12-29 18:12:25 +01:00
TheMode
feab43a5f1
Merge pull request #89 from Nesaak/master
Add BlockIterator and LivingEntity#getTargetBlockPosition
2020-12-29 18:09:30 +01:00
Nesaak
ebea74f3c6 Remove unused import 2020-12-29 11:54:06 -05:00
themode
8da6148152 PlayerInventory field in player is now protected, to allow unsafe modifications when extending the class 2020-12-29 16:42:07 +01:00
jglrxavpok
817036fd87 Too many F, oops 2020-12-29 16:25:11 +01:00
jglrxavpok
997a76980f Fix ChunkBatch not deserializing properly block state IDs > 255 2020-12-29 16:17:27 +01:00
themode
3c871ed603 Fix NPE in CrossbowMeta 2020-12-29 15:16:51 +01:00
Nesaak
fd73cc1d23 Add BlockIterator and LivingEntity#getTargetBlockPosition 2020-12-28 20:24:03 -05:00
themode
718d787192 Makes the Pose enum public 2020-12-29 00:43:04 +01:00
themode
f7d1bd7e53 Merge remote-tracking branch 'origin/master' 2020-12-29 00:04:27 +01:00
themode
cecf6310ca Added Entity#setPose 2020-12-29 00:04:15 +01:00
TheMode
70c9068365
Merge pull request #87 from mworzala/list_typing
Minor list typing changes
2020-12-28 21:19:58 +01:00
Matt Worzala
071a2ce196
Change ArrayList types to List 2020-12-28 14:57:39 -05:00