sp614x / optifine

1.79k stars 418 forks source link

[Bug] Smooth World causes issues with some entities in chunkloader-loaded chunks #6369

Open themrrobert opened 2 years ago

themrrobert commented 2 years ago

Description of Issue

I've seen some posts about Smooth world already, but they aren't quite correct / accurate to this problem.

In a chunkloader-loaded chunk, most things work as they should, for example: redstone works, I have a redstone repeater with a clock and it runs just fine in the far-away chunk (thats loaded with a chunkloader). However, shulkers do not work. I ran some other tests a while back, and I know that most entity processing works, like minecarts and dropped items from droppers, but shulkers don't work.

Disabling Smooth world makes it work as expected, just like Vanilla, and these are not spawn chunks.

I can provide a World download if you tell me where to upload it. It's only 35MB zipped.

Steps to Reproduce

  1. Ensure Smooth world is off first.
  2. Go to 1000 / x / 1000 (far outside spawn chunks) and build a simple minecart/item chunkloader.
  3. Create 2 dummy scoreboards, one for the redstone clock, and one for the shulker. (See *1 in additional information)
  4. Create a redstone clock as shown in 4 pointed to a command block, with default settings, and code in 2 (place a redstone torch next to one of the redstone dusts and quickly break it to start the clock. If you leave it too long, the circuit is on permanently and won't work. You will have to break a redstone dust to break the circuit and try again)
  5. Place any block, then an observer on top of it with a string in front of it
  6. Place a command block behind the observer, with default settings, and command *3
  7. Places a shulker on the ground in front of the observer, so when it opens its shell, it contacts the string. (Pictured below)
  8. You should now see both counters.
  9. Teleport to spawn. Both counters should continue to increase.
  10. Turn on Smooth world, and you will see that the shulker counter no longer increases.

OptiFine Version

1.17.1 HD U G9

Installation Method

Standalone installer

Other Installed Mods

None

F3 Debug Screenshot

2021-11-07_19 24 58

Prior Testing

Additional Information

*1: Creating the objectives for counters.

/scoreboard objectives add redstoneclock dummy
/scoreboard objectives add shulker

*2: Redstone clock commandblock:

scoreboard players add dummyPlayer redstoneclock 1

*3: Shulker command block:

scoreboard players add dummyPlayer shulker 1

*4: Redstone clock: Place a redstone torch next to one of the redstone dusts and quickly break it to start the clock. If you leave it too long, the circuit stays on permanently and won't work. You will have to break a redstone dust to break the circuit and try again. image

Extra: Chunkloader (mirror on the nether side so its connected to the left-half of the portal on the nether side. Drop a minecart on the downslope to start it. ) The track next to the powered rail is a detector rail, and it's resting on a dispenser pointed towards the portal. Make sure the portals are linked properly, otherwise half of the portal may be out-of-reach and the minecart won't return. (The portal search is based on the precise entry point of the portal, so it's possible for 1 nether portal to go to different places in the overworld.) image Extra: Shulker counter layout. This can all be 1-block lower as per my description: (Don't forget the string! It's just in front of the server, you can see the partial block selected) image *Extra: Back at spawn with Smooth world enabled, you can see the redstone clock is still ticking, but the shulker no longer moves: 2021-11-07_19 28 08

Whitelisted1 commented 2 years ago

Passive mobs, such as cows, don't move when players are more than 50 blocks away from them I would assume this is also the case for hostile mobs, such as shulkers, so it isn't moving up and down, triggering the redstone signal

themrrobert commented 2 years ago

That is incorrect with regards to shulkers. They do move if the chunk is loaded. I will disable smooth world and post another screenshot from spawn so you can see. (I believe I mentioned this, but still helpful to show proof :) ) (Smooth world disabled makes it work like Vanilla. Again, this is not a spawn chunk, and you can tell the chunk is definitely loaded because the redstone functions. Also, entities must be being processed, otherwise the chunk wouldn't still be loaded because the chunkloader would fail.) 2021-11-07_19 37 08

Responding to:

Passive mobs, such as cows, don't move when players are more than 50 blocks away from them I would assume this is also the case for hostile mobs, such as shulkers, so it isn't moving up and down, triggering the redstone signal

Whitelisted1 commented 2 years ago

huh, sorry if I missed that I wouldn't know how to help then, but good luck trying to find a solution

themrrobert commented 2 years ago

No worries, thanks :) I just play without Smooth world, but it helps SOO much that I decided to do some extensive testing and really try and give the devs enough help to get it fixed.

huh, sorry if I missed that I wouldn't know how to help then, but good luck trying to find a solution