I have not really done much with datapacks and I'd like to make an enchantment called "reaping" for hoes that increases the damage you deal by 1 point per level. (Basically slightly buffed sharpness for hoes). I was wondering either how to do this, if this already exists in a datapack, or if someone would be willing to make it for me.
#Making a new enchantment.
1 messages · Page 1 of 1 (latest)
https://minecraft.wiki/w/Enchantment_definition heres everything you need
You can also look how shapness works and modify some values
alr thx I didn't realize the wiki had as much documentation as it does, thats always been one of my complaints is I feel like its hard to find good datapack docs but mabey I'm just stupid lol
If you need to know something, first check the datapack wiki
good to know
Datapack Wiki
Welcome to the Datapack Wiki, a resource for everything related to Minecraft Datapacks. We've got guides, tutorials, and documentation to help you build your knowledge about data packs.
cool
Good luck with your enchantments man
yeah I've been doing java programming for a while but I've always found json syntax scary so hopefully I can figure it out
If you use Misode's generator for enchantments then you need not fear json
yeah
alr so uhm, It don't work, this is located withen data/namespace/enchantment
{
"description": "Reaping",
"anvil_cost": 2,
"max_level": 5,
"supported_items": "#minecraft:hoes",
"primary_items": "#minecraft:hoes",
"weight": 8,
"min_cost": {
"base": 3,
"per_level_above_first": 4
},
"max_cost": {
"base": 5,
"per_level_above_first": 5
},
"slots": [
"mainhand"
],
"effects": {
"minecraft:damage": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": 2,
"per_level_above_first": -2
}
}
}
],
"minecraft:armor_effectiveness": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": -0.1,
"per_level_above_first": -0.05
}
}
}
]
}
}
It does no damage, like I could hit a husk infinitely and it wouldn't die, and it doesn't seem to show up in the etable
To let it show up in the enchantment table you need to create a new folder in the tags folder of the minecraft-namespace called enchantment and a file in there called in_enchanting_table.json. In there is just a list of every enchantment you want to be enchantable through the etable.
And for the "It does no damage" you put ***-***2 in the per_level_above_first in your damage effect.
oh I'm stupid how did I do that, and wdym by minecraft-namespace do I have to make the json file in both?
The basic folder structure of a datapack -> you should have your namespace in the data folder and one called minecraft where you "told" minecraft your load and tick functions
ok
so do I need to put it in the minecraft and the namespace in the tags
or just the minecraft
minecraft
-> tags
--> enchantment
---> in_enchantment_table.json
got it
so smth like this
{
"replace": false,
"values": [
"reaperenchant:reaper"
]
}
great thx for the help
so It don't work
like I've enchanted 50 hoes and haven't gotten it
and it has a weight of 8 which is farely common
Did you just /reload after adding the enchantment?
no I reopened the world
and the other stuff I changed works
this is what I have rn tell me if the path or anything looks wrong
heres my most recent reaping.json incase that helps too
{
"description": "Reaping",
"anvil_cost": 2,
"max_level": 5,
"supported_items": "#minecraft:hoes",
"primary_items": "#minecraft:hoes",
"weight": 8,
"min_cost": {
"base": 3,
"per_level_above_first": 4
},
"max_cost": {
"base": 5,
"per_level_above_first": 5
},
"slots": [
"mainhand"
],
"effects": {
"minecraft:damage": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": 2,
"per_level_above_first": 1.5
}
}
}
],
"minecraft:armor_effectiveness": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": -0.1,
"per_level_above_first": -0.05
}
}
}
]
}
}
Looks correct... dunno what could be wrong.
Have you tried starting Minecraft with the debug log?
(Possible by navigating to settings in the launcher and tick "open output log...")
Set weight to like 100 and see if that works
Oh yeah what might be the cause is that your min and max cost are pretty low, have you tried having less bookshelves around your enchantment table.
alr gimme a second to try that
@bleak shadow @ripe pilot I tried both and neither helped so idk, heres my log if you want: https://paste.atlauncher.com/view/ccb36fe1-d555-4388-962e-88a56785010b
If you got no errors then I can't help you, this is beyond my understanding. I'm sorry.
we'll see if anyone else can figure it out ig