Jump to content

[CLOSED] [1.12.2] Minecraft modding unexpected crash


Arthur Wesley

Recommended Posts

This error is driving me crazy! I can't figure out what is it. 

 

Error Log:

---- Minecraft Crash Report ----
// I just don't know what went wrong :(

Time: 4/11/18 5:38 PM
Description: Initializing game

java.lang.NullPointerException: Can't use a null-name for the registry, object null.
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:287)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:281)
	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:114)
	at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:155)
	at tutuicraft3.sapphirecraft.init.ModBlocks.registerBlocks(ModBlocks.java:49)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_ModBlocks_registerBlocks_Register.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
	at net.minecraft.client.Minecraft.init(Minecraft.java:513)
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	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:26)


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

-- Head --
Thread: Client thread
Stacktrace:
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:864)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:287)
	at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:281)
	at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:114)
	at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:155)
	at tutuicraft3.sapphirecraft.init.ModBlocks.registerBlocks(ModBlocks.java:49)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_ModBlocks_registerBlocks_Register.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
	at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:736)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:604)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
	at net.minecraft.client.Minecraft.init(Minecraft.java:513)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:421)
	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:26)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 7 (amd64) version 6.1
	Java Version: 1.8.0_162, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 350758720 bytes (334 MB) / 504365056 bytes (481 MB) up to 954728448 bytes (910 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.2.2627 6 mods loaded, 6 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 |
	|:----- |:--------- |:------------ |:-------------------------------- |:--------- |
	| UCH   | minecraft | 1.12.2       | minecraft.jar                    | None      |
	| UCH   | mcp       | 9.42         | minecraft.jar                    | None      |
	| UCH   | FML       | 8.0.99.99    | forgeSrc-1.12.2-14.23.2.2627.jar | None      |
	| UCH   | forge     | 14.23.2.2627 | forgeSrc-1.12.2-14.23.2.2627.jar | None      |
	| UCH   | sc        | 1.0          | bin                              | None      |
	| UCH   | xray      | 1.4.0        | xray-1.12.2-1.4.0.jar            | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.24' Renderer: 'GeForce GT 430/PCIe/SSE2'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: GeForce GT 430/PCIe/SSE2 GL version 4.6.0 NVIDIA 391.24, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 3x AMD Phenom(tm) 8400 Triple-Core Processor

 

My ModBlocks class:

 

package tutuicraft3.sapphirecraft.init;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.registries.IForgeRegistry;
import tutuicraft3.sapphirecraft.Reference;
import tutuicraft3.sapphirecraft.blocks.BlockOre;
import tutuicraft3.sapphirecraft.blocks.MSapphire_Block;
import tutuicraft3.sapphirecraft.blocks.Sapphire_Block;
import tutuicraft3.sapphirecraft.blocks.tileentity.MSapphire_Infusor;

@Mod.EventBusSubscriber(modid=Reference.MODID)
public class ModBlocks {
	
	static Block Sapphire_Block;
	
	public static Block Sapphire_Ore;
	
	static Block MSapphire_Block;
	
	public static MSapphire_Infusor infusor;
	
	public static void init() {
		
		Sapphire_Block = new Sapphire_Block("sapphire_block", Material.IRON);
		
		Sapphire_Ore = new BlockOre("sapphire_ore", Material.ROCK, ModItems.Sapphire, 1).setHardness(3.0F).setCreativeTab(ModItems.TabSapphireCraft);
		Sapphire_Ore.setHarvestLevel("pickaxe", 2);
		Sapphire_Ore.setResistance(5.0f);
		
		MSapphire_Block = new MSapphire_Block("msapphire_block", Material.IRON);
		
		infusor = new MSapphire_Infusor("msapphire_infusor", Material.IRON);
		
	}
	
	@SubscribeEvent
	public static void registerBlocks(RegistryEvent.Register<Block> event) {
		
		event.getRegistry().registerAll(Sapphire_Block); 
		event.getRegistry().registerAll(Sapphire_Ore); 
		event.getRegistry().registerAll(MSapphire_Block);
		event.getRegistry().registerAll(infusor);
		
		GameRegistry.registerTileEntity(infusor.getTileEntityClass(), infusor.getRegistryName().toString());
		
	}
	
	@SubscribeEvent
	public static void registerItemBlocks(RegistryEvent.Register<Item> event) {
		
		event.getRegistry().registerAll(new ItemBlock(Sapphire_Block).setRegistryName(Sapphire_Block.getRegistryName()));
		
		event.getRegistry().registerAll(new ItemBlock(Sapphire_Ore).setRegistryName(Sapphire_Ore.getRegistryName()));
		
		event.getRegistry().registerAll(new ItemBlock(MSapphire_Block).setRegistryName(MSapphire_Block.getRegistryName()));
		
		event.getRegistry().registerAll(new ItemBlock(infusor).setRegistryName(infusor.getRegistryName()));
				
	    
	
	}
	
	@SubscribeEvent
	public static void registerRenders(ModelRegistryEvent event) {
		
		registerRender(Item.getItemFromBlock(Sapphire_Block));
		
		registerRender(Item.getItemFromBlock(Sapphire_Ore));
		
		registerRender(Item.getItemFromBlock(MSapphire_Block));
		
		registerRender(Item.getItemFromBlock(infusor));
		
	}
	
	public static void registerRender(Item item) {
		
		ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
		
	}	

}

 

I was wondering if someone could help me, please?

 

Edited by Arthur Wesley
Link to comment
Share on other sites

You never call setRegistryName() for your blocks.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

14 minutes ago, Draco18s said:

You never call setRegistryName() for your blocks.

Anyway, it looks like that didn't solve the crash. This line calls my attention:
 

java.lang.NullPointerException: Can't use a null-name for the registry, object null.

 

What could  that mean?

Edited by Arthur Wesley
Link to comment
Share on other sites

What have you done to debug it? It should be easy to quickly see what is wrong if you just observe the execution. I personally like to add print statements throughout the code so I can watch (and learn) about the execution in real time. For example, if you put print statements at the beginning of each of your methods then you can confirm they are being called in the correct order. And if you put a print statement right before your error line you can print out the values of what you're trying to pass to the method and you should see that they are in fact null. Then you simply trace backwards until you find the first place it isn't doing what you expect.

 

This is how professionals debug -- by "tracing" the execution. Not just staring at the code or trying random changes. Since computers are logical, just watching the execution you can always find where it starts to go wrong.

 

Basically for this problem, it is obvious what the error actually is -- so something is either wrong with your order of operations, or else you may have created multiple instances and getting them confused with each other (i.e. one has registry name set and one doesn't). To be honest I think your instances are mixed up as you're not using the object holder annotation so you need to be careful about how you order and reference your instances.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

19 minutes ago, jabelar said:

What have you done to debug it? It should be easy to quickly see what is wrong if you just observe the execution. I personally like to add print statements throughout the code so I can watch (and learn) about the execution in real time. For example, if you put print statements at the beginning of each of your methods then you can confirm they are being called in the correct order. And if you put a print statement right before your error line you can print out the values of what you're trying to pass to the method and you should see that they are in fact null. Then you simply trace backwards until you find the first place it isn't doing what you expect.

 

This is how professionals debug -- by "tracing" the execution. Not just staring at the code or trying random changes. Since computers are logical, just watching the execution you can always find where it starts to go wrong.

 

Basically for this problem, it is obvious what the error actually is -- so something is either wrong with your order of operations, or else you may have created multiple instances and getting them confused with each other (i.e. one has registry name set and one doesn't). To be honest I think your instances are mixed up as you're not using the object holder annotation so you need to be careful about how you order and reference your instances.

I've found out that the error occur when the ModBlocks class is registering the first block:

 

	@SubscribeEvent
	public static void registerBlocks(RegistryEvent.Register<Block> event) {
		
		System.out.println("ModBlocks registerBlocks -------------------------------------");
		
		System.out.println("register Sapphire Block -----------------------------------");
		event.getRegistry().registerAll(Sapphire_Block); //<-- THE ERROR STARTS HERE ================ <--
		System.out.println("register Sapphire Ore ----------------------------------------");
		event.getRegistry().registerAll(Sapphire_Ore); 
		event.getRegistry().registerAll(MSapphire_Block);
		event.getRegistry().registerAll(infusor);
		
		GameRegistry.registerTileEntity(infusor.getTileEntityClass(), infusor.getRegistryName().toString());
		
	}
	

 

with the same error lines:

 

[21:41:55] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.RegistryEvent$Register@447bf09d:
java.lang.NullPointerException: Can't use a null-name for the registry, object null.

 

Link to comment
Share on other sites

You can't use null for a registry name.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

6 minutes ago, GammaS_ said:

Can you show me where you are calling setRegistryName() for each of your blocks?

I call it on each blockclass, like this:  

 

package tutuicraft3.sapphirecraft.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import tutuicraft3.sapphirecraft.Main;

public class BlockBase extends Block {

	protected String name;

	public BlockBase(Material material, String name) {
		super(material);
	
		this.name = name;
	
		setUnlocalizedName(name);
		setRegistryName(name);
	}
	
	public void registerItemModel(Item itemBlock) {
		Main.proxy.registerItemRenderer(itemBlock, 0, name);
	}
	
	public Item createItemBlock() {
		return new ItemBlock(this).setRegistryName(getRegistryName());
	}
	
	@Override
	public BlockBase setCreativeTab(CreativeTabs tab) {
		super.setCreativeTab(tab);
		return this;
	}
}

 

Link to comment
Share on other sites

Couple of things I can see with the given code:

  1. I cannot see anywhere you are calling registerItemModel()
  2. Are you sure you are calling ModBlocks.init() before the registry events?

 

Have you got a Github Reop, where I can look at all of your code?

Edited by GammaS_
Link to comment
Share on other sites

It is pretty hard to debug this by staring at code, especially since you're not showing all of it. For example, your BlockBase constructor does set the registry name but you don't show the Sapphire_Block code so it is not clear that you actually extended that class, or properly passed the string along to the super constructor.

 

NOTE: It is not considered good programming style to name classes with underscores. It should be SapphireBlock, not Sapphire_Block.

 

Additionally, you construct the instance in your init() method, but it isn't clear where you call that so as far as we know that instance could still be null.

 

Basically, you're not giving us all your code and it is the EXACT order of things that matters for this bug. Anyway, my point is still that it isn't fair to have a bunch of people just reading your code when you can debug this easily yourself. Just keep adding print statements until you understand everything that is happening. For example, in your second print statement why don't you print out some useful data like the contents of the registry name. Assuming it is null, then work backwards to figure out why it is null. For example, put a print statement in your BlockBase constructor that prints out the registry name, then check if that is getting called before you try to register it. And so forth.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

55 minutes ago, Arthur Wesley said:

I call it on each blockclass, like this:  

 


package tutuicraft3.sapphirecraft.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import tutuicraft3.sapphirecraft.Main;

public class BlockBase extends Block {

	protected String name;

	public BlockBase(Material material, String name) {
		super(material);
	
		this.name = name;
	
		setUnlocalizedName(name);
		setRegistryName(name);
	}
	
	public void registerItemModel(Item itemBlock) {
		Main.proxy.registerItemRenderer(itemBlock, 0, name);
	}
	
	public Item createItemBlock() {
		return new ItemBlock(this).setRegistryName(getRegistryName());
	}
	
	@Override
	public BlockBase setCreativeTab(CreativeTabs tab) {
		super.setCreativeTab(tab);
		return this;
	}
}

 

create a class that extends block then have it register automatically:
 

public class SimpleBlock extends Block{
  
  public SimpleBlock(ResourceLocation loc,Material mat)
  {
    	super(mat);
        this.setRegistryName(loc);
        ForgeRegistries.BLOCKS.register(this);
        ItemBlock item = new ItemBlock(this);
        ForgeRegistries.ITEMS.register(item);
    }
}

Then cleanup your main java by simply calling that. Yes you could store them in an array but, this will get you started. 1.8+ requires client proxy to have models unless you want your mod crashing on the server. If you plan on storing it on the array you can use the same array for both client proxy(models) and server(registeries). Do not register the array on the server proxy for some reason on dedicated servers it doesn't run at least I can't get it working.

Unless you need to override specific methods for your object do not create more then one class. You can use this for any basic block. I have a more advanced example via my lib so any block properties can be instantiated without having more then one class.
https://github.com/jredfox/evilnotchlib/blob/master/src/main/java/com/EvilNotch/lib/util/minecraft/content/blocks/BasicBlock.java

Edited by jredfox
  • Sad 1
Link to comment
Share on other sites

1 minute ago, jredfox said:

create a class that extends block then have it register automatically:
 


        ForgeRegistries.BLOCKS.register(this);

        ForgeRegistries.ITEMS.register(item);

 

No. Bad modder.

  • Haha 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

12 minutes ago, Draco18s said:

No. Bad modder.

yes I should register them during the register event via array it was just an example. The more proper way of doing this was looking at the 2d link where it stores an array to instantiate registers on client and server later

Edited by jredfox
Link to comment
Share on other sites

1 hour ago, jredfox said:

it was just an example

A bad one that should never be used.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

1 hour ago, jredfox said:

yes I should register them during the register event via array it was just an example. The more proper way of doing this was looking at the 2d link where it stores an array to instantiate registers on client and server later

Most people try to get to "cute" with their registration code but you really don't need all of that. The problem is that the order of registration needs to be controlled but you also usually want static fields for the instances and it is difficult to control their initialization. So a lot of people then end up with null problems just like this poster is having.

 

So the most accepted practice is to construct the instance when registering and then inject the reference to the instance back to your field with the @ObjectHolder annotation system. If you do that, you will mostly be okay because the events are fired in a useful order and you'll always have a non-null instance registered but still get the benefit of having a field to reference the singleton directly later.

 

As in all coding, there are many ways to do things, but some are more prone to mistakes. In my experience the "self-registering" approach loses some of the control over the order of how things happen and in general simplicity is less error-prone.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

12 hours ago, GammaS_ said:

Couple of things I can see with the given code:

  1. I cannot see anywhere you are calling registerItemModel()
  2. Are you sure you are calling ModBlocks.init() before the registry events?

 

Have you got a Github Reop, where I can look at all of your code?

 I'm sorry, I cannot read anything more right now, I'm back in the evening.

 

By the way, here is my repository:

 

https://github.com/Arthgames3/-1.12.2-SapphireCraft

Link to comment
Share on other sites

You see how you have this line?
System.out.println("register Sapphire Block -----------------------------------");

Why don't you do this:

System.out.println("register Sapphire Block: " + Sapphire_Block.getRegistryName().toString());

That will tell you what the block's registry name is as it attempts to register it. And if the block itself is null, you'll get a NPE there.

This gives you SO MUCH MORE INFORMATION than "I got here!"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

2 hours ago, Draco18s said:

You see how you have this line?
System.out.println("register Sapphire Block -----------------------------------");

Why don't you do this:

System.out.println("register Sapphire Block: " + Sapphire_Block.getRegistryName().toString());

That will tell you what the block's registry name is as it attempts to register it. And if the block itself is null, you'll get a NPE there.

This gives you SO MUCH MORE INFORMATION than "I got here!"

Thanks. I'll see what I get.

Link to comment
Share on other sites

So, I'll create a new, fresh workspace and start everything from 0 following a more advanced tutorial. Thanks for all the help.

 

"By the way, I'm 14 years old, I chose start programming Java with minecraft because I thought it was going to be interesting, because it's something I like. I choose to ask help for advanced modders because I thought I could learn more that way. Yes, I have done an algoritm course and I am actually making a Basic Java course, even if I know the real basicalready. I just think even if I learn advanced Java I couldn't just go and make a mod, I still should need to search, because it's minecraft forge, with it's own methods and callings ways. So yeah, call me noob, call me odd, call me wathever you want, I am just entering the programming world, and maybe I've done it in the wrong way..."

Link to comment
Share on other sites

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.