diff --git a/packages/minecraftBedrock/preset/item/snowball/clientEntity.json b/packages/minecraftBedrock/preset/item/snowball/clientEntity.json index d95a15f9..9075b8bb 100644 --- a/packages/minecraftBedrock/preset/item/snowball/clientEntity.json +++ b/packages/minecraftBedrock/preset/item/snowball/clientEntity.json @@ -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" }, @@ -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" + ] } } } -} +} \ No newline at end of file diff --git a/packages/minecraftBedrock/preset/item/snowball/en_US.lang b/packages/minecraftBedrock/preset/item/snowball/en_US.lang index 6678cca8..946a43dc 100644 --- a/packages/minecraftBedrock/preset/item/snowball/en_US.lang +++ b/packages/minecraftBedrock/preset/item/snowball/en_US.lang @@ -1,3 +1,3 @@ item.{{PROJECT_PREFIX}}:{{IDENTIFIER}}={{IDENTIFIER_NAME}} -entity.{{PROJECT_PREFIX}}:{{IDENTIFIER}}_projectile.name={{IDENTIFIER_NAME}} \ No newline at end of file +entity.{{PROJECT_PREFIX}}:thrown_{{IDENTIFIER}}.name={{IDENTIFIER_NAME}} \ No newline at end of file diff --git a/packages/minecraftBedrock/preset/item/snowball/entity.json b/packages/minecraftBedrock/preset/item/snowball/entity.json index 455e6816..9905c72c 100644 --- a/packages/minecraftBedrock/preset/item/snowball/entity.json +++ b/packages/minecraftBedrock/preset/item/snowball/entity.json @@ -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 - } - } - } - } - \ No newline at end of file + "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 + } + } + } +} \ No newline at end of file diff --git a/packages/minecraftBedrock/preset/item/snowball/item.json b/packages/minecraftBedrock/preset/item/snowball/item.json index 190d0909..66ffa626 100644 --- a/packages/minecraftBedrock/preset/item/snowball/item.json +++ b/packages/minecraftBedrock/preset/item/snowball/item.json @@ -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}}" + } + } + } } \ No newline at end of file diff --git a/packages/minecraftBedrock/preset/item/snowball/manifest.json b/packages/minecraftBedrock/preset/item/snowball/manifest.json index ccdced12..92f504a5 100644 --- a/packages/minecraftBedrock/preset/item/snowball/manifest.json +++ b/packages/minecraftBedrock/preset/item/snowball/manifest.json @@ -17,7 +17,10 @@ "IDENTIFIER", { "validate": ["required", "alphanumeric", "lowercase"] } ], - ["Display Name", "IDENTIFIER_NAME", { "validate": ["required"] }] + [ + "Display Name", "IDENTIFIER_NAME", + { "validate": ["required"] } + ] ], "createFiles": [ @@ -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" } ] ], diff --git a/packages/minecraftBedrock/preset/item/sword/item.json b/packages/minecraftBedrock/preset/item/sword/item.json index c7761604..02fd3d62 100644 --- a/packages/minecraftBedrock/preset/item/sword/item.json +++ b/packages/minecraftBedrock/preset/item/sword/item.json @@ -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" + } + } } } -} +} \ No newline at end of file diff --git a/packages/minecraftBedrock/preset/item/sword/manifest.json b/packages/minecraftBedrock/preset/item/sword/manifest.json index e22e666c..ec87e8ba 100644 --- a/packages/minecraftBedrock/preset/item/sword/manifest.json +++ b/packages/minecraftBedrock/preset/item/sword/manifest.json @@ -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", [