Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip: Add Material::from(isize) #107

Closed
wants to merge 1 commit into from
Closed

Wip: Add Material::from(isize) #107

wants to merge 1 commit into from

Conversation

kepet19
Copy link
Contributor

@kepet19 kepet19 commented Sep 6, 2021

Hello this is a work in progress,
I don't know if you want a huge match statement like this or you would like to use something else.

When I run it from minecraft server 1.16.4
it tries too set item 902. but is is not in the list.
image
image

do somebody know where to look for minecraf block id's?

I am going to remove log::info later. it is just for debugging purpose.

@kepet19 kepet19 changed the title [Wip] Add Material::from(isize) Wip: Add Material::from(isize) Sep 6, 2021
@PureTryOut
Copy link
Collaborator

PureTryOut commented Sep 6, 2021

I am going to remove log::info later. it is just for debugging purpose

Consider using log::debug, it´s made for such things 😉

do somebody know where to look for minecraf block id's?

Almost everything you need is documented on the Minecraft wiki.

For block ID´s up-to 1.12: https://minecraft.fandom.com/wiki/Java_Edition_data_values/Pre-flattening
Since 1.13: https://minecraft.fandom.com/wiki/Java_Edition_data_values

@@ -689,8 +689,8 @@ impl Server {
set_slot.item.as_ref().map_or(0, |s| s.id)
);
let item = set_slot.item.map(|stack| Item {
material: Material::from(stack.id), // TODO: map stack.id to material!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you´re resolving the todo, remove the todo 😉

@terrarier2111
Copy link
Member

I am already implementing this with cross version compatability, i'll be done by today evening (in round about 8hrs)

@kepet19
Copy link
Contributor Author

kepet19 commented Sep 6, 2021

I am going to remove log::info later. it is just for debugging purpose

Consider using log::debug, it´s made for such things wink

do somebody know where to look for minecraf block id's?

Almost everything you need is documented on the Minecraft wiki.

For block ID´s up-to 1.12: https://minecraft.fandom.com/wiki/Java_Edition_data_values/Pre-flattening
Since 1.13: https://minecraft.fandom.com/wiki/Java_Edition_data_values

You would be fine to leave it with log::debug ?

I am not sure I tried yesterday with log:debug, I could not get it out to the terminal. I tried it with Environment variable RUST_LOG=debug, could not get that to work. not sure how to debug.

@kepet19
Copy link
Contributor Author

kepet19 commented Sep 6, 2021

I am already implementing this with cross version compatability, i'll be done by today evening (in round about 8hrs)

okay that sounds nice. I am just gonna close this issue.

@kepet19 kepet19 closed this Sep 6, 2021
@PureTryOut
Copy link
Collaborator

I tried it with Environment variable RUST_LOG=debug, could not get that to work. not sure how to debug.

Hmm that should be enough, not sure then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants