Jump to content

[1.11] Mirror not working


Kokkie

Recommended Posts

So I basicly copied MrCrayfish's furniture mods mirror code but my mirror doesn't mirror anything... I get no errors and nothing pops up in the console

My code (on a name called Egietje, I helped him make it but I lost contact and made a lot myself): https://github.com/KokkieBeer/DeGeweldigeMod/tree/master/src/main/java/com/Egietje/degeweldigemod

Classes: 94

Lines of code: 12173

Other files: 206

Github repo: https://github.com/KokkieBeer/DeGeweldigeMod

Link to comment
Share on other sites

As usual, I'm here to suggest setting breakpoints and stepping through your code (or discovering that something isn't even being called). You'll get more information to tell us so we know where to look.

 

Right now "not working" and "black thing" are too mysterious. *I* want to run your mod in my debugger, but I am too lazy to set that all up. Get in that debugger and find out what's really happening in there.

 

PS: Don't trust the console for rendering feedback. To see all warnings, you need to find the client's log file.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Guess number one. You need to register your RenderCheeseMirror, because it contains a RenderTickEvent.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Two suggestions:

 

1) Gather info from stepping through your code in the debugger. (Why are people so averse to getting into the debugger???) If that doesn't immediately show you what went wrong, then post updated code and tell us what you found out (e.g. what variable values you saw when you expected something else).

 

2) You'll get clearer images if you work in Minecraft daylight. I have my monitor brightness up at 97% and can barely tell that the mirror image is anything but black.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

I noticed that it actually works perfectly, it only zooms in really far and doesn't render me

 

The zoom might be due to the "size" of the render you're asking Minecraft to make (i.e. you might be asking for a 800x600 view and then it gets cropped down to fit the 64x64 pixel texture) and the lack of a visible player might be something that's troublesome to fix.  Your own avatar isn't natively rendered except in 3rd person mode (the hand you see in the corner is a GUI element, not actually your in-world entity model).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Looks like it's somehow catching the inside of the frame itself.  I would put the camera a quarter block forward away from where the mirror actually sits.  It'll be slightly less accurate (won't reflect anything right up against it) but it'll avoid the issue.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Your own avatar isn't natively rendered except in 3rd person mode...

 

Hence my original suggestion to start there looking for ideas. If Kokkie can find that code, then maybe players will appear.

 

BTW, does the mirror reflect any mobs at all? Maybe try spawning a creeper in creative mode to see if you can see its reflection.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.



×
×
  • Create New...

Important Information

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