Make bubble columns placeable

This commit is contained in:
ForestOfLight
2025-12-14 14:23:32 -08:00
Unverified
parent 8b5b9ffc19
commit 5b53066c45
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -54,4 +54,4 @@ export const blockIdToItemStackMap = {
export const specialItemPlacementConversions = { export const specialItemPlacementConversions = {
'water_bucket': 'bucket', 'water_bucket': 'bucket',
'lava_bucket': 'bucket' 'lava_bucket': 'bucket'
} };
@@ -147,6 +147,8 @@ function tryConvertBannedToValidBlock(structureBlock) {
const blockId = structureBlock.type.id.replace('minecraft:', ''); const blockId = structureBlock.type.id.replace('minecraft:', '');
if (Object.keys(bannedToValidBlockMap).includes(blockId)) if (Object.keys(bannedToValidBlockMap).includes(blockId))
return BlockPermutation.resolve(bannedToValidBlockMap[blockId], structureBlock.getAllStates()); return BlockPermutation.resolve(bannedToValidBlockMap[blockId], structureBlock.getAllStates());
if (blockId === "bubble_column" && structureBlock.isWaterlogged)
return BlockPermutation.resolve('minecraft:water');
return structureBlock; return structureBlock;
} }
+1 -1
View File
@@ -1,4 +1,4 @@
import { system, EntityComponentTypes, LiquidType } from '@minecraft/server'; import { system, EntityComponentTypes, LiquidType, ItemStack } from '@minecraft/server';
import { FormCancelationReason } from '@minecraft/server-ui'; import { FormCancelationReason } from '@minecraft/server-ui';
import { specialItemPlacementConversions } from './data'; import { specialItemPlacementConversions } from './data';
import { blocks, block_sounds } from './blocks'; import { blocks, block_sounds } from './blocks';