Make bubble columns placeable
This commit is contained in:
@@ -54,4 +54,4 @@ export const blockIdToItemStackMap = {
|
||||
export const specialItemPlacementConversions = {
|
||||
'water_bucket': 'bucket',
|
||||
'lava_bucket': 'bucket'
|
||||
}
|
||||
};
|
||||
@@ -147,6 +147,8 @@ function tryConvertBannedToValidBlock(structureBlock) {
|
||||
const blockId = structureBlock.type.id.replace('minecraft:', '');
|
||||
if (Object.keys(bannedToValidBlockMap).includes(blockId))
|
||||
return BlockPermutation.resolve(bannedToValidBlockMap[blockId], structureBlock.getAllStates());
|
||||
if (blockId === "bubble_column" && structureBlock.isWaterlogged)
|
||||
return BlockPermutation.resolve('minecraft:water');
|
||||
return structureBlock;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 { specialItemPlacementConversions } from './data';
|
||||
import { blocks, block_sounds } from './blocks';
|
||||
|
||||
Reference in New Issue
Block a user