Oreo Oreoniv
1b4b832c8c
Added a getEntry() to BanList ( #1830 )
2017-12-21 10:08:56 +00:00
Dylan K. Taylor
4f8e4f0522
Add EOF newlines where missing (bulk) ( #1836 )
...
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
Dylan K. Taylor
4c46087ffc
TextFormat: Added EOL constant (for MCPE)
...
MCPE always uses LF for line endings. PHP_EOL might be LF, CRLF, or CR depending on the platform, so it should not be used for (for example) sending messages to players containing newlines.
2017-12-17 14:58:37 +00:00
Dylan K. Taylor
bb3e72ea4b
StringTag: Fixed bad error message for bad value type
2017-12-17 12:30:18 +00:00
Dylan K. Taylor
914e4c9a72
Enchantment: Fix formatting issue
2017-12-16 13:04:25 +00:00
Dylan K. Taylor
9fd7312629
EnchantCommand: Fix vanilla translation
...
This parameter isn't required server side, but it doesn't matter anyway.
2017-12-16 10:34:38 +00:00
Dylan K. Taylor
24387d1efe
Enchantment: Add some PhpDoc for fields
2017-12-16 10:01:42 +00:00
Dylan K. Taylor
3853938ef3
Level: Manage block cache appropriately when loading/unloading/replacing chunks, close #1813 ( #1823 )
...
This changes the block cache to be a 2-dimensional hashmap of [chunkHash][blockHash]. This is needed to more effectively dispose of chunk-specific block caches when chunks are modified.
This now destroys the cache for specific chunk indexes in the following circumstances:
- When a chunk is unloaded (the cache isn't needed anymore)
- When a chunk is set into the world (for example, from the generator)
- When a chunk is loaded (probably unnecessary)
This resolves the ghost blocks bug many have been complaining about.
2017-12-16 09:49:48 +00:00
Dylan K. Taylor
4ec8416f9a
Level: Fix minor code duplication in setChunk()
2017-12-15 16:47:59 +00:00
Dylan K. Taylor
8aff793a4f
Fix drops for leaves, close #1821
...
Seems that leaves are another special case - they technically speaking accept any tool to break, but only drop when shears are used. They don't REQUIRE shears because if they did the break time would be longer for non-shears tools.
2017-12-15 10:14:24 +00:00
Dylan K. Taylor
d93ded9047
merge 1.2.7 "changes"
2017-12-14 18:59:11 +00:00
Dylan K. Taylor
fbd04b0fe7
Bump to 1.2.7
2017-12-14 18:56:32 +00:00
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
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
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