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

Cześć.

Chyba ktoś skopiował twój poradnik.

Masz może konto na CraftSite.pl i nick Elfusion? jak nie to sprawdź to forum bo chyba ktoś zaczyna kopiować twój poradnik. Jest to w części dodatki i modyfikacje, podałbym link ale jakiś błąd wyskakuje. Początek i 1 spoiler jest dokładnie taki sam. No chyba że to twój temat to z gry przepraszam.

Opublikowano

Nie mam konta na CraftSite ale zobaczę.

 

Nawet podam dokładny adres strony :P

tylko wpierw wejdź na stronę craftsite i "doklej ten link", bo ta strona na mpc jest zablokowana xD

/forum/index.php?/topic/45408-tutzaawansowane-tworzenie-modow/

Dla mnie to plagiat na craftsite, bo nawet na mpcforum jest użytkownik o nicku ElfusioN http://www.mpcforum....69480-elfusion/ albo to jest zbieg okoliczności..

 

Za podanie linku do zewnętrznego, dostanę parę %, ale wiem że one pójdą w imię dobrej sprawy :D

Opublikowano

mam błąd przy rekompilacji

 

 

 

post-655105-0-26304400-1346355792.jpg

 

 

BlockBrightsteelBomb.java

 

 

package net.minecraft.src;

 

import java.util.Random;

 

public class BlockBrightsteelBomb extends Block

{

public BlockBrightsteelBomb(int par1, int par2)

{

super(par1, par2, Material.tnt);

}

 

 

public void onBlockAdded(World par1World, int par2, int par3, int par4)

{

super.onBlockAdded(par1World, par2, par3, par4);

 

if (par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))

{

onBlockDestroyedByPlayer(par1World, par2, par3, par4, 1);

par1World.setBlockWithNotify(par2, par3, par4, 0);

}

}

 

/**

* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are

* their own) Args: x, y, z, neighbor blockID

*/

public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)

{

if (par5 > 0 && Block.blocksList[par5].canProvidePower() && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))

{

onBlockDestroyedByPlayer(par1World, par2, par3, par4, 1);

par1World.setBlockWithNotify(par2, par3, par4, 0);

}

}

 

/**

* Returns the quantity of items to drop on block destruction.

*/

public int quantityDropped(Random par1Random)

{

return 1;

}

 

/**

* Called upon the block being destroyed by an explosion

*/

public void onBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4)

{

if (par1World.isRemote)

{

return;

}

else

{

EntityBrightsteelBombPrimed entitytntprimed = new EntityBrightsteelBombPrimed(par1World, (float)par2 + 0.5F, (float)par3 + 0.5F, (float)par4 + 0.5F);

entitytntprimed.fuse = par1World.rand.nextInt(entitytntprimed.fuse / 4) + entitytntprimed.fuse / 8;

par1World.spawnEntityInWorld(entitytntprimed);

return;

}

}

 

/**

* Called right before the block is destroyed by a player. Args: world, x, y, z, metaData

*/

public void onBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5)

{

if (par1World.isRemote)

{

return;

}

 

if ((par5 & 1) == 0)

{

dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Block.tnt.blockID, 1, 0));

}

else

{

EntityBrightsteelBombPrimed entitytntprimed = new EntityBrightsteelBombPrimed(par1World, (float)par2 + 0.5F, (float)par3 + 0.5F, (float)par4 + 0.5F);

par1World.spawnEntityInWorld(entitytntprimed);

par1World.playSoundAtEntity(entitytntprimed, "random.fuse", 1.0F, 1.0F);

}

}

 

/**

* Called when the block is clicked by a player. Args: x, y, z, entityPlayer

*/

public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)

{

super.onBlockClicked(par1World, par2, par3, par4, par5EntityPlayer);

}

 

/**

* Called upon block activation (left or right click on the block.). The three integers represent x,y,z of the

* block.

*/

public boolean blockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)

{

if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().itemID == Item.flintAndSteel.shiftedIndex)

{

onBlockDestroyedByPlayer(par1World, par2, par3, par4, 1);

par1World.setBlockWithNotify(par2, par3, par4, 0);

return true;

}

else

{

return super.blockActivated(par1World, par2, par3, par4, par5EntityPlayer);

}

}

 

/**

* Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage

* and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null.

*/

protected ItemStack createStackedBlock(int par1)

{

return null;

}

}

 

Opublikowano

@up zrób przez Eclipse(jest o tym w tucie), tam łatwiej wiadomo o co chodzi.

 

PS. Aktualizacja:

  • Dodano zbroje
  • Dodano nowe rzeczy które zamierzam zrobić.

W najbliższym czasie powinna wyjść aktualizacja z własnym typem narzędzia.

Opublikowano

@karol202

 

nie dodałeś pliku "ItemTYPArmor.java" do części o zbrojach! Bez tego są błędy! Powinno to chyba wyglądać mniej więcej tak:

 

 

package net.minecraft.src;

public class ItemBrightsteelTYPArmor extends Item
{
/** Holds the 'base' maxDamage that each armorType have. */
private static final int[] maxDamageArray = new int[] {22, 32, 30, 26};

/**
* Stores the armor type: 0 is helmet, 1 is plate, 2 is legs and 3 is boots
*/
public final int armorType;

/** Holds the amount of damage that the armor reduces at full durability. */
public final int damageReduceAmount;

/**
* Used on RenderPlayer to select the correspondent armor to be rendered on the player: 0 is cloth, 1 is chain, 2 is
* iron, 3 is diamond and 4 is gold.
*/
public final int renderIndex;

/** The EnumArmorMaterial used for this ItemArmor */
private final EnumTYPArmorMaterial material;

public ItemTYPArmor(int par1, EnumTYPArmorMaterial par2EnumTYPArmorMaterial, int par3, int par4)
{
super(par1);
this.material = par2EnumTYPArmorMaterial;
this.armorType = par4;
this.renderIndex = par3;
this.damageReduceAmount = par2EnumTYPArmorMaterial.getDamageReductionAmount(par4);
this.setMaxDamage(par2EnumTYPArmorMaterial.getDurability(par4));
this.maxStackSize = 1;
this.setTabToDisplayOn(CreativeTabs.tabCombat);
}



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

/**
* Returns the 'max damage' factor array for the armor, each piece of armor have a durability factor (that gets
* multiplied by armor material factor)
*/
static int[] getMaxDamageArray()
{
return maxDamageArray;
}
}

 

Opublikowano

w Eclipse mi zaznaczał po lewej stronie żarówką z X:

 

 

The constructor ItemArmor(int, EnumBrightsteelArmorMaterial, int, int) is undefined

 

 

 

jeszce mam błąd w tej linijce głównego modu:

public static Item Faelnivr = new ItemFood(2014, 40, 2.0F, false).setItemName("Faelnivr").setPotionEffect(Potion.regeneration.id, 500, 0, 1F);

 

 

Eclipse pisze:

 

"The method setPotionEffect(String) in the type Item is not applicable for the arguments(int, int, int, float)

 

 

a przy rekompilacje jest napisane:

 

required: String

Found: int, int, int, float

reason: actual and formal argument lists differ in length

 

Opublikowano

@up: Z tego co mi sie wydaje to on używa metody setPotionEffect z klasy Item a nie z klasy ItemFood, a program chyba jest napisany tak żeby używał tej metody z klasy ItemFood. Nie wiem dlaczego.

Opublikowano

W konstruktorze klasy w linijce setBlockBounds(X, Y, Z, SX, SY, SZ);

X to tam gdzie blok się zaczyna w osi X, z pozostałymi tak samo.

SX to tam gdzie blok się kończy w osi X, z pozostałymi tak samo.

W noramalnym bloku jest to setBlockBounds(0F, 0F, 0F, 1F, 1F, 1F);

Opublikowano

A jak zrobic crafting z barwnikami? bo jak pisze np.

 

ModLoader.addRecipe(new ItemStack(puszka1, 4), new Object[]
						    {
								    "KKK", "KFK", "KKK", 'K', Item.Purple Dye, 'F', puszka,
						    });

 

to jest error

prosze niech ktoś mi to wytłumaczy!

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...