Page 2 of 3

Re: Forge - question for FC

Posted: Sun Jan 29, 2012 7:55 pm
by FlowerChild
Kinniken wrote:I downloaded the source version of Forge, and like they instruct placed it in an already-decompiled MCP environment. I then ran forge/install.sh. With Forge 1.3.1, it works, with 1.3, it fails with the errors I posted.
Not sure man. It may be the MCP mappings, and I believe each source-install version of the mod comes with a specific set of mappings that work with it.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:37 am
by Kinniken
Could be. I'll try again tonight, making sure I'm using the Forge mappings.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:47 pm
by Kinniken
I got it running with 1.3.1 with minor changes to get rid of dependencies to other Forge classes. For items, it's working fine. For blocks though Minecraft only uses the alternate texture file for the icon (in the inventory for instance), but switches back to the normal texture file when rendering placed blocks. Any idea of the issue?

Oh, and is there any reason not to use the same texture file for both blocks and items? It's more than big enough for both for me.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:52 pm
by FlowerChild
Kinniken wrote:I got it running with 1.3.1 with minor changes to get rid of dependencies to other Forge classes. For items, it's working fine. For blocks though Minecraft only uses the alternate texture file for the icon (in the inventory for instance), but switches back to the normal texture file when rendering placed blocks. Any idea of the issue?

Oh, and is there any reason not to use the same texture file for both blocks and items? It's more than big enough for both for me.
Hmmm...I've never tried it, but I don't believe it would be an issue.

No idea on your placed-blocks issue, although it would seem to me that you may be missing the appropriate changes in RenderBlocks if that's going on.

Also, make sure you're preloading your textures if you're not doing so already. I doubt it's related, but might be.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:56 pm
by Kinniken
Ah, that preloading part could be that. How do I do it? So far all I've done is implement ITextureProvider on my blocks and items.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:57 pm
by Kinniken
Ok, found the tutorial, don't bother.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 4:59 pm
by FlowerChild
Well, no guarantees it will solve your issue, but it certainly won't hurt and will get rid of some potentially rendering glitches and performance drops.

Here's my own preload routine. Just drop something similar into the init for your mod, and you're good to go:

Code: Select all

	private void PreloadTextures()
	{
		ModLoader.getMinecraftInstance().renderEngine.getTexture( "/btwmodtex/btwterrain01.png" );

		ModLoader.getMinecraftInstance().renderEngine.getTexture( "/btwmodtex/btwitems01.png" );
	}
Kinniken wrote:Ok, found the tutorial, don't bother.
Too late :)

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:04 pm
by Kinniken
Thanks. It didn't help though (I placed it in the load() method of my main mod class). And my RenderBlocks is the Forge one with really tiny changes that do not seem linked, to get rid of the errors I had listed previously. Is there any way to check if the texture swapping code is triggered at all when rendering blocks?

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:07 pm
by FlowerChild
Kinniken wrote:Thanks. It didn't help though (I placed it in the load() method of my main mod class). And my RenderBlocks is the Forge one with really tiny changes that do not seem linked, to get rid of the errors I had listed previously. Is there any way to check if the texture swapping code is triggered at all when rendering blocks?
You could always just drop a breakpoint in there.

You are implementing the ITextureInterface for each of your blocks correct?

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:11 pm
by Kinniken
Not sure where that breakpoint would go. I'll have to have a proper look at the rendering code, I never did (either the Forge one or the original).

Yes, I'm implementing the interface, and it's working for the icon in the inventory (though that might be taken from the corresponding item class right?).

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:12 pm
by FlowerChild
Kinniken wrote:Not sure where that breakpoint would go. I'll have to have a proper look at the rendering code, I never did (either the Forge one or the original).

Yes, I'm implementing the interface, and it's working for the icon in the inventory (though that might be taken from the corresponding item class right?).
Could be. You might also want to try breaking them blocks and items into separate texture files as well if you haven't already tried that.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:24 pm
by Kinniken
I will, though I'd be surprised it changes things (after all, block-based items already use icons coming from the blocks' texture file). I've also noticed something that could help narrow it down: when I'm holding a block in my hand, it has the right texture, and same for the "break" particules when destroying a block. So it does look like the texture is really loaded fine, it's just not being swapped in the specific code rendering placed blocks.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:28 pm
by FlowerChild
Kinniken wrote:I will, though I'd be surprised it changes things (after all, block-based items already use icons coming from the blocks' texture file). I've also noticed something that could help narrow it down: when I'm holding a block in my hand, it has the right texture, and same for the "break" particules when destroying a block. So it does look like the texture is really loaded fine, it's just not being swapped in the specific code rendering placed blocks.
Sorry man, I'm of very limited use today for a variety of reasons detailed in the off-topic section. I doubt I can be of much help.

Re: Forge - question for FC

Posted: Mon Jan 30, 2012 5:37 pm
by Kinniken
Ok, after reading the off-topic thread, I get your point. Let's hope the next night is better.

I'll go and dive in RenderBlocks and see if I can find the issue.

Re: Forge - question for FC

Posted: Tue Jan 31, 2012 6:13 pm
by Kinniken
Ok, I got it working, at least based on your classes (I haven't tried against BTW or Forge yet). I have a test version here:

http://www.minecraftforum.net/topic/227 ... __12438063

Thanks for the help!

Re: Forge - question for FC

Posted: Tue Jan 31, 2012 6:13 pm
by FlowerChild
Kinniken wrote:Ok, I got it working, at least based on your classes (I haven't tried against BTW or Forge yet). I have a test version here:

http://www.minecraftforum.net/topic/227 ... __12438063

Thanks for the help!
Awesome stuff man! Glad to hear it :)

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 3:03 pm
by Kinniken
Yep, seems to work fine! My mod can run on either it, Forge or BTW. Works fine with Optifine and MCPatcher also. The code is here for those interested: http://millenaire.org/dl/ForgeSpriteExtender-src.zip

I'll probably do a release dependent on it this weekend. Thanks again, it would have taken me ages to do the same job directly from the Forge code.

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 3:17 pm
by Zhil
This is great :)

Maybe it's time for me to give Millenaire a whirl again. I didn't like some of the mechanics in the earlier versions, but I just read through the wiki a bit and it seems to have come a far way since then

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 4:57 pm
by FlowerChild
Kinniken wrote:Yep, seems to work fine! My mod can run on either it, Forge or BTW. Works fine with Optifine and MCPatcher also. The code is here for those interested: http://millenaire.org/dl/ForgeSpriteExtender-src.zip

I'll probably do a release dependent on it this weekend. Thanks again, it would have taken me ages to do the same job directly from the Forge code.
Excellent man! Maybe I'll give Millenaire a try this weekend :)

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 5:05 pm
by Zhil
FlowerChild wrote:Excellent man! Maybe I'll give Millenaire a try this weekend :)
I'm interested in your findings :)

Millenaire is one of those mods that grabs my interest, but never enough to try it out for a full play-through.

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 5:16 pm
by Starshifterxen
I'm a big fan of Millenaire. Really cool to see the author here.

It has adds something I think minecraft ihas alwayed missed, which is a sense of a wider world and a purpose behind resource gathering.

Some of my early explorations of BTW were coupled with Millenaire and I felt they complemented each other really well.

Hope you enjoy and really glad it is compatible with BTW.

Just for fun, here is a millenaire village with my first every windmill:
Spoiler
Show
Image

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 5:20 pm
by FlowerChild
Yeah, I know one thing I'd love to see with a mod like Millenaire is support for stuff like villagers building Wind Mills after you teach them how to do so (say by giving them a Wind Mill to begin with).

This would leave technological development in Steve's hands, but those developments would then be reflected in the world around him which would evolve along with him.

It's a long-term idea I've been tossing around for the vanilla NPC's if Mojang ever does anything interesting with them ;)

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 5:56 pm
by Stormweaver
FlowerChild wrote:Yeah, I know one thing I'd love to see with a mod like Millenaire is support for stuff like villagers building Wind Mills after you teach them how to do so (say by giving them a Wind Mill to begin with).

This would leave technological development in Steve's hands, but those developments would then be reflected in the world around him which would evolve along with him.

It's a long-term idea I've been tossing around for the vanilla NPC's if Mojang ever does anything interesting with them ;)
6 weeks later: "Introducing Better with Millenaire then Buildcraft and Railcraft! BwMtBaR represents..."

I have to admit, Millenaire's just one of those mods I've looked at, really wanted to use, and then just never gotten around to installing. Maybe come the 1.2 versions of everything I'll give it a go, as I'll probably be starting a new world then anyways ^.^

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 6:38 pm
by orangeweaver
I might be right there with you Storm.

Also I agree w/ FC, the technological development must stay in Steve's hands but seeing it reflect in the world would feel damn good.

Re: Forge - question for FC

Posted: Wed Feb 01, 2012 8:07 pm
by DaveYanakov
The concept of dragging a civilization kicking and screaming into a more industrial age has great appeal for me. I've played around with it before but it does add a lot of processor cycles. I basically had to choose between it and translucent leaves.