1
0
mirror of https://github.com/GeyserMC/GeyserOptionalPack.git synced 2025-12-19 14:59:14 +00:00

Revert Iron Golem Material to Support Render Dragon (#6)

* Delete materials for now

We may try to utilize these again if Render Dragon ever allows for community modification of shaders and materials again (though this seems unlikely).

* Bump version

* Revert entity to use tropicalfish again since Geyser will now send COLOR_2

* Update documentation to reflect that we use the tropicalfish maertial again for the iron golem
This commit is contained in:
Kas-tle
2021-03-05 21:41:15 -08:00
committed by GitHub
parent 395f6092d1
commit 19d9dffe1b
4 changed files with 4 additions and 28 deletions

View File

@@ -79,7 +79,7 @@ Looking at the fully defined entity_multitexture_multiplicative_blend material,
}
```
Unfortunately, the "USE_COLOR_MASK" and "MULTIPLICATIVE_TINT_COLOR" definitions rely on certain entity data being sent. Geyser does not send all of this data for every entity, as under vanilla conditions, it does not server a purpose. Though not confirmed, "COLOR" and "COLOR_2" are the likely culprits. For more information, refer to [EntityDaya.java](https://github.com/CloudburstMC/Protocol/blob/develop/bedrock/bedrock-common/src/main/java/com/nukkitx/protocol/bedrock/data/entity/EntityData.java) in the [CloudburstMC/Protcol](https://github.com/CloudburstMC/Protocol) repository. The lack of these data likely results in a null value being interpreted by the material, leading to a rendering with entirely black pixels. Luckily, the case of the iron golem does not require color tinting. Therefore, a new materical can be defined that lacks "USE_COLOR_MASK" and "MULTIPLICATIVE_TINT_COLOR". This was defined as "custom_iron_golem". This was parented by a newly defined material, "entity_multitexture_multiplicative_custom_overlay", which utilized the base "entity" material.
Unfortunately, the "USE_COLOR_MASK" and "MULTIPLICATIVE_TINT_COLOR" definitions rely on certain entity data being sent. Geyser does not send all of this data for every entity, as under vanilla conditions, it does not server a purpose. For more information, refer to [EntityDaya.java](https://github.com/CloudburstMC/Protocol/blob/develop/bedrock/bedrock-common/src/main/java/com/nukkitx/protocol/bedrock/data/entity/EntityData.java) in the [CloudburstMC/Protcol](https://github.com/CloudburstMC/Protocol) repository. The lack of this data likely results in a null value being interpreted by the material, leading to a rendering with entirely black pixels. Originally, custom materials were defined that remomved the "USE_COLOR_MASK" and "MULTIPLICATIVE_TINT_COLOR" parameters. However, custom materials have been largely broken on Windows 10 devices by the introduction of Render Dragon, which seems to completely remove the ability to define or edit materials in a data-driven fashion. Therefore, Geyser was modified to send the entity component "COLOR_2". This allows for the use of the tropical fish material over Geyser. Due to Render Dragon, this pack will not be able to move ahead with features that require custom materials unless Render Dragon is changed to allow for modifcation of shaders and material assets.
#### Render controller

View File

@@ -3,7 +3,7 @@
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:iron_golem",
"materials": { "default": "custom_iron_golem" },
"materials": { "default": "tropicalfish" },
"textures": {
"crackiness_none": "textures/entity/iron_golem/iron_golem_crackiness_none",
"crackiness_low": "textures/entity/iron_golem/iron_golem_crackiness_low",

View File

@@ -4,7 +4,7 @@
"description": "Geyser Vanilla Assets",
"name": "Geyser Vanilla Assets",
"uuid": "5d8f8e98-7a2a-11eb-9439-0242ac130002",
"version": [1, 0, 71],
"version": [1, 0, 72],
"min_engine_version": [ 1, 16, 0 ]
},
"modules": [
@@ -12,7 +12,7 @@
"description": "Geyser Vanilla Assets",
"type": "resources",
"uuid": "72e9b0ca-7a2a-11eb-9439-0242ac130002",
"version": [1, 0, 71]
"version": [1, 0, 72]
}
]
}

View File

@@ -1,24 +0,0 @@
{
"materials": {
"version": "1.0.0",
"entity_multitexture_multiplicative_custom_overlay:entity": {
"+states": [ "DisableCulling" ],
"+samplerStates": [
{
"samplerIndex": 0,
"textureWrap": "Clamp"
},
{
"samplerIndex": 1,
"textureWrap": "Clamp"
}
],
"+defines": [
"ALPHA_TEST",
"USE_OVERLAY",
"MULTIPLICATIVE_TINT"
]
},
"custom_iron_golem:entity_multitexture_multiplicative_custom_overlay": {}
}
}