Jump to content

Recommended Posts

Posted

Hello there,

 

I've been restarting to learn mod development, and after diving into the horrendous forge documentation, I started searching for tutorials and mods hosted on git hosters, to try to create a simple mod.

 

The thing is: I have an Item, a .json model stored under my {modid}/models/item/ and a .png texture file, under {modid}/textures/items/

 

When loading the mod, I get this error.

 

This is my folder structure: folder structure.txt

 

And my sourcecode (including gradle files) is available here

 

Note that due to some weird bug, I can't paste anything on this website. That includes sourcecode, so I must use external code hosting solutions.

"Everybody has a test environment. Some are lucky enough to have a completely separate environment to run production on"

Posted (edited)
1 hour ago, Leviathan143 said:

I believe item/block model registration needs to be done during preinit, you are doing it during init.

I forgot about that, I changed that, but now I get this item rendering, which I don't understand.

While fixing, I also changed the registerRender class to use the registryName of the item instead of a fixed name (which was for testing).

 

I now get this item rendering:

In-game screenshot of item rendering.

2017-05-01_22.56.50.png

Edited by Artemix
adding screenshot

"Everybody has a test environment. Some are lucky enough to have a completely separate environment to run production on"

Posted

 

2 minutes ago, Artemix said:

I forgot about that, I changed that, but now I get this item rendering, which I don't understand.

While fixing, I also changed the registerRender class to use the registryName of the item instead of a fixed name (which was for testing).

 

I now get this item rendering:

In-game screenshot of item rendering.

Post the latest console log, it should give the error.

Posted (edited)

The error log is here.

 

It says that the path "metricsmod:models/item/tape_meter.json" can't be found, which I don't understand, as that's pretty much the only way to load it. That, or I missed something.

 

The json model file stored under assets/metricsmod/models/item/tape_meter.json contains

Quote

{
    "parent": "item/generated",
    "textures": {
        "layer0": "metricsmod:items/tape_meter"
    }
}

 

Edited by Artemix
adding json

"Everybody has a test environment. Some are lucky enough to have a completely separate environment to run production on"

Posted

Would you show a screenshot of the path and file as see in Windows File Explorer?

(or equivalent on your system)

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)

Here's a screenshot from the file explorer/terminal, with full path.

Here's a `tree` view starting from the src/main folder:

Quote

> $ tree                                [±master ●●]
.
├── java
│   └── xyz
│       └── artemix
│           └── mc
│               └── metrics
│                   ├── ClientProxy.java
│                   ├── CommonProxy.java
│                   ├── Constants.java
│                   ├── init
│                   │   └── ItemHandler.java
│                   ├── items
│                   │   └── ItemTapeMeter.java
│                   ├── MetricsMod.java
│                   └── MetricsModTab.java
└── resources
    ├── assets
    │   └── metricsmod
    │       ├── blockstates
    │       ├── lang
    │       │   └── en_US.lang
    │       ├── models
    │       │   ├── block
    │       │   └── item
    │       │       └── tape_meter.json
    │       └── textures
    │           ├── block
    │           └── items
    │               ├── tape_meter.png
    │               └── tape_meter.xcf
    └── mcmod.info

18 directories, 12 files

 

 

Screenshot from 2017-05-02 15-53-47.png

Edited by Artemix
adding screenshot

"Everybody has a test environment. Some are lucky enough to have a completely separate environment to run production on"

Posted

Some issues I had was that I first created the files with a uppercase name, and windows didn't recognize that there was a change even though it displayed it.
Might be the same issue for you, even though it looks like you are using linux and I am not sure if thats an issue in it too.

Posted

Is the file visible in Eclipse's Package Explorer? If it isn't, try refreshing the folder or the project.

 

In my experience, Eclipse seems to cache the project. If you edit a file in Eclipse, the cache is updated and you don't notice anything. If you edit or create a file in the project folder with an external tool, the cache is not updated and the cached version of the file is used when running or debugging, leading to unexpected results.

 

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.