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

Hello there!

 

Background: I've been working on code for intergrading custom models into minecraft described in JSON format. Before that I've been writing models using ModelRenderers.

 

Before I could using custom models described in JSON, I used to write every box in ModelRenderer format, and then I had to check if the texture mapping is correct and is coordinates are fine too by running minecraft again and again. The problem was in the coordinate system.

 

Why the hell is ModelBase's coordinate system is so f*ck*d up?! Well, X and Z axes are kinda fine, but the Y axis is messed up completely! Why Y=0.0 isn't the bottom of the model, and instead it's something like 16 pixels (as I understand 16 pixels = 1 block (0.0625F))? That's not cool.

 

Why did Mojang/Notch choose that kind of origin for models?

 

P.S.: Is that the right forum for discussions?

Blockbuster – simple machinimas and cinematics for Minecraft

Y axis is fine, take an example from the cube.json file:

 

{

    "parent": "block/block",

    "elements": [

        {  "from": [ 0, 0, 0 ],

            "to": [ 16, 16, 16 ],

            "faces": {

                "down":  { "texture": "#down", "cullface": "down" },

                "up":    { "texture": "#up", "cullface": "up" },

                "north": { "texture": "#north", "cullface": "north" },

                "south": { "texture": "#south", "cullface": "south" },

                "west":  { "texture": "#west", "cullface": "west" },

                "east":  { "texture": "#east", "cullface": "east" }

            }

        }

    ]

}

 

On the Y axis (in green) we can see that the block is going from y=0 to y=16

So I conclude that 0 is the bottom and 16 is the top of a typical minecraft block.

  • Author

Y axis is fine, take an example from the cube.json file:

 

{

    "parent": "block/block",

    "elements": [

        {  "from": [ 0, 0, 0 ],

            "to": [ 16, 16, 16 ],

            "faces": {

                "down":  { "texture": "#down", "cullface": "down" },

                "up":    { "texture": "#up", "cullface": "up" },

                "north": { "texture": "#north", "cullface": "north" },

                "south": { "texture": "#south", "cullface": "south" },

                "west":  { "texture": "#west", "cullface": "west" },

                "east":  { "texture": "#east", "cullface": "east" }

            }

        }

    ]

}

 

On the Y axis (in green) we can see that the block is going from y=0 to y=16

So I conclude that 0 is the bottom and 16 is the top of a typical minecraft block.

 

I'm talking about ModelBase coordinate system, i.e. the one that Render<?> and entities use.

Blockbuster – simple machinimas and cinematics for Minecraft

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.