From 8dc71e8934b65d2fe750e7ae561deaeda29f2167 Mon Sep 17 00:00:00 2001 From: Fulldroper <40297614+Fulldroper@users.noreply.github.com> Date: Sun, 11 Oct 2026 09:34:32 +0300 Subject: [PATCH] =?UTF-8?q?0.13.1:=20border=20colours=20=E2=80=94=20reserv?= =?UTF-8?q?ed=20red,=20road=20orange=20/=20blue=20when=20built;=20entering?= =?UTF-8?q?=20a=20plot=20detected=20by=20numbers,=20not=20string=20keys?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- index.toml | 4 ++-- kubejs/client_scripts/createrp_plots.js | 15 +++++++++++---- kubejs/client_scripts/createrp_ponder.js | 3 ++- pack.toml | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/index.toml b/index.toml index 9f2ff61..4177332 100644 --- a/index.toml +++ b/index.toml @@ -814,11 +814,11 @@ hash = "db4c4a8ab49265f6e8e456f495800ea148b133b18a3242aabca30b98ab7f784f" [[files]] file = "kubejs/client_scripts/createrp_plots.js" -hash = "8597716263518bdea8748e7f8b2bb54475207462f653a7a93a353b74a8aa8aa0" +hash = "4efdcd2dca1e5c3baa1ac523803ecbe86b93079d56be93f86c96a070a1d29c5f" [[files]] file = "kubejs/client_scripts/createrp_ponder.js" -hash = "92bd775a6ac69edbf04215f596d2abef1591ef7bc2cd4bd5cf5c9a6162015956" +hash = "335b88e6d4ba4885ad5a8dd0e7d05a9d4a507523f3a5723afb4c31123b2f532c" [[files]] file = "kubejs/client_scripts/createrp_survey.js" diff --git a/kubejs/client_scripts/createrp_plots.js b/kubejs/client_scripts/createrp_plots.js index f526a41..1bd93e5 100644 --- a/kubejs/client_scripts/createrp_plots.js +++ b/kubejs/client_scripts/createrp_plots.js @@ -7,7 +7,10 @@ const RpOutliner = Java.loadClass('net.createmod.catnip.outliner.Outliner') const RpAABB = Java.loadClass('net.minecraft.world.phys.AABB') const RpTextures = Java.loadClass('com.simibubi.create.AllSpecialTextures') -const PLOT_COLOR = { mine: 0x4FC3F7, free: 0x66DD66, auction: 0xFFD54F, taken: 0xB0B0B0, frozen: 0xE05050, state: 0xFF9800 } +// своя — блакитна, вільна (лот) — зелена, чужа — сіра, аукціон — жовта, заморожена — фіолетова; +// державна: резерв — червона, дорога — помаранчева (не збудована) і синя (збудована), шахта — коричнева +const PLOT_COLOR = { mine: 0x4FC3F7, free: 0x66DD66, auction: 0xFFD54F, taken: 0xB0B0B0, frozen: 0x9C27B0, + reserved: 0xE53935, road: 0xFF9800, road_built: 0x2F6BFF, state_mine: 0x8D6E63, state: 0xE53935 } const SHOW_TICKS = 100 // 5 секунд після входу на ділянку const WALL_BOTTOM = -64 // стіна межі стоїть на всю висоту світу й не рухається разом із гравцем const WALL_TOP = 320 @@ -61,7 +64,7 @@ NetworkEvents.dataReceived('createrp_plots', event => { cells.push([Number(xz[0]), Number(xz[1])]) byChunk[Number(xz[0]) + ',' + Number(xz[1])] = plots.length } - plots.push({ id: f[0], kind: f[1], walls: rpWalls(cells) }) + plots.push({ id: f[0], kind: f[1], cells: cells, walls: rpWalls(cells) }) } rpPlots = plots; rpByChunk = byChunk }) @@ -71,8 +74,12 @@ function rpDraw () { var player = Client.player if (!player) return rpTick++ - var idx = rpByChunk[Math.floor(player.x / 16) + ',' + Math.floor(player.z / 16)] - var here = idx === undefined ? '' : rpPlots[idx].id + var cx = Math.floor(player.x / 16); var cz = Math.floor(player.z / 16) + var here = '' + for (var n = 0; n < rpPlots.length && here === ''; n++) { + var cells = rpPlots[n].cells + for (var k = 0; k < cells.length; k++) if (cells[k][0] == cx && cells[k][1] == cz) { here = rpPlots[n].id; break } + } if (here !== rpHere) { rpHere = here; if (here !== '') rpShowUntil = rpTick + SHOW_TICKS } var holding = String(player.mainHandItem.id) === 'kubejs:citizen_guide' || String(player.offHandItem.id) === 'kubejs:citizen_guide' if (!holding && rpTick >= rpShowUntil) return diff --git a/kubejs/client_scripts/createrp_ponder.js b/kubejs/client_scripts/createrp_ponder.js index 0f1e186..d97ab9c 100644 --- a/kubejs/client_scripts/createrp_ponder.js +++ b/kubejs/client_scripts/createrp_ponder.js @@ -266,7 +266,8 @@ function landScene(scene, util) { say(scene, 70, 'Бури Create теж копають лише з дозволом', [3.5, 2, 3.5]) say(scene, 70, 'Візьми довідник у руку — побачиш межі ділянок', [2.5, 2.5, 2.5], PonderPalette.BLUE, true) - say(scene, 70, 'Блакитна рамка — твоя, сіра — чужа, помаранчева — державна', [2.5, 2.5, 2.5]) + say(scene, 70, 'Блакитна межа — твоя, сіра — чужа, червона — державна', [2.5, 2.5, 2.5]) + say(scene, 70, 'Дорога: помаранчева — ще будується, синя — готова', [2.5, 2.5, 2.5]) } // --------------------------------------------------------------------------------------------- diff --git a/pack.toml b/pack.toml index 12415a2..327fe45 100644 --- a/pack.toml +++ b/pack.toml @@ -1,12 +1,12 @@ name = "Create RP" author = "Pinecraft-CreateRP" -version = "0.13.0" +version = "0.13.1" pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "e824a0654a6fc476ad57a5f93d80a91334000016697d1d25f1e41d980a495ab0" +hash = "f3e15d8ad0a056c06329546314d374d165bb6cb3218c1e2de8e1cb62badcda5b" [versions] minecraft = "1.21.1"