Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/particles #9

Merged
merged 29 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5a8e235
Add new textures to .gitignore
Kas-tle Mar 8, 2021
5017842
Use java-style sneeze animation for panda
Kas-tle Mar 8, 2021
dfb328e
Add damage indicator particles
Kas-tle Mar 8, 2021
b682735
Add enchanted hit particles
Kas-tle Mar 8, 2021
2b5584c
Add sneeze particle
Kas-tle Mar 8, 2021
a914edd
Add sweep attack particle
Kas-tle Mar 8, 2021
4ae3e5b
Update required files with new textures
Kas-tle Mar 8, 2021
7446452
Create sprite for sweep attack particle
Kas-tle Mar 8, 2021
ae74057
Add newly defined textures to .gitignore
Kas-tle Mar 9, 2021
7adc755
Rename sweep texture to sweep_attack for consistency with particle name
Kas-tle Mar 9, 2021
6f2caf2
Add geyseropt:ash (minecraft:ash) particle
Kas-tle Mar 9, 2021
e374ab0
Update texture reference
Kas-tle Mar 9, 2021
a19b9b6
Add geyseropt:barrier (minecraft:barrier) particle
Kas-tle Mar 9, 2021
314cd6e
Add geyseropt:bubble (minecraft:bubble) particle
Kas-tle Mar 9, 2021
1bcd62f
Add geyseropt:bubble_pop (minecraft:bubble_pop) particle
Kas-tle Mar 9, 2021
aeca83a
Add geyseropt:crimson_spore (minecraft:crimson_spore) particle
Kas-tle Mar 9, 2021
89ab4c3
Add geyseropt:dolphin (minecraft:dolphin) particle
Kas-tle Mar 9, 2021
f45844c
Add geyseropt:flash (minecraft:flash) particle
Kas-tle Mar 9, 2021
35df33e
Add geyseropt:landing_honey (minecraft:landing_honey) particle
Kas-tle Mar 9, 2021
196f663
Add geyseropt:landing_lava (minecraft:landing_lava) particle
Kas-tle Mar 9, 2021
c2ec655
Add geyseropt:landing_obsidian_tear (minecraft:landing_obsidian_tear)…
Kas-tle Mar 9, 2021
b2b23f4
Add geyseropt:nautilus (minecraft:nautilus) particle
Kas-tle Mar 9, 2021
739b614
Add geyseropt:underwater (minecraft:underwater) particle
Kas-tle Mar 9, 2021
4c4db27
Add geyseropt:warped_spore (minecraft:warped_spore) particle
Kas-tle Mar 9, 2021
071e5cf
Add geyseropt:white_ash (minecraft:white_ash) particle
Kas-tle Mar 9, 2021
311e4bd
Add associated files for new particles to required_files.txt
Kas-tle Mar 9, 2021
a6ac9a5
Merge remote-tracking branch 'upstream/master' into feature/particles
Kas-tle Apr 2, 2021
7f9e3ab
Fixes to damage_indicator
Kas-tle Apr 3, 2021
850736f
Requested Fixes
Kas-tle Apr 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ 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
textures/entity/rabbit/caerbannog.png
textures/particle/damage.png
textures/particle/flash.png
textures/particle/nautilus.png
textures/particle/bubble_pop.png
textures/particle/sweep_attack.png
17 changes: 17 additions & 0 deletions animation_controllers/panda.animation_controllers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"format_version" : "1.10.0",
"animation_controllers" : {
"controller.animation.panda.sneezing" : {
"initial_state" : "baby",
"states" : {
"baby" : {
"animations" : [
{
"sneezing": false
}
]
}
}
}
}
}
30 changes: 30 additions & 0 deletions animations/panda.animation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"format_version": "1.8.0",
"animations": {
"animation.panda.sneezing": {
"loop": true,
"animation_length": 2,
"bones": {
"head": {
"rotation": {
"0.0": [0, 0, 0],
"0.16": [-7.5, 0, 0],
"0.44": [-22.5, 0, 0],
"0.52": [-22.5, 0, 0],
"0.6": [15, 0, 0],
"0.64": [0, 0, 0]
}
}
},
"particle_effects": {
"0.52": {
"effect": "sneeze",
"locator": "particle"
}
},
"timeline": {
"1.96": "v.geyser_sneezing = 0;"
}
}
}
}
2 changes: 2 additions & 0 deletions copy_java_files_to_pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ while read -r p || [ -n "$p" ]; do
mkdir -p "${filesToCopy[1]}"
cp "extracted/${filesToCopy[0]}" "${filesToCopy[1]}"
done <required_files.txt
convert -append extracted/assets/minecraft/textures/particle/sweep_*.png -define png:format=png8 textures/particle/sweep_attack.png
convert -append extracted/assets/minecraft/textures/particle/bubble_pop_*.png -define png:format=png8 textures/particle/bubble_pop.png
rm client.jar
rm -r extracted
53 changes: 53 additions & 0 deletions entity/panda.entity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:panda",
"materials": { "default": "panda" },
"textures": {
"default": "textures/entity/panda/panda",
"lazy": "textures/entity/panda/panda_lazy",
"worried": "textures/entity/panda/panda_worried",
"playful": "textures/entity/panda/panda_playful",
"brown": "textures/entity/panda/panda_brown",
"weak": "textures/entity/panda/panda_sneezy",
"aggressive": "textures/entity/panda/panda_aggressive"
},
"geometry": {
"default": "geometry.panda"
},
"particle_effects": {
"sneeze": "geyseropt:sneeze"
},
"animations": {
"unhappy": "animation.panda.unhappy",
"geyser_sneezing": "animation.panda.sneezing",
"walk": "animation.quadruped.walk",
"look_at_target": "animation.common.look_at_target",
"baby_transform": "animation.panda.baby_transform",
"sitting": "animation.panda.sitting",
"rolling": "animation.panda.rolling",
"lying": "animation.panda.lying",
"controller.move": "controller.animation.panda.move",
"controller.unhappy": "controller.animation.panda.unhappy",
"controller.baby": "controller.animation.panda.baby"
},
"scripts": {
"pre_animation": [
"v.geyser_sneezing = q.sneeze_counter > 0 ? 1 : (v.geyser_sneezing ?? 0);"
],
"animate": [
"controller.move",
"controller.unhappy",
"controller.baby",
{"geyser_sneezing": "v.geyser_sneezing"}
]
},
"render_controllers": [ "controller.render.panda" ],
"spawn_egg": {
"texture": "spawn_egg",
"texture_index": 54
}
}
}
}
66 changes: 66 additions & 0 deletions models/entity/panda.geo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"format_version": "1.8.0",
"geometry.panda": {
"texturewidth": 64,
"textureheight": 64,
"visible_bounds_width": 3,
"visible_bounds_height": 3.5,
"visible_bounds_offset": [0, 1.25, 0],
"bones": [
{
"name": "body",
"pivot": [0, 14, 0],
"cubes": [
{"origin": [-9.5, 1, -6.5], "size": [19, 26, 13], "uv": [0, 25]}
]
},
{
"name": "head",
"parent": "body",
"pivot": [0, 12.5, -17],
"cubes": [
{"origin": [-6.5, 7.5, -21], "size": [13, 10, 9], "uv": [0, 6]},
{"origin": [-3.5, 7.5, -23], "size": [7, 5, 2], "uv": [45, 16]},
{"origin": [-8.5, 16.5, -18], "size": [5, 4, 1], "uv": [52, 25]},
{"origin": [3.5, 16.5, -18], "size": [5, 4, 1], "uv": [52, 25]}
],
"locators": {
"lead": [0, 14, -16],
"particle": [0, 9.5, -24]
}
},
{
"name": "leg0",
"parent": "body",
"pivot": [-5.5, 9, 9],
"cubes": [
{"origin": [-8.5, 0, 6], "size": [6, 9, 6], "uv": [40, 0]}
]
},
{
"name": "leg1",
"parent": "body",
"pivot": [5.5, 9, 9],
"cubes": [
{"origin": [2.5, 0, 6], "size": [6, 9, 6], "uv": [40, 0]}
]
},
{
"name": "leg2",
"parent": "body",
"pivot": [-5.5, 9, -9],
"cubes": [
{"origin": [-8.5, 0, -12], "size": [6, 9, 6], "uv": [40, 0]}
]
},
{
"name": "leg3",
"parent": "body",
"pivot": [5.5, 9, -9],
"cubes": [
{"origin": [2.5, 0, -12], "size": [6, 9, 6], "uv": [40, 0]}
]
}
]
}
}
52 changes: 52 additions & 0 deletions particles/ash.particle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"format_version": "1.10.0",
"particle_effect": {
"description": {
"identifier": "geyseropt:ash",
"basic_render_parameters": {
"material": "particles_alpha",
"texture": "textures/particle/particles"
}
},
"components": {
"minecraft:emitter_initialization": {
"creation_expression": "v.random = math.random(0, 1);"
},
"minecraft:emitter_rate_instant": {
"num_particles": 1
},
"minecraft:emitter_lifetime_once": {
"active_time": 0.75
},
"minecraft:emitter_shape_point": {},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 0.75
},
"minecraft:particle_initial_speed": 0.2,
"minecraft:particle_motion_dynamic": {
"linear_acceleration": [0, -3, 0],
"linear_drag_coefficient": 2
},
"minecraft:particle_appearance_billboard": {
"size": [0.02, 0.02],
"facing_camera_mode": "rotate_xyz",
"uv": {
"texture_width": 128,
"texture_height": 128,
"uv": [4, 4],
"uv_size": [1, 1]
}
},
"minecraft:particle_appearance_lighting": {},
"minecraft:particle_appearance_tinting": {
"color": {
"interpolant": "v.random",
"gradient": {
"0.0": "#FFA5A5A5",
"1.0": "#ff000000"
}
}
}
}
}
}
36 changes: 36 additions & 0 deletions particles/barrier.particle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"format_version": "1.10.0",
"particle_effect": {
"description": {
"identifier": "geyseropt:barrier",
"basic_render_parameters": {
"material": "particles_alpha",
"texture": "textures/blocks/barrier"
}
},
"components": {
"minecraft:emitter_rate_instant": {
"num_particles": 1
},
"minecraft:emitter_lifetime_once": {
"active_time": 4.5
},
"minecraft:emitter_shape_point": {},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 4.5
},
"minecraft:particle_initial_speed": 0,
"minecraft:particle_motion_dynamic": {},
"minecraft:particle_appearance_billboard": {
"size": [0.5, 0.5],
"facing_camera_mode": "rotate_xyz",
"uv": {
"texture_width": 16,
"texture_height": 16,
"uv": [0, 0],
"uv_size": [16, 16]
}
}
}
}
}
43 changes: 43 additions & 0 deletions particles/basic_bubble_manual.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"format_version": "1.10.0",
"particle_effect": {
"description": {
"identifier": "minecraft:basic_bubble_particle_manual",
"basic_render_parameters": {
"material": "particles_alpha",
"texture": "textures/particle/particles"
}
},
"components": {
"minecraft:emitter_rate_manual": {
"max_particles": 100
},
"minecraft:emitter_lifetime_expression": {
"activation_expression": 1,
"expiration_expression": 0
},
"minecraft:emitter_shape_point": {
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": "2 / ((Math.Random(0.0, 1.0) * 0.8 + 0.2) * 5)"
},
"minecraft:particle_expire_if_not_in_blocks": [],
"minecraft:particle_motion_dynamic": {
"linear_acceleration": [ 0, 0.8, 0 ],
"linear_drag_coefficient": 5.25
},
"minecraft:particle_appearance_billboard": {
"size": [ "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)", "(0.05*variable.particle_random_1+0.1)*(variable.particle_random_2*0.9+0.2)" ],
"facing_camera_mode": "lookat_xyz",
"uv": {
"texture_width": 128,
"texture_height": 128,
"uv": [ 0, 16 ],
"uv_size": [ 8, 8 ]
}
},
"minecraft:particle_appearance_lighting": {}
}
}
}

43 changes: 43 additions & 0 deletions particles/bubble.particle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"format_version": "1.10.0",
"particle_effect": {
"description": {
"identifier": "geyseropt:bubble",
"basic_render_parameters": {
"material": "particles_alpha",
"texture": "textures/particle/particles"
}
},
"components": {
"minecraft:emitter_initialization": {
"creation_expression": "v.size = math.random(0.05, 0.15);"
},
"minecraft:emitter_rate_instant": {
"num_particles": 1
},
"minecraft:emitter_lifetime_once": {
"active_time": 0.25
},
"minecraft:emitter_shape_point": {},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 0.25
},
"minecraft:particle_initial_speed": 0,
"minecraft:particle_motion_dynamic": {},
"minecraft:particle_appearance_billboard": {
"size": ["v.size", "v.size"],
"facing_camera_mode": "rotate_xyz",
"uv": {
"texture_width": 128,
"texture_height": 128,
"uv": [0, 16],
"uv_size": [8, 8]
}
},
"minecraft:particle_appearance_lighting": {},
"minecraft:particle_appearance_tinting": {
"color": [1, 1, 1, 1]
}
}
}
}
Loading