Skip to content

Commit

Permalink
Merge pull request #28 from Chikorita-Lover/main
Browse files Browse the repository at this point in the history
Update snowball and sword item presets
  • Loading branch information
Joelant05 committed Sep 9, 2022
2 parents 4d85cb2 + 9372563 commit fad54f7
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 94 deletions.
12 changes: 8 additions & 4 deletions packages/minecraftBedrock/preset/item/snowball/clientEntity.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}_projectile",
"identifier": "{{PROJECT_PREFIX}}:thrown_{{IDENTIFIER}}",
"materials": {
"default": "snowball"
},
Expand All @@ -12,13 +12,17 @@
"geometry": {
"default": "geometry.item_sprite"
},
"render_controllers": ["controller.render.item_sprite"],
"render_controllers": [
"controller.render.item_sprite"
],
"animations": {
"flying": "animation.actor.billboard"
},
"scripts": {
"animate": ["flying"]
"animate": [
"flying"
]
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/minecraftBedrock/preset/item/snowball/en_US.lang
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
item.{{PROJECT_PREFIX}}:{{IDENTIFIER}}={{IDENTIFIER_NAME}}

entity.{{PROJECT_PREFIX}}:{{IDENTIFIER}}_projectile.name={{IDENTIFIER_NAME}}
entity.{{PROJECT_PREFIX}}:thrown_{{IDENTIFIER}}.name={{IDENTIFIER_NAME}}
90 changes: 47 additions & 43 deletions packages/minecraftBedrock/preset/item/snowball/entity.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}_projectile",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:collision_box": {
"width": 0.25,
"height": 0.25
},
"minecraft:projectile": {
"on_hit": {
"impact_damage": {
"filter": "blaze",
"damage": 3,
"knockback": true
},
"remove_on_hit": {},
"particle_on_hit": {
"particle_type": "snowballpoof",
"num_particles": 6,
"on_entity_hit": true,
"on_other_hit": true
}
},
"anchor": 1,
"power": 1.5,
"gravity": 0.03,
"angle_offset": 0.0,
"offset": [ 0, -0.1, 0 ]
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
}
}
}
}

"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:thrown_{{IDENTIFIER}}",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false,
"runtime_identifier": "minecraft:snowball"
},
"components": {
"minecraft:collision_box": {
"width": 0.25,
"height": 0.25
},
"minecraft:projectile": {
"on_hit": {
"impact_damage": {
"filter": "blaze",
"damage": 3,
"knockback": true
},
"remove_on_hit": {},
"particle_on_hit": {
"particle_type": "snowballpoof",
"num_particles": 6,
"on_entity_hit": true,
"on_other_hit": true
}
},
"anchor": 1,
"power": 1.5,
"gravity": 0.03,
"angle_offset": 0.0,
"offset": [
0,
-0.1,
0
]
},
"minecraft:physics": {},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
}
}
}
}
47 changes: 23 additions & 24 deletions packages/minecraftBedrock/preset/item/snowball/item.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"format_version": "1.16.100",
"minecraft:item": {
"description": {
"category": "nature",
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}"
},
"components": {
"minecraft:creative_category" : {
"parent" : "itemGroup.name.snowball"
},
"minecraft:max_stack_size": 64,
"minecraft:use_duration": 32,
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
},
"minecraft:throwable": {
"do_swing_animation": true,
"launch_power_scale": 2.0
},
"minecraft:projectile": {
"projectile_entity": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}_projectile"
}
}
}
"format_version": "1.16.100",
"minecraft:item": {
"description": {
"identifier": "{{PROJECT_PREFIX}}:{{IDENTIFIER}}",
"category": "equipment"
},
"components": {
"minecraft:creative_category": {
"parent": "equipment"
},
"minecraft:max_stack_size": 16,
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
},
"minecraft:throwable": {
"do_swing_animation": true,
"launch_power_scale": 2
},
"minecraft:projectile": {
"projectile_entity": "{{PROJECT_PREFIX}}:thrown_{{IDENTIFIER}}"
}
}
}
}
9 changes: 6 additions & 3 deletions packages/minecraftBedrock/preset/item/snowball/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"IDENTIFIER",
{ "validate": ["required", "alphanumeric", "lowercase"] }
],
["Display Name", "IDENTIFIER_NAME", { "validate": ["required"] }]
[
"Display Name", "IDENTIFIER_NAME",
{ "validate": ["required"] }
]
],

"createFiles": [
Expand All @@ -33,12 +36,12 @@
],
[
"clientEntity.json",
"entity/{{PRESET_PATH}}{{IDENTIFIER}}.json",
"entity/{{PRESET_PATH}}thrown_{{IDENTIFIER}}.entity.json",
{ "inject": ["IDENTIFIER", "PROJECT_PREFIX", "PRESET_PATH"], "openFile": true, "packPath": "resourcePack" }
],
[
"entity.json",
"entities/{{PRESET_PATH}}{{IDENTIFIER}}.json",
"entities/{{PRESET_PATH}}thrown_{{IDENTIFIER}}.json",
{ "inject": ["IDENTIFIER", "PROJECT_PREFIX", "PRESET_PATH"], "openFile": true, "packPath": "behaviorPack" }
]
],
Expand Down
80 changes: 63 additions & 17 deletions packages/minecraftBedrock/preset/item/sword/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,84 @@
"category": "equipment"
},
"components": {
"minecraft:can_destroy_in_creative": false,
"minecraft:creative_category": {
"parent": "itemGroup.name.sword"
},
"minecraft:max_stack_size": 1,
"minecraft:hand_equipped": true,
"minecraft:durability": {
"max_durability": 150
},
"minecraft:damage": 5,
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
"max_durability": 251
},
"minecraft:enchantable": {
"value": 14,
"slot": "sword"
},
"minecraft:can_destroy_in_creative": false,
"minecraft:damage": 6,
"minecraft:digger": {
"use_efficiency": true,
"destroy_speeds": [
{
"block": "minecraft:web",
"speed": 12
"on_dig": {
"event": "on_tool_used",
"target": "self"
},
"speed": 15
},
{
"block": "minecraft:bamboo",
"speed": 8
"on_dig": {
"event": "on_tool_used",
"target": "self"
},
"speed": 60
}
]
},
"minecraft:weapon": {},
"tag:minecraft:is_sword": {}
"minecraft:enchantable": {
"value": 14,
"slot": "sword"
},
"minecraft:hand_equipped": true,
"minecraft:icon": {
"texture": "{{PROJECT_PREFIX}}_{{IDENTIFIER}}"
},
"minecraft:max_stack_size": 1,
"minecraft:repairable": {
"repair_items": [
{
"items": [
"minecraft:iron_ingot"
],
"repair_amount": "query.max_durability * 0.25"
},
{
"items": [
"{{PROJECT_PREFIX}}:{{IDENTIFIER}}"
],
"repair_amount": "context.other->query.remaining_durability + 0.12 * context.other->query.max_durability"
}
]
},
"minecraft:weapon": {
"on_hurt_entity": {
"event": "damaged",
"target": "self"
}
},
"tag:minecraft:is_sword": {},
"tag:minecraft:is_tool": {}
},
"events": {
"damaged": {
"damage": {
"type": "durability",
"amount": 1,
"target": "self"
}
},
"on_tool_used": {
"damage": {
"type": "durability",
"amount": 2,
"target": "self"
}
}
}
}
}
}
7 changes: 5 additions & 2 deletions packages/minecraftBedrock/preset/item/sword/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
"IDENTIFIER",
{ "validate": ["required", "alphanumeric", "lowercase"] }
],
["Display Name", "IDENTIFIER_NAME", { "validate": ["required"] }]
[
"Display Name",
"IDENTIFIER_NAME",
{ "validate": ["required"] }
]
],

"createFiles": [
"presetScript/itemImages.js",
[
Expand Down

0 comments on commit fad54f7

Please sign in to comment.