Неизвестная причина вылета

Версия Minecraft
1.12.2
148
2
6
Да вот недавно всё было пучком, предметы отображались и блоки тоже, щас уже нет, что мне нужно ещё вписать?
Код:
public class ClientProxy extends CommonProxy{
    @Override
    public void preInit(FMLPreInitializationEvent event){
        super.preInit(event);
    }

    @Override
    public void init(FMLInitializationEvent event){
        VItems.registerRender();
        VBlocks.registerRender();
        super.init(event);
    }

    @Override
    public void postInit(FMLPostInitializationEvent event){
        super.postInit(event);
    }

    public void registerItemRenderer(Item item, int meta, String id){
        ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id));
    }
}
Код:
public class CommonProxy{
    public void preInit(FMLPreInitializationEvent event){
        VItems.register();
        VBlocks.register();
    }

    public void init(FMLInitializationEvent event){
        CraftingRegister.register();
    }

    public void postInit(FMLPostInitializationEvent event){
    }
    
    public void registerItemRenderer(Item item, int meta, String id){
    }
}
Код:
@Mod.EventHandler
    public static void preInit(FMLPreInitializationEvent event){       
        proxy.preInit(event);
    }

    @Mod.EventHandler
    public static void Init(FMLInitializationEvent event){
        proxy.init(event);
    }

    @Mod.EventHandler
    public static void postInit(FMLPostInitializationEvent event){
        proxy.postInit(event);
    }
}
 
Краш-лог
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from VanillaRealisticRecipes (vanillarealisticrecipes)
Caused by: java.lang.ExceptionInInitializerError
at com.hesperus_rus.vanillarealisticrecipes.proxy.CommonProxy.preInit(CommonProxy.java:14)
at com.hesperus_rus.vanillarealisticrecipes.proxy.ClientProxy.preInit(ClientProxy.java:16)
at com.hesperus_rus.vanillarealisticrecipes.vanillarealisticrecipes.VanillaRealisticRecipes.preInit(VanillaRealisticRecipes.java:40)
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:498)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
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:498)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:627)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:25)
Краш-лог:
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from VanillaRealisticRecipes (vanillarealisticrecipes)
Caused by: java.lang.ExceptionInInitializerError
	at com.hesperus_rus.vanillarealisticrecipes.proxy.CommonProxy.preInit(CommonProxy.java:14)
	at com.hesperus_rus.vanillarealisticrecipes.proxy.ClientProxy.preInit(ClientProxy.java:16)
	at com.hesperus_rus.vanillarealisticrecipes.vanillarealisticrecipes.VanillaRealisticRecipes.preInit(VanillaRealisticRecipes.java:40)
	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:498)
	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
	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:498)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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:627)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:25)
148
2
6
Что мне нужно вписать в preInit? Я уже забыл...
 
3,005
192
592
at com.hesperus_rus.vanillarealisticrecipes.proxy.CommonProxy.preInit(CommonProxy.java:14)
Пучком, открываешь 14 строку и смотришь что не так.
Мы (простые смертные) не знаем, сколько у тебя импортов, значит не можем определить, какая из 14 строка.
 
148
2
6
@Doc А импорты то тебе зачем?
 
3,005
192
592
7,099
324
1,509
148
2
6
@SuperCatMaster Что? Куда super(event); что за привычка написать 1 строку предложения и не сказать куда её вставлять?
 

timaxa007

Модератор
5,831
409
672
@Hesperus_rus, он типа так имел виду:
из
Java:
    @Override
    public void init(FMLInitializationEvent event){
        VItems.registerRender();
        VBlocks.registerRender();
        super.init(event);
    }
в
Java:
    @Override
    public void init(FMLInitializationEvent event){
        super.init(event);
        VItems.registerRender();
        VBlocks.registerRender();
    }
---
Но краш связан, с тем что в классе VanillaRealisticRecipes метод preInit строчка 40. Предположительно у тебя ингредиент или результат рецепта null.
 
148
2
6
@timaxa007 С объяснениями и подсказками как для меня ну ты получше будешь, но я не помню что писать в
Java:
public void preInit(FMLPreInitializationEvent event){
        proxy.preInit(event);
    }
 

timaxa007

Модератор
5,831
409
672
но я не помню что писать в
Эм... VanillaRealisticRecipes у тебя это главный класс? Так как в нём ни чего писать, нужно искать где именно он null у тебя видит. Либо ошибка в другом и нужно смотреть полный краш-лог.
 
148
2
6
Я кстати вот 1 не понимаю, что вместо null писать?
Java:
public static Item Limestonepickaxe = new LimestonePickaxe("limestone_pickaxe", null);
 
148
2
6
Код:
package com.hesperus_rus.items;

import com.hesperus_rus.init.VBlocks;
import com.hesperus_rus.init.VItems;
import com.hesperus_rus.utils.interfaces.IHasModel;
import com.hesperus_rus.vanillarealisticrecipes.vanillarealisticrecipes.VanillaRealisticRecipes;

import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;

public class LimestonePickaxe extends ItemPickaxe implements IHasModel{
    public LimestonePickaxe(String name, ToolMaterial material){
        super(material);
        this.setRegistryName(name);
        this.setUnlocalizedName(name);
        this.setMaxStackSize(1);
        this.setCreativeTab(VanillaRealisticRecipes.Vanilla_Realistic_Recipes);
    }
        
    @Override
    public boolean canHarvestBlock(IBlockState blockIn){
        Block block = blockIn.getBlock();
        return block == VBlocks.LIMESTONE_ORE || block == Blocks.STONE || block == Blocks.SANDSTONE || super.canHarvestBlock(blockIn);
    }

    @Override
    public boolean getIsRepairable(ItemStack stack, ItemStack material){
        return material.getItem() == VItems.Limeball;
    }
        
    @Override
    public float getDestroySpeed(ItemStack stack, IBlockState state){
        Block block = state.getBlock();
            if (block == VBlocks.LIMESTONE_ORE || block == Blocks.STONE || block == Blocks.SANDSTONE){
                return 2F;
            }
            return super.getDestroySpeed(stack, state);
          }

    @Override
    public void registerModels(){
        VanillaRealisticRecipes.proxy.registerItemRenderer(this, 0, "inventory");
    }
}
 
148
2
6
148
2
6
148
2
6
Это типо, к какому кирка имеет отношения с предметом?
 
Сверху