mirror of
https://github.com/GeyserMC/GeyserOptionalPack.git
synced 2025-12-19 14:59:14 +00:00
Add Killer Bunny (#7)
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,2 +1,7 @@
|
|||||||
.idea/
|
.idea/
|
||||||
GeyserOptionalPack.zip
|
GeyserOptionalPack.zip
|
||||||
|
textures/entity/iron_golem/iron_golem_crackiness_high.png
|
||||||
|
textures/entity/iron_golem/iron_golem_crackiness_low.png
|
||||||
|
textures/entity/iron_golem/iron_golem_crackiness_medium.png
|
||||||
|
textures/entity/arrow/spectral_arrow.png
|
||||||
|
textures/entity/rabbit/caerbannog.png
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar
|
wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar
|
||||||
unzip client.jar -d extracted/
|
unzip client.jar -d extracted/
|
||||||
IFS=' '
|
IFS=' '
|
||||||
while read -r p; do
|
while read -r p || [ -n "$p" ]; do
|
||||||
read -rafilesToCopy<<< "$p"
|
read -rafilesToCopy<<< "$p"
|
||||||
echo "extracted/${filesToCopy[0]} ${filesToCopy[1]}"
|
echo "extracted/${filesToCopy[0]} ${filesToCopy[1]}"
|
||||||
mkdir -p "${filesToCopy[1]}"
|
mkdir -p "${filesToCopy[1]}"
|
||||||
cp "extracted/${filesToCopy[0]}" "${filesToCopy[1]}"
|
cp "extracted/${filesToCopy[0]}" "${filesToCopy[1]}"
|
||||||
done <required_files.txt
|
done <required_files.txt
|
||||||
# Make sure the above file ends with a newline!!
|
|
||||||
rm client.jar
|
rm client.jar
|
||||||
rm -r extracted
|
rm -r extracted
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
|
<!--ts-->
|
||||||
|
* [Introduction](#Introduction)
|
||||||
|
* [Armor stands](#Armor-stands)
|
||||||
|
* [Part visibility and rotation encoding](#Part-visibility-and-rotation-encoding)
|
||||||
|
* [Geometry and attachables](#Geometry-and-attachables)
|
||||||
|
* [Iron golems](#Iron-golems)
|
||||||
|
* [Cracking](#Cracking)
|
||||||
|
* [Materials](#Materials)
|
||||||
|
* [Render controller](Render-controllers)
|
||||||
|
* [Shulkers](#Shulkers)
|
||||||
|
* [Spectral arrow entities](#Spectral-arrow-entities)
|
||||||
|
* [Killer bunnies](#Killer-bunnies)
|
||||||
|
<!--te-->
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
Entity data and entity flags (known as queries in Molang) are pieces of metadata that store various pieces of information about an entity on the Bedrock Edition of Minecraft. You have a query for an entity's health, for example (a number query, or an entity data), and you have a query for is an entity is angry (an entity flag, which is either 1.0 or 0.0 in Molang). Not all entities use every query, but every entity has access to most queries, though Bedrock by default ignores these. We use this to our advantage in this resource pack.
|
Entity data and entity flags (known as queries in Molang) are pieces of metadata that store various pieces of information about an entity on the Bedrock Edition of Minecraft. You have a query for an entity's health, for example (a number query, or an entity data), and you have a query for is an entity is angry (an entity flag, which is either 1.0 or 0.0 in Molang). Not all entities use every query, but every entity has access to most queries, though Bedrock by default ignores these. We use this to our advantage in this resource pack.
|
||||||
@@ -85,8 +99,10 @@ Unfortunately, the "USE_COLOR_MASK" and "MULTIPLICATIVE_TINT_COLOR" definitions
|
|||||||
|
|
||||||
In order to utilize multiple textures, a render controller containing a texture array was defined. A position in the texture array is then determined by the following Molang expression:
|
In order to utilize multiple textures, a render controller containing a texture array was defined. A position in the texture array is then determined by the following Molang expression:
|
||||||
|
|
||||||
```c
|
```json
|
||||||
(q.health > 99 || !q.is_bribed) ? 3 : math.floor(q.health / 25)
|
"textures": [
|
||||||
|
"(q.health > 99 || !q.is_bribed) ? 3 : math.floor(q.health / 25)"
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
The trinary operator ensures that even if `max_health`, defined at 100, is overflowed, the expression will never produce a value outside the range of 0-3. As all data is derived resource pack side, this addition requires no modification by the server (though `query.is_bribed` enables the feature). The textures required for this to display can be retrieved during the build process.
|
The trinary operator ensures that even if `max_health`, defined at 100, is overflowed, the expression will never produce a value outside the range of 0-3. As all data is derived resource pack side, this addition requires no modification by the server (though `query.is_bribed` enables the feature). The textures required for this to display can be retrieved during the build process.
|
||||||
@@ -116,3 +132,15 @@ The glowing effect and the spectral arrow item and entities do not exist on Bedr
|
|||||||
```
|
```
|
||||||
|
|
||||||
The texture required for this to be displayed can be retrieved during the build process.
|
The texture required for this to be displayed can be retrieved during the build process.
|
||||||
|
|
||||||
|
### Killer bunnies
|
||||||
|
|
||||||
|
The killer bunny does not exist in Bedrock Edition. Nonetheless, this is primarily a simple texture swap. The "caerbannog" texture is the name of the texture in Java Edition, so that name has been used for consistency. This texture is added to the pack and the rabbit entity definition file. In order to construct the Molang query, the "Toast" rabbit must also be considered. In the event a rabbit is named "Toast", the texture is always overridden as the texture "Toast", including in the case of the killer bunny. Therefore, the query to select the texture is constructed as follows, with `q.is_bribed` being determined by Geyser:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"textures": [
|
||||||
|
"q.get_name == 'Toast' ? Texture.toast : (q.is_bribed ? Texture.caerbannog : Array.skins[q.variant])"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
The texture required for this to be displayed can be retrieved during the build process.
|
||||||
|
|||||||
37
entity/rabbit.entity.json
Executable file
37
entity/rabbit.entity.json
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.8.0",
|
||||||
|
"minecraft:client_entity": {
|
||||||
|
"description": {
|
||||||
|
"identifier": "minecraft:rabbit",
|
||||||
|
"min_engine_version": "1.8.0",
|
||||||
|
"materials": { "default": "rabbit" },
|
||||||
|
"textures": {
|
||||||
|
"brown": "textures/entity/rabbit/brown",
|
||||||
|
"white": "textures/entity/rabbit/white",
|
||||||
|
"black": "textures/entity/rabbit/blackrabbit",
|
||||||
|
"white_splotched": "textures/entity/rabbit/white_splotched",
|
||||||
|
"gold": "textures/entity/rabbit/gold",
|
||||||
|
"salt": "textures/entity/rabbit/salt",
|
||||||
|
"toast": "textures/entity/rabbit/toast",
|
||||||
|
"caerbannog": "textures/entity/rabbit/caerbannog"
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"default": "geometry.rabbit.v1.8"
|
||||||
|
},
|
||||||
|
"animations": {
|
||||||
|
"move": "animation.rabbit.move",
|
||||||
|
"baby_transform": "animation.rabbit.baby_transform",
|
||||||
|
"look_at_target": "animation.common.look_at_target"
|
||||||
|
},
|
||||||
|
"animation_controllers": [
|
||||||
|
{ "general": "controller.animation.rabbit.general" },
|
||||||
|
{ "baby": "controller.animation.rabbit.baby" }
|
||||||
|
],
|
||||||
|
"render_controllers": [ "controller.render.rabbit" ],
|
||||||
|
"spawn_egg": {
|
||||||
|
"texture": "spawn_egg",
|
||||||
|
"texture_index": 24
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "Geyser Vanilla Assets",
|
"description": "Geyser Vanilla Assets",
|
||||||
"name": "Geyser Vanilla Assets",
|
"name": "Geyser Vanilla Assets",
|
||||||
"uuid": "5d8f8e98-7a2a-11eb-9439-0242ac130002",
|
"uuid": "5d8f8e98-7a2a-11eb-9439-0242ac130002",
|
||||||
"version": [1, 0, 72],
|
"version": [1, 0, 73],
|
||||||
"min_engine_version": [ 1, 16, 0 ]
|
"min_engine_version": [ 1, 16, 0 ]
|
||||||
},
|
},
|
||||||
"modules": [
|
"modules": [
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"description": "Geyser Vanilla Assets",
|
"description": "Geyser Vanilla Assets",
|
||||||
"type": "resources",
|
"type": "resources",
|
||||||
"uuid": "72e9b0ca-7a2a-11eb-9439-0242ac130002",
|
"uuid": "72e9b0ca-7a2a-11eb-9439-0242ac130002",
|
||||||
"version": [1, 0, 72]
|
"version": [1, 0, 73]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
28
render_controllers/rabbit.render_controllers.json
Executable file
28
render_controllers/rabbit.render_controllers.json
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.8.0",
|
||||||
|
"render_controllers": {
|
||||||
|
"controller.render.rabbit": {
|
||||||
|
"arrays": {
|
||||||
|
"textures": {
|
||||||
|
"Array.skins": [
|
||||||
|
"Texture.brown",
|
||||||
|
"Texture.white",
|
||||||
|
"Texture.black",
|
||||||
|
"Texture.white_splotched",
|
||||||
|
"Texture.gold",
|
||||||
|
"Texture.salt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"geometry": "Geometry.default",
|
||||||
|
"materials": [
|
||||||
|
{
|
||||||
|
"*": "Material.default"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"textures": [
|
||||||
|
"q.get_name == 'Toast' ? Texture.toast : (q.is_bribed ? Texture.caerbannog : Array.skins[q.variant])"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,3 +2,4 @@ assets/minecraft/textures/entity/iron_golem/iron_golem_crackiness_high.png textu
|
|||||||
assets/minecraft/textures/entity/iron_golem/iron_golem_crackiness_low.png textures/entity/iron_golem/
|
assets/minecraft/textures/entity/iron_golem/iron_golem_crackiness_low.png textures/entity/iron_golem/
|
||||||
assets/minecraft/textures/entity/iron_golem/iron_golem_crackiness_medium.png textures/entity/iron_golem/
|
assets/minecraft/textures/entity/iron_golem/iron_golem_crackiness_medium.png textures/entity/iron_golem/
|
||||||
assets/minecraft/textures/entity/projectiles/spectral_arrow.png textures/entity/arrow/
|
assets/minecraft/textures/entity/projectiles/spectral_arrow.png textures/entity/arrow/
|
||||||
|
assets/minecraft/textures/entity/rabbit/caerbannog.png textures/entity/rabbit/
|
||||||
Reference in New Issue
Block a user