-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implements mace item #6468
base: stable
Are you sure you want to change the base?
Conversation
|
@@ -324,8 +324,9 @@ private function __construct(){ | |||
public const SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE = 20285; | |||
public const PITCHER_POD = 20286; | |||
public const NAME_TAG = 20287; | |||
public const MACE = 20289; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why from 20297 straight to 20289?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mace should be implemented as a single tool, not as a tiered tool. The item should be autogenerated where applicible. Please make the requested changes and request a re-review.
@@ -40,5 +40,6 @@ private function __construct(){ | |||
public const AXE = 1 << 3; | |||
public const SHEARS = 1 << 4; | |||
public const HOE = 1 << 5; | |||
public const MACE = 1 << 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool type only must be added here for variants like diamond and iron versions of the item.
|
||
public const FIRST_UNUSED_ITEM_ID = 20288; | ||
public const FIRST_UNUSED_ITEM_ID = 20290; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be autogenerated using the composer script included with pocketmine's build tools.
use pocketmine\block\BlockToolType; | ||
use pocketmine\entity\Entity; | ||
|
||
class Mace extends TieredTool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extending TieredTool implies variants of the tool such as an Iron Mace or Diamond Mace item, which does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I have ever. In pull request #6446
@@ -47,6 +48,7 @@ enum ToolTier{ | |||
case IRON; | |||
case DIAMOND; | |||
case NETHERITE; | |||
case MACE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be obvious MACE is not a tier which can be applied to existing tools in the game.
Introduction
Added a new weapon class, the Mace, which functions both as a tool and a weapon with specific properties. This implementation includes changes to the item serialization system and new constants to support the Mace.
https://minecraft.wiki/w/Mace
Relevant issues
Changes
API changes
Added API for the Mace weapon in several files, including
ItemSerializerDeserializerRegistrar.php
andItemTypeIds.php
.Behavioural changes
Introduced the behaviour of the Mace, which has a 1.5x faster mining rate when used on blocks, and takes damage when attacking entities or breaking blocks.
Backwards compatibility
Screenshot
Note
Don't worry i also implement the compass recovery
Follow-up
Prepare unit tests or in-game playtesting sessions to confirm that the Mace functions as intended.
Caution
What's missing at the moment is item crafting and the main function for calculating damage based on the height of an entity.
I tested this PR by doing the following (tick all that apply):
tests/phpunit
folder)