forked from PrismarineJS/flying-squid
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(regression,critical): chunks were stopped loading after moving to…
… another chunk fix: fix command blocks parsing for most versions fix: chat was not working for 1.19+ fix: better range adjustment for plate command block activation fix: was not possible to change the warp
- Loading branch information
Showing
6 changed files
with
54 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Block } from 'prismarine-block' | ||
|
||
|
||
export const server = function (serv: Server) { | ||
serv.getCommandBlockData = (commandBlock: Block) => { | ||
const pos = commandBlock.position | ||
const key = `${pos.x},${pos.y},${pos.z}` | ||
let entity = serv.overworld.blockEntityData[key] | ||
entity = entity?.value ?? entity | ||
if (!entity) return | ||
return Object.keys(entity).reduce((acc, key) => { | ||
acc[key] = entity[key].value | ||
return acc | ||
}, {} as any) | ||
} | ||
} | ||
|
||
declare global { | ||
interface Server { | ||
getCommandBlockData: (commandBlock: Block) => { | ||
Command: string | ||
LastOutput: string | ||
TrackOutput: Number | ||
SuccessCount: number | ||
CustomName: string | ||
powered: boolean | ||
conditionMet: boolean | ||
UpdateLastExecution?: boolean | ||
LastExecution?: number | ||
// color: string | ||
} | undefined | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters