Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I'm trying to render a simple texture on a block. I know Java, I know what files are and I know how to use a computer. However, I am horribly unfamiliar with how textures are processed in minecraft, and it seems every single place, even those from just 7 or 8 months ago, is outdated.

 

pastebin of all the code i have made. there is nothing outside of this.

 

https://pastebin.com/aeJhqX5g

 

I am well aware that I have no models being called. I don't know how to do it. Tutorials and old questions from these forums said to use `ModelLoader.setCustomModelResourceLocation()`, but that does not exist, it seems.

 

gyazo of my current resources directory setup

 

https://gyazo.com/57f5184856f9a557e2040856a554ae7b

 

(Yes, this is built off of the default example mod because I'm still new to the forge process).

 

How do you load a texture?

27 minutes ago, thorsigal said:

(Yes, this is built off of the default example mod because I'm still new to the forge process).

This is fine it's exactly what it is meant for. However you seem to have been following a bad tutorial. You shouldn't register any registry object (Item, Block, Enchantment, etc) outside of its registry event. Aka dont statically initialize them.

 

The problem is you dont have and model json or blockstate json.

 

Those links aren't tutorials might not help much, but you can look at the vanilla ones under assets.minecraft.blockstates and assets.minecraft.models

 

And they need to be in your folder called assets.[modid].whatever path here

 

And textures are under assets.[modid].textures.[item/block]

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.

  • Author

Actually I have those, if you look at the gyazo screencap

 

and I changed the block and blockitem to still be static, but now they are initialized in their respective registryevents, but the textures are still not there

 

edit: lo and behold my error did indeed lie within those files however. I copied the versions from vanilla instead of the dumb tutorial I got it off of and it worked like a charm.

 

examplemod:block/texture instead of just examplemod:texture.

 

also one of them said "normal" : { when it should have been empty quotes.

 

Thanks for the suggestion.

Edited by thorsigal

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.