Jump to content

Recommended Posts

Posted

lightLevel truns the block into a light source. i realized that having the light level at 15 would not look great for what i need, i found out that

.isValidSpawn(Blocks::never).isRedstoneConductor(Blocks::never).isSuffocating(Blocks::never).isViewBlocking(Blocks::never))

gives the block behavior similar to glass which is what my block is supposed to be like but the methods listed above dont seem to work in my own class

 

Posted

take a look into the GlassBlock

1 hour ago, KaboomRoads said:

but the methods listed above dont seem to work in my own class

17 hours ago, Luis_ST said:

add lightLevel to your Block.Properties

the methode is not inside your Block class, for an example you can take a look at the Blocks.BEACON

Posted (edited)

it does i copied it from the blocks class

private static boolean never(BlockState p_50806_, BlockGetter p_50807_, BlockPos p_50808_) {
		return false;
	}

and then i changed Blocks::never to ModBlocks::never

Edited by KaboomRoads
Posted

this should work, but only for:

  • isValidSpawn
  • isRedstoneConductor
  • isSuffocating
  • isViewBlocking

but for lightLevel you need a method with BlockState as parameter and an int as retrun value

Posted (edited)

i fixed it now. there was a different never boolean somewhere in the blocks class

private static Boolean never(BlockState p_50779_, BlockGetter p_50780_, BlockPos p_50781_, EntityType<?> p_50782_) {
		return (boolean) false;
	}

 

Edited by KaboomRoads

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.