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

[Problem] Modding


Gość Xand3s

Rekomendowane odpowiedzi

Opublikowano

Hej, ludziki, mam problem, mianowicie:

 

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_03\bin\javac" -Xlint:-options -deprecation -g -

source 1.6 -target 1....' failed : 1

 

== ERRORS FOUND ==

 

src\minecraft\net\minecraft\src\BlockRubyOre.java:14: error: cannot find symbol

return Block.dirt.BlockID;

^

 

symbol: variable BlockID

location: variable dirt of type Block

src\minecraft\net\minecraft\src\mod_Rokkit.java:122: error: cannot find symbol

RubyOre.blockInd

exInTexture = ModLoader.addOverride("/terrain.png", "/RubyOre.png");

^

 

symbol: variable RubyOre

location: class mod_Rokkit

src\minecraft\net\minecraft\src\mod_Rokkit.java:123: error: cannot find symbol

ModLoader.registerBlock(RubyOre);

^

 

symbol: variable RubyOre

location: class mod_Rokkit

src\minecraft\net\minecraft\src\mod_Rokkit.java:124: error: cannot find symbol

ModLoader.addName(RubyOre, "Ruby Ore");

^

 

symbol: variable RubyOre

location: class mod_Rokkit

4 errors

==================

 

!! Can not find server sources, try decompiling !!

 

 

 

i jeszcze tu macie kod:

 

package net.minecraft.src;

import java.util.Random;

 

public class mod_Rokkit extends BaseMod

{

 

public static final Item RubyPickaxe = new ItemPickaxe(2001, EnumToolMaterial.RUBY).setItemName("RubyPickaxe");

public static final Item RubySword = new ItemSword(2002, EnumToolMaterial.RUBY).setItemName("RubySword");

public static final Item RubySpade = new ItemSpade(2003, EnumToolMaterial.RUBY).setItemName("RubySpade");

public static final Item RubyAxe = new ItemAxe(2004, EnumToolMaterial.RUBY).setItemName("RubyAxe");

public static final Item RubyHoe = new ItemHoe(2005, EnumToolMaterial.RUBY).setItemName("RubyHoe");

 

public static final Block CopperOre = new BlockRubyOre(160, 0)

.setBlockName("RubyOre")

.setHardness(3F)

.setResistance(5F)

;

 

public static final Item Ruby = new ItemRuby(161)

.setItemName("Ruby");

 

public static final Item RubyHelm = (new ItemArmor(2006, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 0)).setItemName("RubyHelm");

public static final Item RubyPlate = (new ItemArmor(2007, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 1)).setItemName("RubyPlate");

public static final Item RubyLegs = (new ItemArmor(2008, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 2)).setItemName("RubyLegs");

public static final Item RubyBoots = (new ItemArmor(2009, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 3)).setItemName("RubyBoots");

 

public void load()

{

RubyPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyPickaxe.png");

RubySword.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubySword.png");

RubySpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubySpade.png");

RubyAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyAxe.png");

RubyHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyHoe.png");

 

RubyHelm.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyHelm.png");

RubyPlate.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyPlate.png");

RubyLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyLegs.png");

RubyBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/RubyBoots.png");

 

ModLoader.addRecipe(new ItemStack(RubyHelm, 1), new Object[] {

"***",

"* *",

" ",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyPlate, 1), new Object[] {

"* *",

"***",

"***",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyLegs, 1), new Object[] {

"***",

"* *",

"* *",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyBoots, 1), new Object[] {

"* *",

"* *",

" ",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyPickaxe, 1), new Object[] {

"***",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubySword, 1), new Object[] {

" * ",

" * ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubySpade, 1), new Object[] {

" * ",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubyAxe, 1), new Object[] {

"** ",

"*@ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubyHoe, 1), new Object[] {

"** ",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addName(RubyPickaxe, "Ruby Pickaxe");

ModLoader.addName(RubySword, "Ruby Sword");

ModLoader.addName(RubySpade, "Ruby Spade");

ModLoader.addName(RubyAxe, "Ruby Axe");

ModLoader.addName(RubyHoe, "Ruby Hoe");

 

ModLoader.addName(RubyHelm, "Ruby Helmet");

ModLoader.addName(RubyPlate, "Ruby Plate");

ModLoader.addName(RubyLegs, "Ruby Legins");

ModLoader.addName(RubyBoots, "Ruby Boots");

 

Ruby.iconIndex = ModLoader.addOverride("/gui/items.png", "/Ruby.png");

ModLoader.addName(Ruby, "Ruby");

 

RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RubyOre.png");

ModLoader.registerBlock(RubyOre);

ModLoader.addName(RubyOre, "Ruby Ore");

}

 

 

 

 

 

public String getVersion()

{

return "1.3.1";

}

 

public void GenerateSurface(World world, Random random, int chunkX, int chunkZ)

{

for(int i = 0; i < 75; i++)

{

int randPosX = chunkX + random.nextInt(5);

int randPosY = random.nextInt(255);

int randPosZ = chunkZ + random.nextInt(5);

(new WorldGenMinable(CopperOre.blockID, 9000)).generate(world, random, randPosX, randPosY, randPosZ);

}

}

 

 

}

 

 

 

Ktoś mi pomoże?

Opublikowano

1. Zmień z CopperOre na RubyOre.

 

public static final Block CopperOre = new BlockRubyOre(160, 0).setBlockName("RubyOre").setHardness(3F).setResistance(5F)

 

2. Zmień

Block.dirt.BlockID;

na

Block.dirt;

 

 

W BlockRubyOre.java:

return Block.dirt.BlockID;

 

 

Opublikowano

dzięki wielkie za pomoc :D poprostu nie zauważyłem, że mam copperore, w blockrubyore ustawilem ze ma wypadac 1 rubin i dziala ;>

Opublikowano

dobra teraz mam inny problem ;d, mianowicie ruda nie chce się generować na mapie

niewiem co mam zrobić

 

 

package net.minecraft.src;

import java.util.Random;

 

public class mod_Rokkit extends BaseMod

{

 

public static final Item RubyPickaxe = new ItemPickaxe(2001, EnumToolMaterial.RUBY).setItemName("RubyPickaxe");

public static final Item RubySword = new ItemSword(2002, EnumToolMaterial.RUBY).setItemName("RubySword");

public static final Item RubySpade = new ItemSpade(2003, EnumToolMaterial.RUBY).setItemName("RubySpade");

public static final Item RubyAxe = new ItemAxe(2004, EnumToolMaterial.RUBY).setItemName("RubyAxe");

public static final Item RubyHoe = new ItemHoe(2005, EnumToolMaterial.RUBY).setItemName("RubyHoe");

 

public static final Block RubyOre = new BlockRubyOre(160, 0)

.setBlockName("RubyOre")

.setHardness(3F)

.setResistance(5F)

;

 

public static final Item Ruby = new ItemRuby(161)

.setItemName("Ruby");

 

public static final Item RubyHelm = (new ItemArmor(2006, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 0)).setItemName("RubyHelm");

public static final Item RubyPlate = (new ItemArmor(2007, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 1)).setItemName("RubyPlate");

public static final Item RubyLegs = (new ItemArmor(2008, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 2)).setItemName("RubyLegs");

public static final Item RubyBoots = (new ItemArmor(2009, EnumArmorMaterial.RUBY, ModLoader.addArmor("ruby"), 3)).setItemName("RubyBoots");

 

public void load()

{

RubyPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyPickaxe.png");

RubySword.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubySword.png");

RubySpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubySpade.png");

RubyAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyAxe.png");

RubyHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyHoe.png");

 

RubyHelm.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyHelm.png");

RubyPlate.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyPlate.png");

RubyLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyLegs.png");

RubyBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/RubyBoots.png");

 

ModLoader.addRecipe(new ItemStack(RubyHelm, 1), new Object[] {

"***",

"* *",

" ",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyPlate, 1), new Object[] {

"* *",

"***",

"***",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyLegs, 1), new Object[] {

"***",

"* *",

"* *",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyBoots, 1), new Object[] {

"* *",

"* *",

" ",

Character.valueOf('*'), Ruby

});

 

ModLoader.addRecipe(new ItemStack(RubyPickaxe, 1), new Object[] {

"***",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubySword, 1), new Object[] {

" * ",

" * ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubySpade, 1), new Object[] {

" * ",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubyAxe, 1), new Object[] {

"** ",

"*@ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addRecipe(new ItemStack(RubyHoe, 1), new Object[] {

"** ",

" @ ",

" @ ",

Character.valueOf('*'), Ruby,

Character.valueOf('@'), Item.stick

});

 

ModLoader.addName(RubyPickaxe, "Ruby Pickaxe");

ModLoader.addName(RubySword, "Ruby Sword");

ModLoader.addName(RubySpade, "Ruby Spade");

ModLoader.addName(RubyAxe, "Ruby Axe");

ModLoader.addName(RubyHoe, "Ruby Hoe");

 

ModLoader.addName(RubyHelm, "Ruby Helmet");

ModLoader.addName(RubyPlate, "Ruby Plate");

ModLoader.addName(RubyLegs, "Ruby Legins");

ModLoader.addName(RubyBoots, "Ruby Boots");

 

Ruby.iconIndex = ModLoader.addOverride("/gui/items.png", "/mod/Ruby.png");

ModLoader.addName(Ruby, "Ruby");

 

RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/mod/RubyOre.png");

ModLoader.registerBlock(RubyOre);

ModLoader.addName(RubyOre, "Ruby Ore");

}

 

public void generateSurface(World world, Random rand, int chunkX, int chunkZ)

{

for(int l = 0; l < 15; l++)

{

int i1 = chunkX + rand.nextInt(16);

int j1 = rand.nextInt(70);

int k1 = chunkZ + rand.nextInt(16);

(new WorldGenMinable(mod_Rokkit.RubyOre.blockID, 5)).generate(world, rand, i1, j1, k1);

}

}

 

 

 

public String getVersion()

{

return "1.3.1";

}

 

 

 

 

}

 

 

Opublikowano

Spróbuj z tym kodem:

	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
		for(int l = 0; l < 5; l++)	//
		{
			int i1 = chunkX + rand.nextInt(16);
			int j1 = rand.nextInt(20);
			int k1 = chunkZ + rand.nextInt(16);
			(new WorldGenMinable(RubyOre.blockID, 3)).generate(world, rand, i1, j1, k1);
		}
}

 

 

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...