Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Zaawansowane Tworzenie Modów


karol202

Rekomendowane odpowiedzi

  • Odpowiedzi 1,2 tys.
  • Dodano
  • Ostatniej odpowiedzi
Opublikowano

Karol popraw linki do Downloadu bo nieda sie sciągnąc ..

 

    

 

 

CPU: AMD FX 8350    GPU: GTX 760 2GB   PSU: Deus G1    MOBO: GIGABYTE 970A-DS3P   RAM: 8GB

 

 

Opublikowano

@up co nie działa? Jakie błędy?

 

PS. To nie skrypt.

 

 

Wyskakuje mi takie coś na 1.3.1, na 1.2.5 normalnie działo

 

error.png

 

 

PS: Jest to skopiowana java z 1.2.5

Opublikowano

@up bo ten tut był na 1.2.5. Ale teraz już zaktualizowałem do 1.3.1, przeczytaj jeszcze raz o przepalaniu.

 

@2xup linki poprawione :)

 

PS. W najbliższym czasie pojawi się część o GUI

Opublikowano

Mam problem z kilofem

 

 

Log z recompile


== MCP 7.0 (data: 7.0a, client: 1.3.1, server: 1.3.1) ==
# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs
, param csvs, renumber csv, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_05\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1

== ERRORS FOUND ==

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:7: error: ',', '}',
or ';' expected
	private final int harvestLevel;
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:7: error: '}' expec
ted
	private final int harvestLevel;
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:7: error: class, in
terface, or enum expected
	private final int harvestLevel;
				  ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:8: error: class, in
terface, or enum expected
	private final int maxUses;
				  ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:9: error: class, in
terface, or enum expected
	private final float efficiencyOnProperMaterial;
				  ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:10: error: class, i
nterface, or enum expected
	private final int damageVsEntity;
				  ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:11: error: class, i
nterface, or enum expected
	private final int enchantability;
				  ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:13: error: class, i
nterface, or enum expected
	private EnumAdvobsiToolMaterial(String s1, int j, int k, int l, float f,
int i1, int j1)
			^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:16: error: class, i
nterface, or enum expected
			maxUses = l;
			^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:17: error: class, i
nterface, or enum expected
			efficiencyOnProperMaterial = f;
			^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:18: error: class, i
nterface, or enum expected
			damageVsEntity = i1;
			^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:19: error: class, i
nterface, or enum expected
			enchantability = j1;
			^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:20: error: class, i
nterface, or enum expected
	}
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:22: error: class, i
nterface, or enum expected
	public int getMaxUses()
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:25: error: class, i
nterface, or enum expected
	}
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:27: error: class, i
nterface, or enum expected
	public float getEfficiencyOnProperMaterial()
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:30: error: class, i
nterface, or enum expected
	}
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:32: error: class, i
nterface, or enum expected
	public int getDamageVsEntity()
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:35: error: class, i
nterface, or enum expected
	}
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:37: error: class, i
nterface, or enum expected
	public int getHarvestLevel()
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:40: error: class, i
nterface, or enum expected
	}
	^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:42: error: class, i
nterface, or enum expected
	public int getEnchantability()
		   ^

src\minecraft\net\minecraft\src\EnumAdvobsiToolMaterial.java:45: error: class, i
nterface, or enum expected
	}
	^

23 errors
==================

!! Can not find server sources, try decompiling !!
Aby kontynuować, naciśnij dowolny klawisz . . .

 

 

Log pliku moda


package net.minecraft.src;
import java.util.Map;
import java.util.Random;

public class mod_AdvancetObsidian extends BaseMod
{
	public static Block AdvObsidian = new BlockAdvObsidian(200, 0).setBlockName("AdvObsidian").setHardness(40F).setResistance(30F);
	public static Block AdvCobObsidian = new BlockAdvCobObsidian(201, 0).setBlockName("AdvCobObsidian").setHardness(30F).setResistance(29F);
	public static Item ObsiIngot = new Item(199).setItemName("ObsiIngot");
public static Item Advobsi = new ItemAdvobsiPickaxe(198, EnumAdvobsiToolMaterial.ADVOBSI).setItemName("Advobsi");
	public String getVersion()
	{
			return "v. 1.0";
	}
	public void load() {}
	public mod_AdvancetObsidian()
	{
			AdvObsidian.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/adv/obs/advobs.png");
			ModLoader.registerBlock(AdvObsidian);
			ModLoader.addName(AdvObsidian, "Advencet Obsidian");
ObsiIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/adv/obs/advobsing.png");
			ModLoader.addName(ObsiIngot, "Advancet Obsidian Ingot");
AdvCobObsidian.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/adv/obs/advcobobs.png");
			ModLoader.registerBlock(AdvCobObsidian);
			ModLoader.addName(AdvCobObsidian, "Advancet CoobleObsidian");
Advobsi.iconIndex = ModLoader.addOverride("/gui/items.png", "/adv/obs/pickaxe.png");
			ModLoader.addName(Advobsi, "Advancet Obsidian Pickaxe");

ModLoader.addSmelting(201, new ItemStack(AdvObsidian, 1), 1F);
ModLoader.addSmelting(200, new ItemStack(ObsiIngot, 4), 1F);
ModLoader.addRecipe(new ItemStack(AdvObsidian, 1), new Object[]
							{
									"XX", "XX", 'X', ObsiIngot
							});
ModLoader.addRecipe(new ItemStack(ObsiIngot, 4), new Object[]
							{
									"X", 'X', AdvObsidian
							});
}
public void generateSurface(World world, Random random, int i, int j)
	{
			for (int a = 0; a < 3; a++)
			{
					int x = i + random.nextInt(24);
					int y = 10 + random.nextInt(30);
					int z = j + random.nextInt(24);
					(new WorldGenMinable(AdvObsidian.blockID, 4)).generate(world, random, x, y, z);
			}
	}
}

Log pliku EnumAdvobsiToolMaterial


package net.minecraft.src;

public enum EnumAdvobsiToolMaterial
{
	ADVOBSI( 5,  2500, 12F, 2, 14)

	private final int harvestLevel;
	private final int maxUses;
	private final float efficiencyOnProperMaterial;
	private final int damageVsEntity;
	private final int enchantability;

	private EnumAdvobsiToolMaterial(String s1, int j, int k, int l, float f, int i1, int j1)
	{
			harvestLevel = k;
			maxUses = l;
			efficiencyOnProperMaterial = f;
			damageVsEntity = i1;
			enchantability = j1;
	}

	public int getMaxUses()
	{
			return maxUses;
	}

	public float getEfficiencyOnProperMaterial()
	{
			return efficiencyOnProperMaterial;
	}

	public int getDamageVsEntity()
	{
			return damageVsEntity;
	}

	public int getHarvestLevel()
	{
			return harvestLevel;
	}

	public int getEnchantability()
	{
			return enchantability;
	}
}

Log pliku ItemAdvobsiTool


package net.minecraft.src;

public class ItemAdvobsiTool extends Item
{
	private Block blocksEffectiveAgainst[];
	protected float efficiencyOnProperMaterial;
	private int damageVsEntity;
	protected EnumAdvobsiToolMaterial toolMaterial;

	protected ItemAdvobsiTool(int i, int j, EnumAdvobsiToolMaterial enumAdvobsitoolmaterial, Block ablock[])
	{
			super(i);
			efficiencyOnProperMaterial = 4F;
			toolMaterial = enumAdvobsitoolmaterial;
			blocksEffectiveAgainst = ablock;
			maxStackSize = 1;
			setMaxDamage(enumAdvobsitoolmaterial.getMaxUses());
			efficiencyOnProperMaterial = enumAdvobsitoolmaterial.getEfficiencyOnProperMaterial();
			damageVsEntity = j + enumAdvobsitoolmaterial.getDamageVsEntity();
	}

	/**
	 * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
	 * sword
	 */
	public float getStrVsBlock(ItemStack itemstack, Block block)
	{
			for (int i = 0; i < blocksEffectiveAgainst.length; i++)
			{
					if (blocksEffectiveAgainst[i] == block)
					{
							return efficiencyOnProperMaterial;
					}
			}

			return 1.0F;
	}

	/**
	 * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
	 * the damage on the stack.
	 */
	public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
	{
			itemstack.damageItem(2, entityliving1);
			return true;
	}

	public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
	{
			itemstack.damageItem(1, entityliving);
			return true;
	}

	/**
	 * Returns the damage against a given entity.
	 */
	public int getDamageVsEntity(Entity entity)
	{
			return damageVsEntity;
	}

	/**
	 * Returns True is the item is renderer in full 3D when hold.
	 */
	public boolean isFull3D()
	{
			return true;
	}

	/**
	 * Return the enchantability factor of the item, most of the time is based on material.
	 */
	public int getItemEnchantability()
	{
			return toolMaterial.getEnchantability();
	}
}

Log pliku ItemAdvobsiPickaxe


package net.minecraft.src;

public class ItemAdvobsiPickaxe extends ItemAdvobsiTool
{
	private static Block blocksEffectiveAgainst[];

	protected ItemAdvobsiPickaxe(int i, EnumAdvobsiToolMaterial enumAdvobsitoolmaterial)
	{
			super(i, 2, enumAdvobsitoolmaterial, blocksEffectiveAgainst);
	}

	/**
	 * Returns if the item (tool) can harvest results from the block type.
	 */
	public boolean canHarvestBlock(Block block)
	{
			if (block == Block.obsidian)
			{
					return toolMaterial.getHarvestLevel() == 3;
			}

			if (block == Block.blockDiamond || block == Block.oreDiamond)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block == Block.blockGold || block == Block.oreGold)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block == Block.blockSteel || block == Block.oreIron)
			{
					return toolMaterial.getHarvestLevel() >= 1;
			}

			if (block == Block.blockLapis || block == Block.oreLapis)
			{
					return toolMaterial.getHarvestLevel() >= 1;
			}

			if (block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block.blockMaterial == Material.rock)
			{
					return true;
			}
			else
			{
					return block.blockMaterial == Material.iron;
			}
	}

	/**
	 * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
	 * sword
	 */
	public float getStrVsBlock(ItemStack itemstack, Block block)
	{
			if (block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.rock))
			{
					return efficiencyOnProperMaterial;
			}
			else
			{
					return super.getStrVsBlock(itemstack, block);
			}
	}

	static
	{
			blocksEffectiveAgainst = (new Block[]
							{
									Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold,
									Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail,
									Block.railDetector, Block.railPowered
							});
	}
}

 

 

Z góry dzięki za pomoc

Opublikowano

@up spróbuj dać ; po

ADVOBSI( 5,  2500, 12F, 2, 14)

 

PS. Z niewyjaśnionych powodów spoiler w twoim poście nie działa...

Opublikowano

@up spróbuj plik EnumAdvobsiToolMaterial.java:

package net.minecraft.src;
public enum EnumAdvobsiToolMaterial
{
		    ADVOBSI(5, 2500, 12F, 2, 14);
		    private final int harvestLevel;
		    private final int maxUses;
		    private final float efficiencyOnProperMaterial;
		    private final int damageVsEntity;
		    private final int enchantability;

		    private EnumAdvobsiToolMaterial(int k, int l, float f, int i1, int j1)
		    {
						    harvestLevel = k;
						    maxUses = l;
						    efficiencyOnProperMaterial = f;
						    damageVsEntity = i1;
						    enchantability = j1;
		    }
		    public int getMaxUses()
		    {
						    return maxUses;
		    }
		    public float getEfficiencyOnProperMaterial()
		    {
						    return efficiencyOnProperMaterial;
		    }
		    public int getDamageVsEntity()
		    {
						    return damageVsEntity;
		    }
		    public int getHarvestLevel()
		    {
						    return harvestLevel;
		    }
		    public int getEnchantability()
		    {
						    return enchantability;
		    }
}

Opublikowano

Witam, ja mam taki problem, iż przy rekopilacji pliku mod_****.java wyspępuje taki oto błąd:

 

 

== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Modzik.java:52: error: incompatible types
			polblok = (new Block(254, Material.wood)).setStepSound(Block.sou
ndWoodFootstep).setHardness(0.7F).setResistance(10F).setBlockName("polblok").set
LightValue(0.9F).setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);

						   ^
 required: Block
 found:	void
1 error
=================

 

 

 

plik mod_****.java:

 

 

package net.minecraft.src;
public class mod_Modzik extends BaseMod
{
public static final Block blok;
   public static final Block bloczek;
   public static final Item dziwnamaz = new Item(261).setItemName("dziwnamaz");
   public static final Block polblok;
public mod_Modzik()
{
	ModLoader.registerBlock(bloczek);
	ModLoader.registerBlock(blok);
    ModLoader.registerBlock(polblok);
	ModLoader.addName(bloczek, "Mieszany");
	ModLoader.addName(blok, "Blok");
	ModLoader.addName(dziwnamaz, "Dziwna maź");
    ModLoader.addName(polblok, "Pół-blok");
    dziwnamaz.iconIndex = ModLoader.addOverride("/gui/items.png", "/textury/dziwnamaz.png");
    bloczek.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textury/bloczek.png");
	blok.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textury/blok.png");
    polblok.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "textury/polblok.png");
	ModLoader.addRecipe(new ItemStack(blok, 1), new Object[]
			{
				"RGR", "GRG", "RGR", 'R', Item.redstone, 'G', Block.glowStone
			});
    ModLoader.addRecipe(new ItemStack(blok, 1), new Object[]
			{
				" M ", " M ", 'M', dziwnamaz
			});
    ModLoader.addRecipe(new ItemStack(polblok, 1), new Object[]
	  {
	" D ", " Z ", 'Z', Block.dirt, 'D', dziwnamaz
});
    ModLoader.addSmelting(250, new ItemStack(bloczek, 2));
    ModLoader.addSmelting(252, new ItemStack(dziwnamaz, 1));
}
public String getVersion()
{
	return "v1.0";
}
public void load()
{}
static
{
	blok = (new Block(250, Material.ice)).setStepSound(Block.soundGlassFootstep).setHardness(0.7F).setResistance(10F).setBlockName("blok").setLightValue(1F);
    bloczek = (new Block(252, Material.rock)).setStepSound(Block.soundStoneFootstep).setHardness(0.4F).setResistance(5F).setBlockName("bloczek").setLightValue(0.6F);
    polblok = (new Block(254, Material.wood)).setStepSound(Block.soundWoodFootstep).setHardness(0.7F).setResistance(10F).setBlockName("polblok").setLightValue(0.9F).setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);
}
}

 

 

 

problem pojawia się w ostatniej linijce deklarowanego kodu:

polblok = (new Block(254, Material.wood)).setStepSound(Block.soundWoodFootstep).setHardness(0.7F).setResistance(10F).setBlockName("polblok").setLightValue(0.9F).setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);

 

a dokładniej w tej części:

.setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);

 

wywnioskowałem to na podstawie metody pób i błędów wycinania prawdopodobnych problemów, i tylko ta jedna częśc wywołuje ten błąd.

 

Oczywiście to tylko mój wniosek, który może byc błędny :D

 

Prosze o pomoc

 

Ups... post mi się zdublował...

Przepraszam

Opublikowano

@2up działa

ale plik ItemAdvobsiPickaxe.java przy recompilacji daje 2 błędy

 

 

 

Log z recompile


== MCP 7.0 (data: 7.0a, client: 1.3.1, server: 1.3.1) ==
# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs
, param csvs, renumber csv, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_05\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1

== ERRORS FOUND ==

src\minecraft\net\minecraft\src\ItemAdvobsiPickaxe.java:77: error: cannot find s
ymbol
									Block.cobblestone, Block.stairDouble, Bl
ock.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.ore
Iron, Block.blockSteel, Block.oreCoal, Block.blockGold,
															^

 symbol:   variable stairDouble
 location: class Block
src\minecraft\net\minecraft\src\ItemAdvobsiPickaxe.java:77: error: cannot find s
ymbol
									Block.cobblestone, Block.stairDouble, Bl
ock.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.ore
Iron, Block.blockSteel, Block.oreCoal, Block.blockGold,

  ^

 symbol:   variable stairSingle
 location: class Block
2 errors
==================

!! Can not find server sources, try decompiling !!
Aby kontynuować, naciśnij dowolny klawisz . . .

plik


package net.minecraft.src;

public class ItemAdvobsiPickaxe extends ItemAdvobsiTool
{
	private static Block blocksEffectiveAgainst[];

	protected ItemAdvobsiPickaxe(int i, EnumAdvobsiToolMaterial enumAdvobsitoolmaterial)
	{
			super(i, 2, enumAdvobsitoolmaterial, blocksEffectiveAgainst);
	}

	/**
	 * Returns if the item (tool) can harvest results from the block type.
	 */
	public boolean canHarvestBlock(Block block)
	{
			if (block == Block.obsidian)
			{
					return toolMaterial.getHarvestLevel() == 3;
			}

			if (block == Block.blockDiamond || block == Block.oreDiamond)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block == Block.blockGold || block == Block.oreGold)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block == Block.blockSteel || block == Block.oreIron)
			{
					return toolMaterial.getHarvestLevel() >= 1;
			}

			if (block == Block.blockLapis || block == Block.oreLapis)
			{
					return toolMaterial.getHarvestLevel() >= 1;
			}

			if (block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
			{
					return toolMaterial.getHarvestLevel() >= 2;
			}

			if (block.blockMaterial == Material.rock)
			{
					return true;
			}
			else
			{
					return block.blockMaterial == Material.iron;
			}
	}

	/**
	 * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
	 * sword
	 */
	public float getStrVsBlock(ItemStack itemstack, Block block)
	{
			if (block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.rock))
			{
					return efficiencyOnProperMaterial;
			}
			else
			{
					return super.getStrVsBlock(itemstack, block);
			}
	}

	static
	{
			blocksEffectiveAgainst = (new Block[]
							{
									Block.cobblestone, Block.stairDouble, Block.stairSingle, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold,
									Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail,
									Block.railDetector, Block.railPowered
							});
	}
}

 

 

Opublikowano

@up a tak działa?

package net.minecraft.src;
public class ItemAdvobsiPickaxe extends ItemAdvobsiTool
{
		    private static Block blocksEffectiveAgainst[];
		    protected ItemAdvobsiPickaxe(int i, EnumAdvobsiToolMaterial enumAdvobsitoolmaterial)
		    {
						    super(i, 2, enumAdvobsitoolmaterial, blocksEffectiveAgainst);
		    }
		    /**
			 * Returns if the item (tool) can harvest results from the block type.
			 */
		    public boolean canHarvestBlock(Block block)
		    {
						    if (block == Block.obsidian)
						    {
										    return toolMaterial.getHarvestLevel() == 3;
						    }
						    if (block == Block.blockDiamond || block == Block.oreDiamond)
						    {
										    return toolMaterial.getHarvestLevel() >= 2;
						    }
						    if (block == Block.blockGold || block == Block.oreGold)
						    {
										    return toolMaterial.getHarvestLevel() >= 2;
						    }
						    if (block == Block.blockSteel || block == Block.oreIron)
						    {
										    return toolMaterial.getHarvestLevel() >= 1;
						    }
						    if (block == Block.blockLapis || block == Block.oreLapis)
						    {
										    return toolMaterial.getHarvestLevel() >= 1;
						    }
						    if (block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
						    {
										    return toolMaterial.getHarvestLevel() >= 2;
						    }
						    if (block.blockMaterial == Material.rock)
						    {
										    return true;
						    }
						    else
						    {
										    return block.blockMaterial == Material.iron;
						    }
		    }
		    /**
			 * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
			 * sword
			 */
		    public float getStrVsBlock(ItemStack itemstack, Block block)
		    {
						    if (block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.rock))
						    {
										    return efficiencyOnProperMaterial;
						    }
						    else
						    {
										    return super.getStrVsBlock(itemstack, block);
						    }
		    }
		    static
		    {
						    blocksEffectiveAgainst = (new Block[]
														    {
																		    Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold,
																		    Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail,
																		    Block.railDetector, Block.railPowered
														    });
		    }
}

Opublikowano

Mam problem :< gdy wlaczamminecraft juz z modem mam : Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.

This error has been saved to C:\Users\Szymixx Nowe\AppData\Roaming\.minecraft\crash-reports\crash-2012-08-10_06.16.45-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.

 

 

 

--- BEGIN ERROR REPORT 8ba6f483 --------

Generated 10.08.12 06:16

 

- Minecraft Version: 1.3.1

- Operating System: Windows Vista (x86) version 6.0

- Java Version: 1.7.0_05, Oracle Corporation

- Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation

- Memory: 406409776 bytes (387 MB) / 518979584 bytes (494 MB) up to 1037959168 bytes (989 MB)

- JVM Flags: 2 total; -Xms512m -Xmx1024m

- ModLoader: Mods loaded: 2

ModLoader 1.3.1

mod_Pros 1.3.1.

 

 

java.lang.ArrayIndexOutOfBoundsException: 401

at ModLoader.initStats(ModLoader.java:971)

at ModLoader.init(ModLoader.java:944)

at ModLoader.addAllRenderers(ModLoader.java:169)

at avx.<init>(RenderManager.java:86)

at avx.<clinit>(RenderManager.java:12)

at net.minecraft.client.Minecraft.a(SourceFile:260)

at net.minecraft.client.Minecraft.run(SourceFile:516)

at java.lang.Thread.run(Unknown Source)

--- END ERROR REPORT 2a4a41cb ----------

 

Przy rekompilacji i reobuf costam :> nie ma zadnych bledow oto kod modu:

package net.minecraft.src;

public class mod_Pros extends BaseMod
{
	public static Block  ProStone = new BlockProStone(401, 0).setBlockName("ProStone").setHardness(10F).setResistance(100F);
	public String getVersion()
	{
			return "1.3.1.";
	}
	public void load() {}
	public mod_Pros()
	{
			ProStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Pros/ProStone.png");
			ModLoader.registerBlock(ProStone);
			ModLoader.addName(ProStone, "Pro Stone");
	}
}

 

package net.minecraft.src;
import java.util.Random;
public class BlockProStone extends Block
{
	public BlockProStone(int i, int j)
	{
			super(i, j, Material.wood);
	}
	public int idDropped(int i, Random j, int k)
	{
			return mod_Pros.ProStone.blockID;
	}
}

Opublikowano

package net.minecraft.src

public class mod_Pros extends BaseMod
{
	public static Block  ProStone = new BlockProStone(401, 0).setBlockName("ProStone").setHardness(10F).setResistance(100F);
	public String getVersion()
	{
			return "1.3.1."
	}
	public void load() {}
	public mod_Pros()
	{
			ProStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Pros/ProStone.png");
			ModLoader.registerBlock(ProStone);
			ModLoader.addName(ProStone, "Pro Stone");
	}
}

 

Masz miałeś ; w nieodpowiednich miejscach

Opublikowano

niby nie mam zadnych bledow ale minecraft crashuje gdy chce grac :/

Błąd:

  Minecraft has crashed!	 
  ----------------------	 
Minecraft has stopped running because it encountered a problem; Unexpected error
This error has been saved to D:\Program Files\koniki\jars\.\crash-reports\crash-2012-08-10_17.21.58-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.

--- BEGIN ERROR REPORT bda83644 --------
Generated 10.08.12 17:21
- Minecraft Version: 1.3.1
- Operating System: Windows XP (x86) version 5.1
- Java Version: 1.6.0_32, Sun Microsystems Inc.
- Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
- Memory: 953913096 bytes (909 MB) / 1070399488 bytes (1020 MB) up to 1070399488 bytes (1020 MB)
- JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.1
mod_konie v1.0
- LWJGL: 2.4.2
- OpenGL: GeForce 8600 GT/PCI/SSE2/3DNOW! GL version 3.2.0, NVIDIA Corporation
- Is Modded: Probably not
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
- World MpServer Entities: 12 total; [EntityClientPlayerMP['Player828'/191, l='MpServer', x=-84,50, y=70,24, z=242,50], EntitySkeleton['Skeleton'/197, l='MpServer', x=-94,50, y=51,00, z=210,50], EntityPig['Pig'/63, l='MpServer', x=-139,53, y=63,00, z=259,50], EntityPig['Pig'/62, l='MpServer', x=-138,50, y=63,00, z=259,50], EntityPig['Pig'/68, l='MpServer', x=-139,50, y=63,00, z=300,50], EntityPig['Pig'/69, l='MpServer', x=-140,53, y=63,00, z=301,53], EntityChicken['Chicken'/70, l='MpServer', x=-122,50, y=64,00, z=204,50], EntityChicken['Chicken'/71, l='MpServer', x=-124,50, y=64,00, z=206,50], EntityPig['Pig'/64, l='MpServer', x=-141,50, y=69,00, z=259,50], EntityPig['Pig'/65, l='MpServer', x=-142,53, y=69,00, z=259,50], EntityPig['Pig'/66, l='MpServer', x=-141,50, y=63,00, z=298,50], EntityPig['Pig'/67, l='MpServer', x=-138,50, y=63,00, z=298,50]]
- World MpServer Players: 1 total; [EntityClientPlayerMP['Player828'/191, l='MpServer', x=-84,50, y=70,24, z=242,50]]
- World MpServer Chunk Stats: MultiplayerChunkCache: 5
- Forced Entities: 12 total; [EntityPig['Pig'/68, l='MpServer', x=-139,50, y=63,00, z=300,50], EntityPig['Pig'/69, l='MpServer', x=-140,53, y=63,00, z=301,53], EntityChicken['Chicken'/70, l='MpServer', x=-122,50, y=64,00, z=204,50], EntityChicken['Chicken'/71, l='MpServer', x=-124,50, y=64,00, z=206,50], EntityPig['Pig'/64, l='MpServer', x=-141,50, y=69,00, z=259,50], EntityPig['Pig'/65, l='MpServer', x=-142,53, y=69,00, z=259,50], EntityPig['Pig'/66, l='MpServer', x=-141,50, y=63,00, z=298,50], EntityPig['Pig'/67, l='MpServer', x=-138,50, y=63,00, z=298,50], EntitySkeleton['Skeleton'/197, l='MpServer', x=-94,50, y=51,00, z=210,50], EntityClientPlayerMP['Player828'/191, l='MpServer', x=-84,50, y=70,24, z=242,50], EntityPig['Pig'/63, l='MpServer', x=-139,53, y=63,00, z=259,50], EntityPig['Pig'/62, l='MpServer', x=-138,50, y=63,00, z=259,50]]
- Retry Entities: 0 total; []
java.lang.NullPointerException
at net.minecraft.src.NetClientHandler.handleMobSpawn(NetClientHandler.java:730)
at net.minecraft.src.Packet24MobSpawn.processPacket(Packet24MobSpawn.java:137)
at net.minecraft.src.MemoryConnection.processReadPackets(MemoryConnection.java:70)
at net.minecraft.src.NetClientHandler.processReadPackets(NetClientHandler.java:89)
at net.minecraft.src.WorldClient.tick(WorldClient.java:63)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1760)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:821)
at net.minecraft.client.Minecraft.run(Minecraft.java:751)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 4a21a303 ----------

 

plik entinty

package net.minecraft.src;
import java.util.Random;
public class EntityKon extends EntityAnimal
{
						    public EntityKon(World world)
						    {
														    super(world);
														    texture = "/mob/kon.png";
														    moveSpeed = 1F;
														    getNavigator().setAvoidsWater(true);
														    tasks.addTask(0, new EntityAITempt(this, 0.25F, Item.wheat.shiftedIndex, false));
														    tasks.addTask(1, new EntityAIFollowParent(this, 0.28F));
														    tasks.addTask(2, new EntityAIMate(this, 0.25F));
														    tasks.addTask(3, new EntityAIAvoidEntity(this, net.minecraft.src.EntityPig.class, 8F, 0.3F, 0.35F));
														    tasks.addTask(4, new EntityAISwimming(this));
														    tasks.addTask(5, new EntityAIPanic(this, 0.38F));
														    tasks.addTask(6, new EntityAIWander(this, 0.25F));
						    }
						    public int getMaxHealth()
						    {
														    return 5;
						    }

						    public boolean isAIEnabled()
						    {
								    return true;
						    }

						    protected String getLivingSound()
						    {
														    return "mob.Pig.default";
						    }
						    protected String getHurtSound()
						    {
														    return "mob.Pig.defaulthurt";
						    }
						    protected String getDeathSound()
						    {
														    return "mob.Pig.defaultdeath";
						    }
						    protected int getDropItemId()
						    {
														    return Item.diamond.shiftedIndex;
						    }

						    protected boolean canDespawn()
						    {
														    return false;
						    }

						    public EntityAnimal spawnBabyAnimal(EntityAnimal par1EntityAnimal)
						    {
								    return new EntityPig(worldObj);
						    }
}

 

mod

package net.minecraft.src;
import java.util.Map;

public class mod_konie extends BaseMod
{
    public void load()
    {
		    ModLoader.registerEntityID(EntityKon.class, "Test", ModLoader.getUniqueEntityId());
		    ModLoader.addSpawn(EntityKon.class, 12, 4, 4, EnumCreatureType.creature);
    }

    public void addRenderer(Map map)
    {
								    map.put(EntityKon.class, new RenderBiped(new ModelBiped(), 0.5F));
    }

    public String getVersion()
    {
		    return "v1.0";
    }

    public mod_konie()
    {

    }
}

Opublikowano

@up spróbuj zamienić

ModLoader.registerEntityID(EntityKon.class, "Test", ModLoader.getUniqueEntityId());

na

ModLoader.registerEntityID(EntityKon.class, "Kon", ModLoader.getUniqueEntityId());

Opublikowano

załączy się ujdę kilka metrów i crash :/

 

@ edit

 

czy w linijce:

 

														    getNavigator().setAvoidsWater(true);

jest ok czy powinno byc

getNavigator().func_48664_a(true);

Bo jesli jest to 2 to wyswietla mi to jako blad lecz gdy zmienie na taki jak 1 (czyli taki jak jest u wiekszosci mobow) to mam tego nieszczesnego crasha...

Opublikowano

Czemu jak chcę zainstalować JDK to wywala mi taki error: 'C\Documents and Settings\Gatoo\Moje Dokumenty\Downloads\jdk-7u5-windows-i586.exe nie jest prawidłową aplikacją systemy Win32.'?

Opublikowano

@up a napewno pobrałeś na win xp 32bit?

 

@2xup prawidłowe to pierwsze, bo to drugie jest na starą wersje, ale już poprawiłem tut. Podaj treść crashu.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...