Modding ITeBlocks

Версия Minecraft
1.12.2
API
Forge
15
2
Вылетает клиент
 
Краш-лог
---- Minecraft Crash Report ----
// There are four lights!

Time: 3/3/25 8:35 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from IndustrialCraft 2 (ic2)
Caused by: java.lang.IllegalStateException: Duplicate name for different ITeBlocks!
at ic2.core.block.TeBlockRegistry.addName(TeBlockRegistry.java:204)
at ic2.core.block.TeBlockRegistry$TeBlockInfo.register(TeBlockRegistry.java:47)
at ic2.core.block.TeBlockRegistry$TeBlockInfo.registerAll(TeBlockRegistry.java:66)
at ic2.core.block.TeBlockRegistry.addAll(TeBlockRegistry.java:180)
at ru.yaska.xmatter.xmatter.register(xmatter.java:44)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_xmatter_register_TeBlockFinalCallEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at ic2.core.block.TeBlockRegistry.buildBlocks(TeBlockRegistry.java:223)
at ic2.core.init.BlocksItems.initBlocks(BlocksItems.java:171)
at ic2.core.init.BlocksItems.init(BlocksItems.java:157)
at ic2.core.IC2.load(IC2.java:222)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
at net.minecraft.client.Minecraft.init(Minecraft.java:514)
at net.minecraft.client.Minecraft.run(Minecraft.java:422)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:25)


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

-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_181, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 652761032 bytes (622 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2847 10 mods loaded, 10 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

| State | ID | Version | Source | Signature |
|:----- |:-------------- |:------------- |:--------------------------------------------- |:---------------------------------------- |
| LCH | minecraft | 1.12.2 | minecraft.jar | None |
| LCH | mcp | 9.42 | minecraft.jar | None |
| LCH | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2847.jar | None |
| LCH | forge | 14.23.5.2847 | forgeSrc-1.12.2-14.23.5.2847.jar | None |
| LCH | examplemod | 1.0 | bin | None |
| LCH | xmatter | 0.1 | bin | None |
| LCE | ic2 | 2.8.222-ex112 | industrialcraft-2-2.8.222-ex112-dev.jar | de041f9f6187debbc77034a344134053277aa3b0 |
| LC | codechickenlib | 3.2.3.358 | CodeChickenLib_1.12.2_3.2.3.358_universal.jar | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
| LC | jei | 4.16.1.1013 | jei_1.12.2-4.16.1.1013.jar | None |
| LC | nei | 2.4.3 | NotEnoughItems_1.12.2_2.4.3.245_universal.jar | f1850c39b2516232a2108a7bd84d1cb5df93b261 |

Loaded coremods (and transformers):
GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 511.65' Renderer: 'NVIDIA GeForce GTX 1650/PCIe/SSE2'
Краш-лог:
---- Minecraft Crash Report ----
// There are four lights!

Time: 3/3/25 8:35 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from IndustrialCraft 2 (ic2)
Caused by: java.lang.IllegalStateException: Duplicate name for different ITeBlocks!
	at ic2.core.block.TeBlockRegistry.addName(TeBlockRegistry.java:204)
	at ic2.core.block.TeBlockRegistry$TeBlockInfo.register(TeBlockRegistry.java:47)
	at ic2.core.block.TeBlockRegistry$TeBlockInfo.registerAll(TeBlockRegistry.java:66)
	at ic2.core.block.TeBlockRegistry.addAll(TeBlockRegistry.java:180)
	at ru.yaska.xmatter.xmatter.register(xmatter.java:44)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_xmatter_register_TeBlockFinalCallEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at ic2.core.block.TeBlockRegistry.buildBlocks(TeBlockRegistry.java:223)
	at ic2.core.init.BlocksItems.initBlocks(BlocksItems.java:171)
	at ic2.core.init.BlocksItems.init(BlocksItems.java:157)
	at ic2.core.IC2.load(IC2.java:222)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
	at net.minecraft.client.Minecraft.init(Minecraft.java:514)
	at net.minecraft.client.Minecraft.run(Minecraft.java:422)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:25)


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

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_181, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 652761032 bytes (622 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2847 10 mods loaded, 10 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State | ID             | Version       | Source                                        | Signature                                |
	|:----- |:-------------- |:------------- |:--------------------------------------------- |:---------------------------------------- |
	| LCH   | minecraft      | 1.12.2        | minecraft.jar                                 | None                                     |
	| LCH   | mcp            | 9.42          | minecraft.jar                                 | None                                     |
	| LCH   | FML            | 8.0.99.99     | forgeSrc-1.12.2-14.23.5.2847.jar              | None                                     |
	| LCH   | forge          | 14.23.5.2847  | forgeSrc-1.12.2-14.23.5.2847.jar              | None                                     |
	| LCH   | examplemod     | 1.0           | bin                                           | None                                     |
	| LCH   | xmatter        | 0.1           | bin                                           | None                                     |
	| LCE   | ic2            | 2.8.222-ex112 | industrialcraft-2-2.8.222-ex112-dev.jar       | de041f9f6187debbc77034a344134053277aa3b0 |
	| LC    | codechickenlib | 3.2.3.358     | CodeChickenLib_1.12.2_3.2.3.358_universal.jar | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
	| LC    | jei            | 4.16.1.1013   | jei_1.12.2-4.16.1.1013.jar                    | None                                     |
	| LC    | nei            | 2.4.3         | NotEnoughItems_1.12.2_2.4.3.245_universal.jar | f1850c39b2516232a2108a7bd84d1cb5df93b261 |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 511.65' Renderer: 'NVIDIA GeForce GTX 1650/PCIe/SSE2'
package ru.yaska.xmatter.load;

import java.util.Set;

import ic2.core.block.ITeBlock;
import ic2.core.block.TileEntityBlock;
import ic2.core.ref.TeBlock.DefaultDrop;
import ic2.core.ref.TeBlock.HarvestTool;
import ic2.core.util.Util;
import net.minecraft.item.EnumRarity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.registry.GameRegistry;
import ru.yaska.xmatter.xmatter;

public enum MachinesTE implements ITeBlock{


generator (ru.yaska.xmatter.machines.generator.class, 1, EnumRarity.RARE)


;

private final Class teClass;
private final int itemMeta;
private final EnumRarity rarity;
private TileEntityBlock dummyTe;
private static final MachinesTE[] VALUES = values();
public static final ResourceLocation LOCATION = new ResourceLocation("xmatter", "machines");


private MachinesTE(Class teClass, int itemMeta, EnumRarity rarity)
{
this.teClass = teClass;
this.itemMeta = itemMeta;
this.rarity = rarity;
GameRegistry.registerTileEntity(teClass, "xmatter:" + this.getName());
}

public TileEntityBlock getDummyTe()
{
return this.dummyTe;
}

@Override
public int getId() {

return this.itemMeta;
}

@Override
public String getName() {

return this.name();
}

@Override
public boolean allowWrenchRotating() {
// TODO Auto-generated method stub
return false;
}

@Override
public DefaultDrop getDefaultDrop() {
// TODO Auto-generated method stub
return DefaultDrop.Self;
}


@Override
public float getExplosionResistance() {
// TODO Auto-generated method stub
return 30.0F;
}

@Override
public float getHardness() {
// TODO Auto-generated method stub
return 20.0F;
}

@Override
public HarvestTool getHarvestTool() {
// TODO Auto-generated method stub
return HarvestTool.Pickaxe;
}

@Override
public ResourceLocation getIdentifier() {
// TODO Auto-generated method stub
return LOCATION;
}

@Override
public EnumRarity getRarity() {
// TODO Auto-generated method stub
return this.rarity;
}

@Override
public Set getSupportedFacings() {

return ic2.core.util.Util.horizontalFacings;
}

@Override
public Class getTeClass() {
// TODO Auto-generated method stub
return this.teClass;
}

@Override
public boolean hasActive() {
// TODO Auto-generated method stub
return this == generator;
}

@Override
public boolean hasItem() {

return true;
}

public static void buildDummies() {
ModContainer mc = Loader.instance().activeModContainer();
if ( mc != null && xmatter.MODID.equals(mc.getModId())) {
MachinesTE[] var1 = VALUES;
int var2 = var1.length;

for (int var3 = 1; var3 < var2; ++var3) {
MachinesTE block = var1[var3];
if (block.teClass != null) {
try {
block.dummyTe = (TileEntityBlock)block.teClass.newInstance();
} catch (Exception var6) {
if (Util.inDev()) {
var6.printStackTrace();
}
}
}
}

} else {
throw new IllegalAccessError("accesser!!!!");
}
}
}
 
Назад
Сверху