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

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.

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

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.