Jump to content

Recommended Posts

Posted

Hello, I have a texture FX for a liquid I'm adding which I'm just testing with:

 

package net.minecraft.src;

public class TextureHNO3FX extends TextureWaterFX {
public TextureHNO3FX(){
	super();
	this.iconIndex = mod_ChemicalCraft.instance.hno3Flowing.blockIndexInTexture;
}
}

 

and

 

@Override
public void registerAnimation(Minecraft minecraft) {
ModLoader.addAnimation(new TextureHNO3FX());
}

 

That block uses a custom terrain.png with MinecraftForgeClient.preloadTexture().

 

Unfortunately, the renderer isn't getting the message that it's not the default terrain.png, and it's rendering the top of every grass block with TextureWaterFX!!! How do I set it so it uses the preloaded Texture rather than the default terrain.png?

Posted

I know how to add blocks with ModLoader :P

 

Here's my code:

 

  Reveal hidden contents

 

 

And BlockHNO3Stationary.java:

 

  Reveal hidden contents

 

 

And BlockHNO3Flowing.java:

 

  Reveal hidden contents

 

 

Posted

I am pretty sure the latest forge/fml combo supports that in texturefx's quite directly now.  Maybe look at the BC method, or maybe the fml/forge-edited water/lava texturefx might be enlightening?

Posted

I'm using Forge 3.3.8.152, and it doesn't support it.

 

What I did as a work around was I overrode the method bindTexture(RenderEngine) from

par1RenderEngine.getTexture("/terrain.png")

to

par1RenderEngine.getTexture(mod_ChemicalCraft.hno3Flowing.getTextureFile())

 

That fixed the problem, so seeing this implemented in the base TextureFX class would be nice.

Posted
  On 6/29/2012 at 10:53 PM, thebombzen said:

I'm using Forge 3.3.8.152, and it doesn't support it.

 

What I did as a work around was I overrode the method bindTexture(RenderEngine) from

par1RenderEngine.getTexture("/terrain.png")

to

par1RenderEngine.getTexture(mod_ChemicalCraft.hno3Flowing.getTextureFile())

 

That fixed the problem, so seeing this implemented in the base TextureFX class would be nice.

Actually I though that FML/Forge have their own TextureFX class that subclasses the standard TextureFX class, you are using FML/Forge's TextureFX?

Posted

By 'Forge doesnt support it' Thats a lie, cuz it does support it, the exact same way MC supports it, by overriding the bindImage() function.. like you should.. so whats the issue?

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.