Jump to content

Recommended Posts

Posted

So I'm trying to make a custom torch block which extends TorchBlock, and used similar json as to how mojang normally implemented torches and redstone torches.

However, while the model and texture work fine, Im stuck with these black squares in the model, leaving me clueless as to what I missed.

 

image.png.adbfe5a26f36c800f0c8f87c19912481.png

 

Any help would be appreciated. 

 

public class ArcaneTorch extends TorchBlock {
    public ArcaneTorch() {
        super(TorchBlock.Properties.from(Blocks.TORCH));
    }

    @OnlyIn(Dist.CLIENT)
    @Override
    public void animateTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) {
        double d0 = (double)pos.getX() + 0.5D;
        double d1 = (double)pos.getY() + 0.7D;
        double d2 = (double)pos.getZ() + 0.5D;
        worldIn.addParticle(ParticleTypes.END_ROD, d0, d1, d2, 0.0D, 0.0D, 0.0D);
    }
}

 

This is the Torch class in question.

Posted
11 minutes ago, Ugdhar said:

You need to use RenderTypeLookup.setRenderLayer on your blocks in your FMLClientSetupEvent, probably with RenderType.getCutout()

That worked perfectly! Thank you!

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.