#So my ore hammer gets completely used

55 messages · Page 1 of 1 (latest)

agile raptor
#

When i use my ore hammer it gets used in the craft recipe

cursive garnetBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

agile raptor
#

@snow verge

#

It uses it up completely

#

Not durability

#

How do i fix that?

lime phoenix
#

yeah you don't set a max Damage at the registry

agile raptor
#

So what do i do

#

@lime phoenix

lime phoenix
agile raptor
lime phoenix
#

yeah because you can't take durability in a recipe if the item doen't have a maxDamage that is the first thing you need

jaunty sparrowBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
agile raptor
#

Do i just do ‘maxDamage’(1)

#

?

#

@lime phoenix

snow verge
#

you need to chill on pinging people left and right

#

rules are there for a reason

lime phoenix
#

and sometimes coding are a: just try and see it if it's working thing 😉

agile raptor
#

K sorry

#

Blue it infact did not work

lime phoenix
#

if it's not working send your code and the log because we can't see what you do and what error appears

agile raptor
#

K

jaunty sparrowBOT
#

Paste version of main.js, startup.log from @agile raptor

agile raptor
jaunty sparrowBOT
#

Paste version of recipe.js from @agile raptor

lime phoenix
#

did you look at the wiki how the syntax for the registry looks like ?

StartupEvents.registry('item', event => {
  event.create('ore_hammer').displayName('ยง9Ore Hammer').maxDamage(100)
})
agile raptor
#

Why 100

#

Wouldnt 1 be each individual durability

lime phoenix
#

it's a example

agile raptor
#

Oh :ok

#

That worked i think ty

#

Nope

#

Still perma uses it

#

Hm

jaunty sparrowBOT
#

Paste version of recipe.js, main.js, startup.log from @agile raptor

fossil bronze
#

.maxDamage() is the maximum durability of your item. Meaning it breaks after you damage it that number. Set your durability to something greater than 1 and you will get that number of uses.

agile raptor
#

Oh wait

agile raptor
#

As u were typing i thought

#

XD

#

Ty

#

Hm

#

For the only of its

#

Kind

#

What do i set it to

#

100?

#

125?

#

150?

#

125 should be good

#

There we go ty all!