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

Can anyone help me with making the block face the player on place because all the code I made changed the entire texture to be one when I had it

set to a mulittexture block I think I know whats wrong, but i could use a little help.

I think the onBlockPlacedBy function of BlockFurnace is a good place to start:

 

222     /**
223     * Called when the block is placed in the world.
224     */
225    public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving)
226    {
227        int var6 = MathHelper.floor_double((double)(par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
228
229        if (var6 == 0)
230        {
231            par1World.setBlockMetadataWithNotify(par2, par3, par4, 2);
232        }
233
234        if (var6 == 1)
235        {
236            par1World.setBlockMetadataWithNotify(par2, par3, par4, 5);
237        }
238
239        if (var6 == 2)
240        {
241            par1World.setBlockMetadataWithNotify(par2, par3, par4, 3);
242        }
243
244        if (var6 == 3)
245        {
246            par1World.setBlockMetadataWithNotify(par2, par3, par4, 4);
247        }
248    }

 

And then the metadata defines which side the block faces, with getBlockTextureFromSide.

 

To provide any more help, I'll have to get home and get to experimenting. So good luck for now. :D

  • Author

Figured it out now pro-mole if you would like to know the rest of the code needed. Going to lock it pm me if you want to know.

Guest
This topic is now closed to further replies.

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.