add first patch

This commit is contained in:
2026-07-31 10:34:32 +09:00
parent 03aac2e45e
commit b1cbc6c78d
6390 changed files with 547430 additions and 0 deletions
@@ -0,0 +1,46 @@
console.info("[SOCIETY] checkTapper.js loaded");
BlockEvents.rightClicked(["society:tapper", "society:auto_tapper"], (e) => {
const { level, block, player, server, hand } = e;
if (hand == "OFF_HAND") return;
let errorText;
const attachedBlock = global.getTapperLog(level, block);
if (global.hasMultipleTappers(level, block)) {
errorText = Text.translatable(
"block.society.tapper.too_many_tapper"
).toJson();
}
if (!attachedBlock.hasTag("society:tappable_blocks")) {
errorText = Text.translatable(
"block.society.tapper.invalid_block"
).toJson();
}
if (errorText) {
global.renderUiText(
player,
server,
{
tapperMessage: {
type: "text",
x: 0,
y: -90,
text: `${errorText}`,
color: "#FF5555",
alignX: "center",
alignY: "bottom",
},
tapperMessageShadow: {
type: "text",
x: 1,
z: -1,
y: -89,
text: `${errorText}`,
color: "#000000",
alignX: "center",
alignY: "bottom",
},
},
global.mainUiElementIds
);
}
});