All checks were successful
continuous-integration/drone/push Build is passing
setup.exe
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
StartupEvents.registry('block', (event) => {
|
|
// Construction Barricade
|
|
event.create('apocalypsenow:construction_barricade', 'cardinal')
|
|
.displayName('Construction Barricade')
|
|
.hardness(2.0)
|
|
.soundType('scaffolding')
|
|
.tagBlock('minecraft:mineable/pickaxe')
|
|
.requiresTool(true)
|
|
.lightLevel(0)
|
|
.box(0.0, 0.0, 0.0, 16.0, 17.0, 16.0)
|
|
.defaultCutout()
|
|
|
|
// Iron Locker
|
|
event.create('apocalypsenow:iron_locker', 'cardinal')
|
|
.displayName("Iron Locker")
|
|
.box(0.0, 0.0, 0.0, 16.0, 32.0, 16.0)
|
|
.fullBlock(false)
|
|
.lightLevel(0)
|
|
.hardness(2.6)
|
|
.tagBlock('minecraft:mineable/pickaxe')
|
|
.tagBlock('minecraft:needs_stone_tool')
|
|
.requiresTool(true)
|
|
.defaultCutout()
|
|
.soundType('metal')
|
|
.blockEntity((entityInfo) => {
|
|
entityInfo.inventory(9, 6)
|
|
entityInfo.rightClickOpensInventory()
|
|
})
|
|
|
|
// Medical Storage
|
|
event.create('apocalypsenow:medical_storage', 'cardinal')
|
|
.displayName("Medical Inventory")
|
|
.box(2.0, 1.0, 14.0, 14.0, 15.0, 16.0)
|
|
.fullBlock(false)
|
|
.lightLevel(0)
|
|
.notSolid()
|
|
.hardness(3.0)
|
|
.defaultCutout()
|
|
.renderType('cutout_mipped')
|
|
.soundType('metal')
|
|
.placementState((cb) => {
|
|
let blockstate = cb.getBlockStateToModify(this.AudioContext, this.block)
|
|
blockstate.setValue(BlockProperties.FACING, cb.getClickedFace())
|
|
blockstate.setValue(BlockProperties.WATERLOGGED, cb.getFluidStateAtClickedPos().getType() == $Fluids.WATER)
|
|
return blockstate
|
|
})
|
|
.blockEntity((entityInfo) => {
|
|
entityInfo.inventory(9, 1)
|
|
entityInfo.rightClickOpensInventory()
|
|
})
|
|
}) |