1
0
Fork 0

Inital commit

This commit is contained in:
abtmtr 2025-08-27 20:49:18 -05:00
commit b5089257c5
1005 changed files with 23476 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{
"criteria": {
"default_block_use": {
"trigger": "minecraft:default_block_use",
"conditions": {
"location": [
{
"condition": "minecraft:block_state_property",
"block": "minecraft:enchanting_table"
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.mainhand": {
"items": "minecraft:glass_bottle"
}
},
"type_specific": {
"type": "player",
"level": {
"min": 1
}
}
}
}
]
}
}
},
"rewards": {
"function": "xp_bottling:try_to_bottle_xp"
}
}

View file

@ -0,0 +1,7 @@
clear @s minecraft:glass_bottle 1
give @s minecraft:experience_bottle
xp add @s -12 points
playsound minecraft:item.bottle.fill_dragonbreath player @a ~ ~ ~ 1 1.25
scoreboard players set #steps craXPBot.dummy 50
execute anchored eyes positioned ^ ^ ^ run function xp_bottling:raycast
tag @s remove craXPBot.continue

View file

@ -0,0 +1,3 @@
summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["craXPBot.marker"],Duration:0,Radius:0.0f,WaitTime:0}
execute align y if entity @e[type=minecraft:area_effect_cloud,tag=craXPBot.marker,distance=..0.75] run function xp_bottling:replace_enchanting_table
kill @e[type=minecraft:area_effect_cloud,tag=craXPBot.marker]

View file

@ -0,0 +1,2 @@
scoreboard objectives add craXPBot.dummy dummy
advancement revoke @a only xp_bottling:try_to_bottle_xp

View file

@ -0,0 +1,3 @@
scoreboard players remove #steps craXPBot.dummy 1
execute if block ~ ~ ~ minecraft:enchanting_table run function xp_bottling:check_enchanting_table
execute unless score #steps craXPBot.dummy matches 0 positioned ^ ^ ^0.1 run function xp_bottling:raycast

View file

@ -0,0 +1,5 @@
summon minecraft:item_frame ~ ~1000 ~ {Tags:["craXPBot.enchTable","craXPBot.new"],Fixed:1b,Invisible:1b,Item:{id:"minecraft:enchanting_table",components:{custom_data:{craXPBotData:{}}}}}
data modify entity @e[type=minecraft:item_frame,tag=craXPBot.new,limit=1] Item.components."minecraft:custom_data".craXPBotData set from block ~ ~ ~ {}
setblock ~ ~ ~ minecraft:snow[layers=6]
scoreboard players set #steps craXPBot.dummy 0
schedule function xp_bottling:restore_enchanting_tables 2t append

View file

@ -0,0 +1,3 @@
setblock ~ ~ ~ minecraft:enchanting_table
data modify block ~ ~ ~ {} set from entity @s Item.components."minecaft:custom_data".craXPBotData
kill @s

View file

@ -0,0 +1 @@
execute as @e[type=minecraft:item_frame,tag=craXPBot.enchTable] at @s positioned ~ ~-1000 ~ run function xp_bottling:restore_enchanting_table

View file

@ -0,0 +1,5 @@
advancement revoke @s only xp_bottling:try_to_bottle_xp
tag @s add craXPBot.continue
execute store result score #points craXPBot.dummy run xp query @s points
execute if score #points craXPBot.dummy matches ..4 if entity @s[level=1] run tag @s remove craXPBot.continue
execute if entity @s[tag=craXPBot.continue] run function xp_bottling:bottle_xp

View file

@ -0,0 +1 @@
scoreboard objectives remove craXPBot.dummy

View file

@ -0,0 +1,11 @@
{
"type": "minecraft:smelting",
"ingredient": {
"item": "minecraft:experience_bottle"
},
"result": {
"id": "minecraft:glass_bottle"
},
"experience": 12,
"cookingtime": 1
}