Jump to content

[1.7.10] What do the four int parameters in placeDoorBlock method


Thornack

Recommended Posts

Hi

 

The fastest way to figure out parameters like this is to see what the caller provides.  In this case a search on usage gives

ItemDoor.onItemUse:
                    int i1 = MathHelper.floor_double((double)((p_77648_2_.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
                    placeDoorBlock(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, i1, block);

So the parameter you are interested in is i1, which looks like the player rotation converted to a quadrant from 0 - 3.  In other words, the direction that the player is facing in (north, south, east, west).

 

-TGG

 

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.