Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecss11 committed Jul 26, 2020
2 parents 3749327 + 1f37cf3 commit 9062ab2
Show file tree
Hide file tree
Showing 58 changed files with 327 additions and 100 deletions.
46 changes: 0 additions & 46 deletions Crafting/data/ruaserver/advancements/recipes/custom.json

This file was deleted.

50 changes: 0 additions & 50 deletions Crafting/data/ruaserver/advancements/recipes/fast_crafting.json

This file was deleted.

45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# Datapack
Datapack for RUA server
# RUA 服务器用数据包 Minecraft Datapack for RUA Server

## 自定义合成 Custom Recipes
### 1. 钻石/铁/金马铠 Diamond/Iron/Golden Horse Armor
![dhorsearmor](images/DiamondHorseArmor.png)
![ihorsearmor](images/IronHorseArmor.png)
![ghorsearmor](images/GoldHorseArmor.png)
### 2. 鞘翅 Elytra
![elytra](images/Elytra.png)
### 3. 附魔金苹果 Enchanted Golden Apple
![EGA](images/EnchantedGoldenApple.png)
### 4. 鞍 Saddle
![saddle](images/Saddle.png)
### 5. 潜影壳 Shulker Shell
![shulkershell](images/ShulkerShell.png)
### 6. +蛛网、线互相合成 Cobweb & String
![string](images/String.png)
![web](images/Web.png)
### 7. +潮涌之心 Heart of the sea
![HotS](images/HeartOfTheSea.png)
### 8. +石英块 Quartz Block
![quartz](images/QuartzBlocks.png)
### 9. +三叉戟 Trident
![trident](images/Trident.png)

### 10. +弓箭 Arrow
![arrow](images/Arrow.png)
![arrow](images/ArrowByThree.png)

## 快速合成 Fast Crafting
### 1. 骨头 -> 骨块 Bone -> Bone Block (无序 Unshaped)
![boneBlock](images/BoneBlock.png)
### 2. 各式原木 -> 箱子 All Logs -> Chest (无序 Unshaped)
![chest](images/Box.png)
### 3. 各式矿车 All kinds Minecarts
![tminecart](images/TNTMinecart.png)
![hminecart](images/HopperMinecart.png)
![cminecart1](images/ChestMinecart1.png)
![cminecart2](images/ChestMinecart2.png)
### 4. 原木 + 铁 -> 漏斗 Logs + iron -> Hopper
![hopper](images/Hopper.png)

## 自定义掉落 Custom Loot
### 1. 守卫者可以掉落海绵 Guardian drops Sponge
114 changes: 114 additions & 0 deletions data/minecraft/loot_tables/entities/guardian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 0.0,
"max": 2.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:looting_enchant",
"count": {
"min": 0.0,
"max": 1.0
}
}
],
"name": "minecraft:prismarine_shard"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"weight": 3,
"functions": [
{
"function": "minecraft:looting_enchant",
"count": {
"min": 0.0,
"max": 1.0
}
},
{
"function": "minecraft:furnace_smelt",
"conditions": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"flags": {
"is_on_fire": true
}
},
"entity": "this"
}
]
}
],
"name": "minecraft:cod"
},
{
"type": "minecraft:item",
"weight": 2,
"functions": [
{
"function": "minecraft:looting_enchant",
"count": {
"min": 0.0,
"max": 1.0
}
}
],
"name": "minecraft:prismarine_crystals"
},
{
"type": "minecraft:empty"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:wet_sponge"
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:loot_table",
"name": "minecraft:gameplay/fishing/fish"
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
},
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.025,
"looting_multiplier": 0.01
}
]
}
]
}
5 changes: 5 additions & 0 deletions data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"ruaserver:announce/install"
]
}
5 changes: 5 additions & 0 deletions data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"ruaserver:announce/main"
]
}
3 changes: 3 additions & 0 deletions data/ruaserver/functions/announce/install.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 创建两个计分板检测退出次数和在线时间
scoreboard objectives add logout minecraft.custom:leave_game
scoreboard objectives add Online minecraft.custom:play_one_minute
9 changes: 9 additions & 0 deletions data/ruaserver/functions/announce/main.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 在线时间为 100 后显示通知
execute as @a[scores={Online=100}] at @s run tellraw @s [{"text":"欢迎来到RUA服务器,这使你充满了决心","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"},"hoverEvent":{"action":"show_text","value":"点击此处打开 RUA 论坛"}}]
# 设置在线时间为 200 避免多次显示
execute as @a[scores={Online=100}] at @s run scoreboard players set @s Online 200

# 在线时间为 100 或更大,并且退出过一次或更多次服务器,则显示通知
execute as @a[scores={Online=100.., Logout=1..}] at @s run tellraw @s [{"text":"欢迎来到RUA服务器,这使你充满了决心","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"},"hoverEvent":{"action":"show_text","value":"点击此处打开 RUA 论坛"}}]
# 重置退出次数为 0,所以为什么要设置退出一次或更多啊233
execute as @a[scores={Online=100.., Logout=1..}] at @s run scoreboard players set @s Logout 0
3 changes: 3 additions & 0 deletions data/ruaserver/functions/announce/uninstall.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 删除 Logout 和 online 两个计分板
scoreboard objectives remove Logout
scoreboard objectives remove Online
1 change: 1 addition & 0 deletions data/ruaserver/functions/scoreboard/install.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Empty file.
Empty file.
24 changes: 24 additions & 0 deletions data/ruaserver/recipes/custom/arrow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" i ",
" s ",
" f "
],
"key": {
"f": {
"item": "minecraft:feather"
},
"i": {
"item": "minecraft:iron_ingot"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "minecraft:arrow",
"count": 3
},
"group": "arrow"
}
24 changes: 24 additions & 0 deletions data/ruaserver/recipes/custom/arrow_by_three.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"iii",
"sss",
"fff"
],
"key": {
"f": {
"item": "minecraft:feather"
},
"i": {
"item": "minecraft:iron_ingot"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "minecraft:arrow",
"count": 9
},
"group": "arrow"
}
23 changes: 23 additions & 0 deletions data/ruaserver/recipes/custom/heart_of_the_sea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"DdD",
"dbd",
"DdD"
],
"key": {
"D": {
"item": "minecraft:diamond"
},
"b": {
"item": "minecraft:beacon"
},
"d": {
"item": "minecraft:diamond_block"
}
},
"result": {
"item": "minecraft:heart_of_the_sea",
"count": 1
}
}
20 changes: 20 additions & 0 deletions data/ruaserver/recipes/custom/quartz_blocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"bbb",
"bgb",
"bbb"
],
"key": {
"b": {
"item": "minecraft:bone_block"
},
"g": {
"item": "minecraft:glass"
}
},
"result": {
"item": "minecraft:quartz_block",
"count": 8
}
}
Loading

0 comments on commit 9062ab2

Please sign in to comment.