Commit Graph

269 Commits

Author SHA1 Message Date
jglrxavpok
2fd7f2b310 Automatically set the new instance of an entity when adding it to an instance 2020-05-01 23:32:25 +02:00
jglrxavpok
9b465830e0 Fixed custom block removal when breaking it 2020-05-01 23:18:32 +02:00
jglrxavpok
d96bf48eb2 Remove custom block when breaking it
Use Math.floor() to correct coordinates
2020-05-01 23:05:47 +02:00
jglrxavpok
f38d3718c3 Neighbor updates 2020-05-01 22:08:31 +02:00
jglrxavpok
08a32c4492 User-friendly update scheduling 2020-05-01 21:54:01 +02:00
jglrxavpok
feae9f1cd3 Resource gatherer to extract data from Minecraft's server jar instead of distributing our own 2020-05-01 21:29:34 +02:00
Felix Cravic
7980ee6ebb Fixed inventory held click & slot on InventoryCondition 2020-04-30 02:42:44 +02:00
Felix Cravic
4b3e3e8e65 An inventory can now have multiple InventoryCondition 2020-04-30 01:51:16 +02:00
jglrxavpok
1cb8166edd Actually fix issue direction issue with yaw < 0 2020-04-29 22:07:37 +02:00
jglrxavpok
9e7f05c311 Fix issue when finding direction with MathUtils when yaw < 0 2020-04-29 21:37:20 +02:00
Felix Cravic
7eee0c788f WIP Enchantments (de)serialization 2020-04-29 20:17:04 +02:00
Felix Cravic
0354a60635 Added Enchantment & PotionType enum + PlayerCommandEvent call 2020-04-29 19:23:47 +02:00
Felix Cravic
c2af4be2fa Can now define an inventory to open after closing another + added a bunch of inventory type 2020-04-29 17:27:58 +02:00
Felix Cravic
0782ee7fe5 Added the InventoryCloseEvent event 2020-04-29 12:11:13 +02:00
Felix Cravic
db1e108464 Fixed PlayerInventory craft result slot 2020-04-29 11:40:58 +02:00
jglrxavpok
2292261de7 Allow for a different visual block to be placed along a custom block 2020-04-29 00:42:18 +02:00
jglrxavpok
365cdf7818 Correct visual ID when overriding in PlayerBlockPlaceEvent 2020-04-29 00:20:20 +02:00
jglrxavpok
263713ab49 Custom block breaking and data creation now both have an instance and a position accessible 2020-04-29 00:12:59 +02:00
Felix Cravic
d49cfc2215 Deleted an useless register method 2020-04-28 23:56:24 +02:00
Felix Cravic
2473a1bbe6 Instance#refreshBlockId optimization 2020-04-28 23:43:37 +02:00
Felix Cravic
93f1b240da Merge remote-tracking branch 'origin/master' 2020-04-28 23:39:09 +02:00
Felix Cravic
d0c523f0e5 Added a way to change CustomBlock blockId just after placement + more BlockAlternative tools 2020-04-28 23:38:44 +02:00
jglrxavpok
483cf7aa88 Added opposite() convenience method to Direction 2020-04-28 22:45:44 +02:00
Felix Cravic
a06274f877 Cleanup + updated RedstonePlacementRule 2020-04-28 22:08:39 +02:00
jglrxavpok
54111ece6a Convenience method to find horizontal Direction based on yaw, easier block properties usage and PlayerBlockPlaceEvent now references the player placing the block 2020-04-28 21:52:06 +02:00
jglrxavpok
9b25f5d95b Allow server to be stopped cleanly 2020-04-28 19:23:02 +02:00
Felix Cravic
98875df389 Small tweaks 2020-04-28 19:22:47 +02:00
Felix Cravic
e022881554 Fixed inventory id generation 2020-04-28 18:55:09 +02:00
Felix Cravic
f5212e3bf6 Merge remote-tracking branch 'origin/master' 2020-04-28 18:16:13 +02:00
Felix Cravic
a4922e60fa Added InventoryData 2020-04-28 18:16:00 +02:00
jglrxavpok
85da9203b1 Custom blocks can block item interaction, prevents blocks being placed when opening containers 2020-04-28 18:12:06 +02:00
Felix Cravic
6d9ac0b35d CustomBlock#getBreakDelay is now optional 2020-04-28 17:58:34 +02:00
Felix Cravic
b128074c75 Reworked data management 2020-04-28 17:36:17 +02:00
Felix Cravic
08015586a0 Merge remote-tracking branch 'origin/master' 2020-04-28 17:11:35 +02:00
Felix Cravic
60cc562435 Changed DataType class and its implementation 2020-04-28 17:11:12 +02:00
jglrxavpok
b09db32ddc Send effects to players 2020-04-28 16:08:21 +02:00
Felix Cravic
03f4e19db3 Reduce needed map checks for InstanceContainer#setCustomBlock 2020-04-28 15:41:29 +02:00
Felix Cravic
8050708ecf Changed BlockPosition arg to CustomBlock#createData 2020-04-28 15:25:56 +02:00
jglrxavpok
f8f649852b Allow PlayerBlockPlaceEvent callbacks to change the block placed.
Can be used to place custom blocks in replacement of normal ones.
2020-04-28 13:47:41 +02:00
jglrxavpok
4c6d31fac1 Allow custom blocks to initialize their data on placement 2020-04-28 13:23:49 +02:00
Felix Cravic
f00bdc66bf Fixed ItemStackData#decode 2020-04-28 03:06:37 +02:00
Felix Cravic
e43325edd8 Added ItemStack data type 2020-04-28 03:02:29 +02:00
Felix Cravic
0946c8ce11 Moved the ResponseDataConsumer definition to MinecraftServer#start 2020-04-28 02:33:15 +02:00
jglrxavpok
7ea87b56c2 Wrong check in StatusRequestPacket, show actual error when running 2020-04-28 01:39:53 +02:00
Felix Cravic
48c4941813 We can now have multiple listeners 2020-04-28 01:20:11 +02:00
Felix Cravic
38abe55161 Added Block object to the CustomBlock constructor 2020-04-28 01:01:54 +02:00
Felix Cravic
f544f090ae Added SerializableData 2020-04-28 00:24:10 +02:00
Felix Cravic
ce40627a36 Added CustomBlock#getCustomBlockId, it is now defined by the developer and not increased automatically by a counter 2020-04-27 23:13:17 +02:00
Felix Cravic
22511ca052 Added damage application verification 2020-04-27 23:03:21 +02:00
Felix Cravic
bf795c1442 Added EntityDamageEvent 2020-04-27 22:38:11 +02:00
jglrxavpok
bdab9bf71f Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	src/main/java/net/minestom/server/entity/Player.java
2020-04-27 21:16:24 +02:00
jglrxavpok
7e3bc22bc4 Chat messages when player dies and cleaner damage types 2020-04-27 21:12:42 +02:00
jglrxavpok
6b77627d60 Implemented damage types and void below world 2020-04-27 20:33:08 +02:00
Felix Cravic
51811a5909 Added dimension support 2020-04-27 18:46:39 +02:00
Felix Cravic
26debd0d4b Optimization + fixed custom block placement 2020-04-26 20:41:58 +02:00
Felix Cravic
d4cf29c7a7 Less magic values 2020-04-26 19:17:04 +02:00
Felix Cravic
161e229985 Cleanup 2020-04-26 17:03:42 +02:00
Felix Cravic
1639a4947c Amazingly fast block getter 2020-04-26 16:51:00 +02:00
Felix Cravic
005d95e97b WIP chunk storage rework (use an array instead of a map) hope that this is working 2020-04-26 16:08:04 +02:00
Felix Cravic
18019277e6 Update 2020-04-26 06:34:08 +02:00
Felix Cravic
3614c378f3 Optimization + added Recipe#shouldShow check 2020-04-26 04:50:38 +02:00
Felix Cravic
9d0cec23df Making pathfinder maxCheck configurable 2020-04-25 23:58:17 +02:00
Felix Cravic
cbffd37c8e Added aliases support to CommandProcessor 2020-04-25 23:51:45 +02:00
Felix Cravic
5980943344 Finally a homemade pathfinder 2020-04-25 23:06:16 +02:00
Felix Cravic
6f5ff41c57 Optimization + fix non-solid block entity collision 2020-04-25 20:40:08 +02:00
Felix Cravic
d7e9a3a23f Remove useless equipments sync 2020-04-24 18:39:35 +02:00
Felix Cravic
2f6205b577 Added ItemUpdateStateEvent + batch file clean 2020-04-24 17:43:35 +02:00
Felix Cravic
90925b4967 Block/chunk batching should be much faster 2020-04-24 11:33:29 +02:00
Felix Cravic
7daac5e610 Package rename to net.minestom.server 2020-04-24 03:25:58 +02:00