Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Minecraft > Minecraft Guides & Strategies
You last visited: Today at 16:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Minecraft Mods erstellen [ModLoader]

Discussion on Minecraft Mods erstellen [ModLoader] within the Minecraft Guides & Strategies forum part of the Minecraft category.

View Poll Results: Ist diese Thema Hilfreich ?
Ja 247 89.17%
Nein 30 10.83%
Voters: 277. You may not vote on this poll

Reply
 
Old 10/19/2012, 14:28   #616
 
elite*gold: 0
Join Date: Oct 2012
Posts: 5
Received Thanks: 0
C&P Text?
pinkelaffe is offline  
Old 10/19/2012, 15:23   #617
Moderator


 
elite*gold: 558
Join Date: Feb 2010
Posts: 6,546
Received Thanks: 1,418
Quote:
Originally Posted by pinkelaffe View Post
C&P Text?
Copy und Paste. (Kopieren und Einfügen)

Einfach nur kopieren reicht nicht, du musst selbst noch etwas tun.
ComputerBaer is offline  
Old 10/19/2012, 18:54   #618
 
elite*gold: 0
Join Date: Oct 2012
Posts: 5
Received Thanks: 0
und wie ich kenn mich in dem Bereich nicht so gut aus
pinkelaffe is offline  
Old 10/19/2012, 19:38   #619
Moderator


 
elite*gold: 558
Join Date: Feb 2010
Posts: 6,546
Received Thanks: 1,418
Hmm, laut der ersten Seite müsste das einfügen in Minecraft völlig reichen. Das kann ich zwar nicht wirklich glauben, aber was weiß ich schon von Mods?

Ich würde sagen, schau dir das ganze nochmal an, nimm Minecraft unter die Lupe und du wirst schon einen Weg finden.
Wenn du das wirklich lernen willst, solltest du nicht nur mit Copy and Paste benutzen und auch nicht beim kleinsten Problem gleich um Hilfe schreiben. Zum Programmieren gehört auch viel Zeit in die Fehlersuche und die "Weiterbildung" zu investieren.

Oder du wartest bis the_cake hier vorbei schaut und die Lösung für dein Problem schreibt.
ComputerBaer is offline  
Old 10/19/2012, 22:53   #620
 
elite*gold: 0
Join Date: Oct 2012
Posts: 5
Received Thanks: 0
vllt sollte ich auch erwähnen dass ich schon über 2 std mit fehler & Lösungssuche beschäftigt gewesen bin und als ob ich so einer bin der sofort nach hilfe fragt wenn er nich weiterkommt.
pinkelaffe is offline  
Old 10/20/2012, 15:23   #621
 
elite*gold: 7
Join Date: Oct 2009
Posts: 1,817
Received Thanks: 369
Das behaupten wir von dir auch nicht (Obwohl wir das nach 5 Beiträgen nicht einschätzen können). Jedoch ist das Erstellen von Mods keine 3 Minuten Arbeit. Du befasst dich hier mit dem Spielinneren, und da solltest du dann schon etwas von der Materie verstehen. Wir möchten dir hier keinen Code zusammenschustern, den du dir aus einzelenen Legoteilen nachher zusammenbauen kannst - gehe auf die erste Seite, und lese dne Abschnitt "Welt Generation" ganz genau durch. Nicht nur den Code, alles andere auch. Dann findest du eine Lösung, glaub mir.
cakeflavor is offline  
Old 10/20/2012, 20:32   #622
 
elite*gold: 0
Join Date: Sep 2012
Posts: 1
Received Thanks: 0
@ the_cake mit der Lampe, das geht nicht
ich habe folgenden Code:

Quote:

package net.minecraft.src;

import java.util.Random;

public class BlockUVLampe extends Block
{

private final boolean powered;

protected BlockUVLampe(int par1, int par2, boolean par3) {
super(par1, par2, Material.redstoneLight);
this.setCreativeTab(CreativeTabs.tabRedstone);
this.powered = par3;
}

public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
if (!par1World.isRemote)
{
if (this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
{
par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 4);
}
else if (!this.powered && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
{
par1World.setBlockWithNotify(par2, par3, par4, mod_ObsidianTools.LampeON.blockID);
}
}
}

public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
if (!par1World.isRemote)
{
if (this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
{
par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, 4);
}
else if (!this.powered && par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
{
par1World.setBlockWithNotify(par2, par3, par4, mod_ObsidianTools.LampeON.blockID);
}
}
}

public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote && this.powered && !par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
{
par1World.setBlockWithNotify(par2, par3, par4, mod_ObsidianTools.LampeOFF.blockID);
}
}

}
Quote:

LampeON = (new BlockUVLampe(LampeONID, ModLoader.addOverride("/terrain.png", "/ObsidianTools/LampeON.png"), true).setHardness(0.4F).setBlockName("Lampe An").setStepSound(Block.soundGlassFootstep).setReq uiresSelfNotify().setLightValue(2.5F));
LampeOFF = (new BlockUVLampe(LampeOFFID, ModLoader.addOverride("/terrain.png", "/ObsidianTools/LampeOFF.png"), false).setHardness(0.4F).setBlockName("Lampe Aus").setStepSound(Block.soundGlassFootstep).setRe quiresSelfNotify());

Und das geht viel besser

(Auszug aus meinem ObsidianTools-Mod)
Grzzlwmpf is offline  
Old 10/22/2012, 01:06   #623
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
Alleine, wenn ich das hier:
PHP Code:
package net.minecraft.src;

public class 
mod_name extends BaseMod{
    
    public static final 
Block TestErz;
    
    static{
        
//Block
        
TestErz = new Block(2200Material.rock).setHardness(0.5F).setLightValue(0.5F).setBlockName("Block Tutorial");
        
        
//Register
        
ModLoader.registerBlock(TestErz);
        
        
//Name
        
ModLoader.addName(TestErz"Rubin Erz");
        
        
//Textur
        
TestErz.blockIndexInTexture ModLoader.addOverride("/terrain.png""/tutorial/block/rubin_erz.png");
    }
    

    
    public 
String getVersion() {return "Minecraft Tutorial Mod";}
    public 
void load() {}


einfüge, bekomme ich 9 errors ... -.- habe alles gleich gemacht.

//Edit: ok problem gelöst. Habe einfach das Package beim erstellen von dem neuen Projekt schon eingefügt..

So--- jetzt ist nur die frage... was mach ich jetzt damit wenn ich fertig bin???
BestOfElite is offline  
Old 10/22/2012, 13:21   #624
Moderator


 
elite*gold: 558
Join Date: Feb 2010
Posts: 6,546
Received Thanks: 1,418
Quote:
Originally Posted by BestOfElite View Post
So--- jetzt ist nur die frage... was mach ich jetzt damit wenn ich fertig bin???
Soweit ich weiß erstellt mcp beim recompilieren einen Ordner wo die neuen/modifizierten Klassen drin sind. Diese musst du dann nurnoch kopieren und dann z.B. in deine minecraft.jar einfügen.
ComputerBaer is offline  
Thanks
1 User
Old 10/22/2012, 16:09   #625
 
the_cake's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 454
Received Thanks: 345
Nach dem Minecraft Update am Mittwoch werde ich nochmal meinen Ganzen beitrag überarbeiten. Dann kommen wieder einige neue sachen hinzu. Auserdem wird es zwar immer noch möglich sein mit C&P seinen Mod zu schreiben allerdings werde ich noch näher drauf eingehen um fragen zu klären.
the_cake is offline  
Old 10/22/2012, 20:31   #626
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
so jetzt ist da noch so ne sache... wie mache ich z.B. das ich einen Block im Creative inv habe oder craften kann? kriege es einfach nicht hin...

Quote:
Originally Posted by ComputerBaer View Post
Soweit ich weiß erstellt mcp beim recompilieren einen Ordner wo die neuen/modifizierten Klassen drin sind. Diese musst du dann nurnoch kopieren und dann z.B. in deine minecraft.jar einfügen.
ich musste reobfusicaten und dann war se im reobf drine
BestOfElite is offline  
Old 10/25/2012, 07:22   #627
 
elite*gold: 0
Join Date: Aug 2012
Posts: 14
Received Thanks: 2
Ich habe ein problem mit dem Welt Generation ich möchte gerene einen Block Biomen abhängig Generation lassen mein Code siht schon mal so aus
Code:
     public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
             BiomeGenBase b = world.getBiomeGenForCoords(chunkX, chunkZ);
             {
        switch(world.provider.dimensionId){
        case -1: generateNether(world, random,chunkX*16,chunkZ*16);
        case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
        } }      }
        
    private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
        {
        for(int i =0; i<30;i++){
        if (biomeName == "Plains" ){
        int Xcoord = BlockX + random.nextInt(20);
        int Zcoord = BlockZ + random.nextInt(20);
        int Ycoord = random.nextInt(256);
        
        (new WorldGenMinable(Erzblock.blockID, 20)).generate(world, random, Xcoord, Ycoord, Zcoord);
    }}}}
Diebord is offline  
Old 10/27/2012, 12:57   #628
 
elite*gold: 0
Join Date: Oct 2012
Posts: 3
Received Thanks: 0
Hallo wollte fragen ob du weist wie man mehrere Erze generieren lassen kann. Kann nur eins im Nether generieren lassen (Zeig dir mal mein Code)

package net.minecraft.src;

import java.util.Random;

public class mod_nether_1 extends BaseMod{

//Register
public static final Block coalore;
public static final Block ironore = new Block(221, 0, Material.rock).setBlockName("ironore").setHardness (5.0F).oreIron;
public static final Item cookedrottenflesh = new ItemFood(222, 4, false).setItemName("cookedrottenflesh");


//DropList
static{
coalore = new BlockDrop(220, 0, Material.rock).setBlockName("Block Normal").setHardness(1.0F).oreCoal;
//Register
ModLoader.registerBlock(coalore);
ModLoader.registerBlock(ironore);
//Name
ModLoader.addName(coalore, "Netherrack Coal Ore");
ModLoader.addName(ironore, "Netherrack Iron Ore");
ModLoader.addName(cookedrottenflesh, "Cooked Rotten Flesh");
//CreativeTab
coalore.setCreativeTab(CreativeTabs.tabBlock);
ironore.setCreativeTab(CreativeTabs.tabBlock);
//Texture
coalore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/nether/coalore.png");
ironore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/nether/ironore.png");
cookedrottenflesh.iconIndex = ModLoader.addOverride("/gui/items.png", "/nether/rottenflesh.png");
//Ofen
ModLoader.addSmelting(ironore.blockID, new ItemStack(Item.ingotIron), 2F);
ModLoader.addSmelting(Item.rottenFlesh.shiftedInde x, new ItemStack(cookedrottenflesh), 0.5F);
//Rezepte
ModLoader.addRecipe(new ItemStack(Item.slimeBall), new Object[] {
"M",
Character.valueOf('M'), Item.magmaCream
});
}












public String getVersion() {return null;}

public void load() {



}

public void generateNether(World world, Random random, int chunkX, int chunkZ){
for(int i = 0; i < 25; i++){
int rndPosX = chunkX + random.nextInt(20);
int rndPosY = random.nextInt(128);
int rndPosZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, rndPosX, rndPosY, rndPosZ);
}
}

}

Und wenn ich da unten mehrere public void generateNether/Surface mache kommt z.b der angegebene Block coalore nicht, sondern nur der ironore

Ich weiss nicht ob das jemand schon geschrieben hat, würde mich freuen wenn du mir helfen kannst
FireDre4m is offline  
Old 10/27/2012, 16:52   #629
 
elite*gold: 0
Join Date: Aug 2012
Posts: 14
Received Thanks: 2
ganz einfach nach deinem Code
Code:
for(int i = 0; i < 25; i++){
int rndPosX = chunkX + random.nextInt(20);
int rndPosY = random.nextInt(128);
int rndPosZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, rndPosX, rndPosY, rndPosZ);
}
und so musst du dan weider machen
Code:
for(int i = 0; i < 25; i++){
int CodiX = chunkX + random.nextInt(20);
int CodiY = random.nextInt(128);
int CodiZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, CodiX,CodiZ, CodiZ);
}
also dein code mus dan so aussehen
Code:
public void load() {

public void generateNether(World world, Random random, int chunkX, int chunkZ){
for(int i = 0; i < 25; i++){
int rndPosX = chunkX + random.nextInt(20);
int rndPosY = random.nextInt(128);
int rndPosZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, rndPosX, rndPosY, rndPosZ);
}
for(int i = 0; i < 25; i++){
int CodiX = chunkX + random.nextInt(20);
int CodiY = random.nextInt(128);
int CodiZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, CodiX,CodiZ, CodiZ);
}}

du musst bei jeden weiteren Generirung musst du die 3 uint ändern nicht die gleichen nehem da sonst ein fehler oder der block wird noch mal generirt
Diebord is offline  
Thanks
1 User
Old 10/27/2012, 18:07   #630
 
elite*gold: 0
Join Date: Oct 2012
Posts: 3
Received Thanks: 0
Quote:
Originally Posted by Diebord View Post
ganz einfach nach deinem Code
Code:
for(int i = 0; i < 25; i++){
int rndPosX = chunkX + random.nextInt(20);
int rndPosY = random.nextInt(128);
int rndPosZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, rndPosX, rndPosY, rndPosZ);
}
und so musst du dan weider machen
Code:
for(int i = 0; i < 25; i++){
int CodiX = chunkX + random.nextInt(20);
int CodiY = random.nextInt(128);
int CodiZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, CodiX,CodiZ, CodiZ);
}
also dein code mus dan so aussehen
Code:
public void load() {

public void generateNether(World world, Random random, int chunkX, int chunkZ){
for(int i = 0; i < 25; i++){
int rndPosX = chunkX + random.nextInt(20);
int rndPosY = random.nextInt(128);
int rndPosZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, rndPosX, rndPosY, rndPosZ);
}
for(int i = 0; i < 25; i++){
int CodiX = chunkX + random.nextInt(20);
int CodiY = random.nextInt(128);
int CodiZ = chunkZ + random.nextInt(20);
(new WorldGenNether_1(ironore.blockID, 20)).generate(world, random, CodiX,CodiZ, CodiZ);
}}

du musst bei jeden weiteren Generirung musst du die 3 uint ändern nicht die gleichen nehem da sonst ein fehler oder der block wird noch mal generirt
Danke werde es gleich probieren
FireDre4m is offline  
Reply

Tags
java, minecraft, mod, modloader, tutorial


Similar Threads Similar Threads
Minecraft Mods selber erstellen
10/26/2011 - Minecraft - 6 Replies
Vorab: Ich weiß folgende Frage wurde schon oft gestellt: Wie mache ich eigene Mods? Hab keine Java Kentnisse. Bei mir ist der Fall ähnlich ich habe im Internet gesucht und folgendes gefunden: Minecraft Mod Maker - Minecraft Forum Jedoch funktioniert der bei mir nicht :( Meine Frage an euch gibt e einei alternative oder gibt es eine andere Möglichkeit? Es muss nichts großes sein. Ich möchte jedoch nur zb. einen Block erstellen der kwinw besonderen Funktionen hat wie der Grassblock



All times are GMT +1. The time now is 16:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.