EnderIO icon indicating copy to clipboard operation
EnderIO copied to clipboard

Redstone Conduits are preventing chunks from being unloaded

Open LXGaming opened this issue 4 years ago • 6 comments

Issue Description:

Redstone Conduits are preventing chunks from being unloaded.

What happens:

EnderIO has checks in place to verify if a chunk is loaded but it lacks checks for if the chunk is queued for unload, when getBlockState is called it results in the chunk having its unloadQueued field set to false, This is preventing the chunk from being unloaded.

On a Forge server all Redstone Conduits will prevent chunks from being unloaded.

On a SpongeForge server only Redstone Conduits with a Redstone Sensor Filter will prevent chunks from being unloaded.

What you expected to happen:

EnderIO shouldn't be ticking conduits that are in chunks queued for unload.

Steps to reproduce:

Forge:

  1. Place a Redstone Conduit.

SpongeForge:

  1. Place a Redstone Conduit.
  2. Right click with a Yeta Wrench.
  3. Insert a Redstone Sensor Filter.

I disconnected from the server and used IntelliJ to set breakpoints so I could see what chunks were still loaded.


Affected Versions (Do not use "latest"):

  • EnderIO: 1.12.2-5.1.52
  • EnderCore: 1.12.2-0.5.73
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2847
  • SpongeForge? yes and no
  • Optifine? no
  • Single Player and/or Server? I've only tested this on a Dedicated Server

Your most recent log file where the issue was present:

Redstone Conduit Stacktrace (Forge):

getLoadedChunk:92, ChunkProviderServer (net.minecraft.world.gen)
loadChunk:107, ChunkProviderServer (net.minecraft.world.gen)
loadChunk:101, ChunkProviderServer (net.minecraft.world.gen)
provideChunk:147, ChunkProviderServer (net.minecraft.world.gen)
getChunk:374, World (net.minecraft.world)
getChunk:366, World (net.minecraft.world)
getBlockState:1007, World (net.minecraft.world)
neighborNotifyEvent:212, RedstoneConduitNetwork (crazypants.enderio.conduits.conduit.redstone)
notifyConduitNeighbours:191, RedstoneConduitNetwork (crazypants.enderio.conduits.conduit.redstone)
tickEnd:268, RedstoneConduitNetwork (crazypants.enderio.conduits.conduit.redstone)
onServerTick:57, ServerTickHandler (crazypants.enderio.base.handler)
invoke:-1, ASMEventHandler_124_ServerTickHandler_onServerTick_ServerTickEvent (net.minecraftforge.fml.common.eventhandler)
invoke:90, ASMEventHandler (net.minecraftforge.fml.common.eventhandler)
post:182, EventBus (net.minecraftforge.fml.common.eventhandler)
onPostServerTick:266, FMLCommonHandler (net.minecraftforge.fml.common)
tick:787, MinecraftServer (net.minecraft.server)
run:592, MinecraftServer (net.minecraft.server)
run:748, Thread (java.lang)

Redstone Conduit with Redstone Sensor Filter Stacktrace (SpongeForge):

getLoadedChunk:92, ChunkProviderServer (net.minecraft.world.gen)
redirect$zmg000$impl$ProvideChunkForced:145, ChunkProviderServer (net.minecraft.world.gen)
provideChunk:147, ChunkProviderServer (net.minecraft.world.gen)
getChunk:374, World (net.minecraft.world)
getChunk:366, World (net.minecraft.world)
getBlockState:1970, WorldServer (net.minecraft.world)
apply:15, ComparatorInputSignalFilter (crazypants.enderio.base.filter.redstone)
getNetworkInput:432, InsulatedRedstoneConduit (crazypants.enderio.conduits.conduit.redstone)
updateInputsForSource:114, RedstoneConduitNetwork (crazypants.enderio.conduits.conduit.redstone)
tickEnd:260, RedstoneConduitNetwork (crazypants.enderio.conduits.conduit.redstone)
onServerTick:57, ServerTickHandler (crazypants.enderio.base.handler)
invoke:-1, ASMEventHandler_145_ServerTickHandler_onServerTick_ServerTickEvent (net.minecraftforge.fml.common.eventhandler)
invoke:90, ASMEventHandler (net.minecraftforge.fml.common.eventhandler)
forgeBridge$post:253, EventBus (net.minecraftforge.fml.common.eventhandler)
post:203, EventBus (net.minecraftforge.fml.common.eventhandler)
onPostServerTick:266, FMLCommonHandler (net.minecraftforge.fml.common)
tick:787, MinecraftServer (net.minecraft.server)
run:592, MinecraftServer (net.minecraft.server)
run:748, Thread (java.lang)

LXGaming avatar Jan 11 '20 06:01 LXGaming