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

Edit: Apparently, this has been solved some version later than mine. Don't bother reading, then =)

 

Hey,

 

since the newest version (my Forge info says build number=372), I've not been able to use texture overwrites for my custom textures.

 

Basically, I've used this setup up until now:

(Note that filePath is my own filePath, not the standard MC one)

 

	MinecraftForgeClient.preloadTexture(filePath + "terrain.png");
	MinecraftForgeClient.preloadTexture(filePath + "items.png");

String empty = "";
	for(int i = 0; i < 256; i++) empty += "1";
	SpriteHelper.registerSpriteMapForFile(filePath + "items.png", empty);
	SpriteHelper.registerSpriteMapForFile(filePath + "terrain.png", empty);

	texture1 = ModLoader.addOverride(filePath + "terrain.png", filePath + "myFirstTexture.png");
                [...]

 

This worked fine, at least last version. I personally like dynamically generated texture files better than pre-set up ones, because they're just easier to work with. Also, you can dynamically change them up according to property file settings, for example, so it just generally provides more features.

 

Anyway, since the newest 1.4.4 version, ModLoader.addOverride(customTexture, customOverride); doesn't do anything anymore [at least, visually]. The lines before work perfectly, still, and it's also adding the overrides to all the lists, but it apparently doesn't load them later.

 

I don't know if it was coincidence that it worked before, but I'd very much like it to work again.

 

 

Solution:

 

I figured out that it will work, if you set 'needApply' to stay over 0 inside onUpdate (Inside ModTextureStatic).

 


    @Override
    public void onTick()
    {
        if (oldanaglyph != anaglyphEnabled)
        {
            update();
        }
        // This makes it so we only apply the texture to the target texture when we need to,
        //due to the fact that update is called when the Effect is first registered, we actually
        //need to wait for the next one.
        tileSize = (needApply == 0 ? 0 : storedSize);
        if (needApply > 0)
        {
            //needApply--; //This stays over 0, so tileSize stays one.
        }
    }

 

I know that this way is not the appropriate solution. I don't want to bother with the rest of the logic behind this here, but I guess at least you know where to start looking when fixing it =)

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.