#Making a new enchantment.

1 messages · Page 1 of 1 (latest)

polar wolf
#

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.

ripe pilot
#

You can also look how shapness works and modify some values

polar wolf
#

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

ripe pilot
polar wolf
#

good to know

ripe pilot
polar wolf
#

cool

ripe pilot
#

Good luck with your enchantments man

polar wolf
#

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

torn leaf
polar wolf
#

yeah

polar wolf
#

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

bleak shadow
#

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.

polar wolf
bleak shadow
#

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

polar wolf
#

ok

#

so do I need to put it in the minecraft and the namespace in the tags

#

or just the minecraft

bleak shadow
#

minecraft
-> tags
--> enchantment
---> in_enchantment_table.json

polar wolf
#

got it

#

so smth like this

{
  "replace": false,
  "values": [
    "reaperenchant:reaper"
  ]
}
#

great thx for the help

polar wolf
#

like I've enchanted 50 hoes and haven't gotten it

#

and it has a weight of 8 which is farely common

austere dagger
#

Did you just /reload after adding the enchantment?

polar wolf
#

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
              }
            }
          }
        ]
      }
}
bleak shadow
#

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...")

ripe pilot
#

Set weight to like 100 and see if that works

bleak shadow
#

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.

polar wolf
#

alr gimme a second to try that

polar wolf
bleak shadow
#

If you got no errors then I can't help you, this is beyond my understanding. I'm sorry.

polar wolf
#

alr

#

I might just leave it as it cannot be enchanting tabled then

burnt sigilBOT
#

-# (helpers summoned) <@&1166082198152159386> <@&1202694677766348840>

polar wolf
#

we'll see if anyone else can figure it out ig

austere dagger
#

The tag is in_enchanting_table

polar wolf
#

ah

#

ofc it has to be that stupidly simple