TheMode
a55ea6d0c2
WIP per-chunk thread
2021-04-14 21:29:37 +02:00
TheMode
356150847e
Per-chunk batch management
2021-04-14 20:32:02 +02:00
TheMode
9b8dd6e768
Merge branch 'master' into acquirable
...
# Conflicts:
# src/main/java/net/minestom/server/thread/ThreadProvider.java
2021-04-14 20:13:26 +02:00
TheMode
ccab205a54
Initial acquirable API commit
2021-04-14 20:12:56 +02:00
TheMode
c1b278f4b9
Fix merge, remove unnecessary methods (for now)
...
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-14 20:09:49 +02:00
TheMode
683a6d35fa
Merge branch 'master' into tickable
...
# Conflicts:
# src/main/java/net/minestom/server/entity/Entity.java
# src/main/java/net/minestom/server/instance/DynamicChunk.java
# src/main/java/net/minestom/server/instance/Instance.java
2021-04-14 20:06:35 +02:00
TheMode
dc5b764732
Inventory id generation cleanup
2021-04-14 07:25:51 +02:00
TheMode
97f2f3f06c
Fix inventory id overflow
2021-04-14 05:03:37 +02:00
TheMode
c57e35c58a
Add completable future return to AsyncUtils
2021-04-14 04:06:41 +02:00
TheMode
7d574317dc
ClientCloseWindowPacket window id is a byte, not a var int
2021-04-14 02:00:19 +02:00
TheMode
b68c30423c
Add BinaryWriter#write(ByteBuf)
2021-04-14 01:40:21 +02:00
TheMode
a3f1235df4
Stacking rule should be defaulted to vanilla if null
2021-04-13 23:15:51 +02:00
TheMode
6ba336ee73
Added hand inside eat events
2021-04-13 22:59:40 +02:00
TheMode
a55ae4d048
Cache unmodifiable players set, remove print
2021-04-13 21:39:42 +02:00
TheMode
49944fb651
Keep StackingRule across builders
2021-04-13 09:24:37 +02:00
TheMode
58a532ac03
Annotate ItemStackBuilder#stackingRule with Beta
2021-04-13 09:19:39 +02:00
TheMode
70b97951e4
Added setter for StackingRule
2021-04-13 05:50:11 +02:00
TheMode
fed4e6897a
Fix FireworkEffect byte reading
2021-04-13 04:14:32 +02:00
TheMode
61d2ef2f06
Fix ItemStack#fromNBT
2021-04-13 03:45:01 +02:00
TheMode
508659fd30
Fix potential race condition
2021-04-13 03:29:55 +02:00
TheMode
2b74d7697c
Added ItemStack#fromNBT
2021-04-13 03:27:51 +02:00
TheMode
32430882a5
ItemStack is final
2021-04-13 03:10:04 +02:00
TheMode
3b8ed1df32
Add api status annotations
2021-04-13 02:21:03 +02:00
TheMode
56439a2330
Merge branch 'master' into jline
2021-04-13 02:18:10 +02:00
TheMode
1b98a65869
Get entities from all instances when none is specified in an entity query
2021-04-13 02:08:09 +02:00
TheMode
20c947650f
Clear command cache after unregistering a command
2021-04-12 22:45:45 +02:00
TheMode
cdaef2b4f0
Remove LivingEntity outdated TODO
2021-04-12 19:56:40 +02:00
TheMode
2755add8df
Fix item tags not being saved when going through a builder
2021-04-12 17:11:28 +02:00
TheMode
1e99810451
Inventory title can be raw string
2021-04-12 16:42:57 +02:00
TheMode
6b165c7692
Fix MapMeta not being a provider
2021-04-12 16:29:15 +02:00
TheMode
2531161964
Fix drag click
2021-04-12 16:27:12 +02:00
TheMode
0fea9b39a2
Return AIR if the amount is 0 or below
2021-04-12 09:11:08 +02:00
TheMode
adfb487140
Fix entity currentChunk being null
2021-04-12 04:50:45 +02:00
TheMode
4932262750
Use chunk instead of instance to check if an entity is on ground
2021-04-12 04:45:11 +02:00
TheMode
bd90de0df2
Remove unnecessary string concat
2021-04-12 04:27:36 +02:00
TheMode
0ff9e3e435
Remove debug print
2021-04-12 04:05:18 +02:00
TheMode
8f6a651bda
Added StackingRule#apply with unary operator for amount
2021-04-12 01:27:33 +02:00
TheMode
aac32420de
Annotation cleanup
2021-04-12 01:07:05 +02:00
TheMode
1d5262caf2
Merge branch 'master' into item-api
...
# Conflicts:
# src/test/java/demo/PlayerInit.java
2021-04-12 00:44:47 +02:00
TheMode
7e3035709f
Annotation, fix cursor item not being cleared
2021-04-12 00:42:32 +02:00
TheMode
8e9d7098e5
Allow custom transaction type, simplify inventory superclasses
2021-04-12 00:33:27 +02:00
TheMode
ecb77fc847
Rename FillOption to TransactionOption
2021-04-12 00:07:38 +02:00
TheMode
1100aa98a5
Annotation & comment
2021-04-12 00:04:40 +02:00
TheMode
17fcd23c77
Fix condition, add documentation
2021-04-11 23:52:12 +02:00
TheMode
d86a733b79
WIP FillOption
2021-04-11 23:43:35 +02:00
TheMode
db8f071633
Cleanup, make PingPlayer immutable
2021-04-11 20:46:48 +02:00
TheMode
9f3b7d4ca8
Update FakePlayerConnection.java
2021-04-11 20:32:09 +02:00
thiccaxe
fadbe39494
Getters for fields in HandshakeData
2021-04-11 10:46:09 -07:00
thiccaxe
c451d46ce0
document ServerListPingEvent
2021-04-11 10:30:47 -07:00
TheMode
c7cd8c332a
Rename meta package to metadata to limit breaking changes
2021-04-11 19:13:50 +02:00
TheMode
df20670ce8
Use AIR as default in CrossbowMeta instead of null
2021-04-11 17:12:28 +02:00
TheMode
ea3aedd76f
ItemMeta#getOrDefault annotation
2021-04-11 17:05:32 +02:00
TheMode
792dd9787f
Remove ItemStore API until a stable solution is found
2021-04-11 17:01:05 +02:00
TheMode
f7bf7c1321
Merge pull request #204 from kezz/send-packets-to-audience
...
Add util method to send a packet to an audience
2021-04-11 15:29:04 +02:00
TheMode
34a7c68e16
Merge pull request #237 from Minestom/update_structure_packet
...
Add update structure block packet
2021-04-11 15:26:19 +02:00
TheMode
2fadf1da94
Added varargs equivalent for canPlace/Destroy
2021-04-11 15:01:43 +02:00
TheMode
3b37987f15
Remove dead line
2021-04-11 14:55:27 +02:00
Matt Worzala
1f27f2e6cd
provide default location
2021-04-11 00:46:04 -04:00
Matt Worzala
11146186cc
add update structure block packet
2021-04-11 00:37:00 -04:00
thiccaxe
8a9abff98b
Remove Duplicate Code; unlinking ResponseData & ServerListPingEvent
...
Removed code that would cause maintaining more difficult after an update in ResponseData, and additionally PlayerConnection
Updated demo to reflect changes.
2021-04-10 21:14:36 -07:00
TheMode
2f53388b9f
Fix velocity IP forwarding
2021-04-11 05:46:52 +02:00
TheMode
6e0202c33b
Fix math, improve physics performance
2021-04-11 03:21:38 +02:00
TheMode
e0c2c4b655
Support for canPlace & canDestroy meta
2021-04-11 00:42:09 +02:00
TheMode
5adbc287b3
Added TickMonitor
2021-04-11 00:09:01 +02:00
TheMode
c347f55c1f
Make it clear that ArgumentEntity uses a bitmask
2021-04-10 23:18:07 +02:00
TheMode
d219570fe6
Make it clear that PlayerAbilitiesPacket uses a bitmask
2021-04-10 23:17:20 +02:00
TheMode
2da42cb8cb
Remove unnecessary chunk callback
2021-04-10 22:33:38 +02:00
TheMode
032343011a
Reduce map lookup when looping through surrounding custom blocks
2021-04-10 22:03:03 +02:00
TheMode
f5a21948c6
Reduce chunk lookup when switching
2021-04-10 21:57:33 +02:00
TheMode
c74946cc3c
Cache entity current chunk
2021-04-10 21:42:45 +02:00
TheMode
aaab620839
Reduce entity movement overhead (chunk lookup)
2021-04-10 21:21:37 +02:00
TheMode
be2d1db9e0
Merge branch 'master' into item-api
2021-04-10 19:37:36 +02:00
TheMode
ea293bd376
Added EquipmentHandler#setEquipment
2021-04-10 19:30:25 +02:00
TheMode
0be4c6d8c7
More meta utils method, fix openBook
2021-04-10 18:55:26 +02:00
TheMode
0619b1b14b
Fix immutability inside ItemMeta
2021-04-10 18:36:20 +02:00
TheMode
e81c31f61b
Remove Ownership code
2021-04-10 17:47:45 +02:00
TheMode
bd3c678bde
Add HoverEventSource to ItemStack
2021-04-10 17:01:50 +02:00
TheMode
ebbfe7868b
Prevent implicit cast from int to double
2021-04-10 06:11:43 +02:00
TheMode
d2efb43625
Improve immutability & prevent NPE
2021-04-10 06:08:08 +02:00
TheMode
50ceeb33e4
Use proper meta based on material
2021-04-10 06:03:48 +02:00
TheMode
1d12a5de95
Implement all meta
2021-04-10 05:53:40 +02:00
TheMode
e4f7a66046
Packet cache rename
2021-04-10 02:02:59 +02:00
TheMode
d88f81e5f3
Use UnaryOperator instead of Function
2021-04-10 01:16:21 +02:00
TheMode
d1f8e60a7e
Cache meta binary
2021-04-10 00:55:18 +02:00
TheMode
f5b8f267d6
Clone instead of caching
2021-04-10 00:25:50 +02:00
TheMode
5e8e7cbaf4
Rename nbt method to remove confusion about the object being mutable or not
2021-04-10 00:24:29 +02:00
TheMode
64e70c3b64
Use the builder methods instead of fields
2021-04-10 00:01:06 +02:00
TheMode
d6e7c9a635
Handle nbt directly inside builders instead of lazily
2021-04-09 23:57:05 +02:00
TheMode
4f5fd125c4
ItemMetaBuilder doesnt need to be cloneable
2021-04-09 23:23:33 +02:00
TheMode
e19af0377c
Merge branch 'master' into item-api
...
# Conflicts:
# src/main/java/net/minestom/server/item/ItemDisplay.java
# src/main/java/net/minestom/server/utils/binary/BinaryReader.java
2021-04-09 23:19:38 +02:00
TheMode
e4a26df2b6
Rename ItemMeta#nbt, remove unnecessary cache
2021-04-09 23:16:57 +02:00
TheMode
05a553eb4e
Fix javadoc build
2021-04-09 19:01:37 +02:00
TheMode
4b31e27348
Fix ArgumentMap when the argument accepts space
2021-04-09 18:59:24 +02:00
TheMode
b50c2831bf
Merge pull request #228 from Project-Cepi/argument-map
...
Add ArgumentMap
2021-04-09 18:55:36 +02:00
LeoDog896
ca6ee7c23a
Move ArgumentMapper inside ArgumentMap
2021-04-09 12:54:02 -04:00
LeoDog896
e4c3345da7
Add beta to map
2021-04-09 12:50:05 -04:00
TheMode
b03752afbe
Fix javadoc build
2021-04-09 18:28:03 +02:00
TheMode
5ef4d0f9b4
Reduce the overhead of converting chunk indexes to chunk object, dont tick empty entity list
2021-04-09 18:22:29 +02:00
Kieran Wallbanks
05192de8e1
Make NamespaceID implement Key directly
2021-04-09 13:47:53 +01:00
thiccaxe
61242dc185
Remove extra setters and congregate into refreshServerInformation
2021-04-08 22:06:16 -07:00
TheMode
164873c313
Ensure thread safety
2021-04-09 06:04:16 +02:00
TheMode
abbf7f932d
Prevent memory leak when dealing with cached packets
2021-04-09 06:02:07 +02:00
TheMode
56bdb402b1
Merge remote-tracking branch 'origin/master'
2021-04-09 05:41:03 +02:00
TheMode
01d233f7d8
Overall performance improvement
2021-04-09 05:40:40 +02:00
thiccaxe
fce63a91d5
actually remove the code this time
2021-04-08 18:21:00 -07:00
thiccaxe
b086dc82ca
Remove extra code in FakePlayerConnection, add refershServerInformation back
2021-04-08 18:20:23 -07:00
thiccaxe
94c4ec79e1
simplify data storage, fix annotations
...
Removed HandshakeData - too excessive
Added abstract methods in PlayerConnection as replacement
in FakePlayerConnection setters do nothing and Getters return MinecraftServer defaults
2021-04-08 16:51:50 -07:00
thiccaxe
cad128a393
update demo to show example
...
may be cut down later as it is very excessive.
2021-04-08 14:41:22 -07:00
thiccaxe
cd27d1d6c7
ServerListPingEvent
...
An implementation of what could be done to make this event - not perfect in my opinion.
2021-04-08 14:19:32 -07:00
TheMode
102c060114
Merge pull request #232 from strajabot/master
...
Add multiple colors for FireworkEffect
2021-04-08 20:25:54 +02:00
strajabot
96155e826e
Add multiple colors for FireworkEffect
2021-04-08 19:02:42 +02:00
LeoDog896
45cc41c99e
Merge branch 'master' into argument-map
2021-04-08 13:01:50 -04:00
TheMode
c2f302ad0e
Fix Inventory never being null when clicking inside an inventory (when the click happens on a player inventory slot)
2021-04-08 17:47:44 +02:00
TheMode
25176e9b9d
Merge pull request #231 from DiamondCodingYT/yaw-fix
...
Added a yaw fix to for issue #168
2021-04-08 15:04:08 +02:00
Florian Fuhrmann
9c1eeb56d3
Added the Position#fixYaw method that fixes yaw values an used it on Position#setYaw and on a Position constructor to fix issue #168
2021-04-08 12:45:17 +02:00
TheMode
4c495f401d
Code cleanup
2021-04-07 18:35:19 +02:00
TheMode
5b98fbeb8b
Rename CommandCondition 'source' to 'sender'
2021-04-07 15:48:05 +02:00
LeoDog896
dfae6ad5f8
Documentation and visibility changes
2021-04-06 22:12:30 -04:00
LeoDog896
0e4168ba45
Add ArgumentMap
2021-04-06 22:07:38 -04:00
LeoDog896
97cad24b14
Merge remote-tracking branch 'upstream/master' into update-option-equals
2021-04-06 21:39:17 -04:00
TheMode
2606f2b291
Added PlayerChatEvent#getDefaultChatFormat
2021-04-07 02:47:19 +02:00
TheMode
093cce7242
Dependency update
2021-04-06 23:59:48 +02:00
LeoDog896
9d1d60cdcd
Equals & hashcode overrides
2021-04-06 15:25:18 -04:00
TheMode
0bb8144d33
Improve BinaryReader & BinaryWriter
2021-04-06 18:31:30 +02:00
TheMode
017bbf8a60
Remove 0 size check
2021-04-06 06:43:16 +02:00
TheMode
720c986cea
Fix reading of non-ASCII characters being higher than the protocol limit
2021-04-06 06:39:57 +02:00
Felix Cravic
e3867c659b
Merge branch 'master' into item-api
...
# Conflicts:
# src/main/java/net/minestom/server/item/ItemStack.java
2021-04-06 05:10:58 +02:00
themode
008b7fb223
Fix FishingHookMeta NPE
2021-04-05 20:55:51 +02:00
KrystilizeNevaDies
7a6fb4d601
Format FishingHookMeta + make owner not null
2021-04-06 04:43:19 +10:00
KrystilizeNevaDies
b1cfa3d9b2
make FishingHookMeta implement ObjectDataProvider
2021-04-06 04:39:47 +10:00
thiccaxe
159ff3f646
Remove reprecated code
...
Removed deprecated code,
Added missing code,
Optimized imports.
2021-04-05 09:57:18 -07:00
themode
88765dd703
Fix test
2021-04-05 18:26:57 +02:00
themode
49397957a2
Style cleanup, add more information when the server is not run using bootstrap
2021-04-05 18:24:38 +02:00
themode
63159cc49a
Fix client 0x1E & 0x1F packets
2021-04-05 18:22:08 +02:00
thiccaxe
56f8728890
Fix Deprecation of ResponseDataConsumer
2021-04-04 19:53:01 -07:00
thiccaxe
02982c0ee2
Shortcut methods in StatusRequestEvent
2021-04-04 18:52:55 -07:00
thiccaxe
2dec361836
Deprecate ResponseDataConsumer
...
Not sure if this is how to correctly deprecate, please lmk!
2021-04-04 18:50:41 -07:00
thiccaxe
7c0fcadd4f
Add HandshakeEvent
2021-04-04 16:26:58 -07:00
thiccaxe
4f8e94dcf2
Note about favicon format
2021-04-04 15:57:42 -07:00
thiccaxe
cf4a8756ef
StatusRequestEvent
...
Added basic event
notes:
- minestom will only accept the 1.16.5 protocol version, as of now there is no way to get the protocol version from the event. Assume 1.16.5
- there is also no way to currently get the address the client used to ping the server, as that is sent in another packet and minestom does not currently pass that data through.
- favicon appears to not be working
2021-04-04 15:43:19 -07:00
themode
15c0e64703
Fix AbstractInventory#addItemStack comment
2021-04-04 22:53:08 +02:00
themode
81f2127a9d
Annotation style
2021-04-04 21:48:11 +02:00
themode
5a5531723c
Fix original nbt overwriting modified meta
2021-04-04 21:34:48 +02:00
themode
d34d3a2b50
Add comment about ItemMetaBuilder#clone
2021-04-04 20:50:06 +02:00
themode
d1d973018e
Lore is non-null
2021-04-04 20:49:21 +02:00
TheMode
2b72f91909
Merge pull request #214 from MrBretze/master
...
Added isRegistered(DimensionType) and getDimension(NamespaceID) to DimensionTypeManager
2021-04-04 18:29:40 +02:00
Konstantin Shandurenko
88c2e82604
AbstractInventory: more StackingRule#apply usages instead of ItemStack#withAmount
2021-04-04 19:15:34 +03:00
themode
005d70e3a6
Annotation + ItemStoreBuilder should be more like a builder
2021-04-04 17:54:05 +02:00
Kieran Wallbanks
4ee9d8ee91
Fix Javadoc build error
2021-04-04 14:51:04 +01:00
themode
68de2b1980
Cleanup
2021-04-04 15:44:09 +02:00
themode
ea58d0f693
Fix StackingRule not being used inside to retrieve item count
2021-04-04 15:41:05 +02:00
Kieran Wallbanks
9182ab7e84
Improve deprecation messages, allow ChatColor to be used in Adventure component styling
2021-04-04 14:40:29 +01:00
themode
d6b6d41f41
Fix Inventory not using a Component as title
2021-04-04 15:33:53 +02:00
Kieran Wallbanks
785a0bb66c
Remove unnecessary cast attempts and instanceof checks
2021-04-04 14:10:06 +01:00
Kieran Wallbanks
7b4a072a78
Fix broken sendLegacyMessage functions
2021-04-04 14:06:23 +01:00
Kieran Wallbanks
59e67c0d82
Undeprecate CommandSender#sendMessage(String), see #212
2021-04-04 14:05:02 +01:00
themode
992f7feb77
Added ItemMetaBuilder#hideFlag with varargs
2021-04-04 14:19:51 +02:00
TheMode
6218d2a78e
All inventories should implement InventoryClickHandler
...
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-04 03:37:57 +02:00
TheMode
51d290cae9
Share more data between PlayerInventory & Inventory
...
Signed-off-by: TheMode <themode@outlook.fr>
2021-04-04 03:36:31 +02:00
Konstantin Shandurenko
fdfd20e255
InventoryModifier to AbstractInventory and additional methods for inventories
2021-04-04 03:56:44 +03:00
Konstantin Shandurenko
e295ffea51
Switched to Cooldown object in attacking goals
2021-04-04 03:13:56 +03:00
Konstantin Shandurenko
3f184aad41
Path update cooldown for attacking entity goals
2021-04-04 02:56:02 +03:00
themode
ca41365453
Added some useful store methods
2021-04-03 19:35:03 +02:00
themode
dfa7d712c2
Initial ItemStore support
2021-04-03 19:08:07 +02:00
themode
e4936b4a53
Added almost all item tags
2021-04-03 17:14:00 +02:00
themode
89b35a0569
Cleanup ItemTag
2021-04-03 16:03:03 +02:00
themode
c8fbf47bd9
Impl ItemMeta#getOrDefault
2021-04-03 15:50:34 +02:00
themode
4741c932a0
Add ItemTag
2021-04-03 15:45:46 +02:00
themode
f52e10c2b2
Added InventoryModifier#replaceItemStack
2021-04-03 15:01:36 +02:00
ALS
680361fd35
Add @Nullable to getDimension(NamespaceID)
2021-04-03 13:58:10 +02:00
ALS
99151cb05a
Added isRegistered(DimensionType) and getDimension(NamespaceID) to DimensionTypeManager
2021-04-03 13:57:07 +02:00
themode
d1c10243a8
ItemMeta doesnt need to be cloneable
2021-04-03 04:07:27 +02:00
themode
0478b696f4
Inventory code cleanup
2021-04-03 03:43:13 +02:00
themode
785e002a50
Improve documentation
2021-04-03 00:21:23 +02:00
themode
0382b1adfe
ItemMetaBuilder annotations
2021-04-03 00:09:13 +02:00
themode
9abbef35ae
Reduce code duplication
2021-04-03 00:03:36 +02:00
themode
d3fb364a7a
Better use of ItemStack#of
2021-04-02 23:41:06 +02:00
themode
255ccf8ad5
Remove unused class
2021-04-02 23:34:40 +02:00
themode
56bba41f68
Cleanup
2021-04-02 22:50:20 +02:00
themode
4a075da3e0
Ensure that the meta is new when instantiating from NBT
2021-04-02 22:40:24 +02:00
themode
8d8a22f209
Use original NBT when possible
2021-04-02 22:14:48 +02:00
themode
2b0c525ca2
Implement ItemStack#equals & use a soft reference to store meta cached NBT
2021-04-02 19:10:46 +02:00
themode
7dcc52de57
Support item stacking, cleanup
2021-04-02 18:25:20 +02:00
themode
a128d30b6b
WIP Item rework implementation
2021-04-02 18:13:02 +02:00
themode
a70870d261
Added ItemMetaBuilder.Provider
2021-04-02 15:42:58 +02:00
themode
cf0450f21f
Only make immutable lists when built
2021-04-02 14:02:24 +02:00
Alex
63031f0493
Annotate appropriately & refactor
2021-04-02 09:00:19 +02:00
themode
042c7c864b
Added covariant return type + enchantment
2021-04-01 22:52:28 +02:00
themode
3ba74639bf
Added Item#getUuid
2021-04-01 22:28:32 +02:00
Alex
ad229eb637
SairsPlacementRule (not perfect yet)
2021-04-01 22:19:29 +02:00
themode
debf21927b
Change Item#builder visibility
2021-04-01 20:26:19 +02:00
themode
066b041bba
Allow to directly pass an ItemMeta
2021-04-01 20:06:10 +02:00
themode
cbfeb4e15b
WIP meta support
2021-04-01 20:02:03 +02:00
themode
0ab66113c8
WIP item meta API
2021-04-01 19:08:21 +02:00
Matt Worzala
481494d572
Remove deprecated copy methods
2021-04-01 11:32:09 -04:00
themode
70191e23e9
Even more annotations
2021-04-01 00:32:21 +02:00
themode
5807da47a6
Update annotations + add example
2021-04-01 00:20:59 +02:00
themode
e66fdee4b1
More methods & annotation
2021-04-01 00:09:02 +02:00
Kieran Wallbanks
825bd57a8e
Adventureise ResponseData and cleanup code
2021-03-31 21:22:24 +01:00
themode
d332855bc4
Renamed CooldownUtils to Cooldown
2021-03-31 19:17:37 +02:00