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

I have the block below (`clay oven`). It is supposed to be a half-height block.

219908140-2756cc45-a943-48f1-89da-f7ce2d

I'm looking for blocks in vanilla I can research that might give me a clue how to correct the rendering so the top renders where it's supposed to be and the top half of the block is transparent.

Another problem I'm having with this block is that when I place it, I get the back side facing me. How do I correct that?

Here is the current source (pretty basic at this point):

Spoiler
	private static class ClayOvenBlock extends CampfireBlock {

		public ClayOvenBlock() {
			super(true, 0, BlockBehaviour.Properties
					.of(Material.STONE)
					.strength(3.5F)
					.requiresCorrectToolForDrops()
					.lightLevel(litBlockEmission(8)));
		}

	}

I added the following to properly render the collision frame:

		protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 9.0D, 16.0D);

		//	...

		public VoxelShape getShape(BlockState state, BlockGetter getter, BlockPos pos, CollisionContext context) {
			return SHAPE;
		}

Side note: `getShape` is deprecated. What are we supposed to use? Campfire is using this method override.

Edited by badkraft

11 hours ago, badkraft said:

I'm looking for blocks in vanilla I can research that might give me a clue how to correct the rendering so the top renders where it's supposed to be and the top half of the block is transparent.

The slab block?

11 hours ago, badkraft said:

Another problem I'm having with this block is that when I place it, I get the back side facing me. How do I correct that?

Look at how the FurnaceBlock specifies side using a property.

11 hours ago, badkraft said:

Side note: `getShape` is deprecated. What are we supposed to use? Campfire is using this method override.

#getShape. Mojang deprecates the method for usage, not overriding.

  • Author

Fixed...

Used Blockbench to create the textures and exported the correct model.json.  

221223477-bae32555-1bd6-47ec-acdc-72051c

Edited by badkraft

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.