Water Sensor
Water Sensor
The water sensor mod provides a robust, efficient, no-fuss water sensor that switches nearby levers on when water is next to it. I made this sensor to replace all other buggy, inefficient sensor types, such as the boats-on-pressure-plates sensor, or the CraftBook IC 0260, which needs to be registered with the CraftBook thread (making it incompatable with instance dungeon plugins like TempleCraft and DungeonBuilder.) Now we can all make water temples!
The sensor is made by placing a Lapiz Lazuli block (configurable) next to where water will flow, and then placing a lever next to the Lapiz block. When water flows next to the block, the lever will be turned on. When there is no more water next to the sensor block, the lever is turned off. Here's an example of how the sensor might be placed in a redstone system:
Code is hosted at https://github.com/Chrisknyfe/WaterSensor. I use maven to build the repository into a jar.
Features of the sensor:
- Detects water without those gorram glitchy boats.
- Robustness
- Creates no extra threads, allocates no extra memory.
- You don't have to register each sensor using a sign or a command
- Works with dungeon building plugins like DungeonBuilder and TempleCraft.
This is my first bukkit plugin ever. In the future, I'd like to add a light sensor and a lava sensor to the plugin as well.
Known Issues (both caused by me not having a robust way to detect water draining completely empty...):
- Flickering when water is draining next to the sensor.
- Sensor won't turn levers off if two water blocks drain next to the sensor at the same time.
- Doesn't detect still water? (unverified)
- Doesn't detect waterfalls.
Planned features:
- Lava sensor
- Light sensor
Let me know if you find any bugs, or have any further suggestions for simple sensors you think are missing from Minecraft.
Check out LiquidSensor for updates!
Pleas update the plugin, I can't use it. Every time I start the server it shows me that:
15:32:24 [SCHWERWIEGEND] Could not load 'plugins\WaterSensor-1.02.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bukkit/event/block/BlockListener at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:152) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:223) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:199) at net.minecraft.server.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:50) at net.minecraft.server.ServerConfigurationManager.<init>(SourceFile:11) at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:105) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:377) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: java.lang.NoClassDefFoundError: org/bukkit/event/block/BlockListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:44) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at net.chrisknyfe.watersensor.WaterSensor.<init>(WaterSensor.java:35) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148) ... 9 more Caused by: java.lang.ClassNotFoundException: org.bukkit.event.block.BlockListener at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:34) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 28 more
Thanks
can anyone update it? the watersensor is only going on, but not off :(ok forget it with a fork of chris latest repo it works fine
Updated WaterSensor: http:forums.bukkit.org/threads/abandoned-plugins-i-will-bring-them-up-to-date-for-you-help-required-updating-loads-to-do.62906/page-37#post-1032343
@nurwin22
I should get on that >_> it does work with 1.0.0 right now, but I should at least update the plugin and fix a couple of bugs. sssssoooooooooooon.
This plugin looks awesome.
Any 1.0.1-R1 support?
Awesome! Thank you, and do you know when/if you are gonna do the lava sensor? :)
Known issue get! Doesn't detect waterfalls. I'm pushing my server duties at mc.flyingislands.beastnode.org on to the other admins so I can clean up this plugin in the coming weeks.
WiiNinja, I didn't realize that the sensor didn't detect still water. I'll look into it (adding to know bugs list)
Hey, Nice mod. Can you make it so the sensor detects and acts on still water, as well as flowing water?
Uhm one question, are you busy on something or just ignoring me? :L lol, I should probably wait longer though. :P
So when do you will think the lava and light sensors will be up? Because I can't wait! :D
@skeletonofchaos
Fixed in version 1.02. Sorry about that, it was a debug feature I left in so I could check when water evaporated.
It seems to create snow blocks when the leve is turned off....