diff --git a/behavior_pack_sample/README.md b/behavior_pack_sample/README.md new file mode 100644 index 0000000..64f2e14 --- /dev/null +++ b/behavior_pack_sample/README.md @@ -0,0 +1,49 @@ +--- +page_type: sample +author: docsbryce +description: The sample Behavior Pack used in the Behavior Packs Tutorial. +ms.author: v-bbortree +ms.date: 05/17/2022 +languages: +- json +products: +- minecraft +--- + +# Behavior Pack Sample + +This sample is the behavior pack used in the Behavior Pack Tutorial. + +See the [Intro to Behavior Packs](https://docs.microsoft.com/minecraft/creator/documents/behaviorpack) documentation for a full tutorial on creating an aggressive cow using a behavior pack. + +## Using the Behavior Pack Sample + +The behavior pack sample is a useful tool to check your work while completing the Behavior Pack Tutorial. Using it is as simple as adding it to your `development_behavior_pack` folder. + +### Locate the com.mojang folder + +1. Press Win+R to open Run. +1. Copy and paste the following into the Open field: `%localappdata%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang` +1. Click OK. + +### Copy Behavior Pack sample into the `com.mojang` folder + +1. Click `development_behavior_packs`. +1. Copy `behavior_pack_sample` into the folder. + +### Enable the Behavior Pack in Minecraft + +1. Launch Minecraft and select Play. +1. Select Create New World. +1. Under Settings, scroll down to the Add-Ons section. +1. Click on Behavior Packs to see all available packs. +1. Click the MY PACKS drop-down to open it. +1. Select My Behavior Pack and click Activate to add the behavior pack to the world. +1. Click Create to create your world. + +You now have aggressive cows in your world (for better or worse). Good luck! + +## Manifest + +- [entities/cow.json](https://github.com/microsoft/minecraft-samples/blob/main/behavior_pack_sample/entities/cow.json): This is a modified cow entity programmed with aggressive behavior. +- [manifest.json](https://github.com/microsoft/minecraft-samples/blob/main/behavior_pack_sample/manifest.json/): This is the manifest.json folder for the sample behavior pack. diff --git a/behavior_pack_sample/entities/cow.json b/behavior_pack_sample/entities/cow.json new file mode 100644 index 0000000..e5633e5 --- /dev/null +++ b/behavior_pack_sample/entities/cow.json @@ -0,0 +1,272 @@ +{ + "format_version": "1.16.0", + "minecraft:entity": { + "description": { + "identifier": "minecraft:cow", + "is_spawnable": true, + "is_summonable": true, + "is_experimental": false + }, + "component_groups": { + "minecraft:cow_baby": { + "minecraft:is_baby": {}, + "minecraft:scale": { + "value": 0.5 + }, + "minecraft:ageable": { + "duration": 1200, + "feed_items": "wheat", + "grow_up": { + "event": "minecraft:ageable_grow_up", + "target": "self" + } + }, + "minecraft:behavior.follow_parent": { + "priority": 6, + "speed_multiplier": 1.1 + } + }, + "minecraft:cow_adult": { + "minecraft:experience_reward": { + "on_bred": "Math.Random(1,7)", + "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0" + }, + "minecraft:loot": { + "table": "loot_tables/entities/cow.json" + }, + "minecraft:behavior.breed": { + "priority": 3, + "speed_multiplier": 1.0 + }, + "minecraft:breedable": { + "require_tame": false, + "breed_items": "wheat", + "breeds_with": { + "mate_type": "minecraft:cow", + "baby_type": "minecraft:cow", + "breed_event": { + "event": "minecraft:entity_born", + "target": "baby" + } + } + }, + "minecraft:interact": { + "interactions": [ + { + "on_interact": { + "filters": { + "all_of": [ + { + "test": "is_family", + "subject": "other", + "value": "player" + }, + { + "test": "has_equipment", + "domain": "hand", + "subject": "other", + "value": "bucket:0" + } + ] + } + }, + "use_item": true, + "transform_to_item": "bucket:1", + "play_sounds": "milk", + "interact_text": "action.interact.milk" + } + ] + } + } + }, + "components": { + "minecraft:is_hidden_when_invisible": {}, + "minecraft:type_family": { + "family": [ + "cow", + "mob" + ] + }, + "minecraft:breathable": { + "total_supply": 15, + "suffocate_time": 0 + }, + "minecraft:navigation.walk": { + "can_path_over_water": true, + "avoid_water": true, + "avoid_damage_blocks": true + }, + "minecraft:movement.basic": {}, + "minecraft:jump.static": {}, + "minecraft:can_climb": {}, + "minecraft:collision_box": { + "width": 0.9, + "height": 1.3 + }, + "minecraft:nameable": {}, + "minecraft:health": { + "value": 10, + "max": 10 + }, + "minecraft:hurt_on_condition": { + "damage_conditions": [ + { + "filters": { + "test": "in_lava", + "subject": "self", + "operator": "==", + "value": true + }, + "cause": "lava", + "damage_per_tick": 4 + } + ] + }, + "minecraft:movement": { + "value": 0.25 + }, + "minecraft:despawn": { + "despawn_from_distance": {} + }, + "minecraft:behavior.float": { + "priority": 0 + }, + "minecraft:behavior.panic": { + "priority": 1, + "speed_multiplier": 1.25 + }, + "minecraft:behavior.mount_pathing": { + "priority": 2, + "speed_multiplier": 1.5, + "target_dist": 0.0, + "track_target": true + }, + "minecraft:behavior.breed": { + "priority": 3, + "speed_multiplier": 1.0 + }, + "minecraft:behavior.tempt": { + "priority": 4, + "speed_multiplier": 1.25, + "items": [ + "wheat" + ] + }, + "minecraft:behavior.follow_parent": { + "priority": 5, + "speed_multiplier": 1.1 + }, + "minecraft:behavior.random_stroll": { + "priority": 6, + "speed_multiplier": 0.8 + }, + "minecraft:behavior.look_at_player": { + "priority": 7, + "look_distance": 6.0, + "probability": 0.02 + }, + "minecraft:behavior.random_look_around": { + "priority": 9 + }, + "minecraft:leashable": { + "soft_distance": 4.0, + "hard_distance": 6.0, + "max_distance": 10.0 + }, + "minecraft:balloonable": {}, + "minecraft:rideable": { + "seat_count": 1, + "family_types": [ + "zombie" + ], + "seats": { + "position": [ + 0.0, + 1.105, + 0.0 + ] + } + }, + "minecraft:physics": {}, + "minecraft:pushable": { + "is_pushable": true, + "is_pushable_by_piston": true + }, + "minecraft:conditional_bandwidth_optimization": {}, + "minecraft:behavior.nearest_attackable_target": { + "priority": 2, + "must_see": true, + "reselect_targets": true, + "within_radius": 25.0, + "entity_types": [ + { + "filters": { + "test": "is_family", + "subject": "other", + "value": "player" + }, + "max_dist": 32 + } + ] + }, + "minecraft:behavior.melee_attack": { + "priority": 3 + }, + "minecraft:attack": { + "damage": 3 + } + }, + "events": { + "minecraft:entity_spawned": { + "randomize": [ + { + "weight": 95, + "trigger": "minecraft:spawn_adult" + }, + { + "weight": 5, + "add": { + "component_groups": [ + "minecraft:cow_baby" + ] + } + } + ] + }, + "minecraft:entity_born": { + "add": { + "component_groups": [ + "minecraft:cow_baby" + ] + } + }, + "minecraft:entity_transformed": { + "remove": {}, + "add": { + "component_groups": [ + "minecraft:cow_adult" + ] + } + }, + "minecraft:ageable_grow_up": { + "remove": { + "component_groups": [ + "minecraft:cow_baby" + ] + }, + "add": { + "component_groups": [ + "minecraft:cow_adult" + ] + } + }, + "minecraft:spawn_adult": { + "add": { + "component_groups": [ + "minecraft:cow_adult" + ] + } + } + } + } +} \ No newline at end of file diff --git a/behavior_pack_sample/manifest.json b/behavior_pack_sample/manifest.json new file mode 100644 index 0000000..ae1798c --- /dev/null +++ b/behavior_pack_sample/manifest.json @@ -0,0 +1,25 @@ +{ + "format_version": 2, + "header": { + "description": "My attack cow behavior pack Add-On!", + "name": "My Behavior Pack", + "uuid":"3958f9a2-96e4-4db0-a907-145d065cd7f0", + "version": [1, 0, 0], + "min_engine_version": [1, 16, 0] + }, + "modules": + [ + { + "description": "My First Add-On!", + "type": "data", + "uuid": "1b85a99a-bfeb-481d-8a77-b5cda182e7d3", + "version": [1, 0, 0] + } + ], + "dependencies": [ + { + "uuid":"f792a765-6eec-47e1-baea-599424fec93d", + "version":[1,0,0] + } + ] + } \ No newline at end of file diff --git a/behavior_pack_sample/pack_icon.png b/behavior_pack_sample/pack_icon.png new file mode 100644 index 0000000..85a5158 Binary files /dev/null and b/behavior_pack_sample/pack_icon.png differ diff --git a/npc_dialogue_sample/README.md b/npc_dialogue_sample/README.md new file mode 100644 index 0000000..302ae08 --- /dev/null +++ b/npc_dialogue_sample/README.md @@ -0,0 +1,49 @@ +--- +page_type: sample +author: docsbryce +description: The sample NPC Dialogue Behavior Pack used in the NPC Dialogue Tutorial. +ms.author: v-bbortree +ms.date: 05/17/2022 +languages: +- json +products: +- minecraft +--- + +# NPC Dialogue Sample + +This sample is the behavior pack used in the NPC Dialogue Tutorial. + +See the [NPC Dialogue](https://docs.microsoft.com/minecraft/creator/documents/NPCDialogue) documentation for the full walkthrough adding custom dialogue for an NPC. + +## Using the NPC Dialogue Behavior Pack Sample + +The behavior pack sample is a useful tool to check your work while completing the NPC Dialogue Behavior Pack Tutorial. Using it is as simple as adding it to your `development_behavior_pack` folder. + +### Locate the com.mojang folder + +1. Press Win+R to open Run. +1. Copy and paste the following into the Open field: `%localappdata%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang` +1. Click OK. + +### Copy NPC Dialogue Behavior Pack sample into the `com.mojang` folder + +1. Click `development_behavior_packs`. +1. Copy `npc_dialogue_sample` into the folder. + +### Enable the NPC Dialogue Behavior Pack in Minecraft + +1. Launch Minecraft and select Play. +1. Select Create New World. +1. Under Settings, scroll down to the Add-Ons section. +1. Click on Behavior Packs to see all available packs. +1. Click the MY PACKS drop-down to open it. +1. Select My NPC Dialogue Behavior Pack and click Activate to add the behavior pack to the world. +1. Click Create to create your world. + +Now you can create an NPC named Ducky and receive a very cool item for chatting with them. + +## Manifest + +- [dialogue/scene.json](https://github.com/microsoft/minecraft-samples/blob/main/npc_dialogue_sample/dialogue/scene.json): This defines the dialogue that an NPC named Ducky will use when you run the command in the NPC Dialogue tutorial. +- [manifest.json](https://github.com/microsoft/minecraft-samples/blob/main/npc_dialogue_sample/manifest.json/): This is the manifest.json folder for the sample behavior pack. diff --git a/npc_dialogue_sample/dialogue/scene.json b/npc_dialogue_sample/dialogue/scene.json new file mode 100644 index 0000000..5df7d0e --- /dev/null +++ b/npc_dialogue_sample/dialogue/scene.json @@ -0,0 +1,26 @@ +{ + "format_version":"1.17", + "minecraft:npc_dialogue":{ + "scenes":[ + { + "scene_tag":"ducky_intro", + "npc_name":"Ducky", + "text":"Hello new friend", + "on_open_commands":[ + "/clear @p" + ], + "on_close_commands":[ + "/say Farewell! " + ], + "buttons":[ + { + "name":"Take Gold?", + "commands":[ + "/give @initiator gold_ingot" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/npc_dialogue_sample/manifest.json b/npc_dialogue_sample/manifest.json new file mode 100644 index 0000000..e429ff7 --- /dev/null +++ b/npc_dialogue_sample/manifest.json @@ -0,0 +1,18 @@ +{ + "format_version": 1, + "header": { + "name": "My NPC Dialogue Sample Pack", + "description": "", + "uuid": "6555df28-43a6-4b35-96b3-444bb7f80973", + "min_engine_version": [1, 12, 0], + "version": [0, 0, 1] + }, + "modules": [ + { + "description": "", + "type": "data", + "uuid": "cdc07e12-31d6-4bff-a963-02856a687b17", + "version": [0, 0, 1] + } + ] +} \ No newline at end of file diff --git a/npc_dialogue_sample/pack_icon.png b/npc_dialogue_sample/pack_icon.png new file mode 100644 index 0000000..7da0299 Binary files /dev/null and b/npc_dialogue_sample/pack_icon.png differ diff --git a/resource_pack_sample/README.md b/resource_pack_sample/README.md new file mode 100644 index 0000000..8525af9 --- /dev/null +++ b/resource_pack_sample/README.md @@ -0,0 +1,49 @@ +--- +page_type: sample +author: docsbryce +description: The sample Resource Pack used in the Resource Packs Tutorial. +ms.author: v-bbortree +ms.date: 05/17/2022 +languages: +- json +products: +- minecraft +--- + +# Resource Pack Sample + +This sample is the resource pack used in the Intro to Resource Packs Tutorial. + +See the [Intro to Resource Packs](https://docs.microsoft.com/minecraft/creator/documents/resourcepack) documentation for the full walkthrough creating an aggressive cow using a resource pack. + +## Using the Resource Pack Sample + +The resource pack sample is a useful tool to check your work while completing the Resource Pack Tutorial. Using it is as simple as adding it to your `development_resource_pack` folder. + +### Locate the com.mojang folder + +1. Press Win+R to open Run. +1. Copy and paste the following into the Open field: `%localappdata%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang` +1. Click OK. + +### Copy Resource Pack sample into the `com.mojang` folder + +1. Click `development_resource_packs`. +1. Copy `resource_pack_sample` into the folder. + +### Enable the Resource Pack in Minecraft + +1. Launch Minecraft and select Play. +1. Select Create New World. +1. Under Settings, scroll down to the Add-Ons section. +1. Click on Resource Packs to see all available packs. +1. Click the MY PACKS drop-down to open it. +1. Select My Resource Pack and click Activate to add the resource pack to the world. +1. Click Create to create your world. + +Your plain dirt blocks are now bright green. Neat! + +## Manifest + +- [textures/blocks/dirt.png](https://github.com/microsoft/minecraft-samples/blob/main/resource_pack_sample/textures/blocks/dirt.jpg): A new bright green dirt texture to modify the existing blocks in your world. +- [manifest.json](https://github.com/microsoft/minecraft-samples/blob/main/resource_pack_sample/manifest.json/): This is the manifest.json folder for the sample resource pack. diff --git a/resource_pack_sample/manifest.json b/resource_pack_sample/manifest.json new file mode 100644 index 0000000..770f49e --- /dev/null +++ b/resource_pack_sample/manifest.json @@ -0,0 +1,18 @@ +{ + "format_version": 2, + "header": { + "description": "My dirt resource pack Add-On!", + "name": "My Resource Pack", + "uuid":"f792a765-6eec-47e1-baea-599424fec93d", + "version": [1, 0, 0], + "min_engine_version": [1, 16, 0] + }, + "modules": [ + { + "description": "My First Add-On!", + "type": "resources", + "uuid": "457f55a3-2573-4e3c-a5db-f7e64b3d43a5", + "version": [1, 0, 0] + } + ] + } \ No newline at end of file diff --git a/resource_pack_sample/pack_icon.png b/resource_pack_sample/pack_icon.png new file mode 100644 index 0000000..3e182ac Binary files /dev/null and b/resource_pack_sample/pack_icon.png differ diff --git a/resource_pack_sample/textures/blocks/dirt.png b/resource_pack_sample/textures/blocks/dirt.png new file mode 100644 index 0000000..f22ad02 Binary files /dev/null and b/resource_pack_sample/textures/blocks/dirt.png differ diff --git a/rtx_resource_pack/pack_icon.png b/rtx_resource_pack/pack_icon.png new file mode 100644 index 0000000..2a7631e Binary files /dev/null and b/rtx_resource_pack/pack_icon.png differ diff --git a/structure_blocks_sample_behavior_pack/README.md b/structure_blocks_sample_behavior_pack/README.md index 6ec7f98..812213f 100644 --- a/structure_blocks_sample_behavior_pack/README.md +++ b/structure_blocks_sample_behavior_pack/README.md @@ -45,5 +45,5 @@ You now have several precreated structures to practice saving, loading, and anim ## Manifest -- [structures](https://github.com/microsoft/minecraft-samples/blob/main/rtx_behavior_pack/structures): These are three sample buildings and a statue to use throughout the tutorial. -- [manifest.json](https://github.com/microsoft/minecraft-samples/blob/main/rtx_behavior_pack/manifest.json/): This is the manifest.json folder for the sample behavior pack. +- [structures](https://github.com/microsoft/minecraft-samples/blob/main/structure_blocks_sample_behavior_pack/structures): These are three sample buildings and a statue to use throughout the tutorial. +- [manifest.json](https://github.com/microsoft/minecraft-samples/blob/main/structure_blocks_sample_behavior_pack/manifest.json/): This is the manifest.json folder for the sample behavior pack. diff --git a/structure_blocks_sample_behavior_pack/pack_icon.png b/structure_blocks_sample_behavior_pack/pack_icon.png new file mode 100644 index 0000000..69310e7 Binary files /dev/null and b/structure_blocks_sample_behavior_pack/pack_icon.png differ