Forge - question for FC

A place to talk to other users about the mod.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post by Kinniken »

Could be. I'll try again tonight, making sure I'm using the Forge mappings.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post by Kinniken »

Ok, found the tutorial, don't bother.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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 :)
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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?
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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?
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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?).
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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.
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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!
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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 :)
Kinniken
Posts: 55
Joined: Sat Jan 28, 2012 11:14 am

Re: Forge - question for FC

Post 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.
User avatar
Zhil
Posts: 4486
Joined: Thu Jul 14, 2011 3:12 pm
Location: Belgium

Re: Forge - question for FC

Post 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
Come join us at Vioki's Discord! discord.gg/fhMK5kx
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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 :)
User avatar
Zhil
Posts: 4486
Joined: Thu Jul 14, 2011 3:12 pm
Location: Belgium

Re: Forge - question for FC

Post 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.
Come join us at Vioki's Discord! discord.gg/fhMK5kx
User avatar
Starshifterxen
Posts: 211
Joined: Fri Jul 29, 2011 6:12 am

Re: Forge - question for FC

Post 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
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Forge - question for FC

Post 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 ;)
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: Forge - question for FC

Post 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 ^.^
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
User avatar
orangeweaver
Posts: 343
Joined: Thu Jan 19, 2012 8:25 pm

Re: Forge - question for FC

Post 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.
User avatar
DaveYanakov
Posts: 2090
Joined: Sat Jul 23, 2011 5:17 am

Re: Forge - question for FC

Post 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.
Better is the enemy of Good
Locked