Adds some missing README information
All checks were successful
KnarCraft/BlacksmithVisuals/pipeline/head This commit looks good
All checks were successful
KnarCraft/BlacksmithVisuals/pipeline/head This commit looks good
This commit is contained in:
parent
050491d7ba
commit
edcf418b8b
37
README.md
37
README.md
@ -4,9 +4,21 @@ This plugin adds additional visual and audial details to blacksmiths while they
|
|||||||
they are working or not. It is recommended to put a mace or other hammer-like item in the NPC's off-hand for full
|
they are working or not. It is recommended to put a mace or other hammer-like item in the NPC's off-hand for full
|
||||||
effect.
|
effect.
|
||||||
|
|
||||||
|
## Setting up a new NPC
|
||||||
|
|
||||||
|
While most things are automatic, you should set the NPC's idle and working locations for the NPC to automatically move
|
||||||
|
to the crafting station while working. Use `/setNPCPosition idle` to set the position the NPC will go to after it's
|
||||||
|
finished working. Use `/setNPCPosition reforging-workstation` to set the position the NPC will be in while working. As
|
||||||
|
scrappers can salvage lots of different things, they have two additional positions.
|
||||||
|
Use `/setNPCPosition netherite-workstation` to set the position the scrapper will use when working on netherite or
|
||||||
|
armor-trim items (smithing table). Use `/setNPCPosition crafting-workstation` if extended salvage is enabled to set the
|
||||||
|
position the NPC will use when working on extended salvage (crafting table).
|
||||||
|
|
||||||
|
Remember to disable lookclose or adjust it as described in the FAQ.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### Citizens lookclose makes NPC rotate weirdly
|
### Citizens lookclose makes NPC rotate weirdly and not face its crafting station
|
||||||
|
|
||||||
It has been found that with some options, lookclose can still be used. An example of a working lookclose setup is:
|
It has been found that with some options, lookclose can still be used. An example of a working lookclose setup is:
|
||||||
`/npc lookclose --linkedbody false --disablewhennavigating true --perplayer true --range 3 --targetnpcs false --headonly true --linkedbody false -r false`
|
`/npc lookclose --linkedbody false --disablewhennavigating true --perplayer true --range 3 --targetnpcs false --headonly true --linkedbody false -r false`
|
||||||
@ -16,7 +28,7 @@ mind.
|
|||||||
### NPCs teleport part of the way while walking to or from a crafting station
|
### NPCs teleport part of the way while walking to or from a crafting station
|
||||||
|
|
||||||
This behavior is inevitable. As Citizens pathing is not very accurate (as described in Citizens' FAQ), the NPC must be
|
This behavior is inevitable. As Citizens pathing is not very accurate (as described in Citizens' FAQ), the NPC must be
|
||||||
teleported to end up in the correct spot.
|
teleported when it's about to reach the destination to end up in the correct spot.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
@ -24,7 +36,7 @@ teleported to end up in the correct spot.
|
|||||||
|------------------------------------------------------------|--------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
|
|------------------------------------------------------------|--------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
|
||||||
| /reload (/blacksmithvisuals:reload) | | Reloads the plugin. |
|
| /reload (/blacksmithvisuals:reload) | | Reloads the plugin. |
|
||||||
| /setNPCPosition <positionType> | idle, netherite-workstation, reforging-workstation, crafting-workstation | Sets an idle or working position for an NPC to the current location of the executing player. |
|
| /setNPCPosition <positionType> | idle, netherite-workstation, reforging-workstation, crafting-workstation | Sets an idle or working position for an NPC to the current location of the executing player. |
|
||||||
| /playTestSound <sound category> <sound> \[volume] \[pitch] | | Plays the specified sound at the selected NPC. |
|
| /playTestSound <sound category> <sound> \[volume] \[pitch] | | Plays the specified sound at the selected NPC's location. |
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
@ -33,4 +45,21 @@ teleported to end up in the correct spot.
|
|||||||
| blacksmithvisuals.* | Gives all permissions. |
|
| blacksmithvisuals.* | Gives all permissions. |
|
||||||
| blacksmithvisuals.reload | Gives access to the reload command. |
|
| blacksmithvisuals.reload | Gives access to the reload command. |
|
||||||
| blacksmithvisuals.setposition | Gives access to the /setNPCPosition command. |
|
| blacksmithvisuals.setposition | Gives access to the /setNPCPosition command. |
|
||||||
| blacksmithvisuals.playtestsound | Gives access to the /playTestSound command. |
|
| blacksmithvisuals.playtestsound | Gives access to the /playTestSound command. |
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Each sound played can be disabled, or have
|
||||||
|
its [sound](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html), [sound category](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/SoundCategory.html),
|
||||||
|
pitch, volume and offset specified. The offset can be used to delay a sound to better time it with events happening at
|
||||||
|
the same time as the sound. The working sounds also support a negative offset which causes the working animation to be
|
||||||
|
delayed instead.
|
||||||
|
|
||||||
|
The sound category affects which volume slider players must use to decrease the volume of the sound.
|
||||||
|
|
||||||
|
The animation of the NPC's arm is triggered according to animationDelay. Then, based on animationChance, it might
|
||||||
|
trigger, or it might not trigger. If you for example want to have it animate on a set delay, you could set
|
||||||
|
animationChance to 100 and animationDelay to 20 to make it swing its arm once a second.
|
||||||
|
|
||||||
|
Use the reload command after you have altered the configuration. Note that changes won't happen for working sounds and
|
||||||
|
working animations for NPCs in the middle of working when the command is triggered.
|
@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
public final class SoundHelper {
|
public final class SoundHelper {
|
||||||
|
|
||||||
private SoundHelper() {
|
private SoundHelper() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user