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