Posted April 15, 201510 yr Hi all, i'm here again . I did a custom rendering for a block ( a "smaller" lava block inside glass). The face are renderer correctly except for the light level. when i place a block on one of two particular face the lava texture become darker. I tried to set the light level of the block at the max, but doing this it always give the darker texture. in the spoiler i put some image. And these are my block and render class: Block: http://pastebin.com/btwt8xaC Render : http://pastebin.com/DqUTc5ZX Any idea?
April 15, 201510 yr Hmm... I've heard about this. Try setting your isOpaqueCube() in your block class to true. Correct me if I'm wrong, but this is going dark (I think) because the block is supposed to be opaque because it is only transparent until the lava inside, if that makes any sense.
April 15, 201510 yr Author Tried and nope, still texture is darker when i place a block on WEST or NORTH direction. I have also a crash when i surround it with block, but the crash report refer to vanilla code . Maybe it's that that is causing my "bug"? Crash Report: ---- Minecraft Crash Report ---- // Why did you do that? Time: 15/04/15 18.09 Description: Unexpected error java.lang.IllegalArgumentException at java.util.PriorityQueue.<init>(Unknown Source) at net.minecraft.client.renderer.Tessellator.getVertexState(Tessellator.java:189) at net.minecraft.client.renderer.WorldRenderer.postRenderBlocks(WorldRenderer.java:274) at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:230) at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.util.PriorityQueue.<init>(Unknown Source) at net.minecraft.client.renderer.Tessellator.getVertexState(Tessellator.java:189) at net.minecraft.client.renderer.WorldRenderer.postRenderBlocks(WorldRenderer.java:274) at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:230) at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1618) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1263) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player943'/0, l='MpServer', x=-95,07, y=57,62, z=-488,59]] Chunk stats: MultiplayerChunkCache: 169, 169 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-90,4,-488), Chunk: (at 6,0,8 in -6,-31; contains blocks -96,0,-496 to -81,255,-481), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Level time: 1627 game time, 1627 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: 1 total; [EntityClientPlayerMP['Player943'/0, l='MpServer', x=-95,07, y=57,62, z=-488,59]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555) at net.minecraft.client.Minecraft.run(Minecraft.java:980) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_40, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 832370800 bytes (793 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.82.1216 Minecraft Forge 10.13.1.1216 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.82.1216} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.1.1216-new.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.1.1216} [Minecraft Forge] (forgeSrc-1.7.10-10.13.1.1216-new.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available yesodmod{1.0.0} [Yesod Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel® HD Graphics GL version 2.1.0 - Build 8.15.10.2993, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. 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) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
April 15, 201510 yr Hmm... IllegalArgumentException. Change isOpaqueCude() back to false. I guess that wasn't the problem. It's just very odd that it would go dark. I don't know if this helps, but maybe Minecraft thinks the lava inside should be dark because normaly you aren't supposed to see the inside of a block. And if you placed blocks around a transparent block, it would go dark. Very very odd. Were you following a tutorial?
April 15, 201510 yr Author Yes and no. I watched here http://greyminecraftcoder.blogspot.it/2013/08/the-tessellator.html to have an idea of how to work with tassellator. I watched the code for renderStandardBlock, and it has a color multiplier in it. In fact if i place it in a standard superflat world, the texture become green-ish, and after placing a block near it become normal again. Maybe it's that? The strangest thing it's that the texture become darker only if you place a block at the west or north, other face are ok
April 15, 201510 yr Oh my, that's weird. I don't know why, but maybe it's going blackish with sandstone because sandstone is a type of rock. TheGreyGhost could answer this probably. I have no idea at this point.
April 15, 201510 yr In a flat world, the green is actually from a grass block, which is rendered right before it, and the color for the grass block still applies to your block. Try setting Tessellator#setColorOpaque_F(1F,1F,1F) . Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
April 15, 201510 yr Author In a flat world, the green is actually from a grass block, which is rendered right before it, and the color for the grass block still applies to your block. Try setting Tessellator#setColorOpaque_F(1F,1F,1F) . Ok so this actually works, thanks a lot. I still have the IllegalArgumentException crash when i put blocks around all the 6 faces. Any idea of why it crash?
April 15, 201510 yr The IllegalArgumentException comes from this constructor: public PriorityQueue(int paramInt, Comparator<? super E> paramComparator) { if (paramInt < 1) throw new IllegalArgumentException(); this.queue = new Object[paramInt]; this.comparator = paramComparator; } As you can see, it throws an IllegalArgumentException if paramInt is less then 1. The constructor is called from this line of of code: PriorityQueue priorityqueue = new PriorityQueue(this.rawBufferIndex, new QuadComparator(this.rawBuffer, p_147564_1_ + (float)this.xOffset, p_147564_2_ + (float)this.yOffset, p_147564_3_ + (float)this.zOffset)); So this.rawBufferIndex ( paramInt ) is less then 1. I don't know the cause of that, but it may help you. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
April 15, 201510 yr Author I try to understand what can be the problem, but i can't understand the cause. I think i'll put my code in a try catch code and see if it works anyway, at least till someone tell me what is the cause EDIT: I think it has something about the vertex. Since when you put block on all faces it has no face to render, the rawBuffer it's 0, since it has no vertex to "analyze". Still I don't know how to fix it
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.