6101 Commits

Author SHA1 Message Date
Dylan K. Taylor
2f3c77c68a Fixed entity move performance issue and a ton of entity movement bugs
- fixed zombies and villagers movement not updating
- fixed dropped items "movement" lagging the living **** out of the server when not actually moving
- fixed arrows not falling when the supporting block is removed
- fixed knockback
- fixed zombies + villagers being un-attackable after hitting them

... the list goes on
2017-08-20 20:31:09 +01:00
Dylan K. Taylor
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
Dylan K. Taylor
9451dd361e Fixed some issues in MovingObjectPosition 2017-08-20 17:12:25 +01:00
Dylan K. Taylor
da83b879c0 Major performance improvement to explosions
These changes produce about 3x performance improvements. Some numbers
from my machine (i7-7700k @ 4.5GHz) with TNT:
- before changes: 35ms
- after changes: 11ms

in powersave mode (0.9GHz):
- before changes: 170ms
- after changes: 60ms
2017-08-20 16:12:30 +01:00
Dylan K. Taylor
d1fd6aef44 add type doc 2017-08-20 14:04:02 +01:00
Dylan K. Taylor
cd02f1e4be Minor performance improvement to explosions
This improves calculation time by 20-25% per explosion on flat terrain.
2017-08-20 13:28:31 +01:00
Dylan K. Taylor
eeedcf7332 Refactor Block->getResistance() -> Block->getBlastResistance() and added some documentation 2017-08-20 13:25:43 +01:00
Dylan K. Taylor
216fc6fe31 Fixed incorrect comment 2017-08-20 12:17:44 +01:00
Dylan K. Taylor
17053389b0 Added memory limits for AsyncWorkers 2017-08-20 12:15:48 +01:00
Dylan K. Taylor
8475c63426 Remove redundant brackets from WoodenSlab 2017-08-20 11:02:34 +01:00
Dylan K. Taylor
f2ff0198cc Fixed slab placement, close #145 2017-08-20 10:52:07 +01:00
Dylan K. Taylor
c394aea803 Replaced more literal ints with Vector3 constants 2017-08-20 10:43:48 +01:00
Dylan K. Taylor
e1d894057c Changed face position floating-point params to Vector3s 2017-08-20 10:23:34 +01:00
Dylan K. Taylor
5b3bed8b06 Don't check entity movement or in-air ticks if player dies due to movement, close #1226
Not an ideal solution but it'll do.
2017-08-20 09:49:02 +01:00
Dylan K. Taylor
bed68a012d Don't bother doing null checks for block copy
This will never be null if the block factory was initialized correctly. This will also cause a crash if bugs like e88053faf452df60262aad3e40c83dfed7f5dfa3 occur again in the future instead of silently causing unexpected behaviour.
2017-08-19 21:29:24 +01:00
Dylan K. Taylor
e88053faf4 ... 2017-08-19 18:25:08 +01:00
Dylan K. Taylor
e51106e64c Fixed bad overrides of getBoundingBox() 2017-08-19 17:16:22 +01:00
Dylan K. Taylor
0e24596aed Changed block construction calls to Block::get() 2017-08-19 13:46:17 +01:00
Dylan K. Taylor
276fccf4bb Typehinted block events API 2017-08-19 11:25:32 +01:00
Dylan K. Taylor
64f2e7587d Some cleanup and added missing strict types declare for EndRod 2017-08-19 11:11:49 +01:00
Encritary
bedfca8698 Fix some type errors on custom ExplodePacket use (#1297) 2017-08-19 08:16:10 +01:00
Dylan K. Taylor
4a3f01703e Removed redundant override method 2017-08-18 19:52:23 +01:00
Dylan K. Taylor
41c6cb6f97 Added Block->getVariantBitmask(0 to cut down on getDrops() boilerplate, fixed several blocks incorrectly retaining meta when broken 2017-08-18 19:49:28 +01:00
Dylan K. Taylor
384a4b3a09 Who put this here? 2017-08-18 18:59:34 +01:00
Daniktheboss
a7ad26426f Add stained glass and stained glass pane (#1298) 2017-08-18 18:30:03 +01:00
Dylan K. Taylor
f73d3d086e Added some new blocks, fixed collisions not being detected when standing on top of a full block 2017-08-18 13:58:05 +01:00
Dylan K. Taylor
41f5cba971 Added End Rods, close #940 2017-08-18 13:05:39 +01:00
Dylan K. Taylor
d8f0dd6db8 Changed Block->getDrops() to return Item[] 2017-08-18 11:21:33 +01:00
Dylan K. Taylor
c8ed2406d7 Fix bad setChunk() documentation 2017-08-17 21:03:07 +01:00
Dylan K. Taylor
a4ec2b7f2c Removed copy-pasted code from Player 2017-08-17 19:50:17 +01:00
Dylan K. Taylor
9efd350e78 Return unhandled on desktop crafting instead of hitting errors 2017-08-17 18:34:21 +01:00
Dylan K. Taylor
be4f48a119 Updating submodules 2017-08-17 18:26:06 +01:00
Dylan K. Taylor
83f29e5639 Fixed tests failing since 83af4dcd 2017-08-17 17:02:13 +01:00
Dylan K. Taylor
e825ebd8fa Added some wrapper methods to make data flags less of a pain in the ass to work with 2017-08-17 16:52:17 +01:00
Dylan K. Taylor
83af4dcd59 Block API typehints 2017-08-17 13:50:19 +01:00
Dylan K. Taylor
f6c31680f6 Fixed unknown blocks dropping themselves 2017-08-17 13:25:11 +01:00
Dylan K. Taylor
6320a63ca5 Use standard format for color hex, some minor name alteration 2017-08-17 13:08:18 +01:00
Dylan K. Taylor
9e02f3c4e3 Fixed redstone lamp light levels and hardness 2017-08-17 11:47:10 +01:00
Dylan K. Taylor
2cd05bf5b5 Removed redundant Block constructor overrides 2017-08-17 11:42:26 +01:00
Dylan K. Taylor
5b4035253b Casting cleanup and removed some 32-bit string-int leftovers 2017-08-17 11:24:49 +01:00
Dylan K. Taylor
77376d3e33 No idea how this happened 2017-08-17 11:15:42 +01:00
Dylan K. Taylor
56e45a031b Fixed missing returns for Player->switchLevel() 2017-08-17 11:15:22 +01:00
Dylan K. Taylor
21a1e0eb6b Player API typehints 2017-08-17 11:08:54 +01:00
Dylan K. Taylor
670a9fe44f Fix some crashy issues when incompatible players get disconnected 2017-08-17 10:29:12 +01:00
Dylan K. Taylor
6efa4343b1 Cleaned up fuel duration handling, fixed some fuel items not working in furnaces 2017-08-17 10:22:47 +01:00
Dylan K. Taylor
dc3f13cd30 Cleanup from previous commit 2017-08-17 09:42:00 +01:00
Dylan K. Taylor
b4c4005009 Some condition simplifications suggested by static analysis 2017-08-16 20:06:48 +01:00
Dylan K. Taylor
eebc52e00b Added API method Entity->isClosed() and made Entity->closed protected 2017-08-16 19:30:23 +01:00
Dylan K. Taylor
20aa519f3a Added capability to remove owners/target entities 2017-08-16 19:14:15 +01:00
Dylan K. Taylor
741394dab1 Typehinted up entity API
Did you guys think ALPHA7 changes were done?!
Sone stuff still needs some work, most notably data-properties can't be typed yet because they are just mushed into a couple of methods.
2017-08-16 19:04:30 +01:00