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

Hello, I am creating a custom type of lantern in the game, and to do this I'm pulling directly from the LanternBlock class:

public static final RegistryObject<Block> VOID_LANTERN = BLOCKS.register("void_lantern", () -> new LanternBlock(Block.Properties.from(Blocks.LANTERN)));

In-game the lantern has the correct model, and the textures are mapped correctly, however there is no transparency within the textures themselves. You can see what I mean in the pic below. How would I go about fixing this. 1.12.2 was the last time I dealt with modding, and it seems the entire games rendering system has changed since then.

 

image.thumb.png.58257a04cee5663ce51a5a50f2ffe639.png

Follow these rules when talking to me, and we'll get along fine.

1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them.

2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't?

3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum.

 

ModMCdl - Co-Founder and Director of Design for Artemis Game Studios

You need to call RenderTypeLookup.setRenderLayer in the client setup event to define the block's render type. I recommend using CUTOUT, but CUTOUT_MIPPED would also work.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

  • Author
2 minutes ago, imacatlolol said:

You need to call RenderTypeLookup.setRenderLayer in the client setup event to define the block's render type. I recommend using CUTOUT, but CUTOUT_MIPPED would also work.

How am I calling this? Can you point me in a direction for an example of this in action? 

Follow these rules when talking to me, and we'll get along fine.

1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them.

2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't?

3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum.

 

ModMCdl - Co-Founder and Director of Design for Artemis Game Studios

4 minutes ago, ModMCdl said:

How am I calling this? Can you point me in a direction for an example of this in action? 

It's a static method. You just call it directly in the client setup event (FMLClientSetupEvent). It wants a Block and a RenderType, so simply provide it with what I said. I'm not sure what the confusing part is, this should be basic Java. If you don't know how to subscribe to events, read the docs.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

  • Author
11 minutes ago, imacatlolol said:

It's a static method. You just call it directly in the client setup event (FMLClientSetupEvent). It wants a Block and a RenderType, so simply provide it with what I said. I'm not sure what the confusing part is, this should be basic Java. If you don't know how to subscribe to events, read the docs.

Got it, I didn't know it was a static method, and IntelliJ didn't want to autocomplete it as one. Your second explanation was also much more clear than the first. As I said before, the last time I dealt with transparency, it was overridden directly in a custom block class. Thanks!

Edited by ModMCdl

Follow these rules when talking to me, and we'll get along fine.

1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them.

2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't?

3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum.

 

ModMCdl - Co-Founder and Director of Design for Artemis Game Studios

57 minutes ago, ModMCdl said:

Got it, I didn't know it was a static method, and IntelliJ didn't want to autocomplete it as one. Your second explanation was also much more clear than the first. As I said before, the last time I dealt with transparency, it was overridden directly in a custom block class. Thanks!

Ah, I've never been very good at clarity, my bad. Glad you got it working!

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

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.