Skip to content

Commit 35fa628

Browse files
committed
bump to 1.14.0 (mc 1.20.60+; api 1.18.0-beta)
1 parent 0a0b7cb commit 35fa628

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

pack/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"name": "Debug Stick",
66
"description": "Java §dDebug Stick§r ported to Minecraft: Bedrock Edition, by §bvytdev§r\nUse §a/give @s vyt:debug_stick§r or find it in the inventory screen to obtain the item.\n\nReport bugs here: §bhttps://github.com/vytdev/debug-stick/§r\nCopyright (c) 2023-2025 Vincent Yanzee J. Tan\nLicensed under the MIT License.",
77
"uuid": "21aadfa6-e27c-400c-c596-596021852939",
8-
"version": "1.13.0",
9-
"min_engine_version": [ 1, 21, 50 ]
8+
"version": "1.14.0",
9+
"min_engine_version": [ 1, 21, 60 ]
1010
},
1111

1212
"modules": [
@@ -29,7 +29,7 @@
2929
"dependencies": [
3030
{
3131
"module_name": "@minecraft/server",
32-
"version": "1.17.0-beta"
32+
"version": "1.18.0-beta"
3333
}
3434
],
3535

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "debug-stick",
3-
"version": "1.13.0",
3+
"version": "1.14.0",
44
"description": "Debug stick for minecraft bedrock",
55
"scripts": {
66
"test": "npx tsc",
@@ -24,7 +24,7 @@
2424
},
2525
"homepage": "https://github.com/vytdev/debug-stick#readme",
2626
"dependencies": {
27-
"@minecraft/server": "1.17.0-beta.1.21.51-stable",
27+
"@minecraft/server": "1.18.0-beta.1.21.60-stable",
2828
"typescript": "^5.4.5"
2929
}
3030
}

src/index.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
+* MCPEDL: https://mcpedl.com/debug-stick
77
+* GitHub: https://github.com/vytdev/debug-stick
88
+*
9-
+* Script last updated: September 19, 2024
9+
+* Script last updated: February 27, 2025
1010
+*
1111
+* Copyright (c) 2023-2025 VYT <https://vytdev.github.io>
1212
+* This project is licensed under the MIT License.
@@ -94,7 +94,7 @@ function changeSelectedProperty(player: Player, block: Block) {
9494
const states = permutation.getAllStates();
9595
const names = Object.keys(states);
9696

97-
if (!names.length && !block.type.canBeWaterlogged)
97+
if (!names.length/* && !block.type.canBeWaterlogged*/)
9898
return message(`${block.typeId} has no properties`, player);
9999

100100
let prop = getCurrentProperty(player, block.typeId);
@@ -108,14 +108,14 @@ function changeSelectedProperty(player: Player, block: Block) {
108108
// list, check if the 'waterlogged' property is
109109
// available, or just go back at the start of the list
110110
if (!prop) {
111-
if (block.type.canBeWaterlogged) {
111+
/*if (block.type.canBeWaterlogged) {
112112
prop = "waterlogged";
113113
val = block.isWaterlogged;
114114
}
115-
else {
115+
else {*/
116116
prop = names[0];
117117
val = states[prop];
118-
}
118+
/*}*/
119119
}
120120

121121
// Update the player's selection
@@ -134,29 +134,30 @@ function updateBlockProperty(player: Player, block: Block) {
134134
const states = permutation.getAllStates();
135135
const names = Object.keys(states);
136136

137-
if (!names.length && !block.type.canBeWaterlogged)
137+
if (!names.length/* && !block.type.canBeWaterlogged*/)
138138
return message(`${block.typeId} has no properties`, player);
139139

140140
let prop = getCurrentProperty(player, block.typeId);
141141
let val: BlockStateValue;
142142

143143
// Ensure that the recorded block property selection
144144
// is available on the block
145-
if (prop == "waterlogged" ? !block.type.canBeWaterlogged : !names.includes(prop))
145+
/*if (prop == "waterlogged" ? !block.type.canBeWaterlogged : !names.includes(prop))*/
146+
if (!names.includes(prop))
146147
prop = names[0];
147148

148-
if (!prop && block.type.canBeWaterlogged)
149-
prop = "waterlogged";
149+
/*if (!prop && block.type.canBeWaterlogged)
150+
prop = "waterlogged";*/
150151

151152
// Update the property value
152-
if (prop == "waterlogged") {
153+
/*if (prop == "waterlogged") {
153154
val = !block.isWaterlogged;
154155
system.run(() => {
155156
block.setWaterlogged(val as boolean);
156157
});
157158
}
158159
159-
else {
160+
else {*/
160161
const valids = BlockStates.get(prop).validValues;
161162
val = valids[valids.indexOf(states[prop]) + 1];
162163

@@ -166,7 +167,7 @@ function updateBlockProperty(player: Player, block: Block) {
166167
system.run(() => {
167168
block.setPermutation(permutation.withState(prop as keyof BlockStateSuperset, val));
168169
});
169-
}
170+
/*}*/
170171

171172
// Avoid some edge cases bugs
172173
setCurrentProperty(player, block.typeId, prop);
@@ -207,8 +208,8 @@ function displayBlockInfo(player: Player, block: Block) {
207208
});
208209

209210
// Waterlog property if available
210-
if (block.type.canBeWaterlogged)
211-
info += "\n§o§7waterlogged§r§8: §6" + block.isWaterlogged;
211+
/*if (block.type.canBeWaterlogged)
212+
info += "\n§o§7waterlogged§r§8: §6" + block.isWaterlogged;*/
212213

213214
// Additional block tags
214215
block.getTags().forEach(v => info += "\n§d#" + v);

0 commit comments

Comments
 (0)