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

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;
}




}

 

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!!

  • Author

Ok, but can U help me? a moderator can change the fórum please?

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...

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.