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 need for each block because I'm creating a separate class file? or done differently?

 

 

pleace help me.

It depends, in what way the blocks are different. If all these are just normal block with just another texture, footstepsound, id and name, than you can create just one new class. If one block should have a special property, then you should do a new class file especially for this block.

Well basically, this is a classfile of a normal block:

package Tutorial;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class TutorialBlock extends Block {

public TutorialBlock(int par1, int par2, Material par3Material) {
	super(par1, par2, par3Material);
}

@Override
public String getTextureFile() {
	return "/Tutorial/tutorial_texutre.png";
}

}

In your mainmodfile, you should write something like this:

public static Block tutorialBlock= new TutorialBlock(500, 0, Material.sand).setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setBlockName("oreCopper");

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.