Jump to content

[1.12] Crash while trying to render model


WaffleMan0310

Recommended Posts

I am trying to render a model I made, and the game keeps crashing whenever I place the block and then whenever I load up said world from there on out. I have checked the logs and there are no warnings about more than 4 vertices, which is the only thing I've read thus far that can cause this. 

 

Heres is the crash report:

---- Minecraft Crash Report ----
// My bad.

Time: 2/7/18 3:25 PM
Description: Tesselating block model

java.lang.ArrayIndexOutOfBoundsException: 3
	at net.minecraftforge.client.model.pipeline.VertexLighterFlat.processQuad(VertexLighterFlat.java:111)
	at net.minecraftforge.client.model.pipeline.QuadGatheringTransformer.put(QuadGatheringTransformer.java:63)
	at net.minecraftforge.client.model.pipeline.UnpackedBakedQuad.pipe(UnpackedBakedQuad.java:82)
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.render(ForgeBlockModelRenderer.java:106)
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.renderModelSmooth(ForgeBlockModelRenderer.java:85)
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:47)
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:38)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.base.AncientMagicksTESR.renderModel(AncientMagicksTESR.java:51)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.TileEntityArcanistSmelteryRender.renderTileEntity(TileEntityArcanistSmelteryRender.java:24)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.TileEntityArcanistSmelteryRender.renderTileEntity(TileEntityArcanistSmelteryRender.java:12)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.base.AncientMagicksTESR.func_192841_a(AncientMagicksTESR.java:38)
	at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_192854_a(TileEntityRendererDispatcher.java:161)
	at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.renderTileEntity(TileEntityRendererDispatcher.java:133)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:732)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1398)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1312)
	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1115)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1176)
	at net.minecraft.client.Minecraft.run(Minecraft.java:431)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraftforge.client.model.pipeline.VertexLighterFlat.processQuad(VertexLighterFlat.java:111)
	at net.minecraftforge.client.model.pipeline.QuadGatheringTransformer.put(QuadGatheringTransformer.java:63)
	at net.minecraftforge.client.model.pipeline.UnpackedBakedQuad.pipe(UnpackedBakedQuad.java:82)
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.render(ForgeBlockModelRenderer.java:106)
	at net.minecraftforge.client.model.pipeline.ForgeBlockModelRenderer.renderModelSmooth(ForgeBlockModelRenderer.java:85)

-- Block model being tesselated --
Details:
	Block: ancientmagicks:arcanists_smeltery
	Block location: World: (136,4,-713), Chunk: (at 8,0,7 in 8,-45; contains blocks 128,0,-720 to 143,255,-705), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
	Using AO: true
Stacktrace:
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:47)
	at net.minecraft.client.renderer.BlockModelRenderer.renderModel(BlockModelRenderer.java:38)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.base.AncientMagicksTESR.renderModel(AncientMagicksTESR.java:51)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.TileEntityArcanistSmelteryRender.renderTileEntity(TileEntityArcanistSmelteryRender.java:24)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.TileEntityArcanistSmelteryRender.renderTileEntity(TileEntityArcanistSmelteryRender.java:12)
	at com.waffleman0310.ancientmagicks.client.renderer.tileentity.base.AncientMagicksTESR.func_192841_a(AncientMagicksTESR.java:38)

-- Block Entity Details --
Details:
	Name: minecraft:com.waffleman0310.ancientmagicks.common.tileentity.tileentityarcanistsmeltery // com.waffleman0310.ancientmagicks.common.tileentity.TileEntityArcanistSmeltery
	Block type: ID #260 (tile.ancientmagicks:arcanists_smeltery // com.waffleman0310.ancientmagicks.common.blocks.BlockArcanistSmeltery)
	Block data value: 0 / 0x0 / 0b0000
	Block location: World: (136,4,-713), Chunk: (at 8,0,7 in 8,-45; contains blocks 128,0,-720 to 143,255,-705), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
	Actual block type: ID #260 (tile.ancientmagicks:arcanists_smeltery // com.waffleman0310.ancientmagicks.common.blocks.BlockArcanistSmeltery)
	Actual block data value: 0 / 0x0 / 0b0000
Stacktrace:
	at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_192854_a(TileEntityRendererDispatcher.java:161)
	at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.renderTileEntity(TileEntityRendererDispatcher.java:133)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:732)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1398)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1312)

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player317'/20, l='MpServer', x=137.33, y=4.00, z=-715.46]]
	Chunk stats: MultiplayerChunkCache: 526, 526
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (137,4,-716), Chunk: (at 9,0,4 in 8,-45; contains blocks 128,0,-720 to 143,255,-705), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
	Level time: 319 game time, 319 day time
	Level dimension: 0
	Level storage version: 0x00000 - Unknown?
	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
	Forced entities: 4 total; [EntityPlayerSP['Player317'/20, l='MpServer', x=137.33, y=4.00, z=-715.46], EntitySlime['Slime'/11302, l='MpServer', x=204.91, y=4.00, z=-641.21], EntitySlime['Slime'/22118, l='MpServer', x=200.18, y=4.14, z=-650.34], EntitySlime['Slime'/13800, l='MpServer', x=216.95, y=4.33, z=-640.51]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2862)
	at net.minecraft.client.Minecraft.run(Minecraft.java:452)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_131, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1773013152 bytes (1690 MB) / 2491416576 bytes (2376 MB) up to 15262023680 bytes (14555 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.1.2601 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State     | ID             | Version      | Source                           | Signature |
	|:--------- |:-------------- |:------------ |:-------------------------------- |:--------- |
	| UCHIJAAAA | minecraft      | 1.12.2       | minecraft.jar                    | None      |
	| UCHIJAAAA | mcp            | 9.42         | minecraft.jar                    | None      |
	| UCHIJAAAA | FML            | 8.0.99.99    | forgeSrc-1.12.2-14.23.1.2601.jar | None      |
	| UCHIJAAAA | forge          | 14.23.1.2601 | forgeSrc-1.12.2-14.23.1.2601.jar | None      |
	| UCHIJAAAA | ancientmagicks | 0.0.1        | AncientMagicks                   | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 388.13' Renderer: 'GeForce GTX 1070/PCIe/SSE2'
	Launched Version: 1.12.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 1070/PCIe/SSE2 GL version 4.6.0 NVIDIA 388.13, NVIDIA Corporation
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fml,forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	Profiler Position: N/A (disabled)
	CPU: 8x Intel(R) Core(TM) i7-6820HK CPU @ 2.70GHz

 

I will attach the logs as well.

 

I have looked at exactly where it is happening and its showing: 

float[][] lightmap = quadData[lightmapIndex];

so quadData is smaller than lightmapIndex. I don't really know what would cause that and I don't  know enough about what's going on in this class to go further.

 

Heres the TESR:

Spoiler

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.obj.OBJLoader;

import java.util.HashMap;

public abstract class AncientMagicksTESR <T extends TileEntity> extends TileEntitySpecialRenderer<T>{

	private HashMap<ResourceLocation, IBakedModel> models;

	public AncientMagicksTESR(ResourceLocation... models) {
		this.models = new HashMap<>(models.length);

		for (ResourceLocation model : models) {
			this.models.put(model, null);
		}
	}

	public abstract void renderTileEntity(T te, double x, double y, double z, float partialTicks, int destroyStage, float partial, BufferBuilder buffer);

	@Override
	public void func_192841_a(T te, double x, double y, double z, float partialTicks, int destroyStage, float param) {
		GlStateManager.pushMatrix();
		GlStateManager.translate(x, y, z);

		this.renderTileEntity(te, x, y, z, partialTicks, destroyStage, partialTicks, Tessellator.getInstance().getBuffer());

		GlStateManager.translate(-x, -y, -z);
		GlStateManager.popMatrix();
	}

	public void renderModel(T te, ResourceLocation model, double xOffset, double yOffset, double zOffset, BufferBuilder buffer) {
		if (isModelPresent(model)) {
			GlStateManager.translate(xOffset, yOffset, zOffset);

			World world = te.getWorld();
			BlockPos pos = te.getPos();

			Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModel(
					world,
					getModelBaked(model),
					world.getBlockState(pos),
					pos,
					buffer,
					true

			);

			GlStateManager.translate(-xOffset, -yOffset, -zOffset);
		}
	}

	private boolean isModelPresent(ResourceLocation modelLoc) {
		return this.models.containsKey(modelLoc);
	}

	private IBakedModel getModelBaked(ResourceLocation modelLoc) {
		if (isModelPresent(modelLoc)) {
			if (this.models.get(modelLoc) == null) {
				IModel model;
				try {
					model = OBJLoader.INSTANCE.loadModel(modelLoc);
				} catch (Exception e) {
					throw new RuntimeException(e);
				}

				IBakedModel bakedModel = model.bake(
						model.getDefaultState(),
						DefaultVertexFormats.BLOCK,
						(resourceLocation) -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(resourceLocation.toString())
				);

				this.models.put(modelLoc, bakedModel);
			}

			return this.models.get(modelLoc);
		} else {
			return null;
		}
	}
}

 


import com.waffleman0310.ancientmagicks.client.renderer.tileentity.base.AncientMagicksTESR;
import com.waffleman0310.ancientmagicks.common.tileentity.TileEntityArcanistSmeltery;
import com.waffleman0310.ancientmagicks.util.AncientMagicksUtil;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;


@SideOnly(Side.CLIENT)
public class TileEntityArcanistSmelteryRender extends AncientMagicksTESR<TileEntityArcanistSmeltery> {

	public static final ResourceLocation SMELTERY_MODEL = AncientMagicksUtil.getModResource("models/block/multiblock/arcanists_smeltery.obj");
	//public static final ResourceLocation SMELTERY_REAGENT_MODEL = AncientMagicksUtil.getModResource("models/arcanist_smeltery_reagent.obj");

	public TileEntityArcanistSmelteryRender() {
		super(SMELTERY_MODEL);
	}

	@Override
	public void renderTileEntity(TileEntityArcanistSmeltery te, double x, double y, double z, float partialTicks, int destroyStage, float partial, BufferBuilder buffer) {
		renderModel(te, SMELTERY_MODEL, 0, 0, 0, buffer);
		/*
		renderModel(te, SMELTERY_REAGENT_MODEL, 0, 0, 0, buffer);
		renderModel(te, SMELTERY_REAGENT_MODEL, 0, 0, 0, buffer);
		renderModel(te, SMELTERY_REAGENT_MODEL, 0, 0, 0, buffer);
		*/
	}
}

 

 

 

Thanks in advance!

latest.log

Edited by WaffleMan0310
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Realizing I was a victim of a scam was a devastating blow. My initial investment of $89,000, driven by dreams of financial success and the buzz surrounding a new cryptocurrency project, turned into a nightmare. The project promised high returns and rapid gains, attracting many eager investors like myself. However, as time passed and inconsistencies began to surface, it became evident that I had made a grave mistake by not thoroughly vetting the brokerage company handling the investment. Feeling anxious and betrayed, I desperately searched for a way to recover my funds. It was during this frantic search that I stumbled upon the Lee Ultimate Hacker tool through a Facebook post. With little left to lose, I decided to reach out to their team for help. To my relief, they were quick to respond and immediately started recovering my compromised email and regaining access to my cryptocurrency wallets. The team at Lee Ultimate Hacker was incredibly professional and transparent throughout the process. They meticulously traced the digital footprints left by the scammers, employing advanced technological methods to unravel the complex network that had ensnared my funds. Their expertise in cybersecurity and recovery strategies gradually began to turn the tide in my favor. Although the scammers had already siphoned off $30,000 worth of Bitcoin, Lee Ultimate Hacker was relentless in their pursuit. They managed to expose the fraudulent activities of the scam operators, revealing their identities and the mechanisms they used to lure investors. This exposure was crucial not only for my case but also as a warning to the wider community about the perils of unverified investment schemes. As we progressed, it became a race against time to retrieve the remaining $59,000 before the scammers could vanish completely. Each step forward was met with new challenges, as these criminals constantly shifted tactics and moved their digital assets to evade capture. Nonetheless, the determination and skill of the recovery team kept us hopeful. Throughout this ordeal, I learned the hard value of caution and due diligence in investment, especially within the volatile world of cryptocurrency. The experience has been incredibly taxing, both emotionally and financially, but the support and results provided by Lee Ultimate Hacker have been indispensable. The recovery process is ongoing, and while the final outcome remains uncertain, the progress made so far gives me hope. The battle to recover the full amount of my investment continues, and with the expertise of Lee Ultimate Hacker, I remain optimistic about the eventual recovery of my funds. Their commitment to their clients and proficiency in handling such complex cases truly sets them apart in the field of cyber recovery. LEEULTIMATEHACKER@ AOL. COM   Support @ leeultimatehacker . com.  telegram:LEEULTIMATE   wh@tsapp +1  (715) 314  -  9248     
    • Hi everyone. I’m excited to share my experience with CrackerWizard Recovery Firm. They helped me recover a substantial amount of crypto after falling victim to online scams disguised as Bitcoin investments. CrackerWizard’s exceptional service enabled me to retrieve my lost funds, despite the complex circumstances surrounding the case. With their dedicated team and advanced technology, they swiftly traced and recovered my assets. CrackerWizard is a reliable partner in the crypto world, highly recommended for anyone facing similar challenges. Contact them.
    • So I saw that mixin is shipped as a library with forge, but is it available for 1.7.10 ?  
    • So I've read the EULA, and lets be straight...     If I split my modpack(of my mods, yeah I'm nuts) into several(many) individual mods(like just one boss) with minor additions(plus not working together), then have a complete/modpack version on patreon/onlyfans having each addon work together... Would people buy my idea?
  • Topics

×
×
  • Create New...

Important Information

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