-
Notifications
You must be signed in to change notification settings - Fork 70
Fixes #160
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
Open
aminekei
wants to merge
2
commits into
CustomiesDevs:master
Choose a base branch
from
aminekei:fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fixes #160
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/block/BlockComponents.php → src/Blocks/BlockComponents.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
src/block/BlockComponentsTrait.php → src/Blocks/BlockComponentsTrait.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/block/component/BlockComponent.php → src/Blocks/Components/BlockComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...lock/component/BreathabilityComponent.php → ...cks/Components/BreathabilityComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...block/component/CollisionBoxComponent.php → ...ocks/Components/CollisionBoxComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/block/component/DisplayNameComponent.php → ...locks/Components/DisplayNameComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/block/component/FlammableComponent.php → src/Blocks/Components/FlammableComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/block/component/FrictionComponent.php → src/Blocks/Components/FrictionComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/block/component/GeometryComponent.php → src/Blocks/Components/GeometryComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ock/component/LightDampeningComponent.php → ...ks/Components/LightDampeningComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...lock/component/LightEmissionComponent.php → ...cks/Components/LightEmissionComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../component/MaterialInstancesComponent.php → ...Components/MaterialInstancesComponent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <?php | ||
|
|
||
| namespace customiesdevs\customies\Blocks\Components; | ||
|
|
||
| use customiesdevs\customies\Blocks\Components\BlockComponent;use pocketmine\nbt\tag\CompoundTag; | ||
| use pocketmine\nbt\tag\FloatTag; | ||
| use pocketmine\nbt\tag\IntTag; | ||
| use pocketmine\nbt\tag\ListTag; | ||
|
|
||
| class PickCollisionComponent implements BlockComponent { | ||
|
|
||
| private array $origin; | ||
| private array $size; | ||
|
|
||
| /** | ||
| * Specifies the language file key that maps to what text will be displayed when you hover over the block in your inventory and hotbar. | ||
| * If the string given can not be resolved as a loc string, the raw string given will be displayed. | ||
| * If this component is omitted, the name of the block will be used as the display name. | ||
| * @param array $origin Example using String: `"Custom Block"` | ||
| * @param array $size Example using String: `"Custom Block"` | ||
| * Example using Localization String: `"block.customies:custom_block.name"` | ||
| */ | ||
| public function __construct(array $origin, array $size) { | ||
| $this->origin = $origin; | ||
| $this->size = $size; | ||
| } | ||
|
|
||
| public function getName(): string { | ||
| return "minecraft:pick_collision"; | ||
| } | ||
|
|
||
| public function getValue(): CompoundTag | ||
| { | ||
| return CompoundTag::create() | ||
| ->setTag("origin", new ListTag([ | ||
| new FloatTag($this->origin[0]), | ||
| new FloatTag($this->origin[1]), | ||
| new FloatTag($this->origin[2]) | ||
| ])) | ||
| ->setTag("size", new ListTag([ | ||
| new FloatTag($this->size[0]), | ||
| new FloatTag($this->size[1]), | ||
| new FloatTag($this->size[2]) | ||
| ])); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <?php | ||
|
|
||
| namespace customiesdevs\customies\Blocks\Components; | ||
|
|
||
| use customiesdevs\customies\Blocks\Components\BlockComponent;use pocketmine\math\Vector3; | ||
| use pocketmine\nbt\tag\CompoundTag; | ||
| use pocketmine\nbt\tag\FloatTag; | ||
| use pocketmine\nbt\tag\ListTag; | ||
|
|
||
| class SelectionBoxComponent implements BlockComponent { | ||
|
|
||
| private bool $useSelectionBox; | ||
| private Vector3 $origin; | ||
| private Vector3 $size; | ||
|
|
||
| /** | ||
| * Defines the area of the block that is selected by the player's cursor. If set to true, default values are used. If set to false, this block is not selectable by the player's cursor. If this component is omitted, default values are used. | ||
| * @param Vector3 $origin MMinimal position of the bounds of the selection box. "origin" is specified as [x, y, z] and must be in the range (-8, 0, -8) to (8, 16, 8), inclusive. | ||
| * @param Vector3 $size Size of each side of the selection box. Size is specified as [x, y, z]. "origin" + "size" must be in the range (-8, 0, -8) to (8, 16, 8), inclusive. | ||
| * @param bool $useSelectionBox If selection should be enabled, default is set to `true`. | ||
| */ | ||
| public function __construct(bool $useSelectionBox = true, ?Vector3 $origin = new Vector3(-8.0, 0.0, -8.0), ?Vector3 $size = new Vector3(16.0, 16.0, 16.0)) { | ||
| $this->useSelectionBox = $useSelectionBox; | ||
| $this->origin = $origin; | ||
| $this->size = $size; | ||
| } | ||
|
|
||
| public function getName(): string { | ||
| return "minecraft:selection_box"; | ||
| } | ||
|
|
||
| public function getValue(): CompoundTag { | ||
| return CompoundTag::create() | ||
| ->setByte("enabled", $this->useSelectionBox ? 1 : 0) | ||
| ->setTag("origin", new ListTag([ | ||
| new FloatTag($this->origin->getX()), | ||
| new FloatTag($this->origin->getY()), | ||
| new FloatTag($this->origin->getZ()) | ||
| ])) | ||
| ->setTag("size", new ListTag([ | ||
| new FloatTag($this->size->getX()), | ||
| new FloatTag($this->size->getY()), | ||
| new FloatTag($this->size->getZ()) | ||
| ])); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Mojang can use both "value" & "explosion_resistance"
(In vanilla)