Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

yyrkoon

Members
  • Joined

  • Last visited

  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. yyrkoon replied to a post in a topic in Modder Support
    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. yyrkoon replied to a post in a topic in Modder Support
    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. yyrkoon replied to a post in a topic in Modder Support
    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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.