Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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)

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

  • Author

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.

"Couldn't mojang use a fast way of searching throught strings instead of id's?"

 

Yes, it could, but the fact is that it doesn't. And we can't change that, or we would lose compatibility with vanilla.

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

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

  • 1 month later...
  • Author
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)

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.