Merge remote-tracking branch 'origin/master' into feat/docuasaurus

This commit is contained in:
Chew committed 2023-11-10 19:25:11 -06:00
commit e778fd12e4
5 files changed
+15 -14

No files matched your search

+8 -10
View File
@@ -349,12 +349,11 @@ public class RedstoneDot implements Extension {
BoxComponent selectionBox = new BoxComponent(-5, 0, -5, 10, 1f, 10);
CustomBlockComponents components = CustomBlockComponents.builder()
.collisionBox(BoxComponent.EMPTY_BOX)
.collisionBox(BoxComponent.emptyBox())
.selectionBox(selectionBox)
.geometry(new GeometryComponentBuilder()
.identifier("geometry.amberichu.redstone_dot")
.build())
.destroyTime(0f)
.lightEmission(0)
.lightDampening(0)
.friction(1f)
@@ -362,7 +361,7 @@ public class RedstoneDot implements Extension {
CustomBlockData redstoneDot = CustomBlockData.builder()
.name("redstone_dot")
.intProperty(POWER_PROPERTY, IntStream.range(0, 16).boxed().toList())
.intProperty("POWER_PROPERTY", IntStream.range(0, 16).boxed().toList())
.components(components)
.permutations(createRedstoneDotPermutations())
.build();
@@ -410,12 +409,11 @@ public class RedstoneDot implements Extension {
BoxComponent selectionBox = new BoxComponent(-5, 0, -5, 10, 1f, 10);
CustomBlockComponents components = CustomBlockComponents.builder()
.collisionBox(BoxComponent.EMPTY_BOX)
.collisionBox(BoxComponent.emptyBox())
.selectionBox(selectionBox)
.geometry(new GeometryComponentBuilder()
.identifier("geometry.amberichu.redstone_dot")
.build())
.destroyTime(0f)
.lightEmission(0)
.lightDampening(0)
.friction(1f)
@@ -423,18 +421,18 @@ public class RedstoneDot implements Extension {
CustomBlockData redstoneDot = CustomBlockData.builder()
.name("redstone_dot")
.intProperty(POWER_PROPERTY, IntStream.range(0, 16).boxed().toList())
.intProperty("POWER_PROPERTY", IntStream.range(0, 16).boxed().toList())
.components(components)
.permutations(createRedstoneDotPermutations())
.build();
event.registerCustomBlock(redstoneDot);
event.registerBlockItemOverride("minecraft:redstone_wire", redstoneDot);
event.register(redstoneDot);
event.registerItemOverride("minecraft:redstone_wire", redstoneDot);
for (int power = 0; power < 16; power++) {
String javaIdentifier = String.format("minecraft:redstone_wire[east=none,north=none,power=%d,south=none,west=none]", power);
event.registerBlockStateOverride(javaIdentifier, redstoneDot.blockStateBuilder()
.intProperty(POWER_PROPERTY, power)
event.registerOverride(javaIdentifier, redstoneDot.blockStateBuilder()
.intProperty("POWER_PROPERTY", power)
.build());
}
}
+1
View File
@@ -42,6 +42,7 @@ To setup custom items in geyser, you have to choose how you are going to registe
* `allow_offhand` (boolean) default: false
* `texture_size` (int) default: 16
* `render_offsets` (object) It works as follows. Note that all the sub-objects are optional, except x, y and z. You can have for example only a main hand with a position, and noting else. default: no render offset
* `tags` (array) default: no tags. Allows defining tags that can be used in Molang queries. Example value: ["test:tag_one", "test:tag_two"].
```json
"render_offsets": {
"main_hand": {
+4 -2
View File
@@ -6,7 +6,7 @@ title: Custom skulls with Geyser
Unlike Java Edition, Bedrock does not have native support for custom skull items. As a result, any method to display custom skulls with Geyser is, to some extent, a workaround. Geyser has long supported in-world custom skulls via the spawning of player entities. This, however, does not allow for the use of custom skulls in inventories, nor does it allow them to be worn by entities. To resolve this, Geyser now allows for the pre-registration of custom skulls via a config file. Geyser will then use this config file to generate a custom resource pack on start that contains the geometry and textures for the pre-registered custom skulls. To the client, these skulls are blocks. Therefore, they can be held in player inventories. In additional, attachables are defined for each skull block so that it is displayed correctly when worn and held by entities.
To setup custom skulls in geyser, you have to choose how you are going to register your blocks. The easiest is [using custom-skulls.yml](#custom-skullsyml) but you can also [use a Geyser extension](#geyser-extensions).
To setup custom skulls in geyser, you have to choose how you are going to register your blocks. The easiest is [using custom-skulls.yml](#custom-skullsyml), but you can also [use a Geyser extension](#geyser-extensions).
## Enabling custom skulls
@@ -57,6 +57,8 @@ skin-hashes:
- a90790c57e181ed13aded14c47ee2f7c8de3533e017ba957af7bdf9df1bde94f
```
To add a skull, you need to choose any of the four methods, and add a new entry. The following sections will explain each method:
### Player usernames
Skulls can be registered in this section via player usernames. These will be updated when Geyser starts. As a result, they may change if the player's username or skin changes.
@@ -128,7 +130,7 @@ public class RegisterCustomSkull implements Extension {
@Subscribe
public void onDefineCustomSkulls(GeyserDefineCustomSkullsEvent event) {
String profile = "ewogICJ0aW1lc3RhbXAiIDogMTY1NzMyMjIzOTgzMywKICAicHJvZmlsZUlkIiA6ICJjZGRiZTUyMGQwNDM0YThiYTFjYzlmYzkyZmRlMmJjZiIsCiAgInByb2ZpbGVOYW1lIiA6ICJkYXZjaG9vIiwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2E5MDc5MGM1N2UxODFlZDEzYWRlZDE0YzQ3ZWUyZjdjOGRlMzUzM2UwMTdiYTk1N2FmN2JkZjlkZjFiZGU5NGYiLAogICAgICAibWV0YWRhdGEiIDogewogICAgICAgICJtb2RlbCIgOiAic2xpbSIKICAgICAgfQogICAgfQogIH0KfQ"
event.registerCustomSkull(profile, SkullTextureType.PROFILE);
event.register(profile, SkullTextureType.PROFILE);
}
}
```
+1 -1
View File
@@ -104,6 +104,6 @@ Creator: [Vincss](https://github.com/vincss)
## TydiumCraft Skin API
An API makes it easier for your Bedrock skin to be rendered and outputted!
* [Website](https://tydiumcraft.net/)
* [Website](https://tydiumcraft.net/api)
Creators: [Tydium](https://github.com/Tydium)