Minecraft Mods erstellen [ModLoader]

07/09/2012 18:42 the_cake#436
Quote:
Originally Posted by morice1999 View Post
Wann kommt nun endlich das neue? Du hast geschrieben "morgen", doch das war vor einer Woche.
War alles auf meinen MacBook hab aber heute die nachricht bekommen das mein MainBoard kapput ist ich werde es schon noch einfügen keine angst.
07/09/2012 20:16 morice1999#437
achso okay, naja bin halt recht ungeduldig ^^
07/09/2012 21:13 JONMI2000#438
Hallo mal wieder!
Und wie immer hab ich eine Frage die lautet
Iche habe einen Tempel gebaut den dann mit mcedit kopiert und gespeichert danach mit diesem ...tojava
umgewandelt nun das Problem ich finde den Tempel nicht such nun schon 1.30 h und hab ihn nicht entdeckt.
Hier die .java datein:
mod_modname:
/*
this is a default mod_ file with structure generation



If you're going to copy the generateSurface method from this file, make sure to not forget the 'import java.util.Random;' (line 15)




Thanks for using my tool.
*/

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

public class mod_modname extends BaseMod{

public void load()
{

}

public void generateSurface(World world, Random rand, int y, int z)
{
for(int k = 0; k < 100; k++)
{
int RandPosX = y + rand.nextInt(16);
int RandPosY = rand.nextInt(128);
int RandPosZ = z + rand.nextInt(16);
(new WorldGenStructure()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}


Hier WorldGenStructure:

/*
===== MADE BY HAXMAN2'S .SCHEMATIC TO JAVA CONVERTING TOOLv0.2 ====
There is a tutorial on the forum thread on how to use this tool.
NOTE: The Block limit is 19,500 at the moment, meaning if your file is bigger then 20,000 lines, it MIGHT crash...
*/
package net.minecraft.src;
import java.util.Random;
public class WorldGenStructure extends WorldGenerator
{
public WorldGenStructure()
{
}
public boolean generate(World world, Random rand, int i, int j, int k)
{
int bID = 2; /*2 is the block id for grass, so the structure going to spawn on grass*/
if(world.getBlockId(i, j, k) != bID || world.getBlockId(i, j + 1, k) != 0 || world.getBlockId(i + 7, j, k) != bID || world.getBlockId(i + 7, j, k + 7) != bID || world.getBlockId(i, j, k + 7) != bID || world.getBlockId(i + 7, j + 1, k) != 0 || world.getBlockId(i + 7, j + 1, k + 7) != 0 || world.getBlockId(i, j + 1, k + 7) != 0)
{
return false;
}

return true;
}
} /*=====End of Code=====*/

Könnt ihr mir da irgendwie helfen?

mfg
jonmi
07/09/2012 22:31 the_cake#439
Quote:
Originally Posted by JONMI2000 View Post
Hallo mal wieder!
Und wie immer hab ich eine Frage die lautet
Iche habe einen Tempel gebaut den dann mit mcedit kopiert und gespeichert danach mit diesem ...tojava
umgewandelt nun das Problem ich finde den Tempel nicht such nun schon 1.30 h und hab ihn nicht entdeckt.
Hier die .java datein:
mod_modname:
/*
this is a default mod_ file with structure generation



If you're going to copy the generateSurface method from this file, make sure to not forget the 'import java.util.Random;' (line 15)




Thanks for using my tool.
*/

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

public class mod_modname extends BaseMod{

public void load()
{

}

public void generateSurface(World world, Random rand, int y, int z)
{
for(int k = 0; k < 100; k++)
{
int RandPosX = y + rand.nextInt(16);
int RandPosY = rand.nextInt(128);
int RandPosZ = z + rand.nextInt(16);
(new WorldGenStructure()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}


Hier WorldGenStructure:

/*
===== MADE BY HAXMAN2'S .SCHEMATIC TO JAVA CONVERTING TOOLv0.2 ====
There is a tutorial on the forum thread on how to use this tool.
NOTE: The Block limit is 19,500 at the moment, meaning if your file is bigger then 20,000 lines, it MIGHT crash...
*/
package net.minecraft.src;
import java.util.Random;
public class WorldGenStructure extends WorldGenerator
{
public WorldGenStructure()
{
}
public boolean generate(World world, Random rand, int i, int j, int k)
{
int bID = 2; /*2 is the block id for grass, so the structure going to spawn on grass*/
if(world.getBlockId(i, j, k) != bID || world.getBlockId(i, j + 1, k) != 0 || world.getBlockId(i + 7, j, k) != bID || world.getBlockId(i + 7, j, k + 7) != bID || world.getBlockId(i, j, k + 7) != bID || world.getBlockId(i + 7, j + 1, k) != 0 || world.getBlockId(i + 7, j + 1, k + 7) != 0 || world.getBlockId(i, j + 1, k + 7) != 0)
{
return false;
}

return true;
}
} /*=====End of Code=====*/

Könnt ihr mir da irgendwie helfen?

mfg
jonmi
Ist aber ein kleiner WorldGenStructure Code schau dir mal meinen an der zu meinen KLEINEN haus gehört:


Das ist nicht alles oder ??

07/10/2012 13:20 JONMI2000#440
Doch das ist alles was da drin ist.
Weiß auch nicht

mal gucken
bb
jonmi

ah ich habs hab was falsch gemacht trotzdem danke!
bb
jonmi
07/10/2012 14:08 Domekilla12#441
Habe das selbe Problem ^^ Mein Code fällt etwas größer aus kann es villeicht auch sein dass der Tempel den ich gebaut habe zu groß ist ?

Der Code hat ingesamt 7000 Zeilen und mehr villeicht ist der Tempel ja einfach zu groß
07/10/2012 16:48 the_cake#442
Doch das ist ganz normal kommt immer drauf an wie gros dein Gebäude ist. Um so größer um so mehr zeilen.
07/10/2012 18:33 Domekilla12#443
Ja aber es spawnt nicht wie kann ich das fixxen ;) ?
07/10/2012 23:08 cakeflavor#444
@takenobuokaba: #reported

@DomeKilla: Wie wärs, wenn du uns mal den Code (im Spoiler) zeigst? :) Nur die Methode generateSurface die ja anscheinend Probleme macht.
07/11/2012 13:51 Domekilla12#445
Hier der besagte Code ;)

07/11/2012 19:22 JONMI2000#446
Hallo!
Ich hab mal die Fragen:
1. Wie geht das anstelle von normalen Ziegel auch brüchige/bemooste Ziegel generiert werden? weil bei mir selbst wenn ich bemooste ziegel baue spawnen normale wie behebe ich das?
2. Wie kann man solche gebäude nur in einen bestimmten biom spawnen lassen?
3. Wann kommt das Tut zum Mob der dort spawnt?
4.Wann kommt das Tut zum eigenen Mob?

Ich weiß es sind sehr viele Fragen aber ich brauche Antworten


Danke im voraus
jonmi

Mir ist grad noch was eingefallen
5. Wie kann man in plazierte Truhen etwas reinmachendas dann mit spawnt?
07/11/2012 21:10 Arkensor#447
the_cake i h bin echt begeistert von deinem toturial hier. es hat mir sehr geholfen.

könnetst du dass vllt alles als youtube tutorial durchzeiehn. ich garantiere dir es würde dich echt famem machen.

Mfg Arkensor
07/11/2012 21:21 cakeflavor#448
Ich werde, wenn the_cake nichts dagegen hat, das Tutorial demnächst mal weiterführen, da der Rest Tutorial auf seinem defekten MacBook wohl verloren gegangen sind. Schreibe gleich den Part 'Items' :)
07/12/2012 11:32 morice1999#449
Und wenn du, the_cake, nichts dagegen hast, kann ich es auch für dich auf Youtube durchziehen. Würde natürlich deinen Thread verlinken und deinen Namen mehrmals erwähnen, aber natürlich nur solange du dass willst :D
07/12/2012 14:02 Domekilla12#450
Und was ist jetzt mit meinem Code ? Hoffe der wurde nicht übersehen und ich bekomme noch ne Antwort :)

PS. Ich finde es toll das k0thaufen! Die tutorials weiterführen will :)