Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Craftable Sculk Sensor #42

Merged
merged 5 commits into from
Mar 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ bin/
local.properties

# fabric

run/
logs/latest.log
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Use with carpet mod in the same Minecraft version. Use newer carpet mod versions
- [craftableQuartz](#craftableQuartz)
- [craftableRedSand](#craftableRedSand)
- [craftableSand](#craftableSand)
- [craftableSculkSensor](#craftableSculkSensor)
- [craftableShulkerShells](#craftableShulkerShells)
- [craftableStrippedWood](#craftableStrippedWood)
- [craftableTallGrass](#craftableTallGrass)
Expand Down Expand Up @@ -267,6 +268,15 @@ Allows to craft Red Sand from Sandstone
- Suggested options: `true`, `false`
- Categories: `SURVIVAL`, `FEATURE`, `REDCRAFT`, `CRAFTING`, `DATAPACK`

## craftableSculkSensor

Allow to craft Sculk Sensor with endeperals and observers

- Type: `boolean`
- Default value: `true`
- Suggested options: `true`, `false`
- Categories: `SURVIVAL`, `FEATURE`, `REDCRAFT`, `CRAFTING`, `DATAPACK`

## craftableShulkerShells

Allows to craft Shulker Shells from Turle Shells and Popped Chorus Fruits
Expand Down
10 changes: 10 additions & 0 deletions README_IT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Da usare con la Carpet Mod nella stessa versione di Minecraft. È suggerito usar
- [craftableQuartz](#craftableQuartz)
- [craftableRedSand](#craftableRedSand)
- [craftableSand](#craftableSand)
- [craftableSculkSensor](#craftableSculkSensor)
- [craftableShulkerShells](#craftableShulkerShells)
- [craftableStrippedWood](#craftableStrippedWood)
- [craftableTallGrass](#craftableTallGrass)
Expand Down Expand Up @@ -268,6 +269,15 @@ Permette di craftare la sabbia partendo dall'arenaria
- Suggested options: `true`, `false`
- Categories: `SURVIVAL`, `FEATURE`, `REDCRAFT`, `CRAFTING`, `DATAPACK`

## craftableSculkSensor

Permette di craftare Sculk Sensor con endeperal e osservatori

- Type: `boolean`
- Default value: `true`
- Suggested options: `true`, `false`
- Categories: `SURVIVAL`, `FEATURE`, `REDCRAFT`, `CRAFTING`, `DATAPACK`

## craftableShulkerShells

Permette di craftare i gusci di shulker partendo da quelli di tartaruga e un fiore di chorus scoppiato
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void onServerLoadedWorlds(MinecraftServer server) {
registerDatapackRule(server, "craftablePackedIce", "RedPack - Craftable Packed Ice");
registerDatapackRule(server, "craftablePlayerHead", "RedPack - Craftable Player Heads");
registerDatapackRule(server, "craftableQuartz", "RedPack - Craftable Quartz");
registerDatapackRule(server, "craftableSculkSensor", "RedPack - Craftable Sculk Sensor");
registerDatapackRule(server, "craftableShulkerShells", "RedPack - Craftable Shulker Shells");
registerDatapackRule(server, "craftableStrippedWood", "RedPack - Craftable Stripped Wood");
registerDatapackRule(server, "craftableTallGrass", "RedPack - Craftable Tall Grass");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ public class CarpetRedCraftSettings {
)
public static boolean huskDropsSand = true;

@Rule(
desc= "Allow to craft Sculk Sensor with endeperals and observers",
category = {SURVIVAL, FEATURE, REDCRAFT, CRAFTING, DATAPACK}
)
public static boolean craftableSculkSensor = true;

@Rule(
desc = "You can craft deepslate ore in smithing table.",
category = {SURVIVAL, FEATURE, REDCRAFT, DATAPACK}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"display": {
"title": "Installed Datapacks",
"description": "",
"icon": {
"item": "minecraft:knowledge_book"
},
"background": "minecraft:textures/block/gray_concrete.png",
"show_toast": false,
"announce_to_chat": false

},
"criteria": {
"trigger": {
"trigger": "minecraft:tick"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"#redpack:craftable_sculk_sensor/load"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"display": {
"title": "Craftable Sculk Sensor v0.1.0",
"description": [{
"text": "Sculk Sensor Crafting by BisUmTo, Gnottero & DukeEdivad05"
}],
"icon": {
"item": "minecraft:sculk_sensor"
},
"announce_to_chat": false,
"show_toast": false
},
"parent": "redpack:crafting",
"criteria": {
"trigger": {
"trigger": "minecraft:tick"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"redpack:craftable_sculk_sensor/sculk_sensor"
]
},
"criteria": {
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "redpack:craftable_sculk_sensor/sculk_sensor"
}
},
"has_item_0": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:observer"
}
]
}
},
"has_item_1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:ender_pearl"
}
]
}
}
},
"requirements": [
[
"has_item_0",
"has_the_recipe"
],
[
"has_item_1",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"display": {
"title": "More Craftings",
"description": [
{"text": ""}
],
"icon": {
"item": "minecraft:crafting_table"
},
"announce_to_chat": false,
"show_toast": false
},
"parent": "redpack:redpack",
"criteria": {
"trigger": {
"trigger": "minecraft:tick"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"display": {
"title": "§4§lRed§c§lPack§r - BisUmTo & Gnottero",
"description": "",
"icon": {
"item": "minecraft:player_head",
"nbt": "{display:{Name:'\"Redstone Block\"'},SkullOwner:{Id:[I;1283,1283,1283,1],Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjBjMDU1OTdmYjI3OWZkYmE5OTBlM2QzZTM0NGNmZTNhMmRhMTA2MDA0ZGNiMzk0MjY3YTlhZjlmNmQ0OWU5OSJ9fX0=\"}]}}}"
},
"show_toast": false,
"announce_to_chat": false
},
"parent": "global:root",
"criteria": {
"trigger": {
"trigger": "minecraft:tick"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Executing all the cores functions
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Creating all the scoreboards that are needed by the datapack

# Adding the pack name and version to the redpack storage
data remove storage redpack:config versions[{id:128357}]
data modify storage redpack:config versions append value {"id":128357,"name":"RedPack - Craftable Sculk Sensor","version":"0.1.0"}

# Initializing the scoreboards
scoreboard objectives add gb.configs dummy

# Getting the version of the player and sending an error message if it is outdated
execute store result score $gb.game_version gb.configs run data get entity @a[limit=1] DataVersion
execute if score $gb.game_version gb.configs matches ..2683 run tellraw @a[tag=!global.ignore.gui] {"text":"[Craftable Sculk Sensor (RedPack)]> This datapack is not compatible with all the versions before 20w49a!\n","color":"red"}

# Checking if the server uses a different jar from the vanilla one
execute if score $gb.check_jar gb.configs matches 0 store success score $gb.check_jar gb.configs run data get entity @a[limit=1] "Spigot.ticksLived"
execute if score $gb.check_jar gb.configs matches 0 store success score $gb.check_jar gb.configs run data get entity @a[limit=1] "Bukkit.updateLevel"
execute if score $gb.check_jar gb.configs matches 0 store success score $gb.check_jar gb.configs run data get entity @a[limit=1] "Paper.SpawnReason"
execute if score $gb.check_jar gb.configs matches 1 run tellraw @a[tag=!global.ignore.gui] {"text":"Compatibility in non-vanilla servers is not guaranteed!","color":"red"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Removing all the scoreboards and disabling the datapack

# Removing the scoreboards
scoreboard objectives remove gb.configs

# Removing the storage
data remove storage redpack:config versions[{id:128357}]

# Disabling the datapack
datapack disable "file/RedPack - Craftable Sculk Sensor"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type":"crafting_shaped",
"group": "sculk",
"pattern": [
" # ",
"III"
],
"key": {
"#" :{
"item": "minecraft:observer"
},
"I" :{
"item": "minecraft:ender_pearl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastica scelta delle lettere 😂😂😂
I come ender_peal
# come observer

}
},
"result": {
"item": "minecraft:sculk_sensor"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"redpack:craftable_sculk_sensor/setup"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"redpack:craftable_sculk_sensor/main"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"pack": {
"pack_format": 7,
"description": "RedPack by BisUmTo, Gnottero & DukeEdivad05 - Craftable Sculk Sensor v0.1.0"
},
"redpack": {
"id": "128357",
"video": "KVIxcL8rNC8"
"image": "https://img.youtube.com/vi/0GiWWcVG6x8/maxresdefault.jpg",
DukeEdivad05 marked this conversation as resolved.
Show resolved Hide resolved
"group": "more_craftings"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.