-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #612 from Shynixn/development
Merge changes to master --release
- Loading branch information
Showing
21 changed files
with
315 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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 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 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,45 @@ | ||
# Selectable particle effects | ||
|
||
This is a tutorial to get into building selectable parts for pets. It can also be used | ||
to define selectable sounds, potion effects, etc. | ||
|
||
## 1. Edit the pet template | ||
|
||
Add a basic vanilla particle command as action to one of the loops. In this case the ``idle`` loop. | ||
|
||
* Instead of absolute coordinates we use the pet coordinate placeholders. | ||
* The placeholder ``%petblocks_js_mypart%`` is a custom placeholder defined by you, which stores the **currently selected particle**. You can also name it ``%petblocks_js_mysound%`` to store sound names for example. | ||
* The condition checks if the placeholder can actually be resolved e.g. a particle has been set. | ||
|
||
```yaml | ||
loops: | ||
idle: | ||
actions: | ||
- name: "Play particle effect" | ||
condition: | ||
type: STRING_NOT_CONTAINS | ||
left: "%petblocks_js_mypart%" | ||
right: "petblocks_js_mypart" | ||
type: "COMMAND" | ||
level: "SERVER" | ||
run: | ||
- "/particle %petblocks_js_mypart% %petblocks_pet_locationX% %petblocks_pet_locationY% %petblocks_pet_locationZ%" | ||
``` | ||
## 2. Adjust vanilla command settings | ||
A vanilla command may automatically log to the console and to the chat of every op player. You can disable the output for op players using vanilla game rules such as ``gamerule sendCommandFeedback false``, ``/gamerule logAdminCommands false``, ``/gamerule commandBlockOutput false``. If you want to hide the output in your console, you need to install a LogFilter plugin. | ||
## 3. Check if it works ingame | ||
Execute the following commands and take a look if the pet displays heart particles. | ||
``` | ||
/petblocks reload | ||
/petblocks variable pet mypart heart | ||
``` | ||
|
||
## 4. GUI buttons | ||
|
||
Open the GUI of petblocks or your favourite GUI plugin and add a button where the command ``/petblocks variable pet mypart heart %petblocks_owner_name%`` is executed with server level permissions. | ||
You can add more particles by creating new buttons with new commands e.g. ``/petblocks variable pet mypart angry_villager %petblocks_owner_name%`` |
This file contains 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 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 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 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 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 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 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 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 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 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 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
Oops, something went wrong.