Jump to content

Recommended Posts

Posted (edited)

Hi there,

I've tried for a few hours googling for solutions, trying them out, re-googling, etc and nothing has worked.

Minecraft outputs this:

  Reveal hidden contents

Here's the code I've tried:

1st try

58a5310f7f416_solution1.PNG.571cead3de67dd9723c25eed3eb6d077.PNG

2nd try

58a5311021111_solution2.PNG.e94f54bf13d706d51455c202819619aa.PNG

 

Here's where the texture file and jsons are located:

58a531cb70820_blockmodel.PNG.69a701cc74948ec8208c63d30cc054d0.PNGblockstate.PNG.62abf1f09dfb4b5c75aefa1ee0469ed7.PNG58a531cca6df3_itemmodel.PNG.15ab89f17a6884d5abec65e0e8c4be80.PNGtexture.PNG.ad1e0a1571c823c244580a440cd6fb41.PNG

As you can see, the texture file is in the exact spot that minecraft/forge is looking, so what gives?

 

The blockstate json:

{
    "variants": {
        "normal": { "model": "neurocameramod:test" }
    }
}

 

The block model json:

{
    "parent": "block/cube_all",
    "textures": {
        "all": "neurocameramod:blocks/test"
    }
}

 

The item model json:

{
    "parent":"neurocameramod:block/test"
}

 

And this is what I see in-game. I have no idea what is going wrong and I created this account just to ask, to show my desperation.

2017-02-16_16_04_08.png.6a9eef71ef7e06254e223a2a2c3ac7ca.png

 

Any help would be greatly appreciated.

Thank you.

 

Edited by WellPlacedEggplant
Posted

Don't use ModelMesher.  Use ModelLoader.setCustomModelResourceLocation during preInit instead.

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.

Posted (edited)

It's the same as the section I posted at the top but here it is again:

  Reveal hidden contents

 

Edited by WellPlacedEggplant
mistake
Posted

Try fixing your Invalid sounds.json

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.

Posted (edited)

It was just an empty sounds.json

 

I also removed that a few mins ago completely on the chance that it was somehow interfering with all the other jsons, but no luck, still the same error. Here's the log from that:

  Reveal hidden contents

 

Edited by WellPlacedEggplant
posted log
Posted (edited)

What is ItemBlocks?

NVM that was a stupid question because it doesn't have anything to do with the block in the world. Could you show how you registered the Block itself including it's registry name.

Edited by Animefan8888

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)

Inside ItemBlocks

	private static Map<Block, ItemBlock> itemBlocks = new HashMap<Block, ItemBlock>();
	
	public static ItemBlock add(Block block)
	{
		ItemBlock ib;
		itemBlocks.putIfAbsent(block, ib = new ItemBlock(block));
		return ib;
	}
	
	public static ItemBlock get(Block block)
	{
		return itemBlocks.get(block);
	}

Call to "add"

	public static final Block test = new Block(Material.CACTUS, MapColor.EMERALD)
			.setCreativeTab(CreativeTabs.DECORATIONS);
	
	public static void registerAllBlocks()
	{
		register(test, "test");
	}
	
	private static Block register(Block newBlock, String name)
	{
		newBlock.setRegistryName(CameraCore.MODID, name);
		newBlock.setUnlocalizedName(name);
		GameRegistry.register(newBlock);
		
		ItemBlock ib = ItemBlocks.add(newBlock);
		ib.setRegistryName(name);
		GameRegistry.register(ib);
		
		return newBlock;
	}

And, registerAllBlocks is called in the common proxy preInit, and is guaranteed to be before the renderer is registered.

 

EDIT: Ok, well this shows that too.

Edited by WellPlacedEggplant
Posted (edited)

32x32

EDIT: Trying 16x16 now

EDIT 2: Not surprisingly, still the same error

 

I know why they added the json system, but it looks like it has more cons than pro's. Definitely doesn't make the modder's life any easier.

Edited by WellPlacedEggplant
Posted

You might want to check if the texture file is present in the texture folder in the directory "out/production/...".

Posted (edited)

Do you have a /build folder? My resources are put there on build
You'd be looking for /build/resources/main/assets/neurocameramod/textures/blocks/test.png

Edited by Aarilight
Posted

I put them in the build folder, and while the texture still won't show and gives an error, it looks somewhere along the line, the block in my inventory stopped being rendered like an item but like a block, just missing the texture. I didn't even change any code...

Weird result, but at least it's progress.

Thank you.

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.