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 have a stone block I set up.

It has the hardness and resistance of stone.

It is programmed to require a diamond pickaxe to mine it.

 

It's mineable with any pick, even wood.

I even mined it with my fists!

 

Forge 804 (Please fix this!)

  • Author

I initalize all my Gallifrey- related stuff in another file:

 

@EventHandler
        public void load(FMLInitializationEvent event) {
        	
        	// Loads Gallifrey package
        	if (CoreConfiguration.enableGallifrey == true) {
            CoreGallifrey.initalize();
        	}
        	else {
        		System.out.println("[Whocraft-Core] Gallifrey is disabled, ignoring it...");
        	}
        	
            proxy.registerRenderers();
        }

 

Let's look at that file.

 

package net.pekkit.mcforge.whocraft.gallifrey;

import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.pekkit.mcforge.whocraft.CoreConfiguration;

public class CoreGallifrey {

public static Block gallifreyStone;
public static Block gallifreyGrass;
    public static Block gallifreyDirt;
public static Block gallifreyDiamondOre;
public static Block gallifreyPortal;

    public static int gallifreyDimID = 10;
    
    public static BiomeGenBase BiomeGallifrey;
    public static int gallifreyBiomeID = 53;

@SuppressWarnings("deprecation")
    public static void initalize() {
	System.out.println("[Whocraft-Core] Core module Gallifrey is enabled, loading it...");
	loadBlocks();
	registerDimension();
	loadBiome();
}

public static void loadBlocks() {
	gallifreyStone = new BlockGallifreyStone(241, Material.ground);
	gallifreyGrass = new BlockGallifreyGrass(242, Material.grass);
    gallifreyDirt = new BlockGallifreyDirt(243, Material.grass);
	gallifreyDiamondOre = new BlockGallifreyDiamondOre(244);
	gallifreyPortal = new BlockGallifreyPortal(CoreConfiguration.gallifreyPortalID).setUnlocalizedName("whocraft:gallifreyPortal");

	LanguageRegistry.addName(gallifreyStone, "§4Stone");
        MinecraftForge.setBlockHarvestLevel(gallifreyStone, "pickaxe", 3);
        GameRegistry.registerBlock(gallifreyStone, "gallifreyStone");
    	
    	LanguageRegistry.addName(gallifreyDirt, "§4Dirt");
        MinecraftForge.setBlockHarvestLevel(gallifreyDirt, "shovel", 0);
        GameRegistry.registerBlock(gallifreyDirt, "gallifreyDirt");
    	
    	LanguageRegistry.addName(gallifreyGrass, "§4Grass Block");
        MinecraftForge.setBlockHarvestLevel(gallifreyGrass, "shovel", 0);
        GameRegistry.registerBlock(gallifreyGrass, "gallifreyGrass");
        
        LanguageRegistry.addName(gallifreyDiamondOre, "§4Diamond Ore");
        MinecraftForge.setBlockHarvestLevel(gallifreyDiamondOre, "pickaxe", 2);
        GameRegistry.registerBlock(gallifreyDiamondOre, "gallifreyDiamondOre");
        
        GameRegistry.registerBlock(gallifreyPortal, "gallifreyPortal");
        LanguageRegistry.addName(gallifreyPortal, "§4[DEV] Gallifrey Portal Block");

System.out.println("[Whocraft-Core: Gallifrey] Loaded 5 blocks!");
    }
public static void registerDimension() {
    	
	DimensionManager.registerProviderType(gallifreyDimID, WorldProviderGallifrey.class, false);
	DimensionManager.registerDimension(gallifreyDimID, gallifreyDimID);
    	 
    	 System.out.println("[Whocraft-Core: Gallifrey] Registered the dimension Gallifrey with the dimension ID " + gallifreyDimID + "!");
    }

public static void loadBiome() {
	 BiomeGallifrey = new BiomeGenGallifrey(gallifreyBiomeID);
	 System.out.println("[Whocraft-Core: Gallifrey] Registered the biome Gallifrey with the biome ID " + gallifreyBiomeID + "!");
}
}

 

Now for the affected block file:

 

package net.pekkit.mcforge.whocraft.gallifrey;

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

public class BlockGallifreyStone extends Block {

public BlockGallifreyStone(int id, Material material) {
	super(id, material);
	setHardness(1.5F);
	setResistance(10.0F);
	setStepSound(Block.soundStoneFootstep);
	setUnlocalizedName("gallifreyStone");
	setCreativeTab(CreativeTabs.tabBlock);

	// Texture
	func_111022_d("whocraft:gallifreyStone");

}

}

 

I don't see a problem.

  • Author

Taken from the Gallifrey class. I initalized the Blocks like this:

public static Block gallifreyStone;

 

public static void loadBlocks() {
	gallifreyStone = new BlockGallifreyStone(241, Material.ground);
	gallifreyGrass = new BlockGallifreyGrass(242, Material.grass);
    gallifreyDirt = new BlockGallifreyDirt(243, Material.grass);
	gallifreyDiamondOre = new BlockGallifreyDiamondOre(244);
	gallifreyPortal = new BlockGallifreyPortal(CoreConfiguration.gallifreyPortalID).setUnlocalizedName("whocraft:gallifreyPortal");

	LanguageRegistry.addName(gallifreyStone, "§4Stone");
        MinecraftForge.setBlockHarvestLevel(gallifreyStone, "pickaxe", 3);
        GameRegistry.registerBlock(gallifreyStone, "gallifreyStone");
    	
    	LanguageRegistry.addName(gallifreyDirt, "§4Dirt");
        MinecraftForge.setBlockHarvestLevel(gallifreyDirt, "shovel", 0);
        GameRegistry.registerBlock(gallifreyDirt, "gallifreyDirt");
    	
    	LanguageRegistry.addName(gallifreyGrass, "§4Grass Block");
        MinecraftForge.setBlockHarvestLevel(gallifreyGrass, "shovel", 0);
        GameRegistry.registerBlock(gallifreyGrass, "gallifreyGrass");
        
        LanguageRegistry.addName(gallifreyDiamondOre, "§4Diamond Ore");
        MinecraftForge.setBlockHarvestLevel(gallifreyDiamondOre, "pickaxe", 2);
        GameRegistry.registerBlock(gallifreyDiamondOre, "gallifreyDiamondOre");
        
        GameRegistry.registerBlock(gallifreyPortal, "gallifreyPortal");
        LanguageRegistry.addName(gallifreyPortal, "§4[DEV] Gallifrey Portal Block");

Problem found :

You using wrong block material.

Try this :

gallifreyStone = new BlockGallifreyStone(241, Material.rock);

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.