Advanced Peripherals

Advanced Peripherals

29M Downloads

Environment Detector detects thunder storms when just raining.

Galbi3000 opened this issue ยท 1 comments

commented

Description

The isThunder() function of the Environment Detector block returns true when it's raining but there is no thunder storm.

I am using the Feed The Beast mod pack called "FTB Presents Direwolf20 1.18" which uses version 1.18.2-0.7.16b of the mod but I have manually changed to 1.18.2-0.7.19r (not included in the version selection drop box below) to see if the bug persists, which it does.

Steps to reproduce

  1. Place a computer beside an environment detector block.
  2. In the computer write a Lua script to detect the state of the weather:
local detector = peripheral.find("environmentDetector") -- Finds the peripheral if one is connected
if detector == nil then error("environmentDetector not found!") end

term.clear()

while true do
  local timer = os.startTimer(1)
  local event, id
  repeat
    event, id = os.pullEvent("timer")
  until id == timer

  term.setCursorPos(1,1)  
  if detector.isRaining() then
    if detector.isThunder() then
      term.write("A Thunder Storm!    ")
    else
      term.write("It's raining        ")
    end
  else
    term.write("The weather is clear")
  end
end
  1. Run the script.
  2. In Minecraft control prompt type: weather clear
  3. In the computer you will see it says the weather is clear.
  4. Set the weather to rain with the Minecraft command: weather rain
  5. In the computer you will see it says there is a thunder storm!

Multiplayer?

Yes

Version

1.18.2-0.7.19r

Minecraft, Forge and maybe other related mods versions

Forge 40.1.69 Minecraft 1.18.2

Screenshots or Videos

No response

Crashlog/log

No response

commented

Only fixed in 1.19, need a fix in 1.18 too.