32574118ea
Implemented Mending enchantment ( #2257 )
2018-07-06 13:28:33 +01:00
8c672cb7c8
Implemented Sharpness, Fire Aspect and Knockback enchantments
2018-06-24 12:13:54 +01:00
97c267c70c
Implemented Punch enchantment
2018-06-23 17:40:01 +01:00
85a3c0e7dc
Implemented Flame enchantment
2018-06-23 17:11:20 +01:00
2f70a1eefb
Implemented Thorns enchantment ( #2258 )
...
This implementation is rough and can probably be improved to make it extendable, but this works for now and can be improved later.
2018-06-23 13:36:58 +01:00
1c0b49343c
Implemented Infinity enchantment ( #2259 )
2018-06-23 11:44:35 +01:00
814a949580
Implemented Power enchantment
2018-06-23 11:39:39 +01:00
05af87e1d4
Strip empty lines at the end of classes
2018-06-11 13:19:23 +01:00
263cd900a8
Enchantment: update item type flags
2018-05-23 17:39:52 +01:00
164ce76ff5
Enchantment: apply typehints to PHP 7.2 standards
2018-05-23 17:28:40 +01:00
fbf760bafe
Enchantment: implemented Vanishing
2018-05-23 17:23:56 +01:00
e12e2897bb
Enchantment: Add new constants
...
these aren't registered yet because they aren't implemented.
2018-05-23 12:34:58 +01:00
8239c67b1a
Enchantment: split up primary and secondary flags
...
closes #1911
2018-05-12 11:20:27 +01:00
ffbb44673f
Enchantment: fix mistake in Protection translation key
2018-02-07 10:15:31 +00:00
0df2064802
Implement armor damage protection enchantments ( #1839 )
2018-01-24 10:13:24 +00:00
8d7c65585c
Enchantment: Implement Silk Touch ( #1912 )
2018-01-14 13:37:27 +00:00
94feecd44b
Enchantment: Implemented Unbreaking
2018-01-13 19:34:45 +00:00
98b36fd73e
Enchantment: Implemented Efficiency
...
This is only needed server-side for block-break animation times.
2018-01-11 20:13:57 +00:00
07c7048433
Enchantment: Converted item type bitflags to hex
2018-01-11 20:09:42 +00:00
f09cf92197
Enchantment: Updated item type flags
2018-01-11 20:08:50 +00:00
a6c1e02847
Enchantment: Register Respiration enchantment
...
First working enchantment on master. Hooray for 3 years late.
This works out of the box (the code checking for this enchantment already exists in Human->doAirSupplyTick()).
2018-01-11 18:32:22 +00:00
a842a5319f
Enchantment: Create constant name once, and reuse it
...
this is more readable and more maintainable.
2017-12-21 13:11:31 +00:00
c2b0f6af22
Enchantment: Simplify getEnchantment() with null coalesce
...
This is made possible by 0e538ee51d
.
2017-12-21 13:02:24 +00:00
6490d99ac2
Enchantment: Added a TODO (calculating XP min/max level cost bounds)
2017-12-21 12:55:55 +00:00
e0b063ac85
Enchantment: Added max level property
2017-12-21 12:49:34 +00:00
12ac2f4ac7
Enchantment: Fixed rarity constant values to match vanilla
...
Rarity is used for "weighting" enchantments on enchantment tables and such. Therefore higher numbers mean the enchantment is more common. This changes the rarity values to match vanilla.
2017-12-21 12:48:35 +00:00
cc1951c7ba
Enchantment: Remove activation type stuff
...
This isn't and won't be used anywhere.
2017-12-21 12:48:14 +00:00
0e538ee51d
Enchantment: Split up enchantment type data and enchantment instance data ( #1825 )
...
* Enchantment: Split enchantment type data from instance data
This commit splits enchantments into (effectively) enchantment TYPES vs enchantment INSTANCES.
When applying an enchantment to an item, it only needs to know 2 things:
1. the enchantment ID (identifier) which is used to identify the TYPE
2. the enchantment LEVEL which is used to modify the enchantment's power IN THIS INSTANCE.
Therefore, the LEVEL is not an immutable property. However, all other properties of the currently-named "Enchantment" class are immutable type properties.
Currently, when applying an enchantment to an item, a copy of the enchantment object is created from the registry, and returned. This copies all of the properties contained by the type, which is obviously sub optimal.
2017-12-21 12:40:33 +00:00
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
914e4c9a72
Enchantment: Fix formatting issue
2017-12-16 13:04:25 +00:00
24387d1efe
Enchantment: Add some PhpDoc for fields
2017-12-16 10:01:42 +00:00
74b074753f
Bulk addition of constant visibilities
...
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
6dbdefafdd
Add the long-awaited Enchantment::registerEnchantment() API method
...
api3/blocks users: I am sorry I kept you waiting so long
2017-10-09 11:40:53 +01:00
3b7fc21839
Enchantment API changes, understandable constant names
2017-08-05 21:27:57 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
9004417456
Fixed file headers ( #255 )
2017-01-13 16:57:05 +00:00
329a525ea1
Implemented food and hunger
2016-02-10 22:49:48 +08:00
fabb632286
More changes!
2015-08-13 18:02:10 +02:00
f093a6498d
Added base enchantment adding utilities, /enchant command
2015-08-08 16:03:04 +02:00
4dd0469792
Base enchantment class
2015-08-08 14:53:03 +02:00