Jump to content

Minecraft ID's and conflicts


lucasmontec

Recommended Posts

Hey guys! Hello to all of you =)

 

Let me introduce first. I'm a java developer studiyng computer science here in Brazil. I play tons of minecraft and love mods.

Well, that didn't hurt that much did it?

 

Good, lets get going...

As a dev I wanted to start modding too but I found the API a bit messy. This is probably because the minecraft code is messy too as I read some of it. But is becoming clearer the more I read. Still I'd like to know how the ID system works and why it was developed that way. I read most of the structure but didn't find anything related to that yet. Why the ID's are numbers instead of a String for example? Couldn't mojang use a fast way of searching throught strings instead of id's? If it is because of the data model, what model they use? If it is because of storage sizes, that could be engeneered.... or not? Well, I'd like to get into that if someone knows something about it. Otherwise, thanks for reading! I hope this post is in the right place.

8)

Link to comment
Share on other sites

It's that way because it's that way.

We have had many discussions on how things could be better. But we are working within a framework we have very little control over.

ID setup is a fundamental thing we can't change. You just need to handle it.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Yeah, I understand stuff is this way because it is this way... I would just like to know some information like, Minecraft uses a Btree for items and their id's are part of that. Just how inners are working... I got curious about that, and maybe you guys know better than me how the entire system is plugged together.

Link to comment
Share on other sites

I would just like to know some information like, Minecraft uses a Btree for items and their id's are part of that.

No, it uses flat arrays, and hard coded ids.

Literally 1/2 there shit is if getBlock(x,y,z) == 15 do shit.

Or Block.blocks[getBlock(x,y,z)].doShit()

 

This argument is getting annoying and repetitive.

If you don't spend 10 seconds to do some research, please don't support things -.-

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

  • 1 month later...
I would just like to know some information like, Minecraft uses a Btree for items and their id's are part of that.

 

I'm sorry, I was misunderstood here. I meant I don't know how it works and the "Minecraft uses a Btree for items..." was just an example of the kind of information interested me.

 

Its sad to see that items are stored that way... But thanks for the quick support. Also I'm sorry if this topic was revived this many times... I should have researched better.

 

It is sad to see such a nice game having such big problems of architecture and giving almost 0 fuc** to modding support. Every day I thank guys like you for having the balls to go through notch's code and create this robust API.  8)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.