Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.12.2] Client stuck in loop trying to render custom blueprint #3474

Closed
xElementzx opened this issue May 19, 2019 · 1 comment
Closed

[1.12.2] Client stuck in loop trying to render custom blueprint #3474

xElementzx opened this issue May 19, 2019 · 1 comment

Comments

@xElementzx
Copy link

Before reporting:

Please use the search function to make sure an issue hasn't been reported already. This avoids duplicates.
Also, please give this issue a descriptive name that contains the game version in the title, eg.: "[1.12] Capacitor Interaction Crash"

Description of the issue:

Describe what happens, how it affects your game/gameplay and provide screenshots where possible.
When creating a custom blueprint with Modtweaker/CraftTweaker and using a block as the output the client will get stuck in a loop processing getBlueprintDrawable

VisualVM Sample here https://i.imgur.com/BYXYIIy.png

Custom line for adding Diamond Block with CraftTweaker script
mods.immersiveengineering.Blueprint.addRecipe("components", <minecraft:diamond_block>, [<ore:logWood>, <minecraft:dirt>]);

Versions & Modlist

Forge 1.12.2 - 2836
Immersive Engineering 0.12-89
MTLib 3.0.6
modtweaker 4.0.17
CraftTweaker2 4.1.17

Thank you for reporting issues, without people reporting them, they wouldn't get fixed. You're helping contribute to this mod and that is much appreciated <3

@LXGaming
Copy link

LXGaming commented May 21, 2019

There is an infinite loop here, If the blueprint is null (Which is the case here) i never gets incremented

for(int i = 0; i < l; )
{
BlueprintCraftingRecipe recipe = recipes[i%recipes.length];
BlueprintLines blueprint = recipe==null?null: TileRenderAutoWorkbench.getBlueprintDrawable(recipe, te.getWorld());
if(blueprint!=null)
{
double dX = i < perRow?(.93725/scale-perRow*16.6)+i*16.6: (.70375/scale-i%perRow*16.6);
double dY = i < perRow?0: -.15625;
GlStateManager.translate(dX, dY/scale, 0);
//Width depends on distance
GlStateManager.disableCull();
GlStateManager.disableTexture2D();
GlStateManager.enableBlend();
float texScale = blueprint.textureScale/16f;
GlStateManager.scale(1/texScale, 1/texScale, 1/texScale);
GlStateManager.color(1, 1, 1, 1);
blueprint.draw(lineWidth);
GlStateManager.scale(texScale, texScale, texScale);
GlStateManager.enableAlpha();
GlStateManager.enableTexture2D();
GlStateManager.enableCull();
GlStateManager.translate(-dX, -dY/scale, 0);
i++;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants