Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c9efc3b
Update zh_CN.lang
TickPoints Dec 7, 2025
f1ac680
Merge branch 'ForestOfLight:dev' into dev
TickPoints Dec 14, 2025
7dcd669
Don't force-off vibrant visuals
ForestOfLight Dec 14, 2025
a25c47c
add movement to debug display
ForestOfLight Dec 15, 2025
f968ca9
move TimeOfDay back to the same infodisplay line as WorldDay
ForestOfLight Dec 15, 2025
a3e6c41
add underwatermovement to debugdisplay
ForestOfLight Dec 15, 2025
9d480ef
add Horse to debugdisplay
ForestOfLight Dec 15, 2025
c14eeb1
Make dimension in infodisplay localized
ForestOfLight Dec 15, 2025
15ebb93
add potionBoostedBreeding
ForestOfLight Dec 16, 2025
3f1d141
fix entityInstantDeath not being instantiated
ForestOfLight Dec 24, 2025
a87b2a1
configure for Preview
ForestOfLight Jan 9, 2026
29097cd
render collisionBoxes and chunkBorders for only that player
ForestOfLight Jan 9, 2026
7ec751e
add: Japanese (ja_JP) translation
ru-in-1 Jan 21, 2026
0a84c10
Simplify Japanese translation terminology for hardcoded spawn points …
ru-in-1 Jan 21, 2026
0d00144
refactor: consolidate quickFillContainer translation keys using place…
ru-in-1 Jan 21, 2026
9e66d14
Merge branch 'ForestOfLight:dev' into dev
TickPoints Feb 1, 2026
701b6e6
update extension backend
ForestOfLight Feb 3, 2026
f8170ef
bump version to 1.5.3 & MC 1.26.10
ForestOfLight Feb 3, 2026
a728dd6
use attachedTo for debug display shape elements
ForestOfLight Jan 9, 2026
ec06c8d
Fix DebugBoxes for 1.26.10.21
ForestOfLight Feb 4, 2026
a8b8d86
Merge branch 'debugDisplayShapeElement-attachedTo' into dev
ForestOfLight Feb 4, 2026
9df79f8
/cs - make sure survival players are grounded
ForestOfLight Feb 7, 2026
5901e25
clear infodisplay when there is no data
ForestOfLight Feb 7, 2026
44702c5
catch edge cases for clearing the infodisplay when there is no data
ForestOfLight Feb 7, 2026
5c6509f
Merge branch 'ForestOfLight:dev' into dev
TickPoints Feb 9, 2026
785a529
Update `zh_CN.lang`
TickPoints Feb 9, 2026
d8f7f72
downgrade script dependency for MC 1.26.0
ForestOfLight Feb 10, 2026
b35d46a
continue downgrade to 1.26.0
ForestOfLight Feb 10, 2026
5d829ea
migrate height offset for debugdisplay text shape
ForestOfLight Feb 10, 2026
03a24c6
solve tests
ForestOfLight Feb 10, 2026
242dfc5
provide base for parseInt()
ForestOfLight Feb 10, 2026
42bce93
Merge pull request #68 from TickPoints/dev
ForestOfLight Feb 10, 2026
0d615c5
Merge pull request #67 from ru-in-1/main
ForestOfLight Feb 10, 2026
ea1951c
add Welsh and Japanese translation contribution credit
ForestOfLight Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,32 @@
{
"label": "regolith: watch",
"type": "shell",
"command": "regolith watch",
"command": "regolith watch default",
"isBackground": true,
"problemMatcher": {
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "."
}
},
"presentation": {
"echo": true,
"close": true
}
},
{
"label": "regolith: watch preview",
"type": "shell",
"command": "regolith watch preview",
"isBackground": true,
"problemMatcher": {
"pattern": [
Expand Down
10 changes: 5 additions & 5 deletions Canopy [BP]/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"format_version": 2,
"header": {
"name": "Canopy [BP] v1.5.2",
"name": "Canopy [BP] v1.5.3",
"description": "Technical informatics & features addon by §aForestOfLight§r.",
"uuid": "7f6b23df-a583-476b-b0e4-87457e65f7c0",
"version": [1, 5, 2],
"min_engine_version": [1, 21, 130]
"version": [1, 5, 3],
"min_engine_version": [1, 26, 0]
},
"modules": [
{
Expand All @@ -26,7 +26,7 @@
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "2.5.0-beta"
"version": "2.6.0-beta"
},
{
"module_name": "@minecraft/server-ui",
Expand All @@ -38,7 +38,7 @@
},
{
"uuid": "bcf34368-ed0c-4cf7-938e-582cccf9950d",
"version": [1, 5, 2]
"version": [1, 5, 3]
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions Canopy [BP]/scripts/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const PACK_VERSION = '1.5.2';
const MC_VERSION = '1.21.130.3';
const PACK_VERSION = '1.5.3';
const MC_VERSION = '1.26.0.2';

export { PACK_VERSION, MC_VERSION };
6 changes: 4 additions & 2 deletions Canopy [BP]/scripts/lib/MCBE-IPC/ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,18 @@ export var PROTO;
function Array(value) {
return {
*serialize(array, stream) {
const actualValue = typeof value === 'function' ? value() : value;
yield* PROTO.UVarInt32.serialize(array.length, stream);
for (const item of array) {
yield* value.serialize(item, stream);
yield* actualValue.serialize(item, stream);
}
},
*deserialize(stream) {
const actualValue = typeof value === 'function' ? value() : value;
const result = [];
const length = yield* PROTO.UVarInt32.deserialize(stream);
for (let i = 0; i < length; i++) {
result[i] = yield* value.deserialize(stream);
result[i] = yield* actualValue.deserialize(stream);
}
return result;
}
Expand Down
22 changes: 20 additions & 2 deletions Canopy [BP]/scripts/lib/canopy/Extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Command } from "./commands/Command";
import IPC from "../MCBE-IPC/ipc";
import { RegisterCommand, RegisterRule, RuleValueRequest, RuleValueSet, CommandCallbackRequest, Ready, RuleValueResponse } from "./extension.ipc";
import { BooleanRule } from "./rules/BooleanRule";
import { IntegerRule } from "./rules/IntegerRule";
import { FloatRule } from "./rules/FloatRule";

class Extension {
id = null;
Expand Down Expand Up @@ -77,7 +79,7 @@ class Extension {
}

setRuleValue(identifier, value) {
IPC.send(`canopyExtension:${this.id}:ruleValueSet`, RuleValueSet, { ruleID: identifier, value: value });
IPC.send(`canopyExtension:${this.id}:ruleValueSet`, RuleValueSet, { ruleID: identifier, value: String(value) });
}

runCommand(sender, commandName, args) {
Expand Down Expand Up @@ -107,7 +109,23 @@ class Extension {

#setupRuleRegistration() {
IPC.on(`canopyExtension:${this.id}:registerRule`, RegisterRule, (ruleData) => {
this.rules.push(new BooleanRule({ category: "Rules", ...ruleData }));
ruleData.extension = this;
switch (ruleData.type) {
case 'boolean':
ruleData.defaultValue = Boolean(ruleData.defaultValue);
this.rules.push(new BooleanRule({ category: "Rules", ...ruleData }));
break;
case 'integer':
ruleData.defaultValue = parseInt(ruleData.defaultValue, 10);
this.rules.push(new IntegerRule({ category: "Rules", ...ruleData }));
break;
case 'float':
ruleData.defaultValue = parseFloat(ruleData.defaultValue);
this.rules.push(new FloatRule({ category: "Rules", ...ruleData }));
break;
default:
throw new Error(`[Canopy] Could not register rule: ${ruleData.identifier}. Invalid data type.`);
}
});
}

Expand Down
30 changes: 20 additions & 10 deletions Canopy [BP]/scripts/lib/canopy/extension.ipc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
/* eslint-disable new-cap */
import { PROTO } from '../MCBE-IPC/ipc'

export const Ready = PROTO.Void;

const description = PROTO.Object({
const rawtext = PROTO.Object({
text: PROTO.Optional(PROTO.String),
translate: PROTO.Optional(PROTO.String),
with: PROTO.Optional(PROTO.Array(PROTO.String))
with: PROTO.Optional(PROTO.Array(PROTO.String)),
rawtext: PROTO.Optional(PROTO.Array(() => rawtext))
});

export const Ready = PROTO.Void;

export const RegisterExtension = PROTO.Object({
name: PROTO.String,
version: PROTO.String,
author: PROTO.String,
description: description,
description: rawtext,
isEndstone: PROTO.Boolean
});

export const RegisterCommand = PROTO.Object({
name: PROTO.String,
description: description,
description: rawtext,
usage: PROTO.String,
callback: PROTO.Optional(PROTO.Undefined),
args: PROTO.Optional(PROTO.Array(PROTO.Object({
Expand All @@ -30,17 +31,26 @@ export const RegisterCommand = PROTO.Object({
adminOnly: PROTO.Optional(PROTO.Boolean),
helpEntries: PROTO.Optional(PROTO.Array(PROTO.Object({
usage: PROTO.String,
description: description
description: rawtext
}))),
helpHidden: PROTO.Optional(PROTO.Boolean),
extensionName: PROTO.Optional(PROTO.String)
});

export const RegisterRule = PROTO.Object({
identifier: PROTO.String,
description: description,
description: rawtext,
defaultValue: PROTO.String,
contingentRules: PROTO.Optional(PROTO.Array(PROTO.String)),
independentRules: PROTO.Optional(PROTO.Array(PROTO.String)),
type: PROTO.String,
valueRange: PROTO.Optional(PROTO.Object({
range: PROTO.Optional(PROTO.Object({
min: PROTO.Float64,
max: PROTO.Float64
})),
other: PROTO.Optional(PROTO.Array(PROTO.Float64))
})),
extensionName: PROTO.Optional(PROTO.String)
});

Expand All @@ -49,12 +59,12 @@ export const RuleValueRequest = PROTO.Object({
});

export const RuleValueResponse = PROTO.Object({
value: PROTO.Boolean
value: PROTO.String
});

export const RuleValueSet = PROTO.Object({
ruleID: PROTO.String,
value: PROTO.Boolean
value: PROTO.String
});

export const CommandCallbackRequest = PROTO.Object({
Expand Down
2 changes: 1 addition & 1 deletion Canopy [BP]/scripts/lib/canopy/rules/FloatRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class FloatRule extends Rule {
valueRange;

constructor(options) {
options.defaulValue = options.defaultValue || 0;
options.defaultValue = options.defaultValue || 0;
super({ ...options });
this.valueRange = options.valueRange;
}
Expand Down
2 changes: 1 addition & 1 deletion Canopy [BP]/scripts/lib/canopy/rules/IntegerRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class IntegerRule extends Rule {
valueRange;

constructor(options) {
options.defaulValue = options.defaultValue || 0;
options.defaultValue = options.defaultValue || 0;
super({ ...options });
this.valueRange = options.valueRange;
}
Expand Down
15 changes: 8 additions & 7 deletions Canopy [BP]/scripts/lib/canopy/rules/Rule.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { world } from '@minecraft/server';
import { Rules } from "./Rules";
import { Extensions } from '../Extensions';

export class Rule {
#category;
Expand All @@ -12,17 +11,17 @@ export class Rule {
#extension;

constructor({ category, identifier, description = '', defaultValue = void 0,
contingentRules = [], independentRules = [], onModifyCallback = () => {}, extensionName = false }) {
contingentRules = [], independentRules = [], onModifyCallback = () => {}, extension = false }) {
if (this.constructor === Rule)
throw new TypeError("Abstract class 'Rule' cannot be instantiated directly.");
this.#category = category;
this.#identifier = identifier;
this.#description = this.#parseDescription(description)
this.#description = this.#parseDescription(description);
this.#defaultValue = defaultValue;
this.#contingentRules = contingentRules;
this.#independentRules = independentRules;
this.onModify = onModifyCallback;
this.#extension = Extensions.getFromName(extensionName);
this.#extension = extension;
Rules.register(this);
}

Expand Down Expand Up @@ -67,8 +66,8 @@ export class Rule {
}

async getValue() {
if (this.#extension)
return await this.#extension.getRuleValue(this.#identifier);
if (this.#extension)
return this.#parseRuleValueString(await this.#extension.getRuleValue(this.#identifier));
return this.#parseRuleValueString(world.getDynamicProperty(this.#identifier));
}

Expand Down Expand Up @@ -106,8 +105,10 @@ export class Rule {
}

#parseRuleValueString(value) {
if (value === 'undefined' || value === void 0)
if (value === 'undefined' || value === void 0) {
this.resetToDefaultValue();
return this.getDefaultValue();
}
try {
return JSON.parse(value);
} catch {
Expand Down
1 change: 1 addition & 0 deletions Canopy [BP]/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import './src/rules/spawnEggSpawnWithMinecart'
import './src/rules/chunkBorders'
import './src/rules/echoShardsEnableShriekers'
import './src/rules/collisionBoxes'
import './src/rules/potionBoostedBreeding'

// Load Time Processes
import './src/onStart'
Expand Down
8 changes: 5 additions & 3 deletions Canopy [BP]/scripts/src/classes/BiomeEdgeRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class BiomeEdgeRenderer {
changeInFinalAxis[finalAxis] = quadHeight;
const bound = new Vector(...changeInMiddleAxis).add(new Vector(...changeInFinalAxis));

const worldLocation = Vector.from(this.blockVolume.getMin()).add(new Vector(...localLocation));
const worldLocation = Vector.from(this.blockVolume.getMin()).add(bound.multiply(0.5)).add(new Vector(...localLocation));
worldLocation.dimension = this.dimension;
const sidedBox = new DebugBox(worldLocation);
sidedBox.bound = bound;
Expand Down Expand Up @@ -168,7 +168,8 @@ export class BiomeEdgeRenderer {
}

renderAnalysisLocation(location) {
const dimensionLocation = { ...location, dimension: this.dimension };
const dimensionLocation = Vector.from(location).add(new Vector(0.5, 0.5, 0.5));
dimensionLocation.dimension = this.dimension;
const tempBox = new DebugBox(dimensionLocation);
tempBox.color = { red: 1, green: 1, blue: 1 };
debugDrawer.addShape(tempBox);
Expand All @@ -180,7 +181,8 @@ export class BiomeEdgeRenderer {
drawAnalysisBoundingBox() {
if (this.analysisBoundingBoxShape)
this.analysisBoundingBoxShape.remove();
const dimensionLocation = { ...this.blockVolume.getMin(), dimension: this.dimension };
const dimensionLocation = Vector.from(this.blockVolume.getMin()).add(Vector.from(this.blockVolume.getSpan()).multiply(0.5));
dimensionLocation.dimension = this.dimension;
const boundingBox = new DebugBox(dimensionLocation);
boundingBox.bound = this.blockVolume.getSpan();
boundingBox.color = this.analysisColor;
Expand Down
8 changes: 5 additions & 3 deletions Canopy [BP]/scripts/src/classes/ChunkBorderRender.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export class ChunkBorderRender {
dimension;
debugShapes;

constructor(location, dimension) {
this.location = location;
this.dimension = dimension;
constructor(player) {
this.player = player;
this.location = player.location;
this.dimension = player.dimension;
this.debugShapes = [];
this.render();
}
Expand Down Expand Up @@ -98,6 +99,7 @@ export class ChunkBorderRender {
}

drawShape(shape) {
shape.visibleTo = [this.player];
debugDrawer.addShape(shape);
this.debugShapes.push(shape);
}
Expand Down
12 changes: 6 additions & 6 deletions Canopy [BP]/scripts/src/classes/CollisionBoxRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ export class CollisionBoxRenderer {
viewDirectionVector;
runner = void 0;

constructor(entity) {
constructor(entity, visibleToPlayer) {
this.entity = entity;
this.startRender();
this.startRender(visibleToPlayer);
}

destroy() {
this.stopRender();
this.entity = void 0;
}

startRender() {
this.collisionBox = new CollisionBox(this.entity);
this.eyeLevel = new EyeLevel(this.entity);
this.viewDirectionVector = new ViewDirectionVector(this.entity);
startRender(visibleToPlayer) {
this.collisionBox = new CollisionBox(this.entity, visibleToPlayer);
this.eyeLevel = new EyeLevel(this.entity, visibleToPlayer);
this.viewDirectionVector = new ViewDirectionVector(this.entity, visibleToPlayer);
this.runner = system.runInterval(this.onTick.bind(this));
}

Expand Down
7 changes: 4 additions & 3 deletions Canopy [BP]/scripts/src/classes/HSSFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ export class HSSFinder {
return;
const bottom = this.findStructureBottom(dimension, flooredLocation, "minecraft:fortress");
const top = this.findStructureTop(dimension, flooredLocation, "minecraft:fortress");
const height = top.y - bottom.y;
const height = top.y - bottom.y + 1;

bottom.dimension = dimension;
const box = new DebugBox(bottom);
const dimensionLocation = bottom.add(new Vector(0.5, height * 0.5, 0.5));
dimensionLocation.dimension = dimension;
const box = new DebugBox(dimensionLocation);
box.bound = new Vector(1, height, 1);
box.color = { red: 0, green: 1, blue: 0 };
this.fortressHSSShapes.push(box);
Expand Down
Loading
Loading