Skip to content

Commit

Permalink
Init: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirasawaSama committed Jan 12, 2021
0 parents commit d136939
Show file tree
Hide file tree
Showing 28 changed files with 499 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v1

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 14

- name: Build
run: node release

- name: Pack
run: cd release && zip -r release.zip .

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release/release.zip
asset_name: NekoCraft.zip
tag: ${{ github.ref }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Shirasawa 2021

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NekoCraftDataPack

NekoCraft specific datapack.

## Download

[Release](https://github.com/neko-craft/NekoCraftDataPack/releases)

## License

[MIT](LICENSE)
10 changes: 10 additions & 0 deletions format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const fs = require('fs').promises
const { join } = require('path')

const formatFile = file => fs.readFile(file, 'utf-8').then(json => fs.writeFile(file, JSON.stringify(JSON.parse(json), null, 2)))
const format = path => fs.readdir(path).then(files => Promise.all(files.map(it => {
const file = join(path, it)
return fs.stat(file).then(stat => stat.isDirectory() ? format(file) : formatFile(file))
})))

format('src/data').then(() => formatFile('src/pack.mcmeta')).then(() => console.log('Success!')).catch(console.error)
11 changes: 11 additions & 0 deletions release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { existsSync, rmSync, promises: fs } = require('fs')
const { join } = require('path')

const formatFile = file => fs.readFile(file, 'utf-8').then(json => fs.writeFile(file.replace('src', 'release'), JSON.stringify(JSON.parse(json))))
const format = path => fs.mkdir(path.replace('src', 'release')).then(() => fs.readdir(path)).then(files => Promise.all(files.map(it => {
const file = join(path, it)
return fs.stat(file).then(stat => stat.isDirectory() ? format(file) : formatFile(file))
})))

if (existsSync('release') && rmSync) rmSync('release', { recursive: true })
fs.mkdir('release').then(() => format('src/data')).then(() => formatFile('src/pack.mcmeta')).then(() => console.log('Success!'), console.error)
30 changes: 30 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/astronaut.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "nekocraft:nekocraft/root",
"display": {
"icon": {
"item": "minecraft:elytra"
},
"title": "芜湖起飞",
"description": "飞上十万米高空",
"frame": "challenge"
},
"criteria": {
"fly": {
"trigger": "minecraft:location",
"conditions": {
"location": {
"position": {
"y": {
"min": 100000
}
}
}
}
}
},
"requirements": [
[
"fly"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/death.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/root",
"display": {
"icon": {
"item": "minecraft:wither_rose"
},
"title": "当场去世",
"description": "在游戏中死亡一次",
"frame": "task"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/death_explosion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/death",
"display": {
"icon": {
"item": "minecraft:tnt"
},
"title": "Boom!",
"description": "在爆炸中获得灵魂飞升",
"frame": "goal"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/death_hungry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/death",
"display": {
"icon": {
"item": "minecraft:cooked_beef"
},
"title": "好饿好饿好饿",
"description": "被饿死一次",
"frame": "goal"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/death_stabbed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/death",
"display": {
"icon": {
"item": "minecraft:cactus"
},
"title": "又细又尖",
"description": "被仙人掌或甜浆果丛戳死",
"frame": "goal"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/death_strike.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/death",
"display": {
"icon": {
"item": "minecraft:chain"
},
"title": "幸运儿",
"description": "在雷雨天气被闪电劈死一次",
"frame": "goal"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
35 changes: 35 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/emerald_producer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "nekocraft:nekocraft/first_step",
"display": {
"icon": {
"item": "minecraft:emerald_block"
},
"title": "经典卡服设备",
"description": "参观堆叠掠夺者农场",
"frame": "goal"
},
"criteria": {
"enter": {
"trigger": "minecraft:location",
"conditions": {
"location": {
"position": {
"x": {
"min": -255,
"max": -240
},
"z": {
"min": 1248,
"max": 1263
}
}
}
}
}
},
"requirements": [
[
"enter"
]
]
}
35 changes: 35 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/firework1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "nekocraft:nekocraft/first_step",
"display": {
"icon": {
"item": "minecraft:lantern"
},
"title": "放烟花1",
"description": "参观第一次新年活动的场地",
"frame": "goal"
},
"criteria": {
"enter": {
"trigger": "minecraft:location",
"conditions": {
"location": {
"position": {
"x": {
"min": -1358,
"max": -1225
},
"z": {
"min": -1580,
"max": -1407
}
}
}
}
}
},
"requirements": [
[
"enter"
]
]
}
21 changes: 21 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/first_step.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parent": "nekocraft:nekocraft/root",
"display": {
"icon": {
"item": "minecraft:campfire"
},
"title": "旅程的开始",
"description": "离开出生点",
"frame": "task"
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
26 changes: 26 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/kill_player.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parent": "nekocraft:nekocraft/root",
"display": {
"icon": {
"item": "minecraft:netherite_sword"
},
"title": "是他先动的手",
"description": "杀死一个玩家 (请先征得他人允许哦)",
"frame": "task"
},
"criteria": {
"kill": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"entity": {
"type": "minecraft:player"
}
}
}
},
"requirements": [
[
"kill"
]
]
}
22 changes: 22 additions & 0 deletions src/data/nekocraft/advancements/nekocraft/root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"display": {
"icon": {
"item": "minecraft:nether_star"
},
"title": "NekoCraft",
"description": "同意 NekoCraft 用户守则, 从此成为服务器的一员",
"background": "minecraft:textures/block/white_concrete.png",
"show_toast": false,
"announce_to_chat": false
},
"criteria": {
"trigger": {
"trigger": "minecraft:impossible"
}
},
"requirements": [
[
"trigger"
]
]
}
Loading

0 comments on commit d136939

Please sign in to comment.