292e462ea0
Remove nullable return types on CompoundTag getters
...
this doesn't make sense because there are default value parameters for this
2017-10-16 18:22:45 +01:00
769a50faa5
Refactor confusing parameter names for Item->onActivate()
...
next: refactor the function itself
2017-10-16 13:30:36 +01:00
1641183674
added some typehints to Item
2017-10-16 10:29:44 +01:00
72531209bf
Added some constants for frequently-accessed item NBT tags
2017-10-16 10:24:32 +01:00
8c6ab3e634
Some cleanup to item NBT handling
2017-10-16 10:15:41 +01:00
aa91183504
Added Durable class, fixed some tools not breaking correctly, removed some boilerplate code
2017-10-08 15:54:31 +01:00
ae5aa31e7b
Add Item->setNamedTagEntry() and Item->removeNamedTagEntry()
2017-10-08 15:06:30 +01:00
8fafef2f7f
Added tagType parameter to ListTag constructor, remove some boilerplate code
2017-10-08 13:28:01 +01:00
69e29236aa
Remove some redundant code for checking existence of creative items
...
getCreativeItemIndex() does basically the same thing anyway
2017-10-08 12:50:53 +01:00
e8453b7872
Item->getNamedTag() now always returns a CompoundTag object, removed lots of boilerplate code
...
This change resulted from many complaints and ugly boilerplate code because getNamedTag() is only ever used when you want to read from the tag or modify it. If you have code that depends on this returning null, you should use hasCompoundTag() instead.
2017-10-08 12:41:57 +01:00
00bf190e54
Make Item->getNamedTag() a bit less ugly
2017-10-08 12:17:18 +01:00
7dc5dc3a9f
Restrict item meta values to max signed short value, closes #1101
2017-10-03 12:35:08 +01:00
f7ee78233b
Item IDs should always be unsigned, treat them with appropriate measures ( fixes #1376 )
2017-10-03 12:28:50 +01:00
c47f1f572c
Added API method Item->pop()
2017-09-27 10:56:04 +01:00
bd64172750
Added API method Item->equalsExact() and removed some boilerplate code
2017-09-15 16:48:46 +01:00
75e32b11b7
Merge branch 'php/7.0' into mcpe-1.2
2017-09-02 18:29:53 +01:00
b071ce9c5a
Refactored projectile handling, added Item->onClickAir()
2017-09-02 11:57:26 +01:00
5d75d3d5b6
Merge branch 'php/7.0' into mcpe-1.2
2017-09-01 23:10:58 +01:00
6abef6b22d
Made block and item factory lists private to stop people doing stupid things with them
2017-08-29 10:53:01 +01:00
b5d2402c9b
Merge branch 'master' into mcpe-1.2
2017-08-28 18:02:09 +01:00
697ea55fb7
Another typehint
2017-08-27 20:01:38 +01:00
c7fd3eb725
Merge branch 'master' into mcpe-1.2
2017-08-27 16:09:23 +01:00
a5f5502380
Moved bow functionality out of Player
2017-08-26 19:04:04 +01:00
13187e1749
Removed damage-table mess and added API methods Item->getAttackPoints() and Item->getDefensePoints()
2017-08-26 12:59:03 +01:00
9e142655ea
Removed redundant count parameter from item constructors, added some documentation and tightened safety checks
...
the count parameter is useless since Item ctor should now only be used for constructing item _types_, not actual items. All item creations for inventories etc, should go through the ItemFactory.
2017-08-25 19:06:23 +01:00
17518195d1
Be more smart about json-serializing items
...
Don't include nbt_hex if we don't have a NBT tag
Don't include damage unless it's non-zero
Don't include count unless it's non-1
2017-08-24 12:02:03 +01:00
445a67954d
Merge changes from master
2017-08-22 14:13:31 +01:00
8a35b9da29
Added some documentation
2017-08-22 10:28:43 +01:00
876659cc73
Item factory refactor and added capability to register custom items
2017-08-21 17:49:26 +01:00
d2ace6bdd2
added some typedocs
...
shut up PhpStorm
2017-08-21 17:17:47 +01:00
1f70a7830e
Branch merge
2017-08-20 21:07:19 +01:00
02f42eba48
Move block registration to its own class
2017-08-20 18:05:01 +01:00
e1d894057c
Changed face position floating-point params to Vector3s
2017-08-20 10:23:34 +01:00
4f1302adf2
Merge branch 'master' into mcpe-1.2
2017-08-17 17:14:16 +01:00
6efa4343b1
Cleaned up fuel duration handling, fixed some fuel items not working in furnaces
2017-08-17 10:22:47 +01:00
b4c4005009
Some condition simplifications suggested by static analysis
2017-08-16 20:06:48 +01:00
260179197b
Use SplFixedArrays in inventory, added more typehints and cleaned up some duplicated code
2017-08-09 13:12:07 +01:00
e4a5cb6021
Changed NBT representation in JSON to hex, fix encoding problems with UTF-8
2017-08-06 14:50:18 +01:00
3b7fc21839
Enchantment API changes, understandable constant names
2017-08-05 21:27:57 +01:00
fb59b57bdf
Improve item enchantment API and fix some bugs ( #512 )
2017-08-05 20:50:28 +01:00
3135fe3c69
Added API method Block->getItemId(), cleaned up excess wooden stairs and fence-gate classes, added more wooden door types
2017-08-04 13:02:24 +01:00
561d8e7a39
Regenerated block/item id lists and refactored some names for consistency with MCPE
2017-08-04 12:17:24 +01:00
63c12440dc
Fixed items ordering
2017-08-03 17:48:56 +01:00
6ae24c5c19
Removed unnecessary methods Block->canBeActivated() and Item->canBeActivated() (needless extra confusion)
2017-07-30 18:14:43 +01:00
2a7b736f18
Heap of bugfixes, cleanup and PHP 7 upgrades
2017-07-13 19:18:56 +01:00
c2a7c2c6cd
Remove duplicate Quartz class (cc @PEMapModder)
...
how did nobody ever notice this...
2017-07-13 16:48:25 +01:00
6af87b7b30
Fixed clearCustomBlockData(), close #1118
2017-07-13 10:44:49 +01:00
adbc298909
Fixed item CompoundTags keeping the tag
name after NBT serialize/deserialize, close #1145
2017-06-27 15:58:00 +01:00
a365c831a8
Fixed some doc problems
2017-06-25 12:07:28 +01:00
b83c135c3f
Made Item::setLore() fluent ( #1120 )
2017-06-23 08:39:56 +01:00