Jump to content

yyrkoon

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by yyrkoon

  1. I'm not sure where in the block render path your coremod is working, but I don't believe any of the block render layers have color blending enabled. CUTOUT and TRANSLUCENT have 2 different alpha modes enabled, but they don't seem blend colors. You could try setting a blend mode in your coremod. I know it works in a TESR I use to color a grayscaled texture. I don't think it's a vertex format issue since the format used for blocks already has 4 color channels. GlStateManager.color(...) could work for you as well. The world renderer and state manager make sure vertex modes are set correctly and other redundancies. Beyond tracing the path through the block and TESR render paths and digging out all the specific settings, I can't think of much else to try. I haven't done any core mods personally, so I can't say how tricky managing these settings might become. Here's the blend setup from my TESR: GlStateManager.disableLighting(); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
  2. Your texture is the right dimension, so you can safely ignore my comments about the drawRect methods. Most vanilla container textures don't use a full 256 height for the background portion though. I think you book might simply be too tall.
  3. Appologies, My head was in 1.8. The method exists in 1.7.10, just not in a user friendly form. The method call for you would be func_146110_a. I've copied the 1.8 call below as well so you can better see what the parameters represent. The internals of the 2 methods are the same. Also these are STATIC methods. For the text, you can use the same formula (backx- stringwidth) / 2. The y position you can use the same value as the y coord of the texture. is it safe to assume you texture is also 192x256? If you can open your texture and pad it's width to 256 with transparency (32px on either side), the scaling won't matter and you can use the same draw rect method you've been using (less math ) 1.8 public static void drawModalRectWithCustomSizedTexture(int x, int y, float u, float v, int width, int height, float textureWidth, float textureHeight) 1.7.10 public static void func_146110_a(int p_146110_0_, int p_146110_1_, float p_146110_2_, float p_146110_3_, int p_146110_4_, int p_146110_5_, float p_146110_6_, float p_146110_7_)
  4. I don't know if you're still having problems, but the public void drawTexturedModalRect(int x, int y, int textureX, int textureY, int width, int height) method you are using assumes a texture size of 256x256. If your texture is a unique size, drawModalRectWithCustomSizedTexture(...) may provide better results.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.