It calculates it from the allocated buffer length, which is by default initialized for x16 texture.
If the width is not matching the image is resized (downscaled).
int w = bufferedimage.getWidth();
int h = bufferedimage.getHeight();
int w2 = (int)Math.sqrt(imageData.length / 4);
pixels = new int[w2 * w2];
if(w != h || w != w2)
{
BufferedImage bufferedimage1 = new BufferedImage(w2, w2, 6);
Graphics2D graphics2d = bufferedimage1.createGraphics();
graphics2d.drawImage(bufferedimage, 0, 0, w2, w2, 0, 0, w, h, null);
bufferedimage1.getRGB(0, 0, w2, w2, pixels, 0, w2);
graphics2d.dispose();
} else
{
bufferedimage.getRGB(0, 0, w, h, pixels, 0, w);
}
Oh, didn't see the buffer length has not changed in the TextureFX class. Given that, is there any problem with this
int w = bufferedimage.getWidth();
int h = bufferedimage.getHeight();
if(w==h)imageData = new byte[w * w * 4];
Oh, didn't see the buffer length has not changed in the TextureFX class. Given that is there any problem with this
int w = bufferedimage.getWidth();
int h = bufferedimage.getHeight();
if(w==h)imageData = new byte[w * w * 4];
The correct image size has to be calculated from the current texture pack based on "terrain.png" for terrain and "items.png" for items.
Then the buffered image has to be rescaled to the target size if necessary.
When I use MCPatcher to install both, the game runs but all the text is unreadable gibberish.
I install the texture pack with MCPatcher, and manually install the mod, the game black screens and crashes. I could be doing something completely wrong, but I don't know. I even tried downing the texture pack to 64x, still no luck.
The correct image size has to be calculated from the current texture pack based on "terrain.png" for terrain and "items.png" for items.
Then the buffered image has to be rescaled to the target size if necessary.
I made a quick fix with that code using MCP and nothing went wrong so far. Logically texture packs would have mod textures which are the same tile size (x16 or x32 etc..) or less. I have a custom texture for my mods using 32x32 items mixed with 16x16 items and there are no problems so far. I can see that using a 64x64 item in a x32 texture pack might be a problem.
I made a quick fix with that code using MCP and nothing went wrong so far. Logically texture packs would have mod textures which are the same tile size (x16 or x32 etc..) or less. I have a custom texture for my mods using 32x32 items mixed with 16x16 items and there are no problems so far. I can see that using a 64x64 item in a x32 texture pack might be a problem.
Can you post your small patch for this issue? I'd love for my custom 32x modloader textures to look correct.
I have a suggestion for two options under Detail settings that is if they haven't already been suggested but what about adding, "Leaf Decay: On/Off" and "Particles: On/Off"? It'd help improve the FPS a good little bit.
I have a suggestion for two options under Detail settings that is if they haven't already been suggested but what about adding, "Leaf Decay: On/Off" and "Particles: On/Off"? It'd help improve the FPS a good little bit.
I'm having a rather confusing conflict with another popular mod, Better Than Wolves. Recent versions of both mods (Opti* 1.6.6 F_HD and BTW 2.63) installed results in a crash-to-desktop when using certain items from the latter mod. I haven't been able to generate a crash-report, yet. However, when I do, I will edit it onto this post, as well as the post I made in the other mod's thread.
Thanks.
EDIT: Here's that crash-log
--- BEGIN ERROR REPORT 89169c52 --------
Generated 6/30/11 2:20 AM
Minecraft: Minecraft Beta 1.6.6
OS: Windows XP (x86) version 5.1
Java: 1.7.0-ea, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 6200/AGP/SSE2 version 2.1.2, NVIDIA Corporation
java.lang.IllegalAccessError: tried to access field ct.b from class FCRenderMovingAnchor
at FCRenderMovingAnchor.a(Unknown Source)
at tc.a(tc.java:126)
at tc.a(tc.java:120)
at m.a(RenderGlobal.java:350)
at pt.a(EntityRenderer.java:717)
at pt.b(EntityRenderer.java:521)
at EntityRendererProxy.b(EntityRendererProxy.java:15)
at net.minecraft.client.Minecraft.run(SourceFile:743)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d6ea87c7 ----------
EDIT EDIT: Work-around: Don't include the ct.class from Opti*, as this modifies EntityRenderer in a way that breaks Better Than Wolves. I'm not sure if this causes any issues to the way Optifog/Optimine works, so please let me know if there is some other solution.
"Harry Potter is all about confronting fears, finding inner strength, and doing what is right in the face of adversity. Twilight is about how important it is to have a boyfriend." -Stephen King
As stated before things can go bad if a texture pack adds a mod texture item which is larger than the current texture pack size.
Ill work on a fix for modloader item renderers like 303s hook (currently the hook is rendered as a flat object, unlike pickaxes etc).
I have a suggestion for two options under Detail settings that is if they haven't already been suggested but what about adding, "Leaf Decay: On/Off" and "Particles: On/Off"? It'd help improve the FPS a good little bit.
Most probably coming next week with other changes.
Everyone - chill out. XD 1.7 came, literally, less than 2 hours ago. It's going to take a bit to work on it. =p It's possible the creator isn't even awake, yet!
It will probably, assuming he feels up to working, take a day or so.
Wait 5 sec and press "Skip Ad" at the top.
Oh, didn't see the buffer length has not changed in the TextureFX class. Given that, is there any problem with this
The correct image size has to be calculated from the current texture pack based on "terrain.png" for terrain and "items.png" for items.
Then the buffered image has to be rescaled to the target size if necessary.
I tried to use optifog + optimine with this texture pack:
http://www.minecraftforum.net/topic/376784-128x64x16-sphax-purebdcraft-wip-055-280611/
When I use MCPatcher to install both, the game runs but all the text is unreadable gibberish.
I install the texture pack with MCPatcher, and manually install the mod, the game black screens and crashes. I could be doing something completely wrong, but I don't know. I even tried downing the texture pack to 64x, still no luck.
I made a quick fix with that code using MCP and nothing went wrong so far. Logically texture packs would have mod textures which are the same tile size (x16 or x32 etc..) or less. I have a custom texture for my mods using 32x32 items mixed with 16x16 items and there are no problems so far. I can see that using a 64x64 item in a x32 texture pack might be a problem.
Maybe smooth fps? Or you could just buy a new PC, and problem solved. lol
Not a bug. There's no still of fire, so it just shows that. Look for that in terrain.png, then edit it to suite your tastes.
This.
Thanks.
EDIT: Here's that crash-log
--- BEGIN ERROR REPORT 89169c52 --------
Generated 6/30/11 2:20 AM
Minecraft: Minecraft Beta 1.6.6
OS: Windows XP (x86) version 5.1
Java: 1.7.0-ea, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 6200/AGP/SSE2 version 2.1.2, NVIDIA Corporation
java.lang.IllegalAccessError: tried to access field ct.b from class FCRenderMovingAnchor
at FCRenderMovingAnchor.a(Unknown Source)
at tc.a(tc.java:126)
at tc.a(tc.java:120)
at m.a(RenderGlobal.java:350)
at pt.a(EntityRenderer.java:717)
at pt.b(EntityRenderer.java:521)
at EntityRendererProxy.b(EntityRendererProxy.java:15)
at net.minecraft.client.Minecraft.run(SourceFile:743)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT d6ea87c7 ----------
EDIT EDIT: Work-around: Don't include the ct.class from Opti*, as this modifies EntityRenderer in a way that breaks Better Than Wolves. I'm not sure if this causes any issues to the way Optifog/Optimine works, so please let me know if there is some other solution.
ModTextureStatic Fix
As stated before things can go bad if a texture pack adds a mod texture item which is larger than the current texture pack size.
Ill work on a fix for modloader item renderers like 303s hook (currently the hook is rendered as a flat object, unlike pickaxes etc).
Most probably coming next week with other changes.
Great news. :biggrin.gif:
Can't wait for the next update, really need to increase my FPS more/
It will probably, assuming he feels up to working, take a day or so.
After:
Awesome mod, bro! :biggrin.gif:
After all, you are using Windows.