Jump to content

Recommended Posts

Posted

When i launch my game it says load registries error heres my log:

[12Apr2020 18:03:04.645] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200122.131323, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 31.1.0, --version, MOD_DEV, --assetIndex, 1.15, --assetsDir, C:\Users\Stefan\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[12Apr2020 18:03:04.648] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 1.8.0_241 by Oracle Corporation
[12Apr2020 18:03:04.981] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[12Apr2020 18:03:06.310] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\Stefan\.gradle\caches\forge_gradle\assets, --assetIndex, 1.15, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}]
[12Apr2020 18:03:09.511] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[12Apr2020 18:03:21.710] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 build 10
[12Apr2020 18:03:24.103] [modloading-worker-3/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 31.1.0, for MC 1.15.2 with MCP 20200122.131323
[12Apr2020 18:03:24.104] [modloading-worker-3/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v31.1.0 Initialized
[12Apr2020 18:03:24.693] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: Can't use a null-name for the registry, object Block{null}.
    Index: 2
    Listeners:
        0: NORMAL
        1: net.minecraftforge.eventbus.EventBus$$Lambda$2079/1583625218@e2696e8
        2: ASM: class com.snakez.stefansminecraftmod.util.RegistryHandler$BlockInit registerBlocks(Lnet/minecraftforge/event/RegistryEvent$Register;)V
        3: ASM: class com.snakez.stefansminecraftmod.util.RegistryHandler$BlockInit registerBlocksItems(Lnet/minecraftforge/event/RegistryEvent$Register;)V
java.lang.NullPointerException: Can't use a null-name for the registry, object Block{null}.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:314)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:308)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:133)
    at com.snakez.stefansminecraftmod.util.RegistryHandler$BlockInit.registerBlocks(RegistryHandler.java:43)
    at net.minecraftforge.eventbus.ASMEventHandler_1_BlockInit_registerBlocks_Register.invoke(.dynamic)
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80)
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258)
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106)
    at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
    at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65)
    at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112)
    at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:125)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:125)
    at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96)
    at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71)
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:197)
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$24(ModLoader.java:189)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:969)
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:189)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113)
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:393)
    at net.minecraft.client.main.Main.main(Main.java:141)
    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.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

[12Apr2020 18:03:24.697] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:block> dispatch for modid stefansmm
java.lang.NullPointerException: Can't use a null-name for the registry, object Block{null}.
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864) ~[guava-21.0.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:314) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:308) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:133) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at com.snakez.stefansminecraftmod.util.RegistryHandler$BlockInit.registerBlocks(RegistryHandler.java:43) ~[main/:?]
    at net.minecraftforge.eventbus.ASMEventHandler_1_BlockInit_registerBlocks_Register.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80) ~[eventbus-2.0.0-milestone.1-service.jar:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.0.0-milestone.1-service.jar:?]
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.fireEvent(FMLModContainer.java:106) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:31.1]
    at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_241]
    at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_241]
    at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.ModList.lambda$dispatchSynchronousEvent$5(ModList.java:125) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_241]
    at net.minecraftforge.fml.ModList.dispatchSynchronousEvent(ModList.java:125) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.ModList.lambda$static$1(ModList.java:96) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.LifecycleEventProvider.dispatch(LifecycleEventProvider.java:71) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:197) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$24(ModLoader.java:189) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:969) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:189) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_241]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_241]
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?]
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
[12Apr2020 18:03:24.786] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event LOAD_REGISTRIES, 1 errors found
[12Apr2020 18:03:24.787] [Render thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
    at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_241]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_241]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_241]
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?]
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?]
[12Apr2020 18:03:28.705] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
[12Apr2020 18:03:28.957] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources
[12Apr2020 18:03:30.579] [Server-Worker-1/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event SETUP, 1 errors found.
[12Apr2020 18:03:30.579] [Server-Worker-1/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event SETUP, 1 errors found
[12Apr2020 18:03:30.580] [Server-Worker-1/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
    at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?]
    at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:123) ~[?:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$3(ClientModLoader.java:105) ~[?:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[?:?]
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) [?:1.8.0_241]
    at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_241]
[12Apr2020 18:03:34.282] [Server-Worker-3/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found.
[12Apr2020 18:03:34.282] [Server-Worker-3/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found
[12Apr2020 18:03:34.282] [Server-Worker-3/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
    at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.0.0-milestone.1-service.jar:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:115) ~[?:?]
    at net.minecraftforge.fml.client.ClientModLoader.finishModLoading(ClientModLoader.java:137) ~[?:?]
    at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$4(ClientModLoader.java:107) ~[?:?]
    at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:719) [?:1.8.0_241]
    at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:701) [?:1.8.0_241]
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:457) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_241]
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_241]
[12Apr2020 18:03:34.518] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized.
[12Apr2020 18:03:34.520] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started
[12Apr2020 18:03:34.664] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x3 minecraft:textures/atlas/blocks.png-atlas
[12Apr2020 18:03:34.742] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x3 minecraft:textures/atlas/signs.png-atlas
[12Apr2020 18:03:34.743] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x3 minecraft:textures/atlas/banner_patterns.png-atlas
[12Apr2020 18:03:34.743] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x3 minecraft:textures/atlas/shield_patterns.png-atlas
[12Apr2020 18:03:34.744] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x3 minecraft:textures/atlas/chest.png-atlas
[12Apr2020 18:03:34.744] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x3 minecraft:textures/atlas/beds.png-atlas
[12Apr2020 18:03:34.745] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x3 minecraft:textures/atlas/shulker_boxes.png-atlas
[12Apr2020 18:03:35.249] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[12Apr2020 18:03:35.251] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[12Apr2020 18:03:35.251] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
does anybody know how to fix this?

Posted (edited)

package com.snakez.stefansminecraftmod.util;

import com.snakez.stefansminecraftmod.StefansMinecraftMod;

import com.snakez.stefansminecraftmod.items.ItemBase;

import net.minecraft.block.Block;

import net.minecraft.block.SoundType;

import net.minecraft.block.material.Material;

import net.minecraft.item.BlockItem;

import net.minecraft.item.Item;

import net.minecraftforge.common.ToolType;

import net.minecraftforge.event.RegistryEvent;

import net.minecraftforge.eventbus.api.SubscribeEvent;

import net.minecraftforge.fml.RegistryObject;

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

import net.minecraftforge.registries.DeferredRegister;

import net.minecraftforge.registries.ForgeRegistries;

import net.minecraftforge.registries.ObjectHolder; 

public class RegistryHandler {

public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, StefansMinecraftMod.MOD_ID);

public static void init(){ ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); }

//Items

public static final RegistryObject<Item> SPESIUM = ITEMS.register("spesium", ItemBase::new);

public static final RegistryObject<Item> SPES = ITEMS.register("spes", ItemBase::new);

//Blocks

@ObjectHolder(StefansMinecraftMod.MOD_ID)

@Mod.EventBusSubscriber(modid = StefansMinecraftMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)

public static class BlockInit {

public static final Block random_block = null;

@SubscribeEvent

public static void registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().register(newBlock(Block.Properties.create(Material.ROCK).hardnessAndResistance(3.4f,2500f).sound(SoundType.STONE).harvestTool(ToolType.PICKAXE))); }

@SubscribeEvent public static void registerBlocksItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(new BlockItem(random_block, new Item.Properties().maxStackSize(8)).setRegistryName("random_block")); } } }

Edited by stefanguyman
Posted
1 minute ago, diesieben07 said:

Your code is completely unreadable, please use the code blocks with proper syntax highlighting enabled or a pastebin.

From what I can see it doesn't even look like valid Java.

how do i do that?

Posted
4 minutes ago, diesieben07 said:

Your code is completely unreadable, please use the code blocks with proper syntax highlighting enabled or a pastebin.

From what I can see it doesn't even look like valid Java.

here is a screenshot, hope you can help?

Screenshot (230).png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.