Dylan K. Taylor
8051fa4f6d
Remove some direct Position->level accesses
2018-12-03 21:39:17 +00:00
Dylan K. Taylor
ed531c0009
Merge branch 'release/3.4'
2018-11-29 19:57:35 +00:00
Dylan K. Taylor
05dba61a69
Merge branch 'release/3.3' into release/3.4
2018-11-29 19:47:28 +00:00
Dylan K. Taylor
60dddcd12a
Painting: clean up guard checks, remove unnecessary checks
2018-11-29 19:29:10 +00:00
Twisted
3c86944a7c
Item: make addEnchantment(), removeEnchantment() and removeEnchantments() fluent ( #2523 )
2018-11-13 16:48:13 +00:00
Dylan K. Taylor
95be571481
Fixed Item->equals() not working for no-NBT items since 9bb3c93285d8589cde855b08318e32514eff78c4
2018-10-29 12:45:39 +00:00
Dylan K. Taylor
e1795dfd49
Fixed wtf in Durable->setDamage() exception throw
2018-10-27 21:50:14 +01:00
Dylan K. Taylor
9bb3c93285
Remove network-serialized item NBT from API layer, item NBT is now retained for the lifetime of the stack
2018-10-27 15:26:01 +01:00
Dylan K. Taylor
0ef81e701a
ItemFactory: Use a simple hashmap for item types
...
this is slower but yields less complicated code. Since this isn't in a hot path it's acceptable for this to slow down a little for the sake of sanity.
2018-10-26 18:38:24 +01:00
Dylan K. Taylor
93131b4d92
Rename some meta usages to variant
2018-10-26 18:20:37 +01:00
Dylan K. Taylor
7dd3b5b996
Durable: fixed leftover wtf from damage refactor
2018-10-26 18:17:34 +01:00
Dylan K. Taylor
327c8361bd
Remove variant parameters from TieredTool
2018-10-26 18:16:31 +01:00
Dylan K. Taylor
f438736af5
Make some item constructor variant parameters mandatory
2018-10-26 16:51:02 +01:00
Dylan K. Taylor
51e13104dc
oops, missed one
2018-10-26 16:49:25 +01:00
Dylan K. Taylor
712cafa0cc
Item: remove redundant meta constructor params
...
these ctor params should only be used for variants in the ItemFactory registration, but all of these items have no non-zero variants anyway.
2018-10-26 16:29:14 +01:00
Dylan K. Taylor
011b9ae159
Update to latest NBT lib version
2018-10-23 16:47:00 +01:00
Dylan K. Taylor
90482e79bc
Merge branch 'release/3.4'
2018-10-21 18:23:54 +01:00
Dylan K. Taylor
6dd2597934
Merge branch 'release/3.3' into release/3.4
2018-10-21 18:17:07 +01:00
Dylan K. Taylor
45c9caa38c
Fixup some formatting issues
2018-10-21 18:15:25 +01:00
Dylan K. Taylor
a2a6286e1c
ItemFactory: clean up some unnecessary code
...
this try/catch isn't needed because the list offset derivation function will deal with invalid IDs anyway.
2018-10-19 15:29:01 +01:00
Dylan K. Taylor
e7494fff96
- the fix didn't fix
...
this is a mess
it would be nice not to have to start the server to find these kinds of bugs >.<
2018-10-19 15:29:01 +01:00
Dylan K. Taylor
f81849e550
ItemFactory: fix special case handling for durable items, close #2483
2018-10-19 15:29:01 +01:00
Dylan K. Taylor
139aaa5577
Protect Item->count
2018-10-07 14:34:04 +01:00
Dylan K. Taylor
82c718cff0
Split Bucket into multiple classes
2018-10-07 14:03:13 +01:00
Dylan K. Taylor
36548a335c
Fixed some items disappeared after 5fb782548516316475fd286c48ea2a34c52903ed
2018-10-06 21:30:21 +01:00
Dylan K. Taylor
5fb7825485
Flatten Item variants, remove Item->setDamage()
2018-10-06 20:09:11 +01:00
Dylan K. Taylor
495a0b1dc2
Merge branch 'release/3.3'
2018-10-05 18:11:33 +01:00
Dylan K. Taylor
1dd6591ac1
Migrate a bunch of PluginManager->callEvent() usages to Event->call
...
This has the triple bonus effect of a) making a lot of code easier to read, b) reducing Server::getInstance() usages, and c) removing a whole bunch of Server dependencies.
The network and block namespaces are untouched by this commit due to potential for merge conflicts. These should be dealt with separately on master.
2018-10-05 17:30:06 +01:00
Dylan K. Taylor
5344c0a627
Merge branch 'release/3.3'
2018-09-29 15:39:40 +01:00
Dylan K. Taylor
5b511f6d06
Merge branch 'release/3.1' into release/3.2
2018-09-29 15:39:27 +01:00
Dylan K. Taylor
426dee04a6
Potion: remove unnecessary exception throw in getPotionEffectsById()
...
this is only used by Potion and SplashPotion, and simply causes errors when trying to use potions with unknown IDs.
2018-09-29 15:39:20 +01:00
Dylan K. Taylor
75f364fcf2
Level: Remove obsolete \$direct parameter from setBlock()
...
this parameter was previously used to send blocks with a different set of flags, immediately, to players. However, the flags have been demonstrated useless and the direct sending is pointless now since packets are buffered now per session, so we might as well take advantage of the batched block update sending.
2018-09-27 16:15:07 +01:00
Dylan K. Taylor
896ecb52f4
Merge branch 'release/3.3'
2018-09-24 18:27:26 -04:00
Dylan K. Taylor
f6a8ec83a1
Merge branch 'release/3.1' into release/3.2
2018-09-24 18:26:39 -04:00
Dylan K. Taylor
28137efb53
Fixed server freezing when using chorus fruit from large Y coordinates
2018-09-24 18:26:20 -04:00
Dylan K. Taylor
8873efc303
Duplicate block IDs into ItemIds to allow for split
...
this will be necessary to deal with negative IDs (if I choose to do that), and it'll also be necessary if I decide to do any shift hacks to merge ID/variant for block IDs, because we don't want such things to affect items before we're ready to deal with that.
2018-09-23 15:53:16 +01:00
Dylan K. Taylor
ed1c511c3c
Hacks for dealing with negative item IDs...
2018-09-23 14:14:58 +01:00
Dylan K. Taylor
56d9943b0d
Nuke Block->meta, split into variant and state properties, lots of cleanup
...
This is a major change to the way block metadata is handled within the PM core. This separates variant metadata (which really ought to be part of the ID) from state metadata, and in a couple of cases flattens separate states of blocks together.
The result of this is that invalid variants can be much more easily detected, and additionally state handling is much cleaner since meta is only needed at the serialize layer instead of throughout the code.
2018-09-21 19:28:10 +01:00
Dylan K. Taylor
a55ab54ddb
Merge branch 'release/3.3'
2018-09-20 19:02:48 +01:00
Dylan K. Taylor
8db1ccc1ae
Merge branch 'release/3.1' into release/3.2
2018-09-20 19:02:09 +01:00
Dylan K. Taylor
5d56030afa
Item: make nbtDeserialize() return AIR when reading an unknown PC item
...
This is scummy, but it's better than crashing the whole server just because a chest contained an unknown item.
2018-09-20 19:00:44 +01:00
Dylan K. Taylor
7da51ae97e
Fixed ItemBlocks passing the wrong block name to their constructors
2018-09-19 17:51:28 +01:00
Dylan K. Taylor
3bd224ae1a
Merge branch 'release/3.3'
2018-09-06 19:31:11 +01:00
Dylan K. Taylor
d8e27e6081
Bow: fix wrong arithmetic for Flame fire ticks, closes #2420
2018-09-06 19:30:55 +01:00
Dylan K. Taylor
bd091eb744
Merge branch 'release/3.3'
2018-09-06 19:15:53 +01:00
Dylan K. Taylor
14a2ffa51b
Merge branch 'release/3.1' into release/3.2
2018-09-06 18:43:28 +01:00
Dylan K. Taylor
c447d51e3f
Bucket: use ItemFactory instead of self-clone
...
in the future Item->setDamage() will be removed.
2018-09-06 18:42:09 +01:00
Dylan K. Taylor
f218868338
Separate facing/bearing handling from Vector3, deobfusticate a ton of @shoghicp old code
2018-09-05 19:56:14 +01:00
Dylan K. Taylor
d419d4308f
Add a couple of item constants, register Scute item
...
leaving out turtle helmet for now because of complications relating to the effect application - I REALLY don't want to tick armour if I can avoid it, due to the performance concerns.
2018-08-21 19:54:24 +01:00
Dylan K. Taylor
b480c63060
Fixed ItemFactory::fromString() meta handling bug introduced by 71c3c349766e348bf53a1beeefaf9a897bc0a954
2018-07-17 14:46:08 +01:00