Jump to content

Recommended Posts

Posted

My problem is:

I'm trying to make a new glass, but this isn't transparent!

With ML, it works, but with Forge, no...

Images:

Original Texture:

width=16 height=16http://moddingbr.com/forum/uploads/imgs/small_moddingbr_1358027006__vidroamarelo.png[/img]

 

In-game texture:

width=50 height=29http://moddingbr.com/forum/uploads/imgs/small_moddingbr_1358026926__2013-01-12_194000.png[/img]

 

Codes:

MainClass:

package mod.teste.mods;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPane;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.src.BaseMod;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "Decorative Blocks", name = "Decorative Blocks", version = "3.0")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class MainClass extends BaseMod
{


public static Block vidroamarelo;


@PreInit
public void load(FMLPreInitializationEvent event)
{



}

@Init
public void load(FMLInitializationEvent event)
{

	vidroamarelo = new BlockVidros(220, 0, Material.glass, true).setBlockName("Blocotut").setCreativeTab(CreativeTabs.tabBlock);
	GameRegistry.registerBlock(vidroamarelo);
	LanguageRegistry.addName(vidroamarelo, "Vidro Amarelo");

}

@PostInit
public void load(FMLPostInitializationEvent event)
{

}

@Override
public String getVersion() {
	// TODO Auto-generated method stub
	return null;
}

@Override
public void load() {
	// TODO Auto-generated method stub

}


}

 

BlockVidros:

package mod.teste.mods;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.BlockGlass;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class BlockVidros extends Block {

 public BlockVidros(int par1, int par2, Material par3Material, boolean par4)
    {
        super(par1, par2, par3Material);
        this.setCreativeTab(CreativeTabs.tabBlock);
    }
public String getTextureFile()
{

return "/vidroscoloridos/vidroamarelo.png";


}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
    return 1;
}

/**
* Returns which pass should this block be rendered on. 0 for solids and 1 for alpha

/**
* Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
    return false;
}




}

 

Posted

Wrong forum.

There's an EAQ for a reason. Read it!

"Note that failure to read this will make you look idiotic. You don't want that do you?" -- luacs1998

 

First rule of bug reports: More information is always better.

Oh, and logs OR IT DIDN'T HAPPEN!!

Posted

Clearer screenshot please ? Use the F2 in game.

 

You could try changing the texture of your new glass to the texture of the vanilla glass

aka. "/terrain.png", and the iconIndex is 50.

 

Then post another screenshot of that.

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.