Jump to content

My Textures Arent Rendering Properly


jaojake1804

Recommended Posts

package MedievalCraft2;

import java.util.ArrayList;
import java.util.Random;
import net.minecraft.*;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
import net.minecraft.src.Block;
import net.minecraft.src.forge.ITextureProvider;

public class BlockPlatinumOre extends Block implements ITextureProvider
{	
    public BlockPlatinumOre(int i, int j)
    {
        super(i, Material.rock);  
        setHardness(6F);
        setResistance(1.0F);
        setLightValue(0.4F);
    }
    public String getTextureFile()
    {
    	return "/MeC2/Terrain/terrain.png";
    }
    public int idDropped(int par1, Random par2Random, int par3)
    {
        return MeC2Items.shardPlatinum.shiftedIndex;
    }
    public int quantityDroppedWithBonus(int par1, Random par2Random)
    {
        return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1);
    }
    public int quantityDropped(Random par1Random)
    {
        return 1 + par1Random.nextInt(2);
    }
    public void addCreativeItems(ArrayList itemList)
    {
      itemList.add(new ItemStack(this, 1, 5));
    }
}

 

 

package MedievalCraft2;

import net.minecraft.src.*;
import net.minecraft.src.forge.AchievementPage;
import net.minecraft.src.forge.IEntityInteractHandler;
import net.minecraft.src.forge.MinecraftForge;
import net.minecraft.src.forge.MinecraftForgeClient;
import net.minecraft.src.forge.ITextureProvider;
import net.minecraft.src.forge.NetworkMod;
import java.util.ArrayList;
import java.util.Map;
import java.util.Random;
import net.minecraft.client.Minecraft;

public class mod_MedievalCraft2 extends BaseMod
{
public static OreHandler oreHandler;

public static final Block limestone = new BlockLimestone(125, 16).setBlockName("limestone");
public static final Block slate = new BlockSlate(126, 17).setBlockName("slate");
public static final Block oreZerzerite = new BlockZerzeriteOre(127, 0).setBlockName("oreZerzerite");
public static final Block orePlatinum = new BlockPlatinumOre(130, 3).setBlockName("orePlatinum");

public void load()
{
	MinecraftForgeClient.preloadTexture("/MeC2/Terrain/terrain.png");
	MinecraftForgeClient.preloadTexture("/MeC2/GUI/mec2_items1.png");
	MinecraftForgeClient.preloadTexture("/MeC2/GUI/guialchemicalTable.png");
	MinecraftForgeClient.preloadTexture("/MeC2/GUI/guiDrawbridge.png");

	//MinecraftForge.versionDetect(MeC2Default.MeC2, 3, 0, 0);
	MeC2Config.load();
	oreHandler = new OreHandler();
	MinecraftForge.registerOreHandler(oreHandler);  
	//MinecraftForge.registerPickupHandler(new IPickupHandler());

	ModLoader.registerBlock(limestone);
	ModLoader.registerBlock(slate);
	ModLoader.registerBlock(oreZerzerite);
	ModLoader.registerBlock(orePlatinum);

	ModLoader.addName(limestone, "Limestone");
	ModLoader.addName(slate, "Slate");
	ModLoader.addName(oreZerzerite, "Zerzerite Ore");
	ModLoader.addName(orePlatinum, "Platinum Ore");

	MinecraftForge.setBlockHarvestLevel(slate, "pickaxe", 1);
	MinecraftForge.setBlockHarvestLevel(limestone, "pickaxe", 1);
	MinecraftForge.setBlockHarvestLevel(oreZerzerite, "pickaxe", 2);
	MinecraftForge.setBlockHarvestLevel(orePlatinum, "pickaxe", 2);

	AchievementPage page1 = new AchievementPage("Medieval Craft 2" /*ach1, ach2, ach3, ach4*/);
	MinecraftForge.registerAchievementPage(page1);


	ModLoader.addRecipe(new ItemStack(orePlatinum, 4), new Object[]{   "*", Character.valueOf('*'), Block.dirt });
}

public String getPriorities()
{
    return "";
}

public int addFuel(int i, int j)
  {
    if (i == MeC2Items.fuelZerzericCoal.shiftedIndex) {
      return 1600;
    }
    return 0;
  }

public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
    if (MeC2Config.generatePlatinumOre)
    {
      for (int i = 0; i < 8; i++) 
      {
        int randPosX = chunkX + random.nextInt(16);
        int randPosY = random.nextInt(30) + 4;
        int randPosZ = chunkZ + random.nextInt(16);
        new WorldGenMinable(orePlatinum.blockID, 4).generate(world, random, randPosX, randPosY, randPosZ);
      }
    }
}
public String getVersion()
  {
    String version = "1.0.0";
	return "1.0.0";
  }
}

 

All the textures are reading off the first 16x16 block in the "/MeC2/Terrain/terrain.png"

Link to comment
Share on other sites

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.

Announcements



×
×
  • Create New...

Important Information

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