Minecraft Mods erstellen [ModLoader]

07/19/2012 23:17 -i[Gyxx]*#481
Das muss mit in die Entity von dem Mob
mit
Code:
texture = "/mob/deer.png";
wird die Textur des Mobs bestimmt.
In dem fall ist es im mob Ordner und die Textur heißt deer.png
07/20/2012 07:55 Mrlptoturial#482
Oke dankej hatt mir sehr geholfen...andere haben mir empfohlen das mit irgendein Programm dessen Name mir nicht einfällt zu machen . Dort kann man die textur selber Zeichen welches is jetz besser ?
Du hast mir ja geschrieben ich soll die Funktion von mob ein bischen modden ...so das der mob wenn er den Spieler sieht angreift und erschreckt ...leider kenn ich mich nicht so gut aus...hast du evtl nen Code dafür ?
(Sry wenn ich nerve)
07/20/2012 15:56 -i[Gyxx]*#483
Ich werde mich nachher mal ranmachen das wenn man in sein Radius ist den Status spooki zu bekommen und dadurch langsamer wird und evtl Schaden bekommt.
Die Textur solltest du am besten durch die Texture Map von Techne anpassen.
07/21/2012 22:20 Mrlptoturial#484
Quote:
Ich werde mich nachher mal ranmachen das wenn man in sein Radius ist den Status spooki zu bekommen und dadurch langsamer wird und evtl Schaden bekommt. Die Textur solltest du am besten durch die Texture Map von Techne anpassen.
Oke das ist auch was gutes . :)
Jaa ich muss mir ein paar tutorials angucken weil ich da keine Farben hinkriege ..aber wie gesagt ein paar tutorials werden helfen . Leider schaffe ich es nicht das sich mehrere Blöcke in der gleichen Welt generieren ...
07/21/2012 23:38 -i[Gyxx]*#485
hast du vllt skype oder etwas anderes, denn kann ich dir schneller helfen.
07/22/2012 10:57 Mrlptoturial#486
Ja ich hab Skype ...schick mir einfach dein Skypename per privatnachicht ;) ..komme.halb 1 heute on ...
Hättest du Lust an meinen mod mitzuarbeiten ? ... Ich finde das Thema (programmieren und modden)sehr interresant da wäre es nicht schlecht jemanden zu haben der einen hilft und verbessert und gute Ideen hatt :) :)
07/23/2012 13:17 22Legend#487
Hallo leute,
ich habe das tut zum Dorf erstellen
soweit hinbekommen, auch alles perfekt
recompiled, doch ich hab jetzt schon so lange
gesucht und das nicht gefunden. Kann
man irgendwo im Code die häufigkeit vielleicht
erst einmal sehr hoch stellen, dass man gucken
kann ob es überhaupt funktioniert ?
Es ist auch erstmal nur ein Haus zum testen,
hier der code fals benötigt ;)

Code:
package net.minecraft.src;
import java.util.Random;

public class Dorf extends WorldGenerator
{
    public Dorf() { }

    public boolean generate(World world, Random rand, int i, int j, int k) {
        int spawnBlockID = 5;
        if(world.getBlockId(i, j, k) != spawnBlockID || world.getBlockId(i, j + 1, k) != 0 || world.getBlockId(i + 4, j, k) != spawnBlockID || world.getBlockId(i + 4, j, k + 4) != spawnBlockID || world.getBlockId(i, j, k + 4) != spawnBlockID || world.getBlockId(i + 4, j + 1, k) != 0 || world.getBlockId(i + 4, j + 1, k + 4) != 0 || world.getBlockId(i, j + 1, k + 4) != 0)
        {
            return false;
        }

        world.setBlock(i + 0, j + 0, k + 0, 5);
        world.setBlock(i + 0, j + 0, k + 1, 5);
        world.setBlock(i + 0, j + 0, k + 2, 5);
        world.setBlock(i + 0, j + 0, k + 3, 5);
        world.setBlock(i + 0, j + 0, k + 4, 5);
        world.setBlock(i + 0, j + 1, k + 0, 5);
        world.setBlock(i + 0, j + 1, k + 1, 5);
        world.setBlock(i + 0, j + 1, k + 2, 5);
        world.setBlock(i + 0, j + 1, k + 3, 5);
        world.setBlock(i + 0, j + 1, k + 4, 5);
        world.setBlock(i + 0, j + 2, k + 0, 5);
        world.setBlock(i + 0, j + 2, k + 1, 5);
        world.setBlock(i + 0, j + 2, k + 2, 5);
        world.setBlock(i + 0, j + 2, k + 3, 5);
        world.setBlock(i + 0, j + 2, k + 4, 5);
        world.setBlock(i + 0, j + 3, k + 0, 45);
        world.setBlock(i + 0, j + 3, k + 1, 45);
        world.setBlock(i + 0, j + 3, k + 2, 45);
        world.setBlock(i + 0, j + 3, k + 3, 45);
        world.setBlock(i + 0, j + 3, k + 4, 45);
        world.setBlock(i + 1, j + 0, k + 0, 5);
        world.setBlock(i + 1, j + 0, k + 1, 5);
        world.setBlock(i + 1, j + 0, k + 2, 5);
        world.setBlock(i + 1, j + 0, k + 3, 5);
        world.setBlock(i + 1, j + 0, k + 4, 5);
        world.setBlock(i + 1, j + 1, k + 0, 5);
        world.setBlock(i + 1, j + 1, k + 4, 5);
        world.setBlock(i + 1, j + 2, k + 0, 5);
        world.setBlock(i + 1, j + 2, k + 4, 5);
        world.setBlock(i + 1, j + 3, k + 0, 45);
        world.setBlock(i + 1, j + 3, k + 1, 45);
        world.setBlock(i + 1, j + 3, k + 2, 45);
        world.setBlock(i + 1, j + 3, k + 3, 45);
        world.setBlock(i + 1, j + 3, k + 4, 45);
        world.setBlock(i + 2, j + 0, k + 0, 5);
        world.setBlock(i + 2, j + 0, k + 1, 5);
        world.setBlock(i + 2, j + 0, k + 2, 5);
        world.setBlock(i + 2, j + 0, k + 3, 5);
        world.setBlock(i + 2, j + 0, k + 4, 5);
        world.setBlock(i + 2, j + 1, k + 0, 5);
        world.setBlock(i + 2, j + 1, k + 4, 5);
        world.setBlock(i + 2, j + 2, k + 0, 5);
        world.setBlock(i + 2, j + 2, k + 4, 5);
        world.setBlock(i + 2, j + 3, k + 0, 45);
        world.setBlock(i + 2, j + 3, k + 1, 45);
        world.setBlock(i + 2, j + 3, k + 2, 45);
        world.setBlock(i + 2, j + 3, k + 3, 45);
        world.setBlock(i + 2, j + 3, k + 4, 45);
        world.setBlock(i + 3, j + 0, k + 0, 5);
        world.setBlock(i + 3, j + 0, k + 1, 5);
        world.setBlock(i + 3, j + 0, k + 2, 5);
        world.setBlock(i + 3, j + 0, k + 3, 5);
        world.setBlock(i + 3, j + 0, k + 4, 5);
        world.setBlock(i + 3, j + 1, k + 0, 5);
        world.setBlock(i + 3, j + 1, k + 1, 5);
        world.setBlock(i + 3, j + 1, k + 3, 5);
        world.setBlock(i + 3, j + 1, k + 4, 5);
        world.setBlock(i + 3, j + 2, k + 0, 5);
        world.setBlock(i + 3, j + 2, k + 1, 5);
        world.setBlock(i + 3, j + 2, k + 3, 5);
        world.setBlock(i + 3, j + 2, k + 4, 5);
        world.setBlock(i + 3, j + 3, k + 0, 45);
        world.setBlock(i + 3, j + 3, k + 1, 45);
        world.setBlock(i + 3, j + 3, k + 2, 45);
        world.setBlock(i + 3, j + 3, k + 3, 45);
        world.setBlock(i + 3, j + 3, k + 4, 45);
        world.setBlockWithNotify(i + 3, j + 1, k + 2, 64);
        world.setBlockMetadata(i + 3, j + 1, k + 2, 2);
        world.setBlockWithNotify(i + 3, j + 2, k + 2, 64);
        world.setBlockMetadata(i + 3, j + 2, k + 2, 8);

        return true;
    }
}
Danke schonmal im vorraus :)
07/23/2012 16:04 the_cake#488
Quote:
Originally Posted by 22Legend View Post
Hallo leute,
ich habe das tut zum Dorf erstellen
soweit hinbekommen, auch alles perfekt
recompiled, doch ich hab jetzt schon so lange
gesucht und das nicht gefunden. Kann
man irgendwo im Code die häufigkeit vielleicht
erst einmal sehr hoch stellen, dass man gucken
kann ob es überhaupt funktioniert ?
Es ist auch erstmal nur ein Haus zum testen,
hier der code fals benötigt ;)

Code:
package net.minecraft.src;
import java.util.Random;

public class Dorf extends WorldGenerator
{
    public Dorf() { }

    public boolean generate(World world, Random rand, int i, int j, int k) {
        int spawnBlockID = 5;
        if(world.getBlockId(i, j, k) != spawnBlockID || world.getBlockId(i, j + 1, k) != 0 || world.getBlockId(i + 4, j, k) != spawnBlockID || world.getBlockId(i + 4, j, k + 4) != spawnBlockID || world.getBlockId(i, j, k + 4) != spawnBlockID || world.getBlockId(i + 4, j + 1, k) != 0 || world.getBlockId(i + 4, j + 1, k + 4) != 0 || world.getBlockId(i, j + 1, k + 4) != 0)
        {
            return false;
        }

        world.setBlock(i + 0, j + 0, k + 0, 5);
        world.setBlock(i + 0, j + 0, k + 1, 5);
        world.setBlock(i + 0, j + 0, k + 2, 5);
        world.setBlock(i + 0, j + 0, k + 3, 5);
        world.setBlock(i + 0, j + 0, k + 4, 5);
        world.setBlock(i + 0, j + 1, k + 0, 5);
        world.setBlock(i + 0, j + 1, k + 1, 5);
        world.setBlock(i + 0, j + 1, k + 2, 5);
        world.setBlock(i + 0, j + 1, k + 3, 5);
        world.setBlock(i + 0, j + 1, k + 4, 5);
        world.setBlock(i + 0, j + 2, k + 0, 5);
        world.setBlock(i + 0, j + 2, k + 1, 5);
        world.setBlock(i + 0, j + 2, k + 2, 5);
        world.setBlock(i + 0, j + 2, k + 3, 5);
        world.setBlock(i + 0, j + 2, k + 4, 5);
        world.setBlock(i + 0, j + 3, k + 0, 45);
        world.setBlock(i + 0, j + 3, k + 1, 45);
        world.setBlock(i + 0, j + 3, k + 2, 45);
        world.setBlock(i + 0, j + 3, k + 3, 45);
        world.setBlock(i + 0, j + 3, k + 4, 45);
        world.setBlock(i + 1, j + 0, k + 0, 5);
        world.setBlock(i + 1, j + 0, k + 1, 5);
        world.setBlock(i + 1, j + 0, k + 2, 5);
        world.setBlock(i + 1, j + 0, k + 3, 5);
        world.setBlock(i + 1, j + 0, k + 4, 5);
        world.setBlock(i + 1, j + 1, k + 0, 5);
        world.setBlock(i + 1, j + 1, k + 4, 5);
        world.setBlock(i + 1, j + 2, k + 0, 5);
        world.setBlock(i + 1, j + 2, k + 4, 5);
        world.setBlock(i + 1, j + 3, k + 0, 45);
        world.setBlock(i + 1, j + 3, k + 1, 45);
        world.setBlock(i + 1, j + 3, k + 2, 45);
        world.setBlock(i + 1, j + 3, k + 3, 45);
        world.setBlock(i + 1, j + 3, k + 4, 45);
        world.setBlock(i + 2, j + 0, k + 0, 5);
        world.setBlock(i + 2, j + 0, k + 1, 5);
        world.setBlock(i + 2, j + 0, k + 2, 5);
        world.setBlock(i + 2, j + 0, k + 3, 5);
        world.setBlock(i + 2, j + 0, k + 4, 5);
        world.setBlock(i + 2, j + 1, k + 0, 5);
        world.setBlock(i + 2, j + 1, k + 4, 5);
        world.setBlock(i + 2, j + 2, k + 0, 5);
        world.setBlock(i + 2, j + 2, k + 4, 5);
        world.setBlock(i + 2, j + 3, k + 0, 45);
        world.setBlock(i + 2, j + 3, k + 1, 45);
        world.setBlock(i + 2, j + 3, k + 2, 45);
        world.setBlock(i + 2, j + 3, k + 3, 45);
        world.setBlock(i + 2, j + 3, k + 4, 45);
        world.setBlock(i + 3, j + 0, k + 0, 5);
        world.setBlock(i + 3, j + 0, k + 1, 5);
        world.setBlock(i + 3, j + 0, k + 2, 5);
        world.setBlock(i + 3, j + 0, k + 3, 5);
        world.setBlock(i + 3, j + 0, k + 4, 5);
        world.setBlock(i + 3, j + 1, k + 0, 5);
        world.setBlock(i + 3, j + 1, k + 1, 5);
        world.setBlock(i + 3, j + 1, k + 3, 5);
        world.setBlock(i + 3, j + 1, k + 4, 5);
        world.setBlock(i + 3, j + 2, k + 0, 5);
        world.setBlock(i + 3, j + 2, k + 1, 5);
        world.setBlock(i + 3, j + 2, k + 3, 5);
        world.setBlock(i + 3, j + 2, k + 4, 5);
        world.setBlock(i + 3, j + 3, k + 0, 45);
        world.setBlock(i + 3, j + 3, k + 1, 45);
        world.setBlock(i + 3, j + 3, k + 2, 45);
        world.setBlock(i + 3, j + 3, k + 3, 45);
        world.setBlock(i + 3, j + 3, k + 4, 45);
        world.setBlockWithNotify(i + 3, j + 1, k + 2, 64);
        world.setBlockMetadata(i + 3, j + 1, k + 2, 2);
        world.setBlockWithNotify(i + 3, j + 2, k + 2, 64);
        world.setBlockMetadata(i + 3, j + 2, k + 2, 8);

        return true;
    }
}
Danke schonmal im vorraus :)

Wie meinst du das genau
07/24/2012 14:43 VkBpEqVonSappireFlyff#489
cooool
07/24/2012 23:08 22Legend#490
the_cake, meine frage ist ob ich
irgendwo in dem Code einstellen kann
wie häufig mein dorf oder haus gespawnt wird ?
Weil immoment suche ich und suche und finde
es net. Da wollte ich nur wissen ob man das
ändern kann um zu gucken ob es überhaupt geht ;)

Achja nochmal nebenbei, danke für die guten
modloader tuts ;) Haben mir manchmal echt sehr gut
weiter geholfen, weiter so !!! :)
07/25/2012 16:13 the_cake#491
Quote:
Originally Posted by 22Legend View Post
the_cake, meine frage ist ob ich
irgendwo in dem Code einstellen kann
wie häufig mein dorf oder haus gespawnt wird ?
Weil immoment suche ich und suche und finde
es net. Da wollte ich nur wissen ob man das
ändern kann um zu gucken ob es überhaupt geht ;)

Achja nochmal nebenbei, danke für die guten
modloader tuts ;) Haben mir manchmal echt sehr gut
weiter geholfen, weiter so !!! :)
Klar kann man das einstellen zwar nicht direkt ihn der datei aber mann kann es Dan ihn eine neue Biome Spawnenen lassen. Da kann man dan einstellen das es einmal pro biome Spawnen lassen kann. Auserdem kann man einstellen das dort Dan auch dorf Bewohner Spawnen und Wolla ein NPC Dorf. :)
07/25/2012 17:10 Nick200#492
the cake schon mal einen riesen dank für dein tutorial habe aber noch ein kleines problem ich habe mir ein erz gemacht das in der welt generiert so jetzt möchte ich das das erz ein item droppt in meinem fall das Asphalterz soll Rohasphalt als Item droppen aber wie mache ich das in deinem tut hast du einen neuen block erstellt um das mit "BlockDrop" zu machen
wäre nett wenn du mir helfen könntest




PS: ich mache erst seit so 1 Woche Mods ^^ und das ist mein erster Beitrag auf Elitepvpers.
07/25/2012 23:29 22Legend#493
the_cake kannst du das in deinem Tut über dörfer vielleicht noch erweitern,
was man dannach wirklich genau macht damit das eigene dorf/haus
gespawnt wird. Ich finde an der stelle versteht man nicht wirklich
was man machen muss nachdem man das im Schematic Converter
konvertiert hat. Also was man danach noch machen muss um sein dorf zu bekommen ;)
07/26/2012 16:41 the_cake#494
Quote:
Originally Posted by 22Legend View Post
the_cake kannst du das in deinem Tut über dörfer vielleicht noch erweitern,
was man dannach wirklich genau macht damit das eigene dorf/haus
gespawnt wird. Ich finde an der stelle versteht man nicht wirklich
was man machen muss nachdem man das im Schematic Converter
konvertiert hat. Also was man danach noch machen muss um sein dorf zu bekommen ;)
Also nachdem du den Converter genutzt hast und deine .schamatic umge-wandeld hast ihn eine java datei. Das merkst du da ran das der Unterste block auftaucht von deinem haus ihm Converter. Nun sollten zwei datein ihm ordner liegen wo auch der Converter ist es sollten 2 java datein sein die eine fängt an mit mod_ und die andere glaub ich mit WorldGenStructure . Die beiden datein kopierst du und fügst sie ihn folgenden ordner ein DEINMODORDNER/src/net/minecraft/src und schon sollte es gehen und dan sollte alles gehen.



Quote:
the cake schon mal einen riesen dank für dein tutorial habe aber noch ein kleines problem ich habe mir ein erz gemacht das in der welt generiert so jetzt möchte ich das das erz ein item droppt in meinem fall das Asphalterz soll Rohasphalt als Item droppen aber wie mache ich das in deinem tut hast du einen neuen block erstellt um das mit "BlockDrop" zu machen
wäre nett wenn du mir helfen könntest




PS: ich mache erst seit so 1 Woche Mods ^^ und das ist mein erster Beitrag auf Elitepvpers.
Ich erklär es dir mal dein Code Schaut also nun so aus.:


Nun musst du deinen Code umschreiben und zwar so


Nun heist es nichtmehr

Code:
Asphalterz = new Block(220, 0, Material.wood).setBlockName("Block Normal").setHardness(0.4F);
Sondern

Code:
Asphalterz = new BlockDrop(220, 0, Material.wood).setBlockName("Block Normal").setHardness(0.4F);
Nun erstellst du eine neue Eatei indem du ihn Eclipse oben auf das grüne C drückst und der Name der datei muss BlockDrop heisen ihn dem folgendes Steht.

Code:
package net.minecraft.src;

import java.util.Random;

public class BlockDrop extends Block{

	protected BlockDrop(int par1, int par2, Material par3Material) {
		super(par1, par2, par3Material);
	}

    public int idDropped(int par1, Random par2Random, int par3)
    {
        if (blockID == mod_name.Asphalterz.blockID)
        {
            return mod_name.Rohasphalt.shiftedIndex;
        }
        else
        {
            return blockID;
        }
    }
}
Das sollte dein Problemchen dan Lösen
07/26/2012 20:44 Nick200#495
Danke the cake bist der beste danke das du meine frage so schnell und gut beantworten konntest habe es jetzt hingebracht habe schon viele tutorials angeschaut aber deine sind immer noch die besten vor allem deine schnellen antworten Thx