Jump to content

Recommended Posts

Posted

I am trying to make the belgium flag as 3D model but when i place it it doesn't render the blocks behind the flag, here's is my flag's code:

package com.Egietje.degeweldigemod.init;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockRenderLayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class BelgiumFlag extends Block {

public BelgiumFlag() {
	super(Material.CLOTH);
}

@Override
public boolean isOpaqueCube(IBlockState state) {
        return false;
    }

@Override
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.CUTOUT;
}
}

And also: isOpaqueCube can't be overridden with @Override without the IBlockState state

Posted

im really new to forge but i know the game alot and any blockmodel that needs to show the sides of other blocks such as glass, slabs, stairs, torches and such need to be transperent blocks

a block that is not transperent will not render the sides of the blocks beside it to help performence

i think your first step should be looking how to make a block transperent...

Doing stuff n' things

Posted

Just override the isFullyOpaque method:

@Override
public boolean isFullyOpaque(IBlockState state) {
return false;
}

 

For my mod it works

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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