#somebody help me with this error I cant figure out whats wrong

1 messages · Page 1 of 1 (latest)

raw linden
#

so here is the error im getting from logs while trying to enter the world with my datapack: ```Registry loading errors:

Errors in registry minecraft:enchantment:

Errors in element sharps:Earthbreaker:
java.lang.IllegalStateException: Failed to parse sharps:enchantment/Earthbreaker.json from pack file/betaversion1.0
at knot//net.minecraft.class_7655.method_45122(class_7655.java:329)and here is my enchantment that the error says is wrong somehow:{
"description": "earthbreaker",
"supported_items": "minecraft:netherite_sword",
"weight": 0,
"max_level": 1,
"min_cost": {
"base": 0,
"per_level_above_first": 0
},
"max_cost": {
"base": 0,
"per_level_above_first": 0
},
"anvil_cost": 10000,
"slots": [
"mainhand"
],
"effects": {
"minecraft:post_attack": [
{
"effect": {
"type": "minecraft:run_function",
"function": "sharps:axe_on_hit"
},
"enchanted": "attacker",
"affected": "attacker"
},
{
"requirements": {
"condition": "minecraft:value_check",
"value": {
"type": "minecraft:score",
"target": "attacker",
"score": "hitcount1"
},
"range": 16
},
"effect": {
"type": "minecraft:run_function",
"function": "sharps:axe_ability_victim"
},
"enchanted": "attacker",
"affected": "victim"
},
{
"requirements": {
"condition": "minecraft:value_check",
"value": {
"type": "minecraft:score",
"target": "attacker",
"score": "hitcount1"
},
"range": 16
},
"effect": {
"type": "minecraft:run_function",
"function": "sharps:axe_ability_attacker"
},
"enchanted": "attacker",
"affected": "attacker"
}
]
}
}```

robust bay
#

from the error it looks like your file is saved as Earthbreaker.json with a capital E? you can only use lowercase letters in datapack file names

raw linden
#

ok so I fixed the uppercase E but I still get the minecraft message thingy to join my world on safe mod and still get this error: ```Registry loading errors:

Errors in registry minecraft:enchantment:

Errors in element sharps:earthbreaker:
java.lang.IllegalStateException: Failed to parse sharps:enchantment/earthbreaker.json from pack file/betaversion1.0
at knot//net.minecraft.class_7655.method_45122(class_7655.java:329)
at knot//net.minecraft.class_7655$class_9158.method_56520(class_7655.java:121)
at knot//net.minecraft.class_7655.method_56514(class_7655.java:201)
at knot//net.minecraft.class_7655.method_45120(class_7655.java:220)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at knot//net.minecraft.class_7655.method_45121(class_7655.java:220)
at knot//net.minecraft.class_7655.mixinextras$bridge$method_45121$37(class_7655.java)
at knot//net.minecraft.class_7655.wrapOperation$dii000$fabric-registry-sync-v0$wrapIsServerCall(class_7655.java:1055)```

teal wave
#

the weight should be 1 or higher

#

it cant be 0 or even less than 1

raw linden
#

so how do I make it not appear at the enchanting table at all?

robust bay
#

enchantments do not appear in the enchanting table by default. only those added to the tag #minecraft:in_enchanting_table do, so you just need to not add it to that tag

raw linden
#

alrighty thank you so much

#

yall are so helpful