MrCrayfish / MrCrayfishDeviceMod

A Minecraft Mod that adds in electronic devices that actually work
Other
79 stars 53 forks source link

API_SUGGESTION: Checking if router connected. #92

Open heyitsdoodler opened 6 years ago

heyitsdoodler commented 6 years ago

You should be able to check if the laptop is connected to a router and the connection status!

getRouterConnection() | Boolean

getRouterConnectionQuality() | int (returns 0-2, 0=BAD, 1=OK and 2=GOOD connection)

m00nwtchr commented 6 years ago

i would name the second thing getRouterSignalStrength(). also make it return actual signal strength (distance - baseStrengthOftTheRouter)

Ocelot5836 commented 6 years ago

That sounds a lot cooler. Can't you already do that by getting the pos of the laptop and the pos of the router and calculate it from there?

m00nwtchr commented 6 years ago

ye u can. That would be a helper method to make it easier for you