跳到正文

Sable: Sublevel Detection

作者:GreyTSS

Adds a sensor that provides redstone feedback to whether or not the Sable sublevel it is placed on is occupied by a player. CC: Tweaked compatibility adds advanced functions.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Sable: Sublevel Detection

Dead Man’s Switch

Sable 2.0.0+ Required (Tested 2.0.5)

This mod adds a new redstone component called the “Occupancy Sensor.” This sensor, when placed on a Sable sublevel, provides Redstone signal if any player is occupying that sublevel. The sensor can also be inverted with an empty-handed right-click, to provide a redstone signal when a sublevel is unoccupied.

Occupancy Sensor

This mod was developed around the concept of a Dead Man’s Switch. Simply place the Occupancy Sensor next to a clutch, providing rotational power to your mode of propulsion, and set it to inverted mode. Now when you leave the vessel, it will register as unoccupied and the redstone signal from the sensor will shut off power from your engine.

While this may seem simple, the possibility for usage goes deeper than it seems, especially when augmented with the optional CC: Tweaked support. If CC: Tweaked is installed, you can wrap the occupancy sensor through the Peripheral API and gain access to 5 new functions in CraftOS.

• getOccupancyCount() – Returns an integer of how many players are currently occupying the sublevel.
• getOccupantsNames() – Returns a table containing every occupant’s in-game name.
• getOccupantsUUIDs() – Returns a table containing every occupant’s UUID.
• getInversionState() – Returns a boolean denoting whether the sensor is currently inverted.
• setInversionState(boolean) – Alters the inversion state of the sensor.

Using these functions, this sensor transcends simple redstone logic and allows you to use sublevels as a way to query regional game state, automating logistics based on if someone is present and who.

A few examples of this could be:

• A Create: Coasters Simulated rollercoaster that automatically starts a countdown once a specified amount of passengers have boarded

• A cafe that keeps track of new customers waiting to be tended to.

• A parkour course with platforms that start to move as a player lands on them.

• A cockpit whose door only opens once the Captain’s UUID is present on board.

• A home where every room’s floor is a unique sublevel, allowing a security system to tell you exactly what room an intruder is in.

There are plenty of vessel protocols, minigames, home automations, and roleplay applications that are opened up by this little block.

This is my first mod ever, and as such, there may be some unforeseen bugs. Please provide any relevant details, screenshots, videos, or steps to reproduce it in a GitHub ticket should you stumble across one.

常见问题

Sable: Sublevel Detection 支持哪些 Minecraft 版本?

Sable: Sublevel Detection 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Sable: Sublevel Detection 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分