7353 Commits

Author SHA1 Message Date
Dylan K. Taylor
953f45c50f Altered armour handling, now works for damage other than PvP 2017-12-14 12:37:28 +00:00
Dylan K. Taylor
1822abc862 Living: Apply absorption after effect damage reduction is checked 2017-12-14 12:03:12 +00:00
Dylan K. Taylor
92e966686e Refactor Living->attack() into several methods 2017-12-14 11:39:05 +00:00
Dylan K. Taylor
3f50f88e2c Player: Cleaned up how hurt animations are handled
Override Living->doHitAnimation() instead to ensure that the animation always gets sent to the player.
2017-12-14 11:34:09 +00:00
Dylan K. Taylor
532600ab67 Player: Remove another redundant attack check
This is checked in Player->attack() anyway.
2017-12-14 11:03:13 +00:00
Dylan K. Taylor
78f8fe602c Player: Remove redundant PvP check
This is already checked in a block lower down.
2017-12-14 10:59:17 +00:00
Dylan K. Taylor
e75fbd7fb4
Changed Effect colours to use Color objects instead of arrays (#1814) 2017-12-14 10:21:07 +00:00
Dylan K. Taylor
06f605879a Effect: Save and restore ambiency properly 2017-12-14 10:10:26 +00:00
Dylan K. Taylor
4c7038f941 Effect: Added proper documentation on "ambiency" 2017-12-14 09:57:20 +00:00
Dylan K. Taylor
4bd4d42b82 Fixed raw porkchop being inedible 2017-12-14 09:09:47 +00:00
Dylan K. Taylor
f5ebfc3418 Effect: Added Fatal Poison effect
This is identical to normal Poison, except that it kills the victim. Parrots receive this effect when they are fed cookies.
2017-12-13 18:59:49 +00:00
Dylan K. Taylor
4ae278686c Player: Hack anti-fly to ignore levitation 2017-12-13 18:50:56 +00:00
Dylan K. Taylor
740786c99e PillarRotationHelper: Drop redundant commit 2017-12-13 18:39:16 +00:00
Dylan K. Taylor
6abf880e44 Block: Drop unnecessary parameters for ItemFactory::get() 2017-12-13 18:37:04 +00:00
Dylan K. Taylor
853411fa4f
Merge pull request #1795 from pmmp/tools-refactor
Tools refactor
2017-12-13 18:04:12 +00:00
Dylan K. Taylor
6e30d23254 Added missing properties for several blocks 2017-12-13 16:28:21 +00:00
Dylan K. Taylor
717b36a983 Cleaned up non-trivial getDrops() stuff 2017-12-13 14:47:50 +00:00
Dylan K. Taylor
90eed14cd6 Fixed cobweb drops 2017-12-13 14:46:58 +00:00
Dylan K. Taylor
4452e6ac93 Merge branch 'master' into tools-refactor 2017-12-13 12:58:50 +00:00
Dylan K. Taylor
66562f24fb Made Leaves drops more generic, fix dark oak leaves not dropping apples 1.7dev-501 api/3.0.0-ALPHA10 2017-12-13 12:57:58 +00:00
Dylan K. Taylor
56f1a6ba37 Block: Migrated all trivial drops code to getDropsForCompatibleTool()
getDrops() should now be overridden only for special cases. There are some non-trivial overrides left that are going to need some extra work to clean up.
2017-12-13 12:49:58 +00:00
Dylan K. Taylor
8c47a338df Block: Remove unused imports 2017-12-13 12:44:21 +00:00
Dylan K. Taylor
7c6535283e SnowLayer: Fixed tool requirement 2017-12-13 12:39:29 +00:00
Dylan K. Taylor
c669819bbb Fixed stained/hardened clay being harvestable without a pickaxe, close #1803 2017-12-13 12:01:46 +00:00
Dylan K. Taylor
50f3231629 Fixed being able to mine double stone slabs without a pickaxe 2017-12-13 11:34:41 +00:00
Dylan K. Taylor
015cde2169 Merge branch 'master' into tools-refactor 2017-12-13 11:26:24 +00:00
Dylan K. Taylor
dc064dfa2e Level: Fixed some unnecessary double uses of Level::blockHash() 2017-12-13 11:25:36 +00:00
Dylan K. Taylor
131a6a4d19 Cache fix related to #1813: Don't cache blocks for chunks that don't exist 2017-12-13 10:47:12 +00:00
Dylan K. Taylor
67a576722c Fixed item frames placed on invalid blocks, close #1804 2017-12-13 09:46:18 +00:00
Dylan K. Taylor
b9b50dd5dc Added Block->getDropsForCompatibleTool(), removed lots of boilerplate code from subclasses
The function name is a little long-winded, but that can always be refactored later if needed. This provides a way for blocks requiring specific tools to override drops with non-standard stuff without needing to worry about what tool type was used.

It's also possible that passing the Item used here is actually entirely redundant, but again that can be fixed later.
2017-12-12 20:02:50 +00:00
Dylan K. Taylor
da3640357c Rename Block->canBeBrokenWith() to isCompatibleWithTool() and add documentation
This name better describes it. "can be broken with" implies that items which this returns false for cannot destroy the block at all, which is incorrect. What this actually returns is whether the item is the best tool to use to break the block.
2017-12-12 19:51:31 +00:00
Dylan K. Taylor
0004e7429f Added some documentation on harvest level properties 2017-12-12 16:55:00 +00:00
Dylan K. Taylor
e2e6b7516a Removed WoodenTool classes
These were only needed for their fuel properties, which are the same for all tools of the wooden tier anyway.
2017-12-12 13:55:38 +00:00
Dylan K. Taylor
b903161a5d Refactored tool efficiency handling
This fixes lots of bugs with things like wool, cobwebs, swords.
2017-12-12 13:55:36 +00:00
Dylan K. Taylor
99fe63b2a3 Added harvest level properties to applicable blocks
this fixes block-breaking animations with wrong tools, and also finally resolves the long-standing hierarchy problem in Stair.
2017-12-12 13:54:17 +00:00
Dylan K. Taylor
dbc180315e Declare tool harvest level as a property 2017-12-12 13:54:16 +00:00
Dylan K. Taylor
45983acc0d Fixed too-fast break times with wrong tool types 2017-12-12 13:54:16 +00:00
Dylan K. Taylor
a02af1053f Remove redundant overrides from WoodenTools 2017-12-12 13:54:16 +00:00
Dylan K. Taylor
7de88b9040 Tool tier efficiency should still apply if the block can't be harvested
If you use an iron pickaxe on obsidian, it still mines faster because the tool types are compatible, even though the tool is not high enough.
2017-12-12 13:54:06 +00:00
Dylan K. Taylor
58327d0514 Change block tool types to bitflags
This allows specification of multiple tool types for a block, such as cobwebs.
2017-12-12 13:51:33 +00:00
Dylan K. Taylor
db31d13f96 Added Item->getBlockToolType() 2017-12-12 13:45:52 +00:00
Dylan K. Taylor
55d0684565 Move block-breaking tool-type constants to a BlockToolType interface 2017-12-12 13:45:52 +00:00
Dylan K. Taylor
7e3cd24444 Added TieredTool->getTier() 2017-12-12 13:45:51 +00:00
Dylan K. Taylor
2088a43c56 Refactored tool hierarchy 2017-12-12 13:45:51 +00:00
Dylan K. Taylor
3beccc47cd SlotChangeAction: Remove superfluous >= 0 inventorySlot check
This is done by slotExists() anyway.
2017-12-12 10:36:53 +00:00
Dylan K. Taylor
dfc2d1dfe6 Stop hardcoding src/pocketmine/resources everywhere 2017-12-11 19:52:49 +00:00
Dylan K. Taylor
1f1531810d Added \pocketmine\RESOURCE_PATH and Server->getResourcePath() 2017-12-11 19:52:20 +00:00
Dylan K. Taylor
a5fc77749f Added -file (-f) option to start.ps1
This allows specifying a PocketMine-MP PHP file to execute (phar or source) to use to run the server, like start.sh. If not specified, auto-detection is used.
2017-12-11 19:40:02 +00:00
Dylan K. Taylor
98cb7f2e10 Removed redundant filePath from Server constructor
This parameter is hardcoded to \pocketmine\PATH in PocketMine.php. Additionally, it does not make sense for the server source path to not be the server source path. \pocketmine\PATH is accessible from the Server context, therefore it should be used and does not need to be stored.
2017-12-11 19:25:06 +00:00
Dylan K. Taylor
e58db75396 Level: Remove redundant null checks from useBreakOn()
These checks are not needed as of 3eae7a187524233f35deae028b01cf58ccd48157.
2017-12-11 16:31:43 +00:00