|
You last visited: Today at 03:33
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% |
05/25/2012, 22:00
|
#316
|
elite*gold: 0
Join Date: Feb 2011
Posts: 454
Received Thanks: 345
|
Code:
ModLoader.AddRecipe(new ItemStack(Item.SpawnEgg, Anzhal, ID2), new Object[] {
"X", Character.valueOf('X'), Block.dirt
});
Code:
ModLoader.AddRecipe(new ItemStack(Item.SpawnEgg, 64, 94), new Object[] {
"X", Character.valueOf('X'), Block.dirt
});
Müste so sein sry bin gerade nicht am pc kann es also nicht testen. Bin mir auch nicht sicher ob das Spawn Egg ein Item oder ein block ist
|
|
|
05/26/2012, 09:42
|
#317
|
elite*gold: 0
Join Date: Dec 2010
Posts: 463
Received Thanks: 97
|
Das mit dem Item.SpawnEgg oder Block.Spawnegg ist falsch habs getestet aber weiß auch nicht was da hin kommt
|
|
|
05/26/2012, 11:55
|
#318
|
elite*gold: 0
Join Date: Apr 2011
Posts: 11,117
Received Thanks: 2,436
|
Wenn man hier guckt :
Sieht man das ein Ei nicht seine eigene Id hat, sie benutzen also den Damage aus.
Also müsste es denke ich so gehen :
Code:
ModLoader.AddRecipe(new ItemStack(Item.SpawnEgg, Anzahl, Damage), new Object[] {
"X", Character.valueOf('X'), Block.dirt
});
Ps. Es müsste ein Item sein und kein Block ->  (Typ)
Also eigentlich so wie Cake sagte :/
|
|
|
05/26/2012, 14:32
|
#319
|
elite*gold: 110
Join Date: Jul 2011
Posts: 4,588
Received Thanks: 626
|
Wann wird es den Minecraft Mod Maker denn zum Download geben? Würde mich mal interessieren so ein Programm^^
und wird das Programm etwas kosten?
|
|
|
05/26/2012, 17:44
|
#320
|
elite*gold: 6
Join Date: May 2012
Posts: 117
Received Thanks: 15
|
Gut gemacht
|
|
|
05/26/2012, 19:35
|
#321
|
elite*gold: 0
Join Date: Feb 2011
Posts: 454
Received Thanks: 345
|
Ne das Programm ist kostenlos ich kann ja schon mal einen link posten denoch wird dir das nichts nutzen. 
Es gibt bisher 2 bugs
- Font bug: Die Minecraft font wird nicht automatisch installiert.
- Update bug: Norton internet Security löscht automatisch die exe ob eine neue heruntergeladene exe oder ein update.
|
|
|
05/26/2012, 20:26
|
#322
|
elite*gold: 15
Join Date: Oct 2010
Posts: 182
Received Thanks: 38
|
Habe mir mal dein dein Tutorial angeschaut und gleich ausprobiert, doch gleich am Anfang will der erstellte Block nicht erscheinen, hab schon alles ausprobiert, überall gegraben, 20 neue Welten erstellt. Hier ist mein Code:
Code:
package net.minecraft.src;
import java.util.Random;
public class mod_name extends BaseMod
{
public String getVersion() {return null;}
public static final Block TestOre;
static{
TestOre = new Block(230, 0,Material.rock ).setHardness(1.5F).setLightValue(2).setResistance(1).setBlockName("TestOre");
}
public void load() {
ModLoader.registerBlock(TestOre);
ModLoader.addName(TestOre, "TestOre");
TestOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Block/TestOre.png");
}
public void generateSurface (World World, Random random, int chunkX, int chunkZ){
for(int i= 0; i < 25; i++){
int randposX = chunkX + random.nextInt(16);
int randposY = random.nextInt(128);
int randposZ = chunkX + random.nextInt(16);
(new WorldGenMinable(this.TestOre.blockID, 16)).generate(World, random, randposX, randposY, randposZ);
}
}
}
Alles ist in einer Datei (mod_name.class bzw. .java)
EDIT: Bei dem Ofen-Material (Dirt anstatt Holz oder so) funktionert es auch nicht, d.h. der nimmt die Mods irgendwie nicht an.
|
|
|
05/26/2012, 20:58
|
#323
|
elite*gold: 0
Join Date: Apr 2011
Posts: 11,117
Received Thanks: 2,436
|
Quote:
Originally Posted by Darkangel44
Habe mir mal dein dein Tutorial angeschaut und gleich ausprobiert, doch gleich am Anfang will der erstellte Block nicht erscheinen, hab schon alles ausprobiert, überall gegraben, 20 neue Welten erstellt. Hier ist mein Code:
Code:
package net.minecraft.src;
import java.util.Random;
public class mod_name extends BaseMod
{
public String getVersion() {return null;}
public static final Block TestOre;
static{
TestOre = new Block(230, 0,Material.rock ).setHardness(1.5F).setLightValue(2).setResistance(1).setBlockName("TestOre");
}
public void load() {
ModLoader.registerBlock(TestOre);
ModLoader.addName(TestOre, "TestOre");
TestOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/Block/TestOre.png");
}
public void generateSurface (World World, Random random, int chunkX, int chunkZ){
for(int i= 0; i < 25; i++){
int randposX = chunkX + random.nextInt(16);
int randposY = random.nextInt(128);
int randposZ = chunkX + random.nextInt(16);
(new WorldGenMinable(this.TestOre.blockID, 16)).generate(World, random, randposX, randposY, randposZ);
}
}
}
Alles ist in einer Datei (mod_name.class bzw. .java)
EDIT: Bei dem Ofen-Material (Dirt anstatt Holz oder so) funktionert es auch nicht, d.h. der nimmt die Mods irgendwie nicht an.
|
Kommen Fehler ?
Erstell mal ein Craftingrezept und guck ob es geht.
|
|
|
05/26/2012, 21:00
|
#324
|
elite*gold: 0
Join Date: Apr 2012
Posts: 7
Received Thanks: 0
|
@Darkangel44
Bei mir funktionierts mit diesem Code:
Quote:
package net.minecraft.src;
import java.util.Random;
public class mod_zinn extends BaseMod {
//Erz
public static final Block zinnerz = new Block(170, Material.rock).setBlockName("Zinn Erz");
public void load() {
//Erz
}
public void generateSurface1(World world, Random random, int chunkX, int chunkZ){
for(int i = 0; i < 25; i++){
int randPositionX = chunkX + random.nextInt(20);
int randPositionY = random.nextInt(228);
int randPositionZ = chunkZ + random.nextInt(20);
(new WorldGenMinable(zinnerz.blockID, 20)).generate(world, random, randPositionX, randPositionY, randPositionZ);
}
}
public String getVersion() {
return "1.2.5";
}}
|
Viel Spass
|
|
|
05/26/2012, 21:25
|
#325
|
elite*gold: 15
Join Date: Oct 2010
Posts: 182
Received Thanks: 38
|
@nikolaij1998: fehlt da nicht die Textur usw?
@false: ja 2 Warnungen:
Quote:
|
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment.
|
Quote:
Description: Dead code
On element: TileEntityMobSpawner.java
In folder: Client/src/net/minecraft/src
Location: line 102
|
|
|
|
05/26/2012, 21:43
|
#326
|
elite*gold: 0
Join Date: Feb 2011
Posts: 454
Received Thanks: 345
|
Quote:
Originally Posted by Darkangel44
@nikolaij1998: fehlt da nicht die Textur usw?
@false: ja 2 Warnungen:
|
Wird der Block nun generiert mit dem code von @nikolaij1998
|
|
|
05/26/2012, 21:47
|
#327
|
elite*gold: 15
Join Date: Oct 2010
Posts: 182
Received Thanks: 38
|
Nein, er ist nirgends zu finden
EDIT: Ein Craftingrezept geht auch nicht, also anscheinend gar kein Mod.
|
|
|
05/26/2012, 22:57
|
#328
|
elite*gold: 110
Join Date: Jul 2011
Posts: 4,588
Received Thanks: 626
|
Hmm, okay das mit den Bugs ist schlecht
Werde den Thread trotzdem die nächsten 2 Monate mitverfolgen, hat mich doch ganz schön neugierig gemacht, Mods machen ohne große Java Kentnisse^^
|
|
|
05/27/2012, 13:23
|
#329
|
elite*gold: 574
Join Date: Nov 2010
Posts: 2,498
Received Thanks: 726
|
Quote:
Originally Posted by Alex280M
Hmm, okay das mit den Bugs ist schlecht
Werde den Thread trotzdem die nächsten 2 Monate mitverfolgen, hat mich doch ganz schön neugierig gemacht, Mods machen ohne große Java Kentnisse^^
|
Zum Kopieren & Einfügen braucht man nur eine Brain.exe (die hier wohl auch nicht alle haben), und wenn sie dann etwas nicht wissen, z.B. wie man etwas macht, dass nicht hier im Tutorial steht, fragen sie jemanden anderes, der weiß, wie es geht, um es von ihm wieder zu kopieren und einzufügen.
Java Kentnisse haben hier die wenigsten...
|
|
|
05/27/2012, 19:29
|
#330
|
elite*gold: 0
Join Date: Feb 2011
Posts: 454
Received Thanks: 345
|
Quote:
Originally Posted by Njahs
Zum Kopieren & Einfügen braucht man nur eine Brain.exe (die hier wohl auch nicht alle haben), und wenn sie dann etwas nicht wissen, z.B. wie man etwas macht, dass nicht hier im Tutorial steht, fragen sie jemanden anderes, der weiß, wie es geht, um es von ihm wieder zu kopieren und einzufügen.
Java Kentnisse haben hier die wenigsten...
|
Es ist ja kein direkter Fehler es ist ja mit dem Norten Antivier programm das löscht dan den Modmaker hier ist der text fals den irgendjemanden interessiert
Code:
Imports System.IO
Public Class Form1
Dim Web As New Net.WebClient
Private Property Zeit As Integer
Private Property Zeit2 As Integer
Private Property Appdata As String
Private Property ende As Boolean
Function testInternetConnection()
Dim ping As New Net.NetworkInformation.Ping
Try
ping.Send("google.de")
Return True
Catch ex As Exception
Return True
End Try
End Function
Sub Runupdate()
If testInternetConnection() = True Then
Try
'virtuelle Text datei
Dim version As Integer = Web.DownloadString("http://dl.dropbox.com/u/79646035/version.txt")
If version > CInt(lblversion.Text) Then
Dim path As String = "http://dl.dropbox.com/u/79646035/MinecraftMM.exe"
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/version.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt")
Else
Kill(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt")
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/version.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt")
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/changelog.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
Label_transparent2.Text = IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMMUpdater.exe") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/MinecraftMMUpdater.exe", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMMUpdater.exe")
Else
'nichts
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMM.exe") = False Then
My.Computer.Network.DownloadFile(path, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMM.exe")
Else
Kill(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMM.exe")
My.Computer.Network.DownloadFile(path, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMM.exe")
End If
ende = True
Progressbar.Start()
Else
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/version.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt")
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/changelog.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
Label_transparent2.Text = IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
End If
'form ändern
If INI_ReadValueFromFile("GUI", "Startscreen", "Error", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini") = "false" Then
Form3.Show()
Me.Hide()
Form3.Visible = True
Form2.Close()
Else
Form2.Show()
Me.Hide()
Form2.Visible = True
End If
End If
Catch ex As Exception
'nothing
End Try
End If
End Sub
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
Public Const HT_CAPTION As Integer = &H2
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
Private Declare Function ReleaseCapture Lib "user32.dll" () As Int32
Private Declare Ansi Function GetPrivateProfileString Lib "kernel32.dll" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Int32, ByVal lpFileName As String) As Int32
Private Declare Ansi Function WritePrivateProfileString Lib "kernel32.dll" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Int32
Public Function INI_ReadValueFromFile(ByVal strSection As String, ByVal strKey As String, ByVal strDefault As String, ByVal strFile As String) As String
Dim strTemp As String = Space(1024), lLength As Integer
lLength = GetPrivateProfileString(strSection, strKey, strDefault, strTemp, strTemp.Length, strFile)
Return (strTemp.Substring(0, lLength))
End Function
Public Function INI_WriteValueToFile(ByVal strSection As String, ByVal strKey As String, ByVal strValue As String, ByVal strFile As String) As Boolean
Return (Not (WritePrivateProfileString(strSection, strKey, strValue, strFile) = 0))
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM") = True Then
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini") = False Then
IO.File.Create(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini")
End If
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update") = False Then
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update")
End If
Else
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM")
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini") = False Then
IO.File.Create(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini")
End If
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update") = False Then
Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update")
End If
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt") = True Then
Label_transparent2.Text = IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt") = False Then
My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/79646035/changelog.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
Label_transparent2.Text = IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\changelog.txt")
End If
If My.Computer.FileSystem.FileExists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt") = True Then
Label_transparent3.Text = "V.: " & IO.File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\version.txt") & " Alpha"
End If
testInternetConnection()
End Sub
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
If (e.Button = Windows.Forms.MouseButtons.Left) Then
ReleaseCapture()
SendMessage(Handle.ToInt32, WM_NCLBUTTONDOWN, HT_CAPTION, 0)
End If
End Sub
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
My.Computer.Audio.Play(My.Resources.click, AudioPlayMode.Background)
End
End Sub
Private Sub PictureBox2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseHover
PictureBox2.BackgroundImage = My.Resources.close
End Sub
Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
PictureBox2.BackgroundImage = My.Resources.close2
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
My.Computer.Audio.Play(My.Resources.click, AudioPlayMode.Background)
Runupdate()
End Sub
Private Sub PictureBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
PictureBox1.BackgroundImage = My.Resources.start_over
End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
PictureBox1.BackgroundImage = My.Resources.start
End Sub
Private Sub Progressbar_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Progressbar.Tick
Zeit += 4
PictureBox4.Width = Zeit
If PictureBox4.Width = 752 Then
Progressbar.Stop()
Zeit = 0
PictureBox4.Width = 0
If ende = True Then
If INI_ReadValueFromFile("GUI", "LocationProgramm", "error", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\settings.ini") = "error" Then
Else
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.MinecraftMM\Update\MinecraftMMUpdater.exe")
End
End If
End If
End If
End Sub
End Class
Updater (Autoit)
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Documents\FFOutput\Minecraft Icon Version III.ico
#AutoIt3Wrapper_Outfile=MinecraftMMUpdater.exe
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $Appdata = @AppDataDir & "\.MinecraftMM\Update"
Global $Path = @AppDataDir & "\.MinecraftMM\settings.ini"
Global $PathDir = IniRead($Path, "GUI", "LocationProgramm", "Error")
Global $Update = FileRead(@AppDataDir & "\.MinecraftMM\Update\Version.txt")
If ProcessExists("MinecraftMM.exe") Then
ProcessClose("MinecraftMM.exe")
FileCopy($Appdata & "\MinecraftMM.exe", $PathDir & "\MinecraftMM.exe", 1)
ShellExecuteWait($PathDir & "\MinecraftMM.exe")
Else
FileMove($Appdata & "\MinecraftMM.exe", $PathDir & "\MinecraftMM.exe", 1)
ShellExecuteWait($PathDir & "\MinecraftMM.exe")
EndIf
|
|
|
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 03:33.
|
|