Fishing Component

From wiki
Jump to: navigation, search

Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.

On this page, we go over the Fishing Component, signified by the following;

"fishing": {
  =Content=
}

Fishing Components are mostly used in conjunction with Fishing Rod Items. They are used to specify a number of customisable things about fishing, including models and effects.


When and How to use

Fishing Components should be used whenever you want to make a Fishing Rod Items. This is it's only use, and all Fishing Rod Items are forced to include this component.

This component has no necessary parts so the following is completely valid;

"fishing": {},

This would leave all values at their default. You will still need this part, as it will not specify default values for this component.

To get actual use out of this component, you can use the following;

"fishing": {
  "castEffect": "staxel.particle.fishing.RodPull",
  "castSoundGroup": "staxel.sounds.place.Water",
  "reelEffect": "staxel.particle.fishing.RodCatching",
  "reelSoundGroup": "staxel.sounds.place.Water",
  "catchEffect": "staxel.particle.fishing.RodPull",
  "catchSoundGroup": "staxel.sounds.place.Water",
  "indicator": "staxel/item/gatherables/RodBobber.qb",
  "castDistance": 10.0,
  "minWaitSeconds": 1,
  "maxWaitSeconds": 10,
  "successTranslations": [
    "fishing.success1",
    "fishing.success2",
    "fishing.success3"
  ]
},

This specifies a lot more options than the original property. First of all "castEffect", "reelEffect" and "catchEffect" all point Particle codes which will play the particle at a certain time (i.e. When casting the rod, Reeling the rod to catch fish and Catching fish respectively.). Secondly "castSoundGroup", "reelSoundGroup" and "catchSoundGroup" all point to Sound codes which play at the same time as the particles. The "indicator" property specifies what model the bobber will be. "castDistance" will specify how far you can aim into water. "minWaitSeconds" and "maxWaitSeconds" specify how much time can be spent waiting for a fish. And finally "successTranslations" is a list of Translation Codes which will be used to select the text for the notification.

With that, you have a fully customised fishing rod.


Config Options

All config options must be inside the body of;

"fishing": {
  =Config Here=
}

"castEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not have any cast particles.


This is the particles it will play while casting the rod.


"castSoundGroup"

Valid options (String): A string that points to the code of a Sound.

Default Value: If not specified, will not play a sound when casting.


This is the sound it will play while casting the rod.


"catchEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not play an particles while catching a fish.


This is the particles it will play while catching a fish.


"catchSoundGroup"

Valid options (String): A string that points to the code of a Sound.

Default Value: If not specified, will not play a sound when catching a fish.


This is the sound it will play while catching a fish.


"indicator"

Valid options (String): A string that contains the path to the indicator.

Default Value: If not specified, will not show an indicator.


This is the model it will use to float in the water (i.e. The bobber).


"minWaitSeconds"

Valid options (Integer): A positive integer number.

Default Value: If not specified, will default to 1.


This is the minimum amount of time, in seconds, that the player needs to get to be able to get a fish.


"maxWaitSeconds"

Valid options (Integer): A positive integer number.

Default Value: If not specified, will default to 15.


This is the maximum amount of time, in seconds, that the player needs to get to be able to get a fish.


"reelEffect"

Valid options (String): A string that points to the code of a Particle.

Default Value: If not specified, will not play any particles while reeling.


This is the particles it will play while reeling.


"reelSoundGroup"

Valid options (String): A string that points to the code of a Sound

Default Value: If not specified, will not play any sounds while reeling.


This is the sound it will play while reeling.


"successTranslations"

Valid options (List of Strings): A list of strings to be used for Translations

Default Value: If not specified, will not display any success notifications.


This is a list of strings that can be used to add text to the catch notification.