@orusteam/solariscore 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoorBlockComponent.d.ts","sourceRoot":"","sources":["../../../src/block/components/DoorBlockComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,iCAAiC,EAAE,oCAAoC,EAAE,iCAAiC,EAAE,oBAAoB,EAAoB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"DoorBlockComponent.d.ts","sourceRoot":"","sources":["../../../src/block/components/DoorBlockComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,iCAAiC,EAAE,oCAAoC,EAAE,iCAAiC,EAAE,oBAAoB,EAAoB,MAAM,mBAAmB,CAAC;AA0B9L,qBAAa,kBAAmB,YAAW,oBAAoB;;IAO3D,mBAAmB,CAAC,KAAK,EAAE,oCAAoC;IA8C/D,gBAAgB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,iCAAiC;IAOzE,gBAAgB,CAAC,EAAE,KAAK,EAAE,EAAE,iCAAiC;CAGhE"}
|
package/dist/index.js
CHANGED
|
@@ -4194,10 +4194,14 @@ function doorIsOpen(block) {
|
|
|
4194
4194
|
}
|
|
4195
4195
|
function tryToggleDoor(block) {
|
|
4196
4196
|
const allStates = block.permutation.getAllStates();
|
|
4197
|
-
const
|
|
4197
|
+
const otherBlock = allStates["minecraft:multi_block_part"] ? block.below() : block.above();
|
|
4198
|
+
const isOpen = doorIsOpen(block);
|
|
4198
4199
|
const interactSoundId = isOpen ? "close.wooden_door" : "open.wooden_door";
|
|
4199
|
-
|
|
4200
|
-
|
|
4200
|
+
if (otherBlock) {
|
|
4201
|
+
otherBlock.setPermutation(otherBlock.permutation.withState("solariscore:open_bit", !isOpen));
|
|
4202
|
+
block.setPermutation(block.permutation.withState("solariscore:open_bit", !isOpen));
|
|
4203
|
+
block.dimension.playSound(interactSoundId, block.location);
|
|
4204
|
+
}
|
|
4201
4205
|
}
|
|
4202
4206
|
var DoorBlockComponent = class {
|
|
4203
4207
|
constructor() {
|