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


Hi, I'm working on making a new directional block.

I think giving some properties to block has been changed from 1.20. (am I right?)

I just tried to do like:

BlockBehaviour.Properties.of(Material.STONE).strength(4f)

...and  I found Material class is nowhere.

So I fixed it.

This is what I've done to "example_block"

BlockBehaviour.Properties.of().mapColor(MapColor.STONE))

It worked fine with "example_block"

I thought I could do the same to my 'super cool' directional block.

so I fixed it. (again)

super(BlockBehaviour.Properties.copy(Blocks.CHEST).mapColor(MapColor.STONE).dynamicShape());

 and this is what I got.

Caused by: java.lang.IllegalArgumentException: Cannot set property DirectionProperty{name=facing, clazz=class net.minecraft.core.Direction, values=[north, south, west, east]} as it does not exist in Block{minecraft:air}

I tested several times what if I change Blocks.CHEST into Blocks.FURNACE.

but it still gives me the similar error, only different thing is that it tells me Furnace lits, mine doesn't.

I want to know why it says "air" despite I wrote CHEST.

 

I tested several times what if I change BlocksCHEST into Blocks.FURNACE.

but it still gives me a similar error, only different thing is that Furnace lits, mine doesn't.

I want to know why it says "air" despite I wrote CHEST.

 

How can I fix this?

And Why the registering thing has become soo complicated than before?

Edited by 1HA
problem has solved

  • 1HA changed the title to [Solved][1.20.1] DirectionalBlock

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.