0.12.5: plot borders are full-height walls with a checkered face, fixed in place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-11 08:15:06 +03:00
co-authored by Claude Opus 5.5
parent 98e61093df
commit 9102e0a1fb
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -814,7 +814,7 @@ hash = "db4c4a8ab49265f6e8e456f495800ea148b133b18a3242aabca30b98ab7f784f"
[[files]] [[files]]
file = "kubejs/client_scripts/createrp_plots.js" file = "kubejs/client_scripts/createrp_plots.js"
hash = "71277b8c947ed4c991c03a5051c5f18dd7c2535e1f09d151eb8b58a07f845404" hash = "9d7545f3d7ec5dba135363bdf05661aa898916b3cd23a4f185d7299415caaf9b"
[[files]] [[files]]
file = "kubejs/client_scripts/createrp_ponder.js" file = "kubejs/client_scripts/createrp_ponder.js"
+4 -4
View File
@@ -5,11 +5,12 @@
const RpOutliner = Java.loadClass('net.createmod.catnip.outliner.Outliner') const RpOutliner = Java.loadClass('net.createmod.catnip.outliner.Outliner')
const RpAABB = Java.loadClass('net.minecraft.world.phys.AABB') 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: 0xE05050, state: 0xFF9800 }
const SHOW_TICKS = 100 // 5 секунд після входу на ділянку const SHOW_TICKS = 100 // 5 секунд після входу на ділянку
const WALL_BELOW = 6 // рамка від 6 блоків нижче гравця… const WALL_BOTTOM = -64 // стіна межі стоїть на всю висоту світу й не рухається разом із гравцем
const WALL_HEIGHT = 18 // …на 18 блоків угору const WALL_TOP = 320
let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] } let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] }
let rpByChunk = {} // "cx,cz" -> індекс у rpPlots let rpByChunk = {} // "cx,cz" -> індекс у rpPlots
@@ -74,7 +75,6 @@ function rpDraw () {
if (here !== rpHere) { rpHere = here; if (here !== '') rpShowUntil = rpTick + SHOW_TICKS } 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' var holding = String(player.mainHandItem.id) === 'kubejs:citizen_guide' || String(player.offHandItem.id) === 'kubejs:citizen_guide'
if (!holding && rpTick >= rpShowUntil) return if (!holding && rpTick >= rpShowUntil) return
var y1 = Math.floor(player.y) - WALL_BELOW; var y2 = y1 + WALL_HEIGHT
var outliner = RpOutliner.getInstance() var outliner = RpOutliner.getInstance()
for (var i = 0; i < rpPlots.length; i++) { for (var i = 0; i < rpPlots.length; i++) {
var plot = rpPlots[i] var plot = rpPlots[i]
@@ -82,7 +82,7 @@ function rpDraw () {
var colour = PLOT_COLOR[plot.kind] || PLOT_COLOR.taken var colour = PLOT_COLOR[plot.kind] || PLOT_COLOR.taken
for (var w = 0; w < plot.walls.length; w++) { for (var w = 0; w < plot.walls.length; w++) {
var wall = plot.walls[w] var wall = plot.walls[w]
outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0], y1, wall[1], wall[2], y2, wall[3])).colored(colour).lineWidth(1 / 16) outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0], WALL_BOTTOM, wall[1], wall[2], WALL_TOP, wall[3])).colored(colour).lineWidth(1 / 16).withFaceTexture(RpTextures.THIN_CHECKERED).disableCull()
} }
} }
} }
+2 -2
View File
@@ -1,12 +1,12 @@
name = "Create RP" name = "Create RP"
author = "Pinecraft-CreateRP" author = "Pinecraft-CreateRP"
version = "0.12.4" version = "0.12.5"
pack-format = "packwiz:1.1.0" pack-format = "packwiz:1.1.0"
[index] [index]
file = "index.toml" file = "index.toml"
hash-format = "sha256" hash-format = "sha256"
hash = "68511d069113061d847426634977e0626d153ffff814682253cca36d8670ee6d" hash = "ecd5e7dbaa2f81ecac5cfb80cf6ccd9d4fd6af38fe6735ed313a5662c8ecedf1"
[versions] [versions]
minecraft = "1.21.1" minecraft = "1.21.1"