Jump to content

Recommended Posts

Posted

I want to render a fake block (a block that only has texture and can be skipped). I came to something like this, but I don't know what to give to the renderSingleBlock method

 

Minecraft.getInstance().getBlockRenderer().renderSingleBlock(blockstate, posStack, bufferSource, pakcedLight, packedOverlay, modelData, renderType);

I want to put the textures of the game blocks for the fake blocks, but if I can also put custom textures, that would be fine.

Posted
3 hours ago, BaRiBoD said:

I came to something like this, but I don't know what to give to the renderSingleBlock method

You can look at the places where the method is called to get an idea of what arguments to supply.

Posted

could it be by making a custome block whit no hitbox 
or by a falling block entity 

	// ########## ########## ##########
public FallingBlockEntity create_FallingBlock(BlockPos cursor){
this.fallingblock = FallingBlockEntity.fall(warudo, cursor, this.getBlockState() );
this.fallingblock.setNoGravity(true);
warudo.addFreshEntity(this.fallingblock);
return this.fallingblock;
}
	

  • 2 weeks later...
Posted

just don't give it a hit (voxel) box, but if you do, its hard to get rid of it in the game.  I normally a have 0.0F 0.0F 0.0F   16.0F 1.0F 16.0F so there is something to hit when you want delete it in game

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.