Feature: Custom item v2 docs (#115)
* Start documenting custom item mappings: V2 * Document json definition types * Continue documenting Bedrock item options * Start on component docs * Document removing components, start documenting predicates * Sync all example types * Rough draft should now be sort of there * Resolve suggestions * Split v1 and v2 docs * Document & add examples to range predicates * Component examples * Minor fixes * Remove warning on Hydraulic * oops * more tiny changes * Add javadoc links * Update the build number mentioned in docs --------- Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk> Co-authored-by: Aurora <auroranova8756@gmail.com>
This commit is contained in:
3 files changed
+1227
-44
No files matched your search
@@ -132,7 +132,6 @@ const DownloadPage: React.FC = () => (
|
||||
title='Rainbow'
|
||||
subtitle={<Translate id='pages.download.description.rainbow'>A Minecraft mod to generate Geyser item mappings and bedrock resourcepacks for use with Geyser's custom item API (v2). </Translate>}
|
||||
id='rainbow'
|
||||
tags={['Beta']}
|
||||
inner={
|
||||
<ProjectDownload
|
||||
projectId="rainbow"
|
||||
@@ -158,18 +157,6 @@ const DownloadPage: React.FC = () => (
|
||||
neoforge: <PlatformIcon img={NeoForgeIcon} text="NeoForge" />,
|
||||
}}
|
||||
gridColumns={1}
|
||||
warning={ // Remove when Item API V2 is merged!
|
||||
<>
|
||||
<Translate id='pages.download.warning.hydraulic'>
|
||||
A preview version of Geyser is required to run Hydraulic, you can download the Item API V2 preview below:
|
||||
</Translate>
|
||||
<p>
|
||||
<a href="https://download.geysermc.org/v2/projects/geyserpreview/versions/pr.5189/builds/latest/downloads/fabric">Fabric</a>
|
||||
<span>, </span>
|
||||
<a href="https://download.geysermc.org/v2/projects/geyserpreview/versions/pr.5189/builds/latest/downloads/neoforge">NeoForge</a>
|
||||
</p>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
---
|
||||
title: Custom Items
|
||||
description: Geyser allows custom Bedrock items to be added for an equivalency to Vanilla Java item predicates or modded items.
|
||||
title: Custom Items (v1)
|
||||
description: Legacy documentation for the first version of the custom item API
|
||||
---
|
||||
|
||||
To setup custom items in geyser, you have to choose how you are going to register your items. The easiest is [using a json file](#json-mappings) but you can also [use a Geyser extension](#geyser-extensions).
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
## JSON mappings {#json-mappings}
|
||||
### Format version 1 (legacy)
|
||||
|
||||
:::warning
|
||||
`format_version: 1` is no longer receiving updates. New features will only be added to format version 2.
|
||||
:::
|
||||
|
||||
## JSON mappings (v1)
|
||||
|
||||
1. Start your server, and you should have a folder called `custom_mappings` that is created. That would be with the folder of `Geyser.jar` file for standalone and inside your Geyser data folder for a plugin.
|
||||
2. Create a `.json` file, it can be any name you like and as many files as you like. You don't need to make one file per item. Here is the structure of the file:
|
||||
@@ -74,9 +81,9 @@ To setup custom items in geyser, you have to choose how you are going to registe
|
||||
}
|
||||
```
|
||||
|
||||
## Geyser extensions {#geyser-extensions}
|
||||
## Geyser extensions (v1)
|
||||
|
||||
### Extending a vanilla item {#extending-a-vanilla-item}
|
||||
### Extending a vanilla item (v1)
|
||||
|
||||
1. Create your custom item options or registrations, to which you can add any of the following. They can be stacked, so that all of the specified types need to match, but you **do NOT need all of them.**
|
||||
```java
|
||||
@@ -109,7 +116,7 @@ public void onGeyserPreInitializeEvent(GeyserDefineCustomItemsEvent event) {
|
||||
}
|
||||
```
|
||||
|
||||
### Non vanilla (modded) items with Geyser extensions (for example to use with Fabric) {#non-vanilla-modded-items-with-geyser-extensions-for-example-to-use-with-fabric}
|
||||
### Non vanilla (modded) items with Geyser extensions (for example to use with Fabric) (v1)
|
||||
|
||||
1. Create your item data:
|
||||
```java
|
||||
@@ -127,28 +134,4 @@ public void onGeyserDefineCustomItemsEvent(GeyserDefineCustomItemsEvent event) {
|
||||
}
|
||||
```
|
||||
|
||||
## Resource pack {#resource-pack}
|
||||
|
||||
1. Setup a basic bedrock resource pack. If you need help, you can find it [here](https://wiki.bedrock.dev/guide/project-setup.html#rp-manifest).
|
||||
2. Make a `textures` folder.
|
||||
3. Create `item_texture.json` in the `textures`, and put this in it:
|
||||
|
||||
```json
|
||||
{
|
||||
"resource_pack_name": "MY_PACK_NAME_HERE",
|
||||
"texture_name": "atlas.items",
|
||||
"texture_data": {
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
4. Inside texture data, you can add your items. The texture name and path must match the name that you set in your mappings.
|
||||
|
||||
```json
|
||||
"my_item": {
|
||||
"textures": [
|
||||
"textures/items/my_item"
|
||||
]
|
||||
}
|
||||
```
|
||||
5. Then you need to put your textures inside the `textures/items`. Make sure to have it match the texture path that you specified in `item_texture.json`!
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user