Jump to content

Recommended Posts

Posted (edited)


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...

×   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.