Проблема с дубликатом ID интерфейса из AE2

Версия Minecraft
1.7.10
API
Forge
45
2
3
Пытаюсь создать свой интерфейс с большим количеством слотов но игра украшается и возникает ошибка "Caused by: java.lang.IllegalArgumentException: Duplicate id: BlockInterface". Да я плохо знаю джаву но как-то облазил все что мог но не нашел. Подскажите, пожалуйста, как исправить
BlockAdvancedInterface:
public class BlockAdvancedInterface extends BlockInterface {
  protected IIcon[] icons = new IIcon[3];

  public BlockAdvancedInterface() {

    setTileEntity(TileAdvancedInterface.class);
    setFeature(EnumSet.of(AEFeature.Core));
    setBlockName("advanced_interface");
  }

  @SideOnly(Side.CLIENT)
  protected String getTextureName() {
    return "foxae:" + getUnlocalizedName().replace("tile.", "");
  }

  @SideOnly(Side.CLIENT)
  protected Class<? extends BaseBlockRender> getRenderer() {
    return RenderAdvancedBlockInterface.class;
  }


  public void registerIcons(IIconRegister register) {
    super.registerIcons(register);
    registerBlockIconsSpecial(register);
  }

  public void registerBlockIconsSpecial(IIconRegister register) {
    this.icons[0] = register.registerIcon("foxae:advanced_interface");
    this.icons[1] = register.registerIcon("foxae:advanced_interface_alternate");
    this.icons[2] = register.registerIcon("foxae:advanced_interface_alternate_arrow");
  }

  public IIcon getIcon(int index) {
    return this.icons[MathHelper.clamp_int(index, 0, 2)];
  }

  public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) {
    if (p.isSneaking())
      return false;
    TileAdvancedInterface tg = (TileAdvancedInterface)getTileEntity((IBlockAccess)w, x, y, z);
    if (tg != null) {
      if (Platform.isServer())
        Platform.openGUI(p, (TileEntity)tg, ForgeDirection.getOrientation(side), CommonProxy.getGuiAdvInterface());
      return true;
    }
    return false;
  }
}

Краш:
cpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
    at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Caused by: java.lang.ExceptionInInitializerError
    at ua.ae.foxae.proxy.CommonProxy.preInit(CommonProxy.java:56)
    at ua.ae.foxae.proxy.proxy.ClientProxy.preInit(ClientProxy.java:9)
    at ua.ae.foxae.proxy.AE2Addition.preInit(AE2Addition.java:35)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
    ... 10 more
Caused by: java.lang.IllegalArgumentException: Duplicate id: BlockInterface
    at net.minecraft.tileentity.TileEntity.func_145826_a(TileEntity.java:43)
    at cpw.mods.fml.common.registry.GameRegistry.registerTileEntity(GameRegistry.java:281)
    at appeng.block.AEBaseBlock.setTileEntity(AEBaseBlock.java:200)
    at appeng.block.misc.BlockInterface.<init>(BlockInterface.java:45)
    at ua.ae.foxae.proxy.blocks.BlockAdvancedInterface.<init>(BlockAdvancedInterface.java:28)
    at ua.ae.foxae.proxy.ModBlocks.<clinit>(ModBlocks.java:16)
    ... 40 more
 
Последнее редактирование:
ну тип ето же мой блок а вот блок интерфейса обич
BlockInterface:
public class BlockInterface extends AEBaseBlock {
    public BlockInterface() {
        super(BlockInterface.class, Material.iron);
        this.setTileEntity(TileInterface.class);
        this.setFeature(EnumSet.of(AEFeature.Core));
    }

    protected Class<? extends BaseBlockRender> getRenderer() {
        return RenderBlockInterface.class;
    }

    public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) {
        if (p.isSneaking()) {
            return false;
        } else {
            TileInterface tg = (TileInterface)this.getTileEntity(w, x, y, z);
            if (tg != null) {
                if (Platform.isServer()) {
                    Platform.openGUI(p, tg, ForgeDirection.getOrientation(side), GuiBridge.GUI_INTERFACE);
                }

                return true;
            } else {
                return false;
            }
        }
    }

    protected boolean hasCustomRotation() {
        return true;
    }

    protected void customRotateBlock(IOrientable rotatable, ForgeDirection axis) {
        if (rotatable instanceof TileInterface) {
            ((TileInterface)rotatable).setSide(axis);
        }

    }
}
 
Последнее редактирование:
Назад
Сверху