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 going to be adding a custom flower to my mod, but I am not sure how to get the texture to work. I thought I had everything set up correctly but when I went into my game I had no texture. I looked inside the flower classes and the tall grass class and I think I have everything virtually the same. Is there anything wrong with my class so far?

 

package com.qwertyuiop.blocks;

import net.minecraft.block.BlockBush;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.ColorizerGrass;
import net.minecraft.world.IBlockAccess;

import com.qwertyuiop.main.Qwertyuiop;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockEnrichedGrass extends BlockBush {

public BlockEnrichedGrass() {

	super(Material.grass);

	this.setBlockName("asdsa");
	this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

}

@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister i) {

	this.blockIcon = i.registerIcon(Qwertyuiop.MODID + ":texture.png");

}

@SideOnly(Side.CLIENT)
public IIcon getIcon(int par1, int par2) {

	return this.blockIcon;

}

}

  • Author

I figured out why it wasn't working before, I needed to change the name of the registerIcons method to registerBlockIcons...

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.