Skocz do zawartości

[Problem] - Mój pierwszy mod i... crash? Help


Rekomendowane odpowiedzi

Witam. postanowiłem spróbować zabawy w modowanie. Zrobilem takiego małego modzika co dodaje blok. Oto jego kod:

 

plik mod_DIAMENT.java

 

 

 

package net.minecraft.src;

 

public class mod_DIAMENT extends BaseMod

{

public static Block Diax = new BlockDiax(140, 0).setBlockName("Diax").setHardness(3F).setResistance(5F).setLightValue(1F);

public String getVersion()

{

return "1.0";

}

public void load() {}

public mod_DIAMENT()

{

Diax.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/diaxmod/blok.png");

ModLoader.registerBlock(Diax);

ModLoader.addName(Diax, "Czysty Diament");

}

}

 

 

oraz BlockDiax.java

 

 

 

package net.minecraft.src;

 

import java.util.Random;

 

public class BlockDiax extends Block

 

{

public BlockDiax (int i, int j)

{

super(i, j, Material.rock);

this.setCreativeTab(CreativeTabs.tabBlock);

}

public int idDropped(int i, Random j, int k)

{

return mod_DIAMENT.Diax.blockID;

}

 

}

 

 

 

 

oraz tresc crasha(nie wiem jak to nazwac)

 

 

 

 

---- Minecraft Crash Report ----

// Who set us up the TNT?

 

Time: 10.12.12 20:47

Description: Exception occured in ModLoader

 

java.lang.ExceptionInInitializerError

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at net.minecraft.src.ModLoader.addMod(ModLoader.java:395)

at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1406)

at net.minecraft.src.ModLoader.init(ModLoader.java:952)

at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:190)

at net.minecraft.src.RenderManager.<init>(RenderManager.java:92)

at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:421)

at net.minecraft.client.Minecraft.run(Minecraft.java:741)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalArgumentException: Slot 140 is already occupied by net.minecraft.src.BlockFlowerPot@30e9b11c when adding net.minecraft.src.BlockDiax@3e6abe5a

at net.minecraft.src.Block.<init>(Block.java:280)

at net.minecraft.src.Block.<init>(Block.java:312)

at net.minecraft.src.BlockDiax.<init>(BlockDiax.java:10)

at net.minecraft.src.mod_DIAMENT.<clinit>(mod_DIAMENT.java:5)

... 15 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.4.5

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_09, Oracle Corporation

Java VM Version: Java HotSpot? 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 963311936 bytes (918 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: Start[net.minecraft.src.IPlayerUsage, MinecraftFakeLauncher, ThreadShutdown, ...]

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

ModLoader: Mods loaded: 1

ModLoader 1.4.5

 

 

 

MC odpalany bezposrednio z eclipse a oto raport z konsoli eclipse

 

 

27 achievements

208 recipes

Setting user: Player572, -

Client asked for parameter: server

LWJGL Version: 2.4.2

ModLoader 1.4.5 Initializing...

Failed to load mod from "mod_DIAMENT.class"

Done.

 

Starting up SoundSystem...

Initializing LWJGL OpenAL

(The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)

OpenAL initialized.

 

Stopping!

 

SoundSystem shutting down...

Author: Paul Lamb, www.paulscode.com

 

Someone is closing me!

 

 

 

Prosilbym o pomoc. Dodam jeszcze ze cos nie chca mi sie zkompilować pliki z tym modem. Uruchamiam w mcp plik reobfuscate.bat. Czy cos robie zle?

 

@edit problem rozwiazany do zamknięcia

Odnośnik do komentarza
Udostępnij na innych stronach

Zarchiwizowany

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

  • Ostatnio przeglądający forum [Problem]   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...