HalestormXV Posted August 16, 2015 Posted August 16, 2015 Hello there. I have another question that I am sure is just from my noobness to the modding world. However I cannot seem to find the answer via searching. I have created a custom portal that will take the player to a custom dimension that I have created. Everything works wonderfully thus far. However there is one issue that I cannot seem to figure out, and i KNOW it most likely has something to do with either my portal block class or the block that is used to outline the portal. Here is my problem: Here is my stone block class (the block that outlines the portal that seems to be having the issue) - http://pastebin.com/7SUMba7w Here is my portal block class (I don't think the problem lies in here, because if I switch to a vanilla block like stone bricks or stone, that error doesn't occur) - http://pastebin.com/qe1C4tU3 Or perhaps I am totally wrong and it is the portal block class because I am rendering sides wrong or something like that. So once again any help is greatly appreciated. I promise I am not just "looking for answers" I really want to look for answers and learn. I have really grown to like modding and want to perfect it to the best of my ability. So thank you in advanced. Quote
TheGreyGhost Posted August 16, 2015 Posted August 16, 2015 Hi I looked in your code for the obvious problems and they look ok; I suggest you create a test world with a single CelStone next to a single BlockModPortal, put a breakpoint into CelStone.shouldSideBeRendered() and step out into vanilla to see what's going on. -TGG Quote
HalestormXV Posted August 16, 2015 Author Posted August 16, 2015 Outstanding help. I didn't think to use the breakpoint but it pointed out the issue almost immediately to me. I would have never thought an issue would be related to conflicting light levels. Now perhaps this is because I am a total noob to modding but what appears to be happening was that yes it was returning true as it should but then it went on to execute RenderBlocks.renderStandardBlockWithAmvientOcclusion here: http://pastebin.com/WMk0MdPV Now for whatever reason that does not like light levels coming off of blocks. Or perhaps the light levels of the portal were conflicting with the light levels of the block. So how did I fix it? //this.setLightLevel(0.6F); in the CelStone class. And it works just fine now. But I am curious. Any idea as to why that would happen or why they "fight" like that? I ask purely for knowledge sake. I mean a light level of .6 is hardly noticed next to my portal light level anyway but I am curious. Could it perhaps also be remedied by not allowing any light to pass through the celStone since the light itself seemed to cause the issue. Quote
Recommended Posts
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.