Git Product home page Git Product logo

datamap's Introduction

How To Make Things Happen:

  • Dialogue:
  1. Give villager a nametag
  2. To load.mcfunction (Once):
scoreboard objectives add ClickVillager minecraft.custom:minecraft.talked_to_villager
scoreboard objectives setdisplay sidebar ClickVillager

To main.mcfunction (Per villager):

execute as @a[scores={ClickVillager=1..}] at @s if entity @e[type=villager,limit=1,sort=nearest,name=[NAME],distance=..5] run function camchat:[NAME]/init

Replacing the name as appropriate. Create data/camchat/functions/[NAME]/init.mcfunction to start their interaction.

TODO: Use biome-specific scripts to reduce the amount of ifs; Only check if the player is talking with an NPC in the current biome

  • Biome predicates:

/execute if predicate camchat:biome/[dimension]/[biome] as @a at @a run w @a asd

  • Check for mob kills:

Create loottable in camchat/loot_tables/[LOOTTABLE] with

{
  "type": "minecraft:entity",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "structure_block",
          "functions": [
            {
              "function": "minecraft:set_nbt",
              "tag": "{mob_death_marker:1b,dead_mob:\"zombie\"}"
            }
          ]
        }
      ]
    }
  ]
}

Add to main.mcfunction:

execute as @e[type=item,nbt={Item:{tag:{mob_death_marker:1b}}}] run tellraw @a ["a ",{"nbt":"Item.tag.dead_mob","entity":"@s"}," has died."]
kill @e[type=item,nbt={Item:{tag:{mob_death_marker:1b}}}]

TODO: Also split in biomes

TODO:Armor stands can detonate crossbow fireworks early. Use for shotgun?

High enough of some stat could allow people to crawl out chimneys?

fill -144 -54 375 -136 -60 375 minecraft:air replace minecraft:oak_fence

execute if predicate camchat:fly at @s run effect give @a minecraft:levitation 1 execute as @a[nbt={SelectedItem:{id:"minecraft:ender_pearl",Count:1b,tag:{impedingdoom:1b}}}] at @s run effect give @a[distance=..10] minecraft:blindness 1 1 true execute as @a[predicate=camchat:fly] at @s run effect give @s minecraft:levitation 1 255

execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b}}] at @s run effect give @s minecraft:levitation 1 255 ç

execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b}}] at @s run function magic:spell/fly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.