Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chronoDave committed Mar 16, 2024
1 parent c62a648 commit fc9a299
Show file tree
Hide file tree
Showing 51 changed files with 2,015 additions and 214 deletions.
202 changes: 1 addition & 201 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,204 +26,4 @@ _Note: This package requires Node >10.12.0 and Minecraft 1.7.10._
- Sensible autofills, **create custom bees with less code**
- Supports [Forestry](https://www.curseforge.com/minecraft/mc-mods/forestry), [ExtraBees](https://www.curseforge.com/minecraft/mc-mods/binnies-mods) and [Gendustry](https://www.curseforge.com/minecraft/mc-mods/gendustry).

## Getting started

Recreation of [Gendustry's example bees](https://github.com/bdew-minecraft/gendustry/blob/mc1710/example_configs/example_bees.cfg).

```TS
import fs from 'fs';
import {
formatBranch,
formatCustom,
formatFlower,
formatOreDictionary,
formatHoneyComb,
formatHoneyDrop,
formatRequirementTemperature,
formatRequirementBiome,
formatRequirementBlock,
SPECIES,
BIOME,
TEMPERATURE
} from 'gendustry-bee-lib';

/**
* {
* id: string
* cfg: string[]
* lang: string
* }
*/
const flower = formatFlower({
name: 'Gold Blocks',
dominant: true,
flowers: [
formatOreDictionary('blockGold'),
formatOreDictionary('blockIron')
],
spread: formatOreDictionary('oreGold')
});

/**
* {
* id: string
* cfg: string[]
* lang: string
* }
*/
const honeyComb = formatHoneyComb(13337)({
name: 'Test Comb',
color: {
primary: '#ff0000',
secondary: '#0000ff'
}
});

/**
* {
* id: string
* cfg: string[]
* lang: string
* }
*/
const honeyDrop = formatHoneyDrop(13337)({
name: 'Test Honey Drop',
color: {
primary: '#ff0000',
secondary: '#0000ff'
}
});

/**
* {
* cfg: string[],
* lang: string[]
* }
*/
const branch = formatBranch('gendustry')({
name: 'test',
latin: 'Testis',
bees: [{
name: 'Test',
author: 'BDEW',
color: {
primary: '#FF0000',
secondary: '#0000FF'
},
dominant: true,
drops: {
regular: [{
id: formatCustom(honeyComb.id),
n: 0.3
}]
},
traits: {
base: SPECIES.forest,
nocturnal: true,
flower: flower.id
},
mutations: [{
n: 0.1,
left: SPECIES.industrious,
right: SPECIES.diligent,
requirement: formatRequirementTemperature('hot')
}, {
n: 0.1,
left: SPECIES.industrious,
right: SPECIES.common,
requirement: formatRequirementBiome('nether')
}, {
n: 0.1,
left: SPECIES.industrious,
right: SPECIES.common,
requirement: formatRequirementBlock({ id: 'wool', meta: 1 })
}]
}];
});
```

## API

- [`formatBranch`](#formatbranch)
- [`formatBee`](#formatbee)
- [`formatMutation`](#formatmutation)
- [`formatTraits`](#formattraits)
- [`formatFlower](#formatflower)
- [`formatRequirementTemperature`](#formatrequirementtemperature)
- [`formatRequirementHumidity`](#formatrequirementhumidity)
- [`formatRequirementBiome`](#formatrequirementbiome)
- [`formatRequirementBlock`](#formatrequirementblock)
- [`formatBlock`](#formatblock)
- [`formatItem](#formatitem)
- [`formatCustom`](#formatcustom)
- [`formatOreDictionary`](#formatoredictionary)
- [`formatHoneyComb](#formathoneycomb)
- [`formatHoneyDrop](#formathoneydrop)

### `formatBranch`

Creates [Bee Branch](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-bee-branches/) and [Bee Species](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-bee-species/).

Also creates [Localization](https://bdew.net/gendustry/configuration/custom-localization-files/) data.

### `formatBee`

Creates [Bee Species](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-bee-species/).

Also creates [Localization](https://bdew.net/gendustry/configuration/custom-localization-files/) data.

### `formatMutation`

Creates [Mutation](https://bdew.net/gendustry/configuration/mutation-recipes/) "recipes".

### `formatTraits`

Creates bee [Traits](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-bee-species/).

### `formatFlower`

Creates [Flower](https://github.com/bdew-minecraft/gendustry/blob/mc1710/example_configs/example_bees.cfg#L69) used in [`formatBee`](#formatbee).

### `formatRequirementTemperature`

Creates temperature requirement used in [`formatMutation`](#formatmutation).

### `formatRequirementHumidity`

Creates humidity requirement used in [`formatMutation`](#formatmutation).

### `formatRequirementBiome`

Creates biome requirement used in [`formatMutation`](#formatmutation).

### `formatRequirementBlock`

Creates block requirement used in [`formatMutation`](#formatmutation).

### `formatBlock`

Formats blocks used in [Drops List](https://bdew.net/bacon/configuration-sections/drops-list/).

### `formatItem`

Formats items used in [Drops List](https://bdew.net/bacon/configuration-sections/drops-list/).

### `formatCustom`

Formats custom items (honeycomb / honeydrop) used in [Drops List](https://bdew.net/bacon/configuration-sections/drops-list/).

### `formatOreDictionary`

Formats ore dictionary items used in [Drops List](https://bdew.net/bacon/configuration-sections/drops-list/).

### `formatHoneyComb`

Creates [Honey Comb](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-honey-drops-and-combs/).

Also creates [Localization](https://bdew.net/gendustry/configuration/custom-localization-files/) data.

### `formatHoneyDrop`

Creates [Honey Drop](https://bdew.net/gendustry/configuration/adding-custom-bees/adding-honey-drops-and-combs/).

Also creates [Localization](https://bdew.net/gendustry/configuration/custom-localization-files/) data.
More information can be found in the [documentation](./docs).
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
43 changes: 43 additions & 0 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
:root {
--light-hl-0: #795E26;
--dark-hl-0: #DCDCAA;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-hl-2: #A31515;
--dark-hl-2: #CE9178;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

@media (prefers-color-scheme: light) { :root {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--code-background: var(--light-code-background);
} }

@media (prefers-color-scheme: dark) { :root {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--code-background: var(--dark-code-background);
} }

:root[data-theme='light'] {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--code-background: var(--light-code-background);
}

:root[data-theme='dark'] {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--code-background: var(--dark-code-background);
}

.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
.hl-2 { color: var(--hl-2); }
pre, code { background: var(--code-background); }
Loading

0 comments on commit fc9a299

Please sign in to comment.