Immersive Engineering

Immersive Engineering

134M Downloads

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

xElementzx opened this issue ยท 1 comments

commented

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

commented

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++;
}
}