52 Commits

Author SHA1 Message Date
Dylan K. Taylor
b524b841c5 Reduced duplicated code in AxisAlignedBB->calculateIntercept() 2017-10-14 11:01:00 +01:00
Dylan K. Taylor
5afe4fdb5b Use Vector3 constants instead of hardcoded integers 2017-10-12 13:32:17 +01:00
Dylan K. Taylor
cc7ed7a28f Added some documentation to AxisAlignedBB 2017-10-12 12:22:13 +01:00
Dylan K. Taylor
ecba80fd63 Fixed some trailing whitespace
$ shopt -s globstar
 $ sed -i 's/[ \t]*$//' src/pocketmine/*/**.php

:P
2017-08-05 21:07:21 +01:00
SOFe
3048a3b39b Added precision and mode arguments to Vector3::round() (#1256)
If the precision is positive (i.e. there are numbers after the decimal point), the results should be floating-point numbers rather than integers, hence the additional check.

Even if the precision is negative or zero, the $mode parameter may still be useful.
2017-08-04 09:56:42 +01:00
Dylan K. Taylor
3150c50cac Typehinted AxisAlignedBB 2017-07-15 18:43:10 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Matt
f0d12a0b30
Implemented asVector3(), asPosition() and asLocation()
Squash merge, closes #973
2017-06-07 16:40:45 +08:00
Dylan K. Taylor
839a2ce07e Merge branch 'patch-4' of https://github.com/SOF3/PocketMine-MP-Original 2017-03-25 16:58:46 +00:00
Dylan K. Taylor
c569fd86b1 Simplified Vector3::getOppositeSide() (#377)
* Simplified Vector3::getOppositeSide()

* Throw exception on bad input values

* @throws doc
2017-03-05 19:30:12 +08:00
Dylan K. Taylor
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
Dylan K. Taylor
1cb96d24ce Some fixes, thanks PhpStorm 2017-01-04 11:29:24 +00:00
SOF3
d6e343c2cf Premature optimization again 2016-08-24 17:15:22 +08:00
Shoghi Cervantes
cbb1c55a06
Improved biome generation, get grass color from gradient interpolation, improved performance of generation, try to recreate grass colors from imported chunks, closes #2845, closes #1792 2015-06-07 15:17:02 +02:00
Shoghi Cervantes
0f5f71e612
Forgot to check chunks after moving 2015-05-28 22:55:09 +02:00
Shoghi Cervantes
03f178379e
Fixed items getting corrupted pickup delay, not being able to be killed by other damage sources 2015-05-28 22:17:12 +02:00
Shoghi Cervantes
3dd4fe706c Changed Vector3 floor() and ceil() 2015-05-28 14:20:50 +02:00
Shoghi Cervantes
563f6f8e4f Interaction checks happen using the plane and not 3d space 2015-05-07 15:38:22 +02:00
Shoghi Cervantes
9ec609d025
Improved Player flight detection after setMotion(), other method improvement 2015-05-03 13:42:54 +02:00
Shoghi Cervantes
a65c300a0a
Fixed moving from different chunks, lots of issues fixed (all kind of strange things) 2015-04-11 21:39:51 +02:00
Shoghi Cervantes
d5ba2a72a5
Added strength, weakness, resistance effects, fixed entity area 2015-03-29 14:49:47 +02:00
Shoghi Cervantes
e0a6d0feab
Critical arrows, fixed arrow interception calculation 2015-03-28 17:54:10 +01:00
Shoghi Cervantes
add380c7ed
A few fixes! 2015-03-21 00:45:29 +01:00
Shoghi Cervantes
b4f62bf423
Fixed salling sand breaking on full BB partial blocks, closes #2770 2015-03-17 18:00:19 +01:00
Shoghi Cervantes
747f7685e7 Fix formatting issues due to bad IDE settings 2014-12-07 16:30:04 +01:00
Shoghi Cervantes
8601405a88 Fixed CPU leak 2014-10-31 21:07:00 +01:00
Shoghi Cervantes
7ab3c57b00 Optimized networking code & AxisAlignedBB 2014-10-30 22:06:07 +01:00
Shoghi Cervantes
57d1847c50 Updated to receive new optimizations 2014-10-30 16:02:48 +01:00
Shoghi Cervantes
6f64af3066 Reuse even more objects! 2014-10-29 14:23:51 +01:00
Shoghi Cervantes
144a871c07 Improved Vector3 and Block handling, less allocation on Positions 2014-10-28 10:03:10 +01:00
Shoghi Cervantes
7abf52e615 Implemented Vector3 List and AxisAlignedBB Pool to decrease object allocation 2014-10-27 15:39:20 +01:00
Shoghi Cervantes
05f71691fc Fixed AxisAlignedBB->setBB() 2014-10-17 09:57:42 +02:00
Shoghi Cervantes
da23cf685d Added PlayerBucketEvent and children, improved Bucket usage and Liquid placing 2014-10-13 18:04:40 +02:00
Shoghi Cervantes
5c4e7b6ee0 Added Living->getTargetBlock(), Living->getLineOfSight(), Vector3 side constants, Vector3::getOppositeSide() 2014-10-09 17:57:25 +02:00
Shoghi Cervantes
5b6b789ab3 Improved exponentiation 2014-09-29 13:24:25 +02:00
Shoghi Cervantes
b231eba803 Fixed E_NOTICE error on player movement 2014-09-26 13:23:47 +02:00
Shoghi Cervantes
0907aedcef Fixed Entity/Block issues on negative coordinates, closes #2100 2014-09-22 11:48:39 +02:00
Shoghi Cervantes
23793e0fc4 Added check for invalid entity attack 2014-08-30 18:24:24 +02:00
Shoghi Cervantes
bf839e821c Added proper arrows and damage 2014-08-30 01:22:46 +02:00
Shoghi Cervantes
9fb46d8fe8 Fixed entity physics 2014-08-28 18:26:37 +02:00
Shoghi Cervantes
db7222976e Code cleanup 2014-08-21 17:26:41 +02:00
PEMapModder
0d37e96678 Fixed wrong doccomment for Vector3::add()
Yes I know it was me who wrote it wrong.
2014-07-19 11:59:31 +08:00
PEMapModder
47503d84c2 Added doccomment for Vector3::add() and Vector3::subtract()
This is to avoid IDEs thinking that argument 1 for `Vector3::subtract()` must be an int. (But the fact is `Vector3` is OK too)
2014-07-13 13:43:09 +08:00
Shoghi Cervantes
88157d6e99 Added workaround for #1527 2014-06-23 22:35:02 +02:00
Shoghi Cervantes
4f2856dc09 Added base physics 2014-05-25 12:31:00 +02:00
Shoghi Cervantes
6cbd39de9b Added Inventory interfaces and types, updated long array() to [] 2014-05-22 18:59:16 +02:00
Shoghi Cervantes
3136c23795 Added small benchmark 2014-04-09 02:37:37 +02:00