feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Durability data missing, results in function that always returns None. #493

Open Miro-Andrin opened 2 years ago

Miro-Andrin commented 2 years ago

Description

The method:

impl Item {
   pub fn durability(&self) -> Option<u32> {
        ...
   }
}

Always returns None. This file is generated using 'items.py' using the data from Prismarinejs/minecraft-data. However the items.json only contains damage values for minecraft 1.14 making our function return None in every case. So currently it does the same as this implementation.

impl Item{
   pub fn durability(&self) -> Option<u32> {
        None
   }
}

Related Issues

If #384 ever pans out, then we would want to add some sanity checks for stuff like this.