sp614x / optifine

1.8k stars 418 forks source link

Invisible hostile mobs. #1892

Closed Numpty-Clodpole closed 3 years ago

Numpty-Clodpole commented 6 years ago

Edit as of 31 January 2021:

So, I've started poking around in Minecraft again, and this issue is still occurring in 1.16.5 for me. I exclusively play on servers (running the 'Paper' server software), and this is where I encounter invisible mobs.

According to the 72 (wow! o.o) comments on here, it seems this never stopped being an issue.

Right now I'm using these:

image

The issue is still as infrequent as ever, and annoying to reproduce. I'm currently unable to intentionally make it happen, but it happens when I really don't want it to... funny how the world works like that, lol.

Looks like there's another large thread (#5006) from 6 November 2020, where people are experiencing it as well.


Edit as of 03 August 2020:

I have not actively played Minecraft since I reported this issue, but based on the infrequent comments which keep reconfirming it, it's likely still an issue.

Please read through all the comments on this before replying. If at all possible, try to provide the same information sp614x asked of me when/if you do comment. This is important.

Since I am inactive on this, it may even be worth opening your own issue for it. I'm not really sure what sp614x's policy on this is.


Original submission on 12 October 2018:

This has affected all versions of the 1.13.1 previews, from alpha, through beta, and now in pre5. I am not the only one experiencing it, as others have asked me if it has been fixed yet.

Invisible zombie in OptiFine 1.13.1 pre5, with it attacking me and subtitles showing it's there: https://giant.gfycat.com/NeglectedCarefulJohndory.webm

Visible zombie in vanilla; same exact spot: https://giant.gfycat.com/ClutteredMildGrizzlybear.webm

The bug is random, and sometimes mobs are visible, other times they're not. In vanilla, it never occurs and all mobs are always visible. This is also not limited to servers; it happens in single player, and only with OptiFine. In my opinion, this is a rather game-breaking bug since I almost exclusively play Survival.

All needed information can be seen in both of the above webms, I have my F3 menu open, which displays hardware, game version, etc.

Side note: If you'd rather I use a different file host for the two webms (like YouTube) let me know. I know that not everyone is aware of Gfycat, so it can look like a sketchy link.

sp614x commented 6 years ago

Does this happen with the default resource pack?

sp614x commented 6 years ago

Resource packs can use Random Entities to assign custom textures to mobs. They can also assign partially or fully transparent textures to mobs. For example to simulate missing limbs or invisible mobs. Vanilla doesn't recognize the Random Entities configuration, so it always shows the default skin.

Numpty-Clodpole commented 6 years ago

Yes, sorry @sp614x. It happens without any resource packs as well. Here's one I recorded without one enabled: https://giant.gfycat.com/AlarmingEmptyArthropods.webm

To force it to happen, I can just repeatedly log out and back in, or '/spawn' and '/back' until it turns invisible. For single player, I can just leave and exit the world or leave the chunks it's in and come back. It may take a few tries, but it will happen.

Edit: I'd also like to note that the resource pack I was using (Faithful 32x) does not have extra textures for random mobs. Only one texture per mob (a 32x32 resolution texture of the default texture), so I don't think it would have mattered if I used Faithful.

Numpty-Clodpole commented 6 years ago

Okay, @sp614x. Here's a proper video showing that it still occurs in the full release - OptiFine_1.13.1_HD_U_E3:

https://www.youtube.com/watch?v=HvabxTuvVJQ

Again, no texture packs whatsoever. I open the texture pack menu to prove this, then logout/login a few times to attempt to make it become visible. Ended up having to just unload the chunks and then return. If it were related to the "random mobs" feature, then this would not happen in vanilla textures. Unless I'm mistaken, and I have them enabled somehow regardless.

Now all this said - I never get random invisible hostiles like this without OptiFine. As soon as I stop using it, hostiles are always visible at all times. Even with texture packs. So, please tell me how to fix this if you are not experiencing it, because it is a game breaking issue in survival.

mattebad commented 6 years ago

Hey I just wanted to piggy back off what @Quavelen said @sp614x . I'm experiencing the same thing, at first it was just partial mob invisibility, mostly only on spiders. Just updated to the full release of optifine for 1.13 and I'm experiencing nearly 90% invisible mobs. Turning shaders off and restarting. Same deal. Turning both resource pack and shaders off (Chroma Hills, and Continuum). Same deal. Mobs fully invisible.

I waited for morning to roll around and I couldn't even see them burn, but could hear them burning and saw them drop loot. The server I'm playing on even has a health bar plugin that shows entity health, and none of the mobs I heard near me had health bars on them which is quite weird, even though they're invisible I would have thought that would have worked.

I just want to confirm that yes, this is a issue, and it started from updating from pre-7 to the full release of 1.13

Edit: If I restart the game enough and wait a day, it seems the invisible mobs phase out over the span of the next day. I made sure to test this with shaders and resource packs on and off. It's not clear what causes this as it happened even with both off and on.

sp614x commented 5 years ago

Some errors in error log or the game output? Can you post steps to reproduce it, for example: new world seed ABC, go to X,Y,Z, spawn zombie, etc.?

mattebad commented 5 years ago

As far as I can tell in terms of reproducing it, it occurs at random (First time start after updating to 1.13 optifine). But when it does, it stays like that even after a full restart of the launcher and minecraft itself multiple times. Only after restarting and rejoining the server multiple times, as well as waiting for a full day, will it fix itself somehow. This is on a friends server that has had no issues, as well as locally in my world. From what I can figure out, the mobs don't seem to be physically loaded into the game as no health shows up, nor am I able to hit/damage the mob, but it can damage me. So I don't think it's a texture issue, otherwise, I could damage the mob or see it's health.

Even more weird, is that, waiting a full day has the mobs killed off, and when they respawn during the next night, they work fine consistently and I don't have any issues following that.

Numpty-Clodpole commented 5 years ago

@sp614x it's exactly as @mattebad described. There is nothing in the launcher log/game output to imply it's an error. The mobs - when they turn invisible - are completely impervious. You cannot hit them, even if you trap them and repeatedly attack the same spot. I actually showed you this in one of the above webms above; you can see me attacking the area where the zombie is trapped.

(Edit: Using a bow will kill them, as will thorns enchantment. Other attacks will not.)

Reproducing it is fairly easy, but as stated the issue is entirely random. To reproduce or fix it, just repetitively log out/in, and load/unload the chunks until you get an invisible/visible mob. It will eventually happen, but it takes a few attempts.

sp614x commented 5 years ago

Does it depend on Video Settings -> Quality -> Random Entities -> ON / OFF ?

Numpty-Clodpole commented 5 years ago

@sp614x Just tested that for you, with it off, and no. They still turn invisible. All previous attempts were with it turned on.

Edit - Proof for you with that option turned off: https://giant.gfycat.com/LinearLeanGordonsetter.webm

sp614x commented 5 years ago

May be related: https://www.reddit.com/r/Minecraft/comments/9plwrn/optifine_buggy/

abungato commented 5 years ago

I am also experiencing this issue when using the latest OptiFine install. Zombie and spider mobs are invisible and I cannot attack them.

peaktogooo commented 5 years ago

Still happening in Lastest optifine, & lastest pre version

Invisible Phantom hitted me with only sound ;_;

Numpty-Clodpole commented 5 years ago

Likewise, still happening on the 1.13.2 pre2 for me.

sp614x commented 5 years ago

Looks like the mobs are not loaded client-side at all, they only exist in the (integrated) server. This is why they can't be hit (hit detection is client-side), but the player can be damaged (server-side check) and they produce noises (server initiated).

Numpty-Clodpole commented 5 years ago

Looks like the mobs are not loaded client-side at all, they only exist in the (integrated) server. This is why they can't be hit (hit detection is client-side), but the player can be damaged (server-side check) and they produce noises (server initiated).

Yay! Does this mean you know how to fix it? I'm really looking forwards to not having random invisible mobs any more, lol.

sp614x commented 5 years ago

With render distance 2, are the invisible mobs shown in the debug info as entities?

image

Numpty-Clodpole commented 5 years ago

Nope, it shows as zero:

invisible

visible

sp614x commented 5 years ago

Can you repeat the same test with full debug screen (F3)?

Numpty-Clodpole commented 5 years ago

Yup, here you go:

invisible

visible

sp614x commented 5 years ago

The total number of entities is different 245 vs 368.

image image

This could mean that the entities are not skipped when rendered, but really not loaded. Can you check if the total number of entities is significantly lower when mobs are invisible?

Can you post the full error log or game output (Launcher -> Settings -> Open output log when game starts)? Interesting is the game output when the mobs are invisible.

Numpty-Clodpole commented 5 years ago

Well, if I correctly understand how Spigot works (I probably don't <.<), un-name tagged hostile mobs are despawned when the chunks are unloaded. I was repeatedly using '/back' to teleport between spawn chunks, and the area where that named zombie was held. So that number could simply be the difference between mobs that were despawned when I teleported.

sp614x commented 5 years ago

These are the client total entities. They can only exist in chunks loaded by the client, which are limited by the render distance. The server may keep more entities loaded, but they shouldn't be sent to the client when they are outside the chunk render distance.

The difference may be due to despawning/spawning, therefore can you check if the difference is consistent and unvisible mobs always has significantly less total mobs or not.

Numpty-Clodpole commented 5 years ago

Is this (invisible mobs) something you can fix, though? I don't understand how the stuff works; I just know it only happens with OptiFine.

sp614x commented 5 years ago

So far I can't reproduce the invisible mobs. No amount of load, unload, teleport, etc. can create unvisible mobs. The problem can be fixed if I can reproduce it and see exacly what happens. The only clue so far is that you have an 8 core CPU, so it may be some kind of race condition when loading chunks. In the game output or the error log there may be some info about what may be wrong.

ghost commented 5 years ago

I'm getting this on 1.12.2 as well.

IntelMiner commented 5 years ago

I'm getting this on 1.13.2-OptiFIne_HD_U_E4 as well

elkala commented 5 years ago

I have the same problem, it happened to me with a zombie and a spider, same game and optifine version as @IntelMiner

sp614x commented 5 years ago

This can only be fixed if it is reliably reproducible. For example "make a new world with seed ABC, at coord XYZ there is an invisible zombie" or something similar.

Numpty-Clodpole commented 5 years ago

Well @sp614x, could you try testing on a spigot server? That's where I mainly see them. Since opening this issue, I haven't been able to get invisible mobs in single player; only with OptiFine on a Spigot server. This is despite vividly recalling them being invisible in single player.

Just to reiterate:

I'm also not sure if this requires certain plugins, or if it can just be Spigot by itself (or other server software). I will try spigot by itself right now, though.

Edit: Nope. Can't get anything to be invisible with a freshly launched locale spigot server with all defaults and no plugins. I've a sneaking suspicion it might somehow be related to what you mentioned above - a client and server desync. Meaning, mobs are there server-side but the client doesn't register them. Which means it would only happen on a server that isn't fast enough or whatever to keep up with the client, or vice versa.

What I don't get though, is why it only happens with OptiFine and not vanilla.

sp614x commented 5 years ago

Probably related: https://bugs.mojang.com/browse/MC-65040

Restioson commented 5 years ago

Exact same behaviour here, except I can see skeletons. 1.13.2 latest optifine release on a vanilla 1.13.2 server

ScionNinja14 commented 5 years ago

Same issue here. Once I found the invisible mob, I relaunched Minecraft without optifine and then the zombie was actually visible, and I could interact with it. To make sure simply relaunching didn't fix the issue, I went and found another invisible mob and then relaunched with optifine and the mob was still invisible. Is there any fix for this soon? Getting real annoying dying to invisible creepers.

sp614x commented 5 years ago

@ScionNinja14 single-player or multiplayer (which server)?

ScionNinja14 commented 5 years ago

@sp614x its in a spigot multiplayer.

sp614x commented 5 years ago

Is there a specific server where I can test this?

ScionNinja14 commented 5 years ago

@sp614x is there a way to private dm the IP? i dont want to release the server publicly

sp614x commented 5 years ago

Looks like a Spigot problem. Maybe the mobs are not initialized properly on the server side or some of their information is missing. It can be analyzed further if there is a server with a trapped invisible mob for testing.

mattebad commented 5 years ago

I've actually had this issue on a local install once, but I feel that's a totally different issue on my end since the majority of the time, yes, it's on a server I host or my friends host, although it seems to happen at random. I could never get it to replicate, even running similar background programs and overclocks.

On Tue, Jan 15, 2019 at 6:48 PM sp614x notifications@github.com wrote:

Looks like a Spigot problem. Maybe the mobs are not initialized properly on the server side or some of their information is missing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sp614x/optifine/issues/1892#issuecomment-454595834, or mute the thread https://github.com/notifications/unsubscribe-auth/AqOn-RK7CVusQQTZ9fqWft92wwjtBWPxks5vDmi8gaJpZM4XZz5M .

Restioson commented 5 years ago

It is not only a spigot problem - I have experienced this on a vanilla sever.

mattebad commented 5 years ago

Same here, the server it happened to me on a while back was vanilla, as well as switching over to my local world which was tested with and without my resource pack and shader.

On Wed, Jan 16, 2019, 2:46 PM Restioson <notifications@github.com wrote:

It is not only a spigot problem - I have experienced this on a vanilla sever.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sp614x/optifine/issues/1892#issuecomment-454914203, or mute the thread https://github.com/notifications/unsubscribe-auth/AqOn-SJB0M0yLMzQ2wMwVOxz8AM_OA7nks5vD4GEgaJpZM4XZz5M .

TboneH commented 5 years ago

It seems to me that it happens most often when I log out near hostile mobs. The hostile mobs that were around when I logged off don't correctly load back in and are invisible. Passive mobs seem unaffected(?). For reference, this is a vanilla 1.13.2 server. Dying to invisible creepers is really frustrating!

Sliminconcoova commented 5 years ago

Although not attacked I noticed something invisible leading two lama's into my base...I didn't record any details before killing what ever it was. I do have bad omen which may attract illusionists which can be invisible?

Looking into my stats, I have killed one wondering trader...which I hadn't realized was a thing. So for me it was that.

DataCrusade commented 5 years ago

Although not attacked I noticed something invisible leading two lama's into my base...I didn't record any details before killing what ever it was. I do have bad omen which may attract illusionists which can be invisible?

Looking into my stats, I have killed one wondering trader...which I hadn't realized was a thing. So for me it was that.

Yup, Wandering Traders drink invisibility potions at night, no idea why anyone would think to attack them. Illusioners do not spawn in survival, theyre still creative only.

sp614x commented 5 years ago

The wandering trader is a 1.14 feature, there is still no OptiFine for 1.14. @Sliminconcoova Not related to OptiFine.

Jxsten commented 5 years ago

Was there ever a fix to this bug..? I am using OptiFine 1.13.2 HD U E7 on a 1.13.2 spigot server. I haven't tested it in vanilla, but this is such an annoying bug.. I cannot hit hostile mobs, or even see them.. I found out that you can light them on fire (I believe that I did anyways.. I wasn't in a controlled environment).

Cooliosity commented 4 years ago

@sp614x I recently started experiencing this exact issue and it started happening because the server owner of the server i play on increased the entity-tracking-range in the spigot.yml file. Since then I was trying to figure out the cause of the issue and it seems that Optifine is the reason for this happening as this issue does not occur when using a vanilla client.

johnvilsack commented 4 years ago

I've been experiencing this in single player.

abdbbdii commented 4 years ago

Hahaha so I have recently killed by Evoker (INVISIBLE Evoker) with no reason It was the first time I noted a BUG and after that It happen again and again with zombies, piglins, zombified piglins, creeper, spider, vindicator and skeletons. Version: OptiFine 1.16.1 HD U G2

abdbbdii commented 4 years ago

it is happening on even OptiFine 1.16.1 HD U G2!!!!!