Jump to content

Recommended Posts

Posted

Please help, every time I try to recompile my mod I get the same error.

 

 

src\minecraft\net\minecraft\src\BuildingBlock.java:3: error: package net.minecraft.src.forge does not exist

 

import net.minecraft.src.forge.*;

 

^

 

src\minecraft\net\minecraft\src\BuildingBlock.java:5: error: cannot find symbol

 

public class BuildingBlock extends Block implements ITextureProvider

 

                                                    ^

 

  symbol: class ITextureProvider

 

src\minecraft\net\minecraft\src\mod_BuildingBlocks.java:3: error: package net.minecraft.src.forge does not exist

 

import net.minecraft.src.forge.*;

 

^

 

src\minecraft\net\minecraft\src\mod_BuildingBlocks.java:23: error: cannot find symbol

 

MinecraftForgeClient.preloadTexture("buildingBlocks/terrain.png");

 

^

 

  symbol:  variable MinecraftForgeClient

 

  location: class mod_BuildingBlocks

 

Note: Some input files use unchecked or unsafe operations.

 

Note: Recompile with -Xlint:unchecked for details.

 

4 errors

 

 

 

 

Here is my mod files

mod_BuildingBlocks.java

 

package net.minecraft.src;

 

import net.minecraft.src.forge.*;

 

public class mod_BuildingBlocks extends BaseMod

{

public static final Block obsidianBrick = new BuildingBlock(768, 0).setHardness(50F).setResistance(6000000F).setBlockName("obsidianBrick");

 

public mod_BuildingBlocks()

{

 

}

 

public void load()

{

//Registers

ModLoader.registerBlock(obsidianBrick);

 

//Names

ModLoader.addName(obsidianBrick, "Obsidian Brick");

 

//Textures

MinecraftForgeClient.preloadTexture("buildingBlocks/terrain.png");

}

 

public String getVersion()

{

return "0.1";

}

}

 

 

BuildingBlocks

 

package net.minecraft.src;

 

import net.minecraft.src.forge.*;

 

public class BuildingBlock extends Block implements ITextureProvider

{

public BuildingBlock(int i, int j)

{

super(i, j, Material.rock);

}

 

public String getTextureFile()

{

return "buildingBlocks/terrain.png/terrain.png";

}

}

 

 

I've looked everywhere for an answer to this for the past hour, I just can't find it anywhere.

 

I think its because it can't find net.minecraft.src.forge.*; but I can't figure out how to fix it.

 

Please help.

Posted

if you are using the newest version of forge for minecraft 1.3.1 then net.minecraft.src.forge no longer exists everything is stored in different folders import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

look in net for minecraft forge and the various hooks

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.