Jump to content

刘 远睿

Members
  • Posts

    2
  • Joined

  • Last visited

刘 远睿's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I just remember that the render type needs to register to mod bus. In this case, crops and flowers should use RenderType.getCutOut() in RenderTypeLookUp.setRenderLayer() method. I register my blocks in GensokyoOntology.java. GensokyoOntology.java: @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD,value = Dist.CLIENT) public static class RenderTypeRegistry { @SubscribeEvent public static void onRenderTypeSetUp(FMLClientSetupEvent event){ // Render transparent textures to block model like #cross and crop event.enqueueWork(() -> { RenderTypeLookup.setRenderLayer(BlockRegistry.LYCORIS_RADIATA.get(), RenderType.getCutout()); RenderTypeLookup.setRenderLayer(BlockRegistry.ONION_CROP_BLOCK.get(), RenderType.getCutout()); }); }
  2. Hi, I'm new to Minecraft Forge Mod. I meet with a problem when rendering flower blocks and crop blocks. The transparent part of the texture is black. I try to solve it by adding alpha channel in photoshop, but it doesn't work. The transparent part of the whole texture either render as black or white. Here's the resource of textures and the whole project: https://github.com/TheLawF/Gensokyo-Ontologics/blob/main/src/main/resources/assets/gensokyoontology/textures/block The code of LycorisRadiata.java is listed below: LycorisRadiata.java: package github.thelawf.gensokyoontology.common.block; import net.minecraft.block.*; import net.minecraft.block.material.Material; public class LycorisRadiata extends BushBlock { public LycorisRadiata() { super(Properties.create(Material.PLANTS) .doesNotBlockMovement() .zeroHardnessAndResistance() .sound(SoundType.PLANT)); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.