docs: add asciidoc docs for use with refinedsites

This commit is contained in:
raoulvdberge
2023-11-26 18:31:35 +01:00
parent 27442fbfac
commit b489a3db8f
237 changed files with 3175 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
= Commands
[cols="1,1"]
|===
|Refined Storage version|Command |Explanation
|v1.9.5 or higher |`/refinedstorage disk create <player> <id>`|Creates a disk for a player by disk ID.
|v1.9.5 or higher |`/refinedstorage disk list`|Lists all disks on the server.
|v1.9.5 or higher |`/refinedstorage disk list <player>`|Lists all disks on the server, that the given player created.
|v1.9.5 or higher |`/refinedstorage network list <dimension>`|Lists all networks in a dimension, sorted by highest tick time first.
|v1.9.5 or higher |`/refinedstorage network get <dimension> <pos>`|Gets information about a network in a dimension and position.
|v1.9.5 or higher |`/refinedstorage network get <dimension> <pos> autocrafting list`|Gets all autocrafting tasks for a network.
|v1.9.5 or higher |`/refinedstorage network get <dimension> <pos> autocrafting get <id>`|Gets a specific autocrafting task in a network.
|v1.9.5 or higher |`/refinedstorage network get <dimension> <pos> autocrafting cancel`|Cancels all autocrafting tasks in a network.
|v1.9.5 or higher |`/refinedstorage network get <dimension> <pos> autocrafting cancel <id>`|Cancels a specific autocrafting task in a network.
|v1.9.5 or higher |`/refinedstorage pattern dump`|Dumps information about the currently held xref:../autocrafting/pattern.adoc[]. Meant for debugging purposes.
|v1.6.x |`/createdisk`|See <<_createdisk>>.
|===
[#_createdisk]
== `/createdisk`
[.alert.alert-info]
****
This command is only available for Minecraft 1.12.2 on Refined Storage version v1.6.x.
****
Use the `/createdisk` command to spawn in a disk with a given ID.
=== Usage
`/createdisk <player> <item> <metadata> <id>`
==== Player
The player name to give the disk to.
==== Item
The item ID of the storage disk.
For Refined Storage this would be `refinedstorage:storage_disk` (or `refinedstorage:fluid_storage_disk` for fluid disks).
==== Metadata
The metadata value signifies the type of disk.
**Items**
[cols="1,1"]
|===
|Disk type|Metadata value
|1k|0
|4k|1
|16k|2
|64k|3
|Creative|4
|===
**Fluids**
[cols="1,1"]
|===
|Disk type|Metadata value
|64k|0
|256k|1
|1024k|2
|4096k|3
|Creative|4
|===
==== ID
The ID parameter is the ID of the disk.
A disk ID can be found by turning on advanced tooltips and checking the tooltip of the disk.

View File

@@ -0,0 +1,8 @@
= Advanced usage
- xref:commands.adoc[]
- xref:profiling.adoc[]
- xref:resource-packs.adoc[]
- xref:translating-refined-storage.adoc[]
- xref:using-development-builds.adoc[]
- xref:using-the-api.adoc[]

View File

@@ -0,0 +1,33 @@
= Profiling
If you have a performance, it's best to make a `.nps` file that you can send to the developers so that they can investigate further.
== Installing Sampler
Sampler is a mod by Player that generates .nps files.
You can download it from link:https://forum.industrial-craft.net/thread/10820[here].
=== For Minecraft 1.12
link:http://files.player.to/sampler-1.73.jar[http://files.player.to/sampler-1.73.jar]
=== For Minecraft 1.11
link:http://files.player.to/sampler-1.72.1.jar[http://files.player.to/sampler-1.72.1.jar]
=== For Minecraft 1.10
link:http://files.player.to/sampler-1.69.3.jar[http://files.player.to/sampler-1.69.3.jar]
== Running Sampler
Then you can `/sampler start` and `/sampler stop` while it's lagging.
Then a simple `/sampler export [name of exported nps file here]` will write out the .nps file that can be read by the developers in VisualVM.
== Where to run Sampler?
- Is it a performance on the server, like tick lag?
Run Sampler *on the server*, NOT on your client!
- Is it a performance on the client, like FPS lag?
Run Sampler *on the client*, NOT on your server!

View File

@@ -0,0 +1,25 @@
= Resource packs
== Color settings
You can change the text colors that Refined Storage uses in its GUIs by changing the `pack.mcmeta` file.
Example:
[source,json]
----
{
"pack": {
"pack_format": 4,
"description": "An example"
},
"refinedstorage": {
"primary_color": 11184810,
"secondary_color": 11184810
}
}
----
`primary_color` is used for the GUI titles, `secondary_color` is used for all the rest.
The color is an integer representation of an RGBA color.

View File

@@ -0,0 +1,16 @@
= Translating Refined Storage
== How to create a translation
Copy link:https://github.com/refinedmods/refinedstorage/blob/develop/src/main/resources/assets/refinedstorage/lang/en_us.json[en_us.json] from Refined Storage GitHub repository to a text file on your computer and replace the texts with your language.
== How to submit your translation
* If you know Git well enough, you can contribute new language files via a pull request.
* If you do not know how to use Git/GitHub, upload the translation file to Pastebin or Gist and send it to me through a link:https://github.com/refinedmods/refinedstorage/issues[GitHub issue].
== Updating existing translations
You can compare the new and removed translation keys yourself, link:https://github.com/refinedmods/refinedstorage/blob/develop/tools/missing-translation-keys.sh[or use a Bash script] that outputs a diff between `en_US` and the version specified.
You can, of course, always diff manually using another tool, like the `diff` utility or an online diffing tool.

View File

@@ -0,0 +1,15 @@
= Using development builds
You can use development builds straight from GitHub.
Follow the following steps:
- Head to the link:https://github.com/refinedmods/refinedstorage/actions/workflows/build.yml[list of builds].
- Click on the commit that you want a build of.
- Download "Artifacts".
== Disclaimer
- Using development builds is a risk!
- It may contain untested code, bugs and crashes.
- Remember to take backups.

View File

@@ -0,0 +1,85 @@
= Using the API
== For Minecraft 1.18.2 or later
Starting from Minecraft 1.18, you can include the Refined Storage API in your development environment from 2 sources:
=== GitHub packages
Add the following repository to your `build.gradle`:
[source,groovy]
----
repositories {
maven {
url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage")
credentials {
username = "anything"
password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX"
}
}
}
----
The credentials are necessary because as of December 2021, GitHub packages still requires authentication for public packages.
The password used is a personal access token that has read access to the Refined Mods repositories.
It can be reused in other projects.
See:
* https://github.community/t/download-from-github-package-registry-without-authentication/14407/38
* https://github.community/t/download-from-github-package-registry-without-authentication/14407/44
You can find a list of versions on link:https://github.com/orgs/refinedmods/packages[GitHub packages].
=== CreeperHost Maven
Add the following repository to your `build.gradle`:
[source,groovy]
----
repositories {
maven {
url = uri("https://maven.creeperhost.net")
}
}
----
You can find a list of versions on the link:https://maven.creeperhost.net/com/refinedmods/refinedstorage[Maven index].
**Warning:** Due to a bug in the Maven index on CreeperHost, new versions aren't included in the index.
However, you can use them in your Gradle dependency.
For example, version `1.10.2` isn't included in the Maven index, but you can use `1.10.2` in your Gradle dependency when using CreeperHost Maven.
== For older Minecraft versions
Some Refined Storage API versions for older Minecraft versions are available on the link:https://maven.creeperhost.net/com/refinedmods/refinedstorage[CreeperHost Maven].
However, not all of them are available.
If you need a specific version, build Refined Storage yourself and include the API manually.
== Including the API
[source,groovy]
----
implementation fg.deobf("com.refinedmods:refinedstorage:VERSION_HERE") {
transitive false
}
----
== Using the API
Use the `@RSAPIInject` annotation to get access to the API facade.
[source,java]
----
public class MyMod {
@RSAPIInject
public static IRSAPI RSAPI;
}
----
== Javadoc
Updated Javadoc is available after every release link:https://refinedmods.com/javadoc/refinedstorage[here].