Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • 1.12.2 Registry Issues
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
aliteraryhigh

1.12.2 Registry Issues

By aliteraryhigh, October 29 in Modder Support

  • Reply to this topic
  • Start new topic
  • Prev
  • 1
  • 2
  • Next
  • Page 1 of 2  

Recommended Posts

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted October 29

Here is my GitHub repo with the current stuff I have to go from. I'm having issues with the EventRegistry and cannot for the life of me get this mod to initialize properly. It either crashes on startup, or with minor changes (commenting out the registry lines in ModBlocks.java and ModItems.java) doesn't even load the items. I've tried every tutorial and have searched for the last 5 hours for answers and can't figure out what's wrong. Below are the relevant crash log lines, emphasis mine. I know that I'm not registering the blocks/items correctly but can't figure out how to get them registered properly. Anyone have any help?

 

Quote

---- Minecraft Crash Report ----
// You're mean.

Time: 10/28/19 10:34 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:294)
    at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:288)
    at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:120)
    at net.minecraftforge.registries.ForgeRegistry.registerAll(ForgeRegistry.java:161)
    at FruitBushes.init.ModBlocks.registerBlocks(ModBlocks.java:48)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_11_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:144)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:847)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)

 

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 4

So now that I was finally able to finish registering this account (lost my old one), here's an update on my github repo.

 

The mod loads, finally. I can test run it in Eclipse and it does not crash. However, I'm still having issues. The textures don't load for the items, the names don't properly load, the name of the tab in Creative Mode doesn't display properly, none of the items show up in the new Creative Mode tab, and I can't actually plant the seeds on any type of soil. I'm at my wits' end and have pared down the code on almost every class so far and still nothing. But the mod loads and the recipes work, which I guess is good. Anyone have any suggestions?

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    677

Animefan8888

Animefan8888    677

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 677
  • 5746 posts
Posted November 4
6 hours ago, aliteraryhigh said:

The textures don't load for the items, the names don't properly load, the name of the tab in Creative Mode doesn't display properly

Your resource file structure is incorrect. you have assets/FruitBushes/... you cannot have any capitals in your resources.

 

6 hours ago, aliteraryhigh said:

none of the items show up in the new Creative Mode tab

Why does this method even exist? When you initialize them in the event like you are supposed to. This likely messes things up somewhere.

 

Oh fuck...what...what is this?

 

Let's talk a bit here...First you create your seeds and store the values in the static fields at the top of the class. Good good. Then you proceed to register completely different instances and expect them to work. You didn't even use the same classes for these items. Also this totals up to 3 initializations of those items. Once in the init method called from preInit(not the proper way to do it), secondly in the registry event, and thirdly right below the second time...

6 hours ago, aliteraryhigh said:

Anyone have any suggestions?

I have one really important suggestion. And it will help you a long way into programming. Don't start learning with making a mod. You should learn the basics of programming(kinda looks like you have to an extent). Then you should learn the language you will be writing in; in this case Java. You can do both of those at the same time. The reason I say this is that learning to program by immediately jumping in to using an API, especially Forge is not something anyone can do and is incredibly hard. I don't want you to be discouraged by this. If you want to make a mod, or if you want to learn how to program and make your own game(s) you should start small. Watch/read some tutorials on programming. Experiment by making small programs like pong, a calculator, tic-tac-toe, etc.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 4
5 hours ago, Animefan8888 said:

Your resource file structure is incorrect. you have assets/FruitBushes/... you cannot have any capitals in your resources.

Didn't know that, I'll change that tonight after work!

 

 

5 hours ago, Animefan8888 said:

 

Why does this method even exist? When you initialize them in the event like you are supposed to. This likely messes things up somewhere.

 

Not sure, that should have been taken out. I've been doing most of this work later at night after work so I know I've missed quite a lot. That and at this point I've rebuilt all the code from scratch twice.

 

 

5 hours ago, Animefan8888 said:

Oh fuck...what...what is this?

 

So far? That's the only way I've gotten the items to actually register. Any other way I've done the registry events, the items haven't actually registered. Several times I've had the mod crash the entire client instead of even loading. Please let me know if there's a smarter way to do that, because I've spent a collective 8-10 hours searching these forums, reddit, the official minecraft forums, stackexchange, and github trying to find ANY tutorial that has even the slightest chance of working.

5 hours ago, Animefan8888 said:

 

Let's talk a bit here...First you create your seeds and store the values in the static fields at the top of the class. Good good. Then you proceed to register completely different instances and expect them to work. You didn't even use the same classes for these items. Also this totals up to 3 initializations of those items. Once in the init method called from preInit(not the proper way to do it), secondly in the registry event, and thirdly right below the second time...

 

I'm initializing it twice in the same class? Now that you point that out, I think I see what you're talking about. You mean this section here? I see where I define them twice, that's something I'll correct tonight as well.

 

5 hours ago, Animefan8888 said:

I have one really important suggestion. And it will help you a long way into programming. Don't start learning with making a mod. You should learn the basics of programming(kinda looks like you have to an extent). Then you should learn the language you will be writing in; in this case Java. You can do both of those at the same time. The reason I say this is that learning to program by immediately jumping in to using an API, especially Forge is not something anyone can do and is incredibly hard. I don't want you to be discouraged by this. If you want to make a mod, or if you want to learn how to program and make your own game(s) you should start small. Watch/read some tutorials on programming. Experiment by making small programs like pong, a calculator, tic-tac-toe, etc.

 

I've been coding for a little over a decade now, but I haven't touched Java at all in the last 5 years. The last time I touched Java was making a simple mod for vanilla Minecraft. As I'm sure you're aware, Minecraft (and more specifically Forge) hasn't exactly gotten easier to work with. I was working on this just for personal use and because I'm tired of using VBS all day at work lol. I'm not discouraged by a video game's code being annoying to work with, though I must admit I got fairly frustrated at the lack of depth of the official forge documentation.

 

Would you say the issues you listed in your comment are the main contributing factors to the seeds not planting properly/the models not loading correctly?

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    677

Animefan8888

Animefan8888    677

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 677
  • 5746 posts
Posted November 4 (edited)
3 hours ago, aliteraryhigh said:

Would you say the issues you listed in your comment are the main contributing factors to the seeds not planting properly/the models not loading correctly?

Yes, what you have there is the problem. Its against basic object oriented programming. The values you pass in to the register function aren't an instance of your Seed classes they aren't even the same instance. The code should look something like

 

registerItems(event)

    event.getRegistry().register(BLACKBERRY_SEED = new FruitSeed(...));

...

Edited November 4 by Animefan8888
  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 4

...or don't even set the field yourself and use object holders

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 4
2 hours ago, Animefan8888 said:

Yes, what you have there is the problem. Its against basic object oriented programming. The values you pass in to the register function aren't an instance of your Seed classes they aren't even the same instance. The code should look something like

 

registerItems(event)

    event.getRegistry().register(BLACKBERRY_SEED = new FruitSeed(...));

...

 

So I'll try:

 

event.getRegistry().register(BLACKBERRY_SEED = new FruitSeed(ModBlocks.BlockBlackberry, Blocks.FARMLAND));

 

and that should work, correct?

 

 

48 minutes ago, Draco18s said:

...or don't even set the field yourself and use object holders

 

That was one of the attempts I tried and I don't seem to have a full grasp on how forge uses object holders. I spent a solid 2 hours reading the forge documentation over the weekend and came out further confused than I already was. It's not exactly written in an understandable fashion for most people, which is one of the main complaints I've seen in other similar threads to mine.

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    677

Animefan8888

Animefan8888    677

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 677
  • 5746 posts
Posted November 4
13 minutes ago, aliteraryhigh said:

and that should work, correct?

You'll also need to give it a registry name, but as long as you've made the FruitSeed class it should work.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 4
3 hours ago, Animefan8888 said:

You'll also need to give it a registry name, but as long as you've made the FruitSeed class it should work.

 

What exactly would be in the FruitSeed class? Just an extension of ItemSeeds, correct? That keeps throwing constructor errors in Eclipse. The code below is what I have so far for the class and I'm not quite sure what I'm missing. The "crops" and "soil" values can be set in the individual seed classes with an override, so I'm not too worried about that. But the "public FruitSeed" line keeps throwing the error "Implicit super constructor ItemSeeds() is undefined. Must explicitly invoke another constructor" and I'm not quite sure why, as it's a defined constructor in the ItemSeeds class that the FruitSeed class extends.

 

Spoiler

package FruitBushes.Items;

import FruitBushes.init.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemSeeds;

public class FruitSeed extends ItemSeeds implements net.minecraftforge.common.IPlantable {

    private final Block crops;
    /** BlockID of the block the seeds can be planted on. */
    private final Block soilBlockID;
    
    public FruitSeed(Block crops, Block soil)
    {
        this.crops = crops;
        this.soilBlockID = soil;
    }
}

 

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 5

You know, there's already a class that seeds use and you don't need to extend it.

BlockNamedItem

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 5
1 hour ago, Draco18s said:

You know, there's already a class that seeds use and you don't need to extend it.

BlockNamedItem

 

I'm not sure where you're seeing that. I've searched the entire source jar and haven't found any reference to that anywhere, are you talking about 1.12.2? The main class I've seen that seeds use is ItemSeeds.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 5

UPDATE:

 

I was able to get it mostly working.

 

The seeds register properly, and I still need to clean up the class files for the Blueberry, Maloberry, and Raspberry seeds to match the BlackberrySeeds formatting. Same goes for the block classes. As it stands, the example textures for the seeds work also. The seeds will plant, the crops will grow the appropriate amount of stages, and the crops will drop seeds and fruit. However, the textures for the crops still do not load. Additionally, the item names are not correctly displaying, the creative tab name is not correctly displaying, and the items do not show up in the creative tab. I do still have a fair bit of work to do but I feel as though I've got a much better handle on modding 1.12.2 as far as this is concerned. My next project is going to be in 1.14, so that will be interesting. Thanks all for the help!

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 5

Oh sorry, 1.12

You're looking for ItemSeeds

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 5
1 minute ago, aliteraryhigh said:

However, the textures for the crops still do not load. Additionally, the item names are not correctly displaying, the creative tab name is not correctly displaying, and the items do not show up in the creative tab. I do still have a fair bit of work to do but I feel as though I've got a much better handle on modding 1.12.2 as far as this is concerned. My next project is going to be in 1.14, so that will be interesting. Thanks all for the help!

Your lang file is still in an Upper Case folder:

https://github.com/aliteraryhigh/FruitBushes/tree/11-04-19/src/main/resources/assets/FruitBushes

As are your block models and block textures

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 5
36 minutes ago, Draco18s said:

Your lang file is still in an Upper Case folder:

https://github.com/aliteraryhigh/FruitBushes/tree/11-04-19/src/main/resources/assets/FruitBushes

As are your block models and block textures

 

Huh, that's weird. On GitHub desktop it shows up properly cased, as well as in Eclipse. Same story for the actual files on my hard drive, too. I went through and renamed the subpackages and then rerenamed it back to "fruitbushes" and it's still not working properly.

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 5

Rename it to something else, completely unrelated, push that to github, then rename it back and push that.

 

1) Windows doesn't give a fuck about case, so its lying to you

2) Git does care about case and for some reason it saw the change on only some of the files.

 

Rename, push, rename will fix it

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 5

Interestingly enough, even with the case change it's not working properly. I feel like I may have called the wrong block name somewhere in here, but it's getting a bit late for me to spend a lot of time taking a look at it. I will have to check on this tomorrow night and do some further testing. If you find a problem in the meantime let me know!

 

Thanks

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14008 posts
Posted November 5

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/init/ModBlocks.java#L38-L43

You should still use object holders IMO.

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/Blocks/BlockBlackberry.java#L26

You take in a string name and then do fuckall with it.

And by calling setRegistryName here, its possible that your block is getting the wrong domain. Forge will apply a domain automatically, but if you're using setRegistryName at the wrong time, it will apply the wrong mod ID.

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/Items/BlackberrySeeds.java#L17

Ditto your items, though you construct them in the Register<Item> event, so setRegistryName here works fine.

Also, your unlocalized name should contain your mod ID to prevent conflicts.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 7
On 11/5/2019 at 10:31 AM, Draco18s said:

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/init/ModBlocks.java#L38-L43

You should still use object holders IMO.

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/Blocks/BlockBlackberry.java#L26

You take in a string name and then do fuckall with it.

And by calling setRegistryName here, its possible that your block is getting the wrong domain. Forge will apply a domain automatically, but if you're using setRegistryName at the wrong time, it will apply the wrong mod ID.

https://github.com/aliteraryhigh/FruitBushes/blob/11-04-19/src/main/java/FruitBushes/Items/BlackberrySeeds.java#L17

Ditto your items, though you construct them in the Register<Item> event, so setRegistryName here works fine.

Also, your unlocalized name should contain your mod ID to prevent conflicts.

 

With the changes shown here, I'm getting the error listed below. I'm not sure why it's giving me variant errors on maloberry stage 4, as there is no stage 4 for maloberry and I triple checked to make sure it still shows 3 ages.

 

Update during comment: I quadruple checked and I might be a massive moron. Forgot the @Override tag on setting the max age in the block classes. It still doesn't work, but that's one thing I need to change on all of them.

 

 

error log.txt

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45601 posts
Posted November 7
Quote

Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of 'fruitbushes:block_maloberry' from: 'fruitbushes:blockstates/block_maloberry.json' in resourcepack: 'FMLFileResourcePack:Tiny Progressions Fruit Bushes'
    at net.minecraft.client.renderer.block.model.ModelBakery.loadModelBlockDefinition(ModelBakery.java:246) ~[ModelBakery.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:223) ~[ModelBakery.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:265) ~[ModelLoader.class:?]
    ... 20 more
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected name at line 7 column 6 path $.variants.
    at com.google.gson.Gson.fromJson(Gson.java:902) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:852) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:801) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:773) ~[Gson.class:?]
    at net.minecraftforge.client.model.BlockStateLoader.load(BlockStateLoader.java:80) ~[BlockStateLoader.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlockDefinition.parseFromReader(ModelBlockDefinition.java:42) ~[ModelBlockDefinition.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadModelBlockDefinition(ModelBakery.java:242) ~[ModelBakery.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:223) ~[ModelBakery.class:?]
    at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
    at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:265) ~[ModelLoader.class:?]
    ... 20 more

Your JSON is invalid.

 

4 hours ago, aliteraryhigh said:

Forgot the @Override tag on setting the max age in the block classes.

@Override changes nothing about how your code runs. A method overrides with or without this annotation. All this annotation does is a hint to the compiler, that you intent to override here. The compiler will then issue an error if you are not actually overriding, which can happen if the method you are overriding changes. If you didn't use the annotation, that would still compile, but your method would silently no longer override anything (and thus do absolutely nothing).

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 7
14 hours ago, diesieben07 said:

Your JSON is invalid.

 

Between the official forge documentation and this comment, I've almost got enough information to start looking for the problem.

 

In all seriousness, I'm not quite getting how it's invalid. I've looked at tutorials, other mods, vanilla blocks/items, and directly mimicked the structure of all of them and it's still not working.

 

  • Quote

Share this post


Link to post
Share on other sites

SerpentDagger    15

SerpentDagger

SerpentDagger    15

  • Creeper Killer
  • SerpentDagger
  • Members
  • 15
  • 124 posts
Posted November 8
5 hours ago, aliteraryhigh said:

I'm not quite getting how it's invalid.

19 hours ago, diesieben07 said:

at line 7 column 6 path $.variants.

There's an extra comma in the line above (meaning in line 6) which makes the compiler expect another entry to be on line 7, where there isn't one. You should get a JSON checking plugin for Eclipse, or use an online one, since these sorts of things crop up every now and then and are generally tedious to find.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 8
11 hours ago, SerpentDagger said:

There's an extra comma in the line above (meaning in line 6) which makes the compiler expect another entry to be on line 7, where there isn't one. You should get a JSON checking plugin for Eclipse, or use an online one, since these sorts of things crop up every now and then and are generally tedious to find.

 

I'll make sure to get a decent plugin tonight for it. The comma issue isn't in the blockstate json for the blackberry crop, but it still doesn't show the model for that one either. Is my formatting correct in the json file, or is there something else I'm missing? Like i said, this is a direct copy of a working blockstate json with nothing but the modid and reference changed.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    6671

diesieben07

diesieben07    6671

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6671
  • 45601 posts
Posted November 8

Post updated logs.

  • Quote

Share this post


Link to post
Share on other sites

aliteraryhigh    0

aliteraryhigh

aliteraryhigh    0

  • Tree Puncher
  • aliteraryhigh
  • Members
  • 0
  • 17 posts
Posted November 9
10 hours ago, diesieben07 said:

Post updated logs.

 

I'm here with an updated repo and updated logs. I was missing some close brackets in the JSON files, as well as the extra commas noted above. I removed the commas and added the brackets, so now the crops load with the proper style i.e. crop/cross like the parent BlockCrops class. I also removed the // tags from all lines in the crop Block classes, so now each crop loads with the correct number of AGE values instead of taking on the value of the BlockCrops parent class, which was 7 instead of the 3/4 I wanted.

 

The textures still don't load properly, but the crops still work properly and have the correct number of ages registered. This line from the error log seems to be the problem:

 

Spoiler

[21:02:48] [Client thread/ERROR] [FML]: Exception loading model for variant fruitbushes:block_raspberry#inventory for item "fruitbushes:block_raspberry", normal location exception:

 

I've traced this back to the ModBlocks class, lines 67-69. It seems I don't actually have a render set up for the blocks, just the ItemBlocks? Am I interpreting that correctly? If so, how would I go about implementing the same method for blocks as I have for itemblocks but without the two conflicting? If I'm not interpreting that correctly, how would I go about altering the method so that it no longer requires the #inventory variable that seems unneeded?

 

Thanks

error log 11-08-19.txt

  • Quote

Share this post


Link to post
Share on other sites
  • Prev
  • 1
  • 2
  • Next
  • Page 1 of 2  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Rohman
      [1.12.2 Build 2847] Server Crash on startup

      By Rohman · Posted 30 minutes ago

      Here you go. Thanks for having a look. debug(1).log
    • diesieben07
      Server Cannot Start

      By diesieben07 · Posted 51 minutes ago

      You installed a client-only mod (Controllable) on the server. Mods have the ability to indicate their client-only-ness to Forge and it will not load the mod on a server. This mod has not done so, please report this bug to the mod author.
    • diesieben07
      [1.12.2] How do i make it so my sword renders in my mobs hand?.

      By diesieben07 · Posted 57 minutes ago

      Why would you replace them?! This is a simple method override and you are calling super. There is no need to replace anything. Again: Please learn Java basics before making a mod.
    • diesieben07
      [1.12.2 Build 2847] Server Crash on startup

      By diesieben07 · Posted 1 hour ago

      Post the debug.log file.
    • diesieben07
      Need your help pls

      By diesieben07 · Posted 1 hour ago

      1.8.9 is no longer supported on this forum due to it's age. Update to a modern version of Minecraft to receive support.
  • Topics

    • Rohman
      2
      [1.12.2 Build 2847] Server Crash on startup

      By Rohman
      Started 1 hour ago

    • The_Unkown675
      1
      Server Cannot Start

      By The_Unkown675
      Started 4 hours ago

    • J0WAY
      17
      [1.12.2] How do i make it so my sword renders in my mobs hand?.

      By J0WAY
      Started Thursday at 09:10 PM

    • _jiriik_
      1
      Need your help pls

      By _jiriik_
      Started 2 hours ago

    • Kuaka
      0
      My Forge 1.12 and 1.12.2 Keep Crashing when i start it up

      By Kuaka
      Started 1 hour ago

  • Who's Online (See full list)

    • Ugdhar
    • Gnaux
    • plugsmustard
    • vaartis
    • HussNuss
    • AkosM
    • Ollie_Bear
    • Kuaka
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • 1.12.2 Registry Issues
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community