Skip to content

Commit

Permalink
fix: not deleting placed blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Sep 2, 2024
1 parent c2a142e commit 4f1edb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/features/break-place-outside-of-region.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Player } from '@minecraft/server'
import { MinecraftBlockTypes, MinecraftItemTypes } from '@minecraft/vanilla-data'
import { Cooldown, ms, Vector } from 'lib'
import { Cooldown, ms } from 'lib'
import { actionGuard, ActionGuardOrder, BLOCK_CONTAINERS, DOORS, SWITCHES, TRAPDOORS } from 'lib/region/index'
import { BaseRegion } from 'modules/places/base/region'
import { isScheduledToPlace, scheduleBlockPlace } from 'modules/survival/scheduled-block-place'
Expand All @@ -24,10 +24,10 @@ actionGuard((player, region, ctx) => {

scheduleBlockPlace({
dimension: ctx.event.block.dimension.type,
restoreTime: ms.from('sec', 10),
typeId: MinecraftBlockTypes.Air,
location: ctx.event.block.location,
states: void 0,
location: Vector.floor(Vector.add(ctx.event.block.location, ctx.event.faceLocation)),
restoreTime: ms.from('min', 1),
typeId: MinecraftBlockTypes.Air,
})
return true
} else if (ctx.type === 'break') {
Expand Down

0 comments on commit 4f1edb2

Please sign in to comment.