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

I am having problems setting the texture for my block, there is a spoiler below with the blocks code, please help as this is very frustrating.

 

 

package mnis.kt.common;

 

import org.lwjgl.util.Color;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.util.ChatMessageComponent;

import net.minecraft.util.EnumChatFormatting;

import net.minecraft.world.World;

import net.minecraftforge.client.event.RenderGameOverlayEvent.Chat;

 

public class BlockBOH extends Block {

 

private EntityPlayer player;

 

public BlockBOH(int par1, Material par2Material) {

super(par1, par2Material);

this.setCreativeTab(CreativeTabs.tabBlock);

this.setLightValue(0.0F);

this.setHardness(10);

this.setResistance(10);

}

 

public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)

{

if (par1World.isRemote)

{

return true;

}

else

{

par5EntityPlayer.addChatMessage(EnumChatFormatting.DARK_GRAY + "[" + EnumChatFormatting.DARK_RED + "Healing Block" + EnumChatFormatting.DARK_GRAY + "]" + " You have been healed.");

par5EntityPlayer.setHealth((float) 20.0F);

System.out.println("Healing Block Used");

return true;

}

}

public void registerIcons(IconRegister iconRegister) {

blockIcon = iconRegister.registerIcon("mnis:boh");

}

}

 

  • Author

Check the following things:

  • Is your ModID
    mnis

    ?

  • Is your texture located at
    src/main/resources/assets/mnis/textures/blocks/boh.png

    ?

  • Are your Blocks created and registered in preInit?

Thank you for the help the problem was I accidentally made the assets folder in java instead of resources

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.