Jump to content

Recommended Posts

Posted

My blocks all appear to have the same texture, even though I have checked over and over my code, and designated the texture from mec2terrain.png they should be using.

 

Any help would be amazing.

 

Thanks in advance

 

Jake

Posted

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"

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I just tried installing Forge version 1.21.3, and tried launching it with no mods installed. It loads, and immediately crashes while "loading bootstrap resourses." Does anyone know a fix for this? My Java is up to date, as well as my graphics drivers. Here's a snip right before it crashes: https://imgur.com/a/elLujPj
    • I know this is a forge only place, but just to be clear, my error is in Fabric I was actually super frustrated while trying to fix this, like this mod does work when I play it by launching it in minecraft, but when I was trying to install it onto the server it just kept crashing so I decided to delete every mod I've got but kept the bewitchment mod and the necessary mod it needs to function and I tried to run the server... But it somehow still crashed, and the thing is that I really do want the bewitchment mod to be in the SMP so it'll be SUPER helpful if anyone can figure out on how to fix this: It didn't give me any "crash-reports" so I'll be sending the logs and what the console said: Console: [18:51:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/container/libraries/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER [18:51:46] [main/WARN]: Error loading class: io/github/apace100/origins/power/PreventItemUsePower (java.lang.ClassNotFoundException: io/github/apace100/origins/power/PreventItemUsePower) [18:51:46] [main/WARN]: @Mixin target io.github.apace100.origins.power.PreventItemUsePower was not found bewitchment.mixins.json:integration.origins.PreventItemUsePowerMixin from mod bewitchment [18:51:47] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5). [18:51:52] [main/FATAL]: Failed to start the minecraft server java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bewitchment'! at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.11.jar:?] at net.minecraft.server.Main.main(Main.java:92) [server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.15.11.jar:?] at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [server.jar:1.0.1] Caused by: java.lang.NoSuchFieldError: TEXTURE at moriyashiine.bewitchment.common.item.SpecterBangleItem.<clinit>(SpecterBangleItem.java:28) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.registry.BWObjects.<clinit>(BWObjects.java:272) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.Bewitchment.onInitialize(Bewitchment.java:221) ~[bewitchment-1.16.5-18.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.11.jar:?] ... 7 more Logs: https://mclo.gs/wSsqMfn
    • I know this is a forge only place, but just so you know my error is in Fabric I was actually super frustrated while trying to fix this, like this mod does work when I play it by launching it in minecraft, but when I was trying to install it onto the server it just kept crashing so I decided to delete every mod I've got but kept the bewitchment mod and the necessary mod it needs to function and I tried to run the server... But it somehow still crashed, and the thing is that I really do want the bewitchment mod to be in the SMP so it'll be SUPER helpful if anyone can figure out on how to fix this: It didn't give me any "crash-reports" so I'll be sending the logs and what the console said: Console: [18:51:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/container/libraries/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER [18:51:46] [main/WARN]: Error loading class: io/github/apace100/origins/power/PreventItemUsePower (java.lang.ClassNotFoundException: io/github/apace100/origins/power/PreventItemUsePower) [18:51:46] [main/WARN]: @Mixin target io.github.apace100.origins.power.PreventItemUsePower was not found bewitchment.mixins.json:integration.origins.PreventItemUsePowerMixin from mod bewitchment [18:51:47] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5). [18:51:52] [main/FATAL]: Failed to start the minecraft server java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bewitchment'! at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.11.jar:?] at net.minecraft.server.Main.main(Main.java:92) [server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.15.11.jar:?] at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [server.jar:1.0.1] Caused by: java.lang.NoSuchFieldError: TEXTURE at moriyashiine.bewitchment.common.item.SpecterBangleItem.<clinit>(SpecterBangleItem.java:28) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.registry.BWObjects.<clinit>(BWObjects.java:272) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.Bewitchment.onInitialize(Bewitchment.java:221) ~[bewitchment-1.16.5-18.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.11.jar:?] ... 7 more Logs: https://mclo.gs/wSsqMfn
    • Open the Task Manager and check the Performance Tab At GPU the GPU is mentioned above the Graph
    • how? and how do i find what graphics card i have
  • Topics

×
×
  • Create New...

Important Information

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