feat: add nukkit type defiend

This commit is contained in:
MiaoWoo 2020-02-24 02:54:05 +08:00
parent d004ba17e6
commit d3f33f50e0
1590 changed files with 53034 additions and 0 deletions

View File

@ -0,0 +1,23 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class Achievement extends java.lang.Object {
// @ts-ignore
constructor(message: string, requires: string)
// @ts-ignore
public static achievements: java.util.HashMap;
// @ts-ignore
public message: string;
// @ts-ignore
public requires: java.lang.String[];
// @ts-ignore
public static broadcast(player: cn.nukkit.Player, achievementId: string): boolean;
// @ts-ignore
public static add(name: string, achievement: cn.nukkit.Achievement): boolean;
// @ts-ignore
public getMessage(): string;
// @ts-ignore
public broadcast(player: cn.nukkit.Player): void;
}
}
}

View File

@ -0,0 +1,45 @@
declare namespace cn {
namespace nukkit {
namespace AdventureSettings {
// @ts-ignore
class Type extends java.lang.Enum {
// @ts-ignore
public static WORLD_IMMUTABLE: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static AUTO_JUMP: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static ALLOW_FLIGHT: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static NO_CLIP: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static WORLD_BUILDER: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static FLYING: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static MUTED: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static BUILD_AND_MINE: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static DOORS_AND_SWITCHED: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static OPEN_CONTAINERS: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static ATTACK_PLAYERS: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static ATTACK_MOBS: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static OPERATOR: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static TELEPORT: cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public static values(): cn.nukkit.AdventureSettings.Type[];
// @ts-ignore
public static valueOf(name: string): cn.nukkit.AdventureSettings.Type;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getDefaultValue(): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class AdventureSettings extends java.lang.Object {
// @ts-ignore
constructor(player: cn.nukkit.Player)
// @ts-ignore
public static PERMISSION_NORMAL: number;
// @ts-ignore
public static PERMISSION_OPERATOR: number;
// @ts-ignore
public static PERMISSION_HOST: number;
// @ts-ignore
public static PERMISSION_AUTOMATION: number;
// @ts-ignore
public static PERMISSION_ADMIN: number;
// @ts-ignore
public clone(newPlayer: cn.nukkit.Player): cn.nukkit.AdventureSettings;
// @ts-ignore
public set(type: cn.nukkit.AdventureSettings.Type, value: boolean): cn.nukkit.AdventureSettings;
// @ts-ignore
public get(type: cn.nukkit.AdventureSettings.Type): boolean;
// @ts-ignore
public update(): void;
}
}
}

View File

@ -0,0 +1,82 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
interface IPlayer extends cn.nukkit.permission.ServerOperator, cn.nukkit.metadata.Metadatable {
/**
* 线<br>
* Returns if this player is online.
*/
// @ts-ignore
isOnline(): boolean;
/**
* <br>
* Returns the name of this player.
* <p>线{@link cn.nukkit.Player#getDisplayName}<br>
* Notice that this will only return its login name. If you need its display name, turn to
* {@link cn.nukkit.Player#getDisplayName}</p>
*/
// @ts-ignore
getName(): string;
// @ts-ignore
getUniqueId(): java.util.UUID;
/**
* (ban)<br>
* Returns if this player is banned.
*/
// @ts-ignore
isBanned(): boolean;
/**
* (ban)<br>
* Sets this player to be banned or to be pardoned.
*/
// @ts-ignore
setBanned(value: boolean): void;
/**
* <br>
* Returns if this player is pardoned by whitelist.
*/
// @ts-ignore
isWhitelisted(): boolean;
/**
* <br>
* Adds this player to the white list, or removes it from the whitelist.
*/
// @ts-ignore
setWhitelisted(value: boolean): void;
/**
* {@code Player}<br>
* Returns a {@code Player} object for this interface.
*/
// @ts-ignore
getPlayer(): cn.nukkit.Player;
/**
* <br>
* Returns the server carrying this player.
*/
// @ts-ignore
getServer(): cn.nukkit.Server;
/**
* <br>
* Returns the time this player first played in this server.
*/
// @ts-ignore
getFirstPlayed(): java.lang.Long;
/**
* <br>
* Returns the time this player last joined in this server.
*/
// @ts-ignore
getLastPlayed(): java.lang.Long;
/**
* <br>
* Returns if this player has played in this server before.
* <p>使<br>
* If you want to know if this player is the first time playing in this server, you can use:<br>
* </p>
* <pre>if(!player.hasPlayerBefore()) {...}</pre>
*/
// @ts-ignore
hasPlayedBefore(): boolean;
}
}
}

View File

@ -0,0 +1,7 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
interface InterruptibleThread {
}
}
}

View File

@ -0,0 +1,43 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class Nukkit extends java.lang.Object {
// @ts-ignore
constructor()
// @ts-ignore
public static GIT_INFO: java.util.Properties;
// @ts-ignore
public static VERSION: string;
// @ts-ignore
public static API_VERSION: string;
// @ts-ignore
public static CODENAME: string;
// @ts-ignore
public static MINECRAFT_VERSION: string;
// @ts-ignore
public static MINECRAFT_VERSION_NETWORK: string;
// @ts-ignore
public static PATH: string;
// @ts-ignore
public static DATA_PATH: string;
// @ts-ignore
public static PLUGIN_PATH: string;
// @ts-ignore
public static START_TIME: number;
// @ts-ignore
public static ANSI: boolean;
// @ts-ignore
public static TITLE: boolean;
// @ts-ignore
public static shortTitle: boolean;
// @ts-ignore
public static DEBUG: number;
// @ts-ignore
public static main(args: string): void;
// @ts-ignore
public static setLogLevel(level: Level): void;
// @ts-ignore
public static getLogLevel(): Level;
}
}
}

View File

@ -0,0 +1,53 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class OfflinePlayer extends java.lang.Object implements cn.nukkit.IPlayer {
/**
* {@code OfflinePlayer}<br>
* Initializes the object {@code OfflinePlayer}.
*/
// @ts-ignore
constructor(server: cn.nukkit.Server, uuid: java.util.UUID)
// @ts-ignore
constructor(server: cn.nukkit.Server, name: string)
// @ts-ignore
constructor(server: cn.nukkit.Server, uuid: java.util.UUID, name: string)
// @ts-ignore
public isOnline(): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getUniqueId(): java.util.UUID;
// @ts-ignore
public getServer(): cn.nukkit.Server;
// @ts-ignore
public isOp(): boolean;
// @ts-ignore
public setOp(value: boolean): void;
// @ts-ignore
public isBanned(): boolean;
// @ts-ignore
public setBanned(value: boolean): void;
// @ts-ignore
public isWhitelisted(): boolean;
// @ts-ignore
public setWhitelisted(value: boolean): void;
// @ts-ignore
public getPlayer(): cn.nukkit.Player;
// @ts-ignore
public getFirstPlayed(): java.lang.Long;
// @ts-ignore
public getLastPlayed(): java.lang.Long;
// @ts-ignore
public hasPlayedBefore(): boolean;
// @ts-ignore
public setMetadata(metadataKey: string, newMetadataValue: cn.nukkit.metadata.MetadataValue): void;
// @ts-ignore
public getMetadata(metadataKey: string): java.util.List;
// @ts-ignore
public hasMetadata(metadataKey: string): boolean;
// @ts-ignore
public removeMetadata(metadataKey: string, owningPlugin: cn.nukkit.plugin.Plugin): void;
}
}
}

View File

@ -0,0 +1,731 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class Player extends cn.nukkit.entity.EntityHuman implements cn.nukkit.command.CommandSender, cn.nukkit.inventory.InventoryHolder, cn.nukkit.level.ChunkLoader, cn.nukkit.IPlayer {
// @ts-ignore
constructor(interfaz: cn.nukkit.network.SourceInterface, clientID: java.lang.Long, ip: string, port: number)
// @ts-ignore
public static SURVIVAL: number;
// @ts-ignore
public static CREATIVE: number;
// @ts-ignore
public static ADVENTURE: number;
// @ts-ignore
public static SPECTATOR: number;
// @ts-ignore
public static VIEW: number;
// @ts-ignore
public static SURVIVAL_SLOTS: number;
// @ts-ignore
public static CREATIVE_SLOTS: number;
// @ts-ignore
public static CRAFTING_SMALL: number;
// @ts-ignore
public static CRAFTING_BIG: number;
// @ts-ignore
public static CRAFTING_ANVIL: number;
// @ts-ignore
public static CRAFTING_ENCHANT: number;
// @ts-ignore
public static CRAFTING_BEACON: number;
// @ts-ignore
public static DEFAULT_SPEED: number;
// @ts-ignore
public static MAXIMUM_SPEED: number;
// @ts-ignore
public static PERMISSION_CUSTOM: number;
// @ts-ignore
public static PERMISSION_OPERATOR: number;
// @ts-ignore
public static PERMISSION_MEMBER: number;
// @ts-ignore
public static PERMISSION_VISITOR: number;
// @ts-ignore
public static ANVIL_WINDOW_ID: number;
// @ts-ignore
public static ENCHANT_WINDOW_ID: number;
// @ts-ignore
public static BEACON_WINDOW_ID: number;
// @ts-ignore
protected interfaz: cn.nukkit.network.SourceInterface;
// @ts-ignore
public playedBefore: boolean;
// @ts-ignore
public spawned: boolean;
// @ts-ignore
public loggedIn: boolean;
// @ts-ignore
public gamemode: number;
// @ts-ignore
public lastBreak: number;
// @ts-ignore
protected windowCnt: number;
// @ts-ignore
protected windows: any;
// @ts-ignore
protected windowIndex: any;
// @ts-ignore
protected permanentWindows: java.util.Set;
// @ts-ignore
protected messageCounter: number;
// @ts-ignore
public speed: cn.nukkit.math.Vector3;
// @ts-ignore
public achievements: java.util.HashSet;
// @ts-ignore
public craftingType: number;
// @ts-ignore
protected playerUIInventory: cn.nukkit.inventory.PlayerUIInventory;
// @ts-ignore
protected craftingGrid: cn.nukkit.inventory.CraftingGrid;
// @ts-ignore
protected craftingTransaction: cn.nukkit.inventory.transaction.CraftingTransaction;
// @ts-ignore
public creationTime: number;
// @ts-ignore
protected randomClientId: number;
// @ts-ignore
protected forceMovement: cn.nukkit.math.Vector3;
// @ts-ignore
protected teleportPosition: cn.nukkit.math.Vector3;
// @ts-ignore
protected connected: boolean;
// @ts-ignore
protected ip: string;
// @ts-ignore
protected removeFormat: boolean;
// @ts-ignore
protected port: number;
// @ts-ignore
protected username: string;
// @ts-ignore
protected iusername: string;
// @ts-ignore
protected displayName: string;
// @ts-ignore
protected sleeping: cn.nukkit.math.Vector3;
// @ts-ignore
protected clientID: java.lang.Long;
// @ts-ignore
protected stepHeight: number;
// @ts-ignore
public usedChunks: java.util.Map;
// @ts-ignore
protected chunkLoadCount: number;
// @ts-ignore
protected loadQueue: any;
// @ts-ignore
protected nextChunkOrderRun: number;
// @ts-ignore
protected hiddenPlayers: java.util.Map;
// @ts-ignore
protected newPosition: cn.nukkit.math.Vector3;
// @ts-ignore
protected chunkRadius: number;
// @ts-ignore
protected viewDistance: number;
// @ts-ignore
protected chunksPerTick: number;
// @ts-ignore
protected spawnThreshold: number;
// @ts-ignore
protected spawnPosition: cn.nukkit.level.Position;
// @ts-ignore
protected inAirTicks: number;
// @ts-ignore
protected startAirTicks: number;
// @ts-ignore
protected adventureSettings: cn.nukkit.AdventureSettings;
// @ts-ignore
protected checkMovement: boolean;
// @ts-ignore
protected foodData: cn.nukkit.PlayerFood;
// @ts-ignore
protected enableClientCommand: boolean;
// @ts-ignore
protected lastEnderPearl: number;
// @ts-ignore
protected lastChorusFruitTeleport: number;
// @ts-ignore
public breakingBlock: cn.nukkit.block.Block;
// @ts-ignore
public pickedXPOrb: number;
// @ts-ignore
protected formWindowCount: number;
// @ts-ignore
protected formWindows: java.util.Map;
// @ts-ignore
protected serverSettings: java.util.Map;
// @ts-ignore
protected dummyBossBars: java.util.Map;
// @ts-ignore
protected shouldLogin: boolean;
// @ts-ignore
public fishing: cn.nukkit.entity.item.EntityFishingHook;
// @ts-ignore
public lastSkinChange: number;
// @ts-ignore
protected lastRightClickTime: number;
// @ts-ignore
protected lastRightClickPos: cn.nukkit.math.Vector3;
// @ts-ignore
public getStartActionTick(): number;
// @ts-ignore
public startAction(): void;
// @ts-ignore
public stopAction(): void;
// @ts-ignore
public getLastEnderPearlThrowingTick(): number;
// @ts-ignore
public onThrowEnderPearl(): void;
// @ts-ignore
public getLastChorusFruitTeleport(): number;
// @ts-ignore
public onChorusFruitTeleport(): void;
// @ts-ignore
public getViewingEnderChest(): cn.nukkit.block.BlockEnderChest;
// @ts-ignore
public setViewingEnderChest(chest: cn.nukkit.block.BlockEnderChest): void;
// @ts-ignore
public getLeaveMessage(): cn.nukkit.lang.TranslationContainer;
// @ts-ignore
public getClientSecret(): string;
/**
* This might disappear in the future.
* Please use getUniqueId() instead (IP + clientId + name combo, in the future it'll change to real UUID for online auth)
*/
// @ts-ignore
public getClientId(): java.lang.Long;
// @ts-ignore
public isBanned(): boolean;
// @ts-ignore
public setBanned(value: boolean): void;
// @ts-ignore
public isWhitelisted(): boolean;
// @ts-ignore
public setWhitelisted(value: boolean): void;
// @ts-ignore
public getPlayer(): cn.nukkit.Player;
// @ts-ignore
public getFirstPlayed(): java.lang.Long;
// @ts-ignore
public getLastPlayed(): java.lang.Long;
// @ts-ignore
public hasPlayedBefore(): boolean;
// @ts-ignore
public getAdventureSettings(): cn.nukkit.AdventureSettings;
// @ts-ignore
public setAdventureSettings(adventureSettings: cn.nukkit.AdventureSettings): void;
// @ts-ignore
public resetInAirTicks(): void;
// @ts-ignore
public setAllowFlight(value: boolean): void;
// @ts-ignore
public getAllowFlight(): boolean;
// @ts-ignore
public setAllowModifyWorld(value: boolean): void;
// @ts-ignore
public setAllowInteract(value: boolean): void;
// @ts-ignore
public setAllowInteract(value: boolean, containers: boolean): void;
// @ts-ignore
public setAutoJump(value: boolean): void;
// @ts-ignore
public hasAutoJump(): boolean;
// @ts-ignore
public spawnTo(player: cn.nukkit.Player): void;
// @ts-ignore
public getServer(): cn.nukkit.Server;
// @ts-ignore
public getRemoveFormat(): boolean;
// @ts-ignore
public setRemoveFormat(): void;
// @ts-ignore
public setRemoveFormat(remove: boolean): void;
// @ts-ignore
public canSee(player: cn.nukkit.Player): boolean;
// @ts-ignore
public hidePlayer(player: cn.nukkit.Player): void;
// @ts-ignore
public showPlayer(player: cn.nukkit.Player): void;
// @ts-ignore
public canCollideWith(entity: cn.nukkit.entity.Entity): boolean;
// @ts-ignore
public resetFallDistance(): void;
// @ts-ignore
public isOnline(): boolean;
// @ts-ignore
public isOp(): boolean;
// @ts-ignore
public setOp(value: boolean): void;
// @ts-ignore
public isPermissionSet(name: string): boolean;
// @ts-ignore
public isPermissionSet(permission: cn.nukkit.permission.Permission): boolean;
// @ts-ignore
public hasPermission(name: string): boolean;
// @ts-ignore
public hasPermission(permission: cn.nukkit.permission.Permission): boolean;
// @ts-ignore
public addAttachment(plugin: cn.nukkit.plugin.Plugin): cn.nukkit.permission.PermissionAttachment;
// @ts-ignore
public addAttachment(plugin: cn.nukkit.plugin.Plugin, name: string): cn.nukkit.permission.PermissionAttachment;
// @ts-ignore
public addAttachment(plugin: cn.nukkit.plugin.Plugin, name: string, value: java.lang.Boolean): cn.nukkit.permission.PermissionAttachment;
// @ts-ignore
public removeAttachment(attachment: cn.nukkit.permission.PermissionAttachment): void;
// @ts-ignore
public recalculatePermissions(): void;
// @ts-ignore
public isEnableClientCommand(): boolean;
// @ts-ignore
public setEnableClientCommand(enable: boolean): void;
// @ts-ignore
public sendCommandData(): void;
// @ts-ignore
public getEffectivePermissions(): java.util.Map;
// @ts-ignore
protected initEntity(): void;
// @ts-ignore
public isPlayer(): boolean;
// @ts-ignore
public removeAchievement(achievementId: string): void;
// @ts-ignore
public hasAchievement(achievementId: string): boolean;
// @ts-ignore
public isConnected(): boolean;
// @ts-ignore
public getDisplayName(): string;
// @ts-ignore
public setDisplayName(displayName: string): void;
// @ts-ignore
public setSkin(skin: cn.nukkit.entity.data.Skin): void;
// @ts-ignore
public getAddress(): string;
// @ts-ignore
public getPort(): number;
// @ts-ignore
public getNextPosition(): cn.nukkit.level.Position;
// @ts-ignore
public isSleeping(): boolean;
// @ts-ignore
public getInAirTicks(): number;
/**
* Returns whether the player is currently using an item (right-click and hold).
*/
// @ts-ignore
public isUsingItem(): boolean;
// @ts-ignore
public setUsingItem(value: boolean): void;
// @ts-ignore
public getButtonText(): string;
// @ts-ignore
public setButtonText(text: string): void;
// @ts-ignore
public unloadChunk(x: number, z: number): void;
// @ts-ignore
public unloadChunk(x: number, z: number, level: cn.nukkit.level.Level): void;
// @ts-ignore
public getSpawn(): cn.nukkit.level.Position;
// @ts-ignore
public sendChunk(x: number, z: number, packet: cn.nukkit.network.protocol.DataPacket): void;
// @ts-ignore
public sendChunk(x: number, z: number, subChunkCount: number, payload: number): void;
// @ts-ignore
protected sendNextChunk(): void;
// @ts-ignore
protected doFirstSpawn(): void;
// @ts-ignore
protected orderChunks(): boolean;
// @ts-ignore
public batchDataPacket(packet: cn.nukkit.network.protocol.DataPacket): boolean;
/**
* 0 is true
* -1 is false
* other is identifer
*/
// @ts-ignore
public dataPacket(packet: cn.nukkit.network.protocol.DataPacket): boolean;
// @ts-ignore
public dataPacket(packet: cn.nukkit.network.protocol.DataPacket, needACK: boolean): number;
/**
* 0 is true
* -1 is false
* other is identifer
*/
// @ts-ignore
public directDataPacket(packet: cn.nukkit.network.protocol.DataPacket): boolean;
// @ts-ignore
public directDataPacket(packet: cn.nukkit.network.protocol.DataPacket, needACK: boolean): number;
// @ts-ignore
public getPing(): number;
// @ts-ignore
public sleepOn(pos: cn.nukkit.math.Vector3): boolean;
// @ts-ignore
public setSpawn(pos: cn.nukkit.math.Vector3): void;
// @ts-ignore
public stopSleep(): void;
// @ts-ignore
public awardAchievement(achievementId: string): boolean;
// @ts-ignore
public getGamemode(): number;
// @ts-ignore
public setGamemode(gamemode: number): boolean;
// @ts-ignore
public setGamemode(gamemode: number, clientSide: boolean): boolean;
// @ts-ignore
public setGamemode(gamemode: number, clientSide: boolean, newSettings: cn.nukkit.AdventureSettings): boolean;
// @ts-ignore
public sendSettings(): void;
// @ts-ignore
public isSurvival(): boolean;
// @ts-ignore
public isCreative(): boolean;
// @ts-ignore
public isSpectator(): boolean;
// @ts-ignore
public isAdventure(): boolean;
// @ts-ignore
public getDrops(): cn.nukkit.item.Item[];
// @ts-ignore
public setDataProperty(data: cn.nukkit.entity.data.EntityData): boolean;
// @ts-ignore
public setDataProperty(data: cn.nukkit.entity.data.EntityData, send: boolean): boolean;
// @ts-ignore
protected checkGroundState(movX: number, movY: number, movZ: number, dx: number, dy: number, dz: number): void;
// @ts-ignore
protected checkBlockCollision(): void;
// @ts-ignore
protected checkNearEntities(): void;
// @ts-ignore
protected processMovement(tickDiff: number): void;
// @ts-ignore
public addMovement(x: number, y: number, z: number, yaw: number, pitch: number, headYaw: number): void;
// @ts-ignore
public setMotion(motion: cn.nukkit.math.Vector3): boolean;
// @ts-ignore
public sendAttributes(): void;
// @ts-ignore
public onUpdate(currentTick: number): boolean;
// @ts-ignore
public checkInteractNearby(): void;
/**
* Returns the Entity the player is looking at currently
*/
// @ts-ignore
public getEntityPlayerLookingAt(maxDistance: number): cn.nukkit.entity.EntityInteractable;
// @ts-ignore
public checkNetwork(): void;
// @ts-ignore
public canInteract(pos: cn.nukkit.math.Vector3, maxDistance: number): boolean;
// @ts-ignore
public canInteract(pos: cn.nukkit.math.Vector3, maxDistance: number, maxDiff: number): boolean;
// @ts-ignore
protected processLogin(): void;
// @ts-ignore
protected completeLoginSequence(): void;
// @ts-ignore
public handleDataPacket(packet: cn.nukkit.network.protocol.DataPacket): void;
/**
* Sends a chat message as this player. If the message begins with a / (forward-slash) it will be treated
* as a command.
*/
// @ts-ignore
public chat(message: string): boolean;
// @ts-ignore
public kick(): boolean;
// @ts-ignore
public kick(reason: string, isAdmin: boolean): boolean;
// @ts-ignore
public kick(reason: string): boolean;
// @ts-ignore
public kick(reason: cn.nukkit.event.player.PlayerKickEvent.Reason): boolean;
// @ts-ignore
public kick(reason: cn.nukkit.event.player.PlayerKickEvent.Reason, reasonString: string): boolean;
// @ts-ignore
public kick(reason: cn.nukkit.event.player.PlayerKickEvent.Reason, isAdmin: boolean): boolean;
// @ts-ignore
public kick(reason: cn.nukkit.event.player.PlayerKickEvent.Reason, reasonString: string, isAdmin: boolean): boolean;
// @ts-ignore
public setViewDistance(distance: number): void;
// @ts-ignore
public getViewDistance(): number;
// @ts-ignore
public sendMessage(message: string): void;
// @ts-ignore
public sendMessage(message: cn.nukkit.lang.TextContainer): void;
// @ts-ignore
public sendTranslation(message: string): void;
// @ts-ignore
public sendTranslation(message: string, parameters: string): void;
// @ts-ignore
public sendChat(message: string): void;
// @ts-ignore
public sendChat(source: string, message: string): void;
// @ts-ignore
public sendPopup(message: string): void;
// @ts-ignore
public sendPopup(message: string, subtitle: string): void;
// @ts-ignore
public sendTip(message: string): void;
// @ts-ignore
public clearTitle(): void;
/**
* Resets both title animation times and subtitle for the next shown title
*/
// @ts-ignore
public resetTitleSettings(): void;
// @ts-ignore
public setSubtitle(subtitle: string): void;
// @ts-ignore
public setTitleAnimationTimes(fadein: number, duration: number, fadeout: number): void;
// @ts-ignore
public sendTitle(title: string): void;
// @ts-ignore
public sendTitle(title: string, subtitle: string): void;
// @ts-ignore
public sendTitle(title: string, subtitle: string, fadeIn: number, stay: number, fadeOut: number): void;
// @ts-ignore
public sendActionBar(title: string): void;
// @ts-ignore
public sendActionBar(title: string, fadein: number, duration: number, fadeout: number): void;
// @ts-ignore
public close(): void;
// @ts-ignore
public close(message: string): void;
// @ts-ignore
public close(message: string, reason: string): void;
// @ts-ignore
public close(message: string, reason: string, notify: boolean): void;
// @ts-ignore
public close(message: cn.nukkit.lang.TextContainer): void;
// @ts-ignore
public close(message: cn.nukkit.lang.TextContainer, reason: string): void;
// @ts-ignore
public close(message: cn.nukkit.lang.TextContainer, reason: string, notify: boolean): void;
// @ts-ignore
public save(): void;
// @ts-ignore
public save(async: boolean): void;
// @ts-ignore
public getName(): string;
// @ts-ignore
public kill(): void;
// @ts-ignore
protected respawn(): void;
// @ts-ignore
public setHealth(health: number): void;
// @ts-ignore
public setMaxHealth(maxHealth: number): void;
// @ts-ignore
public getExperience(): number;
// @ts-ignore
public getExperienceLevel(): number;
// @ts-ignore
public addExperience(add: number): void;
// @ts-ignore
public static calculateRequireExperience(level: number): number;
// @ts-ignore
public setExperience(exp: number): void;
// @ts-ignore
public setExperience(exp: number, level: number): void;
// @ts-ignore
public sendExperience(): void;
// @ts-ignore
public sendExperience(exp: number): void;
// @ts-ignore
public sendExperienceLevel(): void;
// @ts-ignore
public sendExperienceLevel(level: number): void;
// @ts-ignore
public setAttribute(attribute: cn.nukkit.entity.Attribute): void;
// @ts-ignore
public setMovementSpeed(speed: number): void;
// @ts-ignore
public setMovementSpeed(speed: number, send: boolean): void;
// @ts-ignore
public getKiller(): cn.nukkit.entity.Entity;
// @ts-ignore
public attack(source: cn.nukkit.event.entity.EntityDamageEvent): boolean;
/**
* Drops an item on the ground in front of the player. Returns if the item drop was successful.
*/
// @ts-ignore
public dropItem(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public sendPosition(pos: cn.nukkit.math.Vector3): void;
// @ts-ignore
public sendPosition(pos: cn.nukkit.math.Vector3, yaw: number): void;
// @ts-ignore
public sendPosition(pos: cn.nukkit.math.Vector3, yaw: number, pitch: number): void;
// @ts-ignore
public sendPosition(pos: cn.nukkit.math.Vector3, yaw: number, pitch: number, mode: number): void;
// @ts-ignore
public sendPosition(pos: cn.nukkit.math.Vector3, yaw: number, pitch: number, mode: number, targets: cn.nukkit.Player): void;
// @ts-ignore
protected checkChunks(): void;
// @ts-ignore
protected checkTeleportPosition(): boolean;
// @ts-ignore
protected sendPlayStatus(status: number): void;
// @ts-ignore
protected sendPlayStatus(status: number, immediate: boolean): void;
// @ts-ignore
public teleport(location: cn.nukkit.level.Location, cause: cn.nukkit.event.player.PlayerTeleportEvent.TeleportCause): boolean;
// @ts-ignore
protected forceSendEmptyChunks(): void;
// @ts-ignore
public teleportImmediate(location: cn.nukkit.level.Location): void;
// @ts-ignore
public teleportImmediate(location: cn.nukkit.level.Location, cause: cn.nukkit.event.player.PlayerTeleportEvent.TeleportCause): void;
/**
* Shows a new FormWindow to the player
* You can find out FormWindow result by listening to PlayerFormRespondedEvent
*/
// @ts-ignore
public showFormWindow(window: cn.nukkit.form.window.FormWindow): number;
/**
* Shows a new FormWindow to the player
* You can find out FormWindow result by listening to PlayerFormRespondedEvent
*/
// @ts-ignore
public showFormWindow(window: cn.nukkit.form.window.FormWindow, id: number): number;
/**
* Shows a new setting page in game settings
* You can find out settings result by listening to PlayerFormRespondedEvent
*/
// @ts-ignore
public addServerSettings(window: cn.nukkit.form.window.FormWindow): number;
/**
* Creates and sends a BossBar to the player
*/
// @ts-ignore
public createBossBar(text: string, length: number): number;
/**
* Creates and sends a BossBar to the player
*/
// @ts-ignore
public createBossBar(dummyBossBar: cn.nukkit.utils.DummyBossBar): number;
/**
* Get a DummyBossBar object
*/
// @ts-ignore
public getDummyBossBar(bossBarId: number): cn.nukkit.utils.DummyBossBar;
/**
* Get all DummyBossBar objects
*/
// @ts-ignore
public getDummyBossBars(): java.util.Map;
/**
* Updates a BossBar
*/
// @ts-ignore
public updateBossBar(text: string, length: number, bossBarId: number): void;
/**
* Removes a BossBar
*/
// @ts-ignore
public removeBossBar(bossBarId: number): void;
// @ts-ignore
public getWindowId(inventory: cn.nukkit.inventory.Inventory): number;
// @ts-ignore
public getWindowById(id: number): cn.nukkit.inventory.Inventory;
// @ts-ignore
public addWindow(inventory: cn.nukkit.inventory.Inventory): number;
// @ts-ignore
public addWindow(inventory: cn.nukkit.inventory.Inventory, forceId: java.lang.Integer): number;
// @ts-ignore
public addWindow(inventory: cn.nukkit.inventory.Inventory, forceId: java.lang.Integer, isPermanent: boolean): number;
// @ts-ignore
public getTopWindow(): java.util.Optional;
// @ts-ignore
public removeWindow(inventory: cn.nukkit.inventory.Inventory): void;
// @ts-ignore
public sendAllInventories(): void;
// @ts-ignore
protected addDefaultWindows(): void;
// @ts-ignore
public getUIInventory(): cn.nukkit.inventory.PlayerUIInventory;
// @ts-ignore
public getCursorInventory(): cn.nukkit.inventory.PlayerCursorInventory;
// @ts-ignore
public getCraftingGrid(): cn.nukkit.inventory.CraftingGrid;
// @ts-ignore
public setCraftingGrid(grid: cn.nukkit.inventory.CraftingGrid): void;
// @ts-ignore
public resetCraftingGridType(): void;
// @ts-ignore
public removeAllWindows(): void;
// @ts-ignore
public removeAllWindows(permanent: boolean): void;
// @ts-ignore
public setMetadata(metadataKey: string, newMetadataValue: cn.nukkit.metadata.MetadataValue): void;
// @ts-ignore
public getMetadata(metadataKey: string): java.util.List;
// @ts-ignore
public hasMetadata(metadataKey: string): boolean;
// @ts-ignore
public removeMetadata(metadataKey: string, owningPlugin: cn.nukkit.plugin.Plugin): void;
// @ts-ignore
public onChunkChanged(chunk: cn.nukkit.level.format.FullChunk): void;
// @ts-ignore
public onChunkLoaded(chunk: cn.nukkit.level.format.FullChunk): void;
// @ts-ignore
public onChunkPopulated(chunk: cn.nukkit.level.format.FullChunk): void;
// @ts-ignore
public onChunkUnloaded(chunk: cn.nukkit.level.format.FullChunk): void;
// @ts-ignore
public onBlockChanged(block: cn.nukkit.math.Vector3): void;
// @ts-ignore
public getLoaderId(): number;
// @ts-ignore
public isLoaderActive(): boolean;
// @ts-ignore
public static getChunkCacheFromData(chunkX: number, chunkZ: number, subChunkCount: number, payload: number): cn.nukkit.network.protocol.BatchPacket;
// @ts-ignore
public isFoodEnabled(): boolean;
// @ts-ignore
public setFoodEnabled(foodEnabled: boolean): void;
// @ts-ignore
public getFoodData(): cn.nukkit.PlayerFood;
// @ts-ignore
public switchLevel(level: cn.nukkit.level.Level): boolean;
// @ts-ignore
public setCheckMovement(checkMovement: boolean): void;
// @ts-ignore
public setLocale(locale: java.util.Locale): void;
// @ts-ignore
public getLocale(): java.util.Locale;
// @ts-ignore
public setSprinting(value: boolean): void;
// @ts-ignore
public transfer(address: java.net.InetSocketAddress): void;
// @ts-ignore
public getLoginChainData(): cn.nukkit.utils.LoginChainData;
// @ts-ignore
public pickupEntity(entity: cn.nukkit.entity.Entity, near: boolean): boolean;
// @ts-ignore
public hashCode(): number;
// @ts-ignore
public equals(obj: java.lang.Object): boolean;
/**
* Notifies an ACK response from the client
*/
// @ts-ignore
public notifyACK(identification: number): void;
// @ts-ignore
public isBreakingBlock(): boolean;
/**
* Show a window of a XBOX account's profile
*/
// @ts-ignore
public showXboxProfile(xuid: string): void;
// @ts-ignore
public startFishing(fishingRod: cn.nukkit.item.Item): void;
// @ts-ignore
public stopFishing(click: boolean): void;
// @ts-ignore
public toString(): string;
}
}
}

View File

@ -0,0 +1,45 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class PlayerFood extends java.lang.Object {
// @ts-ignore
constructor(player: cn.nukkit.Player, foodLevel: number, foodSaturationLevel: number)
// @ts-ignore
public getPlayer(): cn.nukkit.Player;
// @ts-ignore
public getLevel(): number;
// @ts-ignore
public getMaxLevel(): number;
// @ts-ignore
public setLevel(foodLevel: number): void;
// @ts-ignore
public setLevel(foodLevel: number, saturationLevel: number): void;
// @ts-ignore
public getFoodSaturationLevel(): number;
// @ts-ignore
public setFoodSaturationLevel(fsl: number): void;
// @ts-ignore
public useHunger(): void;
// @ts-ignore
public useHunger(amount: number): void;
// @ts-ignore
public addFoodLevel(food: cn.nukkit.item.food.Food): void;
// @ts-ignore
public addFoodLevel(foodLevel: number, fsl: number): void;
// @ts-ignore
public sendFoodLevel(): void;
// @ts-ignore
public reset(): void;
// @ts-ignore
public sendFoodLevel(foodLevel: number): void;
// @ts-ignore
public update(tickDiff: number): void;
// @ts-ignore
public updateFoodExpLevel(use: number): void;
// @ts-ignore
public setFoodLevel(foodLevel: number): void;
// @ts-ignore
public setFoodLevel(foodLevel: number, saturationLevel: number): void;
}
}
}

View File

@ -0,0 +1,348 @@
declare namespace cn {
namespace nukkit {
// @ts-ignore
class Server extends java.lang.Object {
// @ts-ignore
public static BROADCAST_CHANNEL_ADMINISTRATIVE: string;
// @ts-ignore
public static BROADCAST_CHANNEL_USERS: string;
// @ts-ignore
public networkCompressionLevel: number;
// @ts-ignore
public broadcastMessage(message: string): number;
// @ts-ignore
public broadcastMessage(message: cn.nukkit.lang.TextContainer): number;
// @ts-ignore
public broadcastMessage(message: string, recipients: cn.nukkit.command.CommandSender): number;
// @ts-ignore
public broadcastMessage(message: string, recipients: java.util.Collection): number;
// @ts-ignore
public broadcastMessage(message: cn.nukkit.lang.TextContainer, recipients: java.util.Collection): number;
// @ts-ignore
public broadcast(message: string, permissions: string): number;
// @ts-ignore
public broadcast(message: cn.nukkit.lang.TextContainer, permissions: string): number;
// @ts-ignore
public static broadcastPacket(players: java.util.Collection, packet: cn.nukkit.network.protocol.DataPacket): void;
// @ts-ignore
public static broadcastPacket(players: cn.nukkit.Player, packet: cn.nukkit.network.protocol.DataPacket): void;
// @ts-ignore
public batchPackets(players: cn.nukkit.Player, packets: cn.nukkit.network.protocol.DataPacket): void;
// @ts-ignore
public batchPackets(players: cn.nukkit.Player, packets: cn.nukkit.network.protocol.DataPacket, forceSync: boolean): void;
// @ts-ignore
public broadcastPacketsCallback(data: number, identifiers: java.util.List): void;
// @ts-ignore
public enablePlugins(type: cn.nukkit.plugin.PluginLoadOrder): void;
// @ts-ignore
public enablePlugin(plugin: cn.nukkit.plugin.Plugin): void;
// @ts-ignore
public disablePlugins(): void;
// @ts-ignore
public dispatchCommand(sender: cn.nukkit.command.CommandSender, commandLine: string): boolean;
// @ts-ignore
public getConsoleSender(): cn.nukkit.command.ConsoleCommandSender;
// @ts-ignore
public reload(): void;
// @ts-ignore
public shutdown(): void;
// @ts-ignore
public forceShutdown(): void;
// @ts-ignore
public start(): void;
// @ts-ignore
public handlePacket(address: string, port: number, payload: number): void;
// @ts-ignore
public tickProcessor(): void;
// @ts-ignore
public onPlayerCompleteLoginSequence(player: cn.nukkit.Player): void;
// @ts-ignore
public onPlayerLogin(player: cn.nukkit.Player): void;
// @ts-ignore
public addPlayer(identifier: string, player: cn.nukkit.Player): void;
// @ts-ignore
public addOnlinePlayer(player: cn.nukkit.Player): void;
// @ts-ignore
public removeOnlinePlayer(player: cn.nukkit.Player): void;
// @ts-ignore
public updatePlayerListData(uuid: java.util.UUID, entityId: number, name: string, skin: cn.nukkit.entity.data.Skin): void;
// @ts-ignore
public updatePlayerListData(uuid: java.util.UUID, entityId: number, name: string, skin: cn.nukkit.entity.data.Skin, xboxUserId: string): void;
// @ts-ignore
public updatePlayerListData(uuid: java.util.UUID, entityId: number, name: string, skin: cn.nukkit.entity.data.Skin, players: cn.nukkit.Player): void;
// @ts-ignore
public updatePlayerListData(uuid: java.util.UUID, entityId: number, name: string, skin: cn.nukkit.entity.data.Skin, xboxUserId: string, players: cn.nukkit.Player): void;
// @ts-ignore
public updatePlayerListData(uuid: java.util.UUID, entityId: number, name: string, skin: cn.nukkit.entity.data.Skin, xboxUserId: string, players: java.util.Collection): void;
// @ts-ignore
public removePlayerListData(uuid: java.util.UUID): void;
// @ts-ignore
public removePlayerListData(uuid: java.util.UUID, players: cn.nukkit.Player): void;
// @ts-ignore
public removePlayerListData(uuid: java.util.UUID, players: java.util.Collection): void;
// @ts-ignore
public sendFullPlayerListData(player: cn.nukkit.Player): void;
// @ts-ignore
public sendRecipeList(player: cn.nukkit.Player): void;
// @ts-ignore
public doAutoSave(): void;
// @ts-ignore
public getNextTick(): number;
// @ts-ignore
public titleTick(): void;
// @ts-ignore
public getQueryInformation(): cn.nukkit.event.server.QueryRegenerateEvent;
// @ts-ignore
public getName(): string;
// @ts-ignore
public isRunning(): boolean;
// @ts-ignore
public getNukkitVersion(): string;
// @ts-ignore
public getCodename(): string;
// @ts-ignore
public getVersion(): string;
// @ts-ignore
public getApiVersion(): string;
// @ts-ignore
public getFilePath(): string;
// @ts-ignore
public getDataPath(): string;
// @ts-ignore
public getPluginPath(): string;
// @ts-ignore
public getMaxPlayers(): number;
// @ts-ignore
public setMaxPlayers(maxPlayers: number): void;
// @ts-ignore
public getPort(): number;
// @ts-ignore
public getViewDistance(): number;
// @ts-ignore
public getIp(): string;
// @ts-ignore
public getServerUniqueId(): java.util.UUID;
// @ts-ignore
public getAutoSave(): boolean;
// @ts-ignore
public setAutoSave(autoSave: boolean): void;
// @ts-ignore
public getLevelType(): string;
// @ts-ignore
public getGenerateStructures(): boolean;
// @ts-ignore
public getGamemode(): number;
// @ts-ignore
public getForceGamemode(): boolean;
// @ts-ignore
public static getGamemodeString(mode: number): string;
// @ts-ignore
public static getGamemodeString(mode: number, direct: boolean): string;
// @ts-ignore
public static getGamemodeFromString(str: string): number;
// @ts-ignore
public static getDifficultyFromString(str: string): number;
// @ts-ignore
public getDifficulty(): number;
// @ts-ignore
public hasWhitelist(): boolean;
// @ts-ignore
public getSpawnRadius(): number;
// @ts-ignore
public getAllowFlight(): boolean;
// @ts-ignore
public isHardcore(): boolean;
// @ts-ignore
public getDefaultGamemode(): number;
// @ts-ignore
public getMotd(): string;
// @ts-ignore
public getSubMotd(): string;
// @ts-ignore
public getForceResources(): boolean;
// @ts-ignore
public getLogger(): cn.nukkit.utils.MainLogger;
// @ts-ignore
public getEntityMetadata(): cn.nukkit.metadata.EntityMetadataStore;
// @ts-ignore
public getPlayerMetadata(): cn.nukkit.metadata.PlayerMetadataStore;
// @ts-ignore
public getLevelMetadata(): cn.nukkit.metadata.LevelMetadataStore;
// @ts-ignore
public getPluginManager(): cn.nukkit.plugin.PluginManager;
// @ts-ignore
public getCraftingManager(): cn.nukkit.inventory.CraftingManager;
// @ts-ignore
public getResourcePackManager(): cn.nukkit.resourcepacks.ResourcePackManager;
// @ts-ignore
public getScheduler(): cn.nukkit.scheduler.ServerScheduler;
// @ts-ignore
public getTick(): number;
// @ts-ignore
public getTicksPerSecond(): number;
// @ts-ignore
public getTicksPerSecondAverage(): number;
// @ts-ignore
public getTickUsage(): number;
// @ts-ignore
public getTickUsageAverage(): number;
// @ts-ignore
public getCommandMap(): cn.nukkit.command.SimpleCommandMap;
// @ts-ignore
public getOnlinePlayers(): java.util.Map;
// @ts-ignore
public addRecipe(recipe: cn.nukkit.inventory.Recipe): void;
// @ts-ignore
public getPlayer(uuid: java.util.UUID): java.util.Optional;
// @ts-ignore
public lookupName(name: string): java.util.Optional;
// @ts-ignore
public getOfflinePlayer(name: string): cn.nukkit.IPlayer;
// @ts-ignore
public getOfflinePlayer(uuid: java.util.UUID): cn.nukkit.IPlayer;
// @ts-ignore
public getOfflinePlayerData(uuid: java.util.UUID): cn.nukkit.nbt.tag.CompoundTag;
// @ts-ignore
public getOfflinePlayerData(uuid: java.util.UUID, create: boolean): cn.nukkit.nbt.tag.CompoundTag;
// @ts-ignore
public getOfflinePlayerData(name: string): cn.nukkit.nbt.tag.CompoundTag;
// @ts-ignore
public getOfflinePlayerData(name: string, create: boolean): cn.nukkit.nbt.tag.CompoundTag;
// @ts-ignore
public saveOfflinePlayerData(uuid: java.util.UUID, tag: cn.nukkit.nbt.tag.CompoundTag): void;
// @ts-ignore
public saveOfflinePlayerData(name: string, tag: cn.nukkit.nbt.tag.CompoundTag): void;
// @ts-ignore
public saveOfflinePlayerData(uuid: java.util.UUID, tag: cn.nukkit.nbt.tag.CompoundTag, async: boolean): void;
// @ts-ignore
public saveOfflinePlayerData(name: string, tag: cn.nukkit.nbt.tag.CompoundTag, async: boolean): void;
// @ts-ignore
public getPlayer(name: string): cn.nukkit.Player;
// @ts-ignore
public getPlayerExact(name: string): cn.nukkit.Player;
// @ts-ignore
public matchPlayer(partialName: string): cn.nukkit.Player[];
// @ts-ignore
public removePlayer(player: cn.nukkit.Player): void;
// @ts-ignore
public getLevels(): java.util.Map;
// @ts-ignore
public getDefaultLevel(): cn.nukkit.level.Level;
// @ts-ignore
public setDefaultLevel(defaultLevel: cn.nukkit.level.Level): void;
// @ts-ignore
public isLevelLoaded(name: string): boolean;
// @ts-ignore
public getLevel(levelId: number): cn.nukkit.level.Level;
// @ts-ignore
public getLevelByName(name: string): cn.nukkit.level.Level;
// @ts-ignore
public unloadLevel(level: cn.nukkit.level.Level): boolean;
// @ts-ignore
public unloadLevel(level: cn.nukkit.level.Level, forceUnload: boolean): boolean;
// @ts-ignore
public loadLevel(name: string): boolean;
// @ts-ignore
public generateLevel(name: string): boolean;
// @ts-ignore
public generateLevel(name: string, seed: number): boolean;
// @ts-ignore
public generateLevel(name: string, seed: number, generator: java.lang.Class): boolean;
// @ts-ignore
public generateLevel(name: string, seed: number, generator: java.lang.Class, options: java.util.Map): boolean;
// @ts-ignore
public generateLevel(name: string, seed: number, generator: java.lang.Class, options: java.util.Map, provider: java.lang.Class): boolean;
// @ts-ignore
public isLevelGenerated(name: string): boolean;
// @ts-ignore
public getLanguage(): cn.nukkit.lang.BaseLang;
// @ts-ignore
public isLanguageForced(): boolean;
// @ts-ignore
public getNetwork(): cn.nukkit.network.Network;
// @ts-ignore
public getConfig(): cn.nukkit.utils.Config;
// @ts-ignore
public getConfig(variable: string): java.lang.Object;
// @ts-ignore
public getConfig(variable: string, defaultValue: java.lang.Object): java.lang.Object;
// @ts-ignore
public getProperties(): cn.nukkit.utils.Config;
// @ts-ignore
public getProperty(variable: string): java.lang.Object;
// @ts-ignore
public getProperty(variable: string, defaultValue: java.lang.Object): java.lang.Object;
// @ts-ignore
public setPropertyString(variable: string, value: string): void;
// @ts-ignore
public getPropertyString(variable: string): string;
// @ts-ignore
public getPropertyString(variable: string, defaultValue: string): string;
// @ts-ignore
public getPropertyInt(variable: string): number;
// @ts-ignore
public getPropertyInt(variable: string, defaultValue: java.lang.Integer): number;
// @ts-ignore
public setPropertyInt(variable: string, value: number): void;
// @ts-ignore
public getPropertyBoolean(variable: string): boolean;
// @ts-ignore
public getPropertyBoolean(variable: string, defaultValue: java.lang.Object): boolean;
// @ts-ignore
public setPropertyBoolean(variable: string, value: boolean): void;
// @ts-ignore
public getPluginCommand(name: string): cn.nukkit.command.PluginIdentifiableCommand;
// @ts-ignore
public getNameBans(): cn.nukkit.permission.BanList;
// @ts-ignore
public getIPBans(): cn.nukkit.permission.BanList;
// @ts-ignore
public addOp(name: string): void;
// @ts-ignore
public removeOp(name: string): void;
// @ts-ignore
public addWhitelist(name: string): void;
// @ts-ignore
public removeWhitelist(name: string): void;
// @ts-ignore
public isWhitelisted(name: string): boolean;
// @ts-ignore
public isOp(name: string): boolean;
// @ts-ignore
public getWhitelist(): cn.nukkit.utils.Config;
// @ts-ignore
public getOps(): cn.nukkit.utils.Config;
// @ts-ignore
public reloadWhitelist(): void;
// @ts-ignore
public getServiceManager(): cn.nukkit.plugin.service.ServiceManager;
// @ts-ignore
public getCommandAliases(): java.util.Map;
// @ts-ignore
public shouldSavePlayerData(): boolean;
// @ts-ignore
public getPlayerSkinChangeCooldown(): number;
/**
* Checks the current thread against the expected primary thread for the
* server.
* <p>
* <b>Note:</b> this method should not be used to indicate the current
* synchronized state of the runtime. A current thread matching the main
* thread indicates that it is synchronized, but a mismatch does not
* preclude the same assumption.
*/
// @ts-ignore
public isPrimaryThread(): boolean;
// @ts-ignore
public getPrimaryThread(): java.lang.Thread;
// @ts-ignore
public isNetherAllowed(): boolean;
// @ts-ignore
public getPlayerDataSerializer(): cn.nukkit.utils.PlayerDataSerializer;
// @ts-ignore
public setPlayerDataSerializer(playerDataSerializer: cn.nukkit.utils.PlayerDataSerializer): void;
// @ts-ignore
public static getInstance(): cn.nukkit.Server;
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace api {
namespace API {
// @ts-ignore
class Definition extends java.lang.Enum {
// @ts-ignore
public static INTERNAL: cn.nukkit.api.API.Definition;
// @ts-ignore
public static PLATFORM_NATIVE: cn.nukkit.api.API.Definition;
// @ts-ignore
public static UNIVERSAL: cn.nukkit.api.API.Definition;
// @ts-ignore
public static values(): cn.nukkit.api.API.Definition[];
// @ts-ignore
public static valueOf(name: string): cn.nukkit.api.API.Definition;
}
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace api {
namespace API {
// @ts-ignore
class Usage extends java.lang.Enum {
// @ts-ignore
public static DEPRECATED: cn.nukkit.api.API.Usage;
// @ts-ignore
public static INCUBATING: cn.nukkit.api.API.Usage;
// @ts-ignore
public static BLEEDING: cn.nukkit.api.API.Usage;
// @ts-ignore
public static EXPERIMENTAL: cn.nukkit.api.API.Usage;
// @ts-ignore
public static MAINTAINED: cn.nukkit.api.API.Usage;
// @ts-ignore
public static STABLE: cn.nukkit.api.API.Usage;
// @ts-ignore
public static values(): cn.nukkit.api.API.Usage[];
// @ts-ignore
public static valueOf(name: string): cn.nukkit.api.API.Usage;
}
}
}
}
}

View File

@ -0,0 +1,20 @@
declare namespace cn {
namespace nukkit {
namespace api {
// @ts-ignore
interface API {
/**
* Indicates the level of stability of an API element.
* The stability also describes when to use this API element.
*/
// @ts-ignore
usage(): cn.nukkit.api.API.Usage;
/**
* Indicates definition or the platforms this API element supports.
*/
// @ts-ignore
definition(): cn.nukkit.api.API.Definition;
}
}
}
}

View File

@ -0,0 +1,212 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class Block extends cn.nukkit.level.Position implements cn.nukkit.metadata.Metadatable, cn.nukkit.math.AxisAlignedBB, cn.nukkit.block.BlockID {
// @ts-ignore
constructor()
// @ts-ignore
public static list: java.lang.Class[];
// @ts-ignore
public static fullList: cn.nukkit.block.Block[];
// @ts-ignore
public static light: number[];
// @ts-ignore
public static lightFilter: number[];
// @ts-ignore
public static solid: boolean[];
// @ts-ignore
public static hardness: number[];
// @ts-ignore
public static transparent: boolean[];
// @ts-ignore
public static hasMeta: boolean[];
// @ts-ignore
public static init(): void;
// @ts-ignore
public static get(id: number): cn.nukkit.block.Block;
// @ts-ignore
public static get(id: number, meta: java.lang.Integer): cn.nukkit.block.Block;
// @ts-ignore
public static get(id: number, meta: java.lang.Integer, pos: cn.nukkit.level.Position): cn.nukkit.block.Block;
// @ts-ignore
public static get(id: number, data: number): cn.nukkit.block.Block;
// @ts-ignore
public static get(fullId: number, level: cn.nukkit.level.Level, x: number, y: number, z: number): cn.nukkit.block.Block;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public tickRate(): number;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getBurnChance(): number;
// @ts-ignore
public getBurnAbility(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getFrictionFactor(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public canBePlaced(): boolean;
// @ts-ignore
public canBeReplaced(): boolean;
// @ts-ignore
public isTransparent(): boolean;
// @ts-ignore
public isSolid(): boolean;
// @ts-ignore
public canBeFlowedInto(): boolean;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public hasEntityCollision(): boolean;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public canBeClimbed(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public abstract getName(): string;
// @ts-ignore
public abstract getId(): number;
/**
* The full id is a combination of the id and data.
*/
// @ts-ignore
public getFullId(): number;
// @ts-ignore
public addVelocityToEntity(entity: cn.nukkit.entity.Entity, vector: cn.nukkit.math.Vector3): void;
// @ts-ignore
public getDamage(): number;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public setDamage(meta: java.lang.Integer): void;
// @ts-ignore
public position(v: cn.nukkit.level.Position): void;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getBreakTime(item: cn.nukkit.item.Item, player: cn.nukkit.Player): number;
// @ts-ignore
public getBreakTime(item: cn.nukkit.item.Item): number;
// @ts-ignore
public canBeBrokenWith(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getSide(face: cn.nukkit.math.BlockFace): cn.nukkit.block.Block;
// @ts-ignore
public getSide(face: cn.nukkit.math.BlockFace, step: number): cn.nukkit.block.Block;
// @ts-ignore
public up(): cn.nukkit.block.Block;
// @ts-ignore
public up(step: number): cn.nukkit.block.Block;
// @ts-ignore
public down(): cn.nukkit.block.Block;
// @ts-ignore
public down(step: number): cn.nukkit.block.Block;
// @ts-ignore
public north(): cn.nukkit.block.Block;
// @ts-ignore
public north(step: number): cn.nukkit.block.Block;
// @ts-ignore
public south(): cn.nukkit.block.Block;
// @ts-ignore
public south(step: number): cn.nukkit.block.Block;
// @ts-ignore
public east(): cn.nukkit.block.Block;
// @ts-ignore
public east(step: number): cn.nukkit.block.Block;
// @ts-ignore
public west(): cn.nukkit.block.Block;
// @ts-ignore
public west(step: number): cn.nukkit.block.Block;
// @ts-ignore
public toString(): string;
// @ts-ignore
public collidesWithBB(bb: cn.nukkit.math.AxisAlignedBB): boolean;
// @ts-ignore
public collidesWithBB(bb: cn.nukkit.math.AxisAlignedBB, collisionBB: boolean): boolean;
// @ts-ignore
public onEntityCollide(entity: cn.nukkit.entity.Entity): void;
// @ts-ignore
public getBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getCollisionBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinY(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
protected recalculateCollisionBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public calculateIntercept(pos1: cn.nukkit.math.Vector3, pos2: cn.nukkit.math.Vector3): cn.nukkit.level.MovingObjectPosition;
// @ts-ignore
public getSaveId(): string;
// @ts-ignore
public setMetadata(metadataKey: string, newMetadataValue: cn.nukkit.metadata.MetadataValue): void;
// @ts-ignore
public getMetadata(metadataKey: string): java.util.List;
// @ts-ignore
public hasMetadata(metadataKey: string): boolean;
// @ts-ignore
public removeMetadata(metadataKey: string, owningPlugin: cn.nukkit.plugin.Plugin): void;
// @ts-ignore
public clone(): cn.nukkit.block.Block;
// @ts-ignore
public getWeakPower(face: cn.nukkit.math.BlockFace): number;
// @ts-ignore
public getStrongPower(side: cn.nukkit.math.BlockFace): number;
// @ts-ignore
public isPowerSource(): boolean;
// @ts-ignore
public getLocationHash(): string;
// @ts-ignore
public getDropExp(): number;
// @ts-ignore
public isNormalBlock(): boolean;
// @ts-ignore
public static equals(b1: cn.nukkit.block.Block, b2: cn.nukkit.block.Block): boolean;
// @ts-ignore
public static equals(b1: cn.nukkit.block.Block, b2: cn.nukkit.block.Block, checkDamage: boolean): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,37 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockAir extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public canBeFlowedInto(): boolean;
// @ts-ignore
public canBePlaced(): boolean;
// @ts-ignore
public canBeReplaced(): boolean;
// @ts-ignore
public isSolid(): boolean;
// @ts-ignore
public getBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockAnvil extends cn.nukkit.block.BlockFallable implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getFullId(): number;
// @ts-ignore
public getDamage(): number;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public isTransparent(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,39 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBanner extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
}
}
}
}

View File

@ -0,0 +1,33 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBeacon extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,41 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBed extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBedrock extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBedrockInvisible extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBeetroot extends cn.nukkit.block.BlockCrops {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBone extends cn.nukkit.block.BlockSolidMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,33 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBookshelf extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getBurnChance(): number;
// @ts-ignore
public getBurnAbility(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,43 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBrewingStand extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBricks extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBricksEndStone extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBricksNether extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,19 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBricksRedNether extends cn.nukkit.block.BlockNetherBrick {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,35 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockBricksStone extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static NORMAL: number;
// @ts-ignore
public static MOSSY: number;
// @ts-ignore
public static CRACKED: number;
// @ts-ignore
public static CHISELED: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,41 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class BlockButton extends cn.nukkit.block.BlockFlowable implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public isActivated(): boolean;
// @ts-ignore
public isPowerSource(): boolean;
// @ts-ignore
public getWeakPower(side: cn.nukkit.math.BlockFace): number;
// @ts-ignore
public getStrongPower(side: cn.nukkit.math.BlockFace): number;
// @ts-ignore
public getFacing(): cn.nukkit.math.BlockFace;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,19 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockButtonStone extends cn.nukkit.block.BlockButton {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getToolType(): number;
}
}
}
}

View File

@ -0,0 +1,19 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockButtonWooden extends cn.nukkit.block.BlockButton {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getToolType(): number;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCactus extends cn.nukkit.block.BlockTransparentMeta {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public hasEntityCollision(): boolean;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinY(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
protected recalculateCollisionBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public onEntityCollide(entity: cn.nukkit.entity.Entity): void;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
}
}
}
}

View File

@ -0,0 +1,51 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCake extends cn.nukkit.block.BlockTransparentMeta {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinY(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
}
}
}
}

View File

@ -0,0 +1,39 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCarpet extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
constructor(dyeColor: cn.nukkit.utils.DyeColor)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public isSolid(): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCarrot extends cn.nukkit.block.BlockCrops {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,45 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCauldron extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public isFull(): boolean;
// @ts-ignore
public isEmpty(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
protected replaceBucket(oldBucket: cn.nukkit.item.Item, player: cn.nukkit.Player, newBucket: cn.nukkit.item.Item): void;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,53 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockChest extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinY(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,23 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockChorusFlower extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockChorusPlant extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockClay extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCoal extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getBurnChance(): number;
// @ts-ignore
public getBurnAbility(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCobblestone extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCobweb extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public onEntityCollide(entity: cn.nukkit.entity.Entity): void;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,61 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCocoa extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
protected static EAST: cn.nukkit.math.AxisAlignedBB[];
// @ts-ignore
protected static WEST: cn.nukkit.math.AxisAlignedBB[];
// @ts-ignore
protected static NORTH: cn.nukkit.math.AxisAlignedBB[];
// @ts-ignore
protected static SOUTH: cn.nukkit.math.AxisAlignedBB[];
// @ts-ignore
protected static ALL: cn.nukkit.math.AxisAlignedBB[];
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMinY(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,29 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockConcrete extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
}
}
}
}

View File

@ -0,0 +1,33 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockConcretePowder extends cn.nukkit.block.BlockFallable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getFullId(): number;
// @ts-ignore
public getDamage(): number;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, b: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockCraftingTable extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class BlockCrops extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,19 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDandelion extends cn.nukkit.block.BlockFlower {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
protected getUncommonFlower(): cn.nukkit.block.Block;
}
}
}
}

View File

@ -0,0 +1,23 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDaylightDetector extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
protected invertDetect(): boolean;
}
}
}
}

View File

@ -0,0 +1,19 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDaylightDetectorInverted extends cn.nukkit.block.BlockDaylightDetector {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
protected invertDetect(): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDeadBush extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeReplaced(): boolean;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDiamond extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDirt extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,35 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDispenser extends cn.nukkit.block.BlockSolidMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public getFacing(): cn.nukkit.math.BlockFace;
// @ts-ignore
public isTriggered(): boolean;
// @ts-ignore
public setTriggered(value: boolean): void;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getDispensePosition(): cn.nukkit.math.Vector3;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,49 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class BlockDoor extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static DOOR_OPEN_BIT: number;
// @ts-ignore
public static DOOR_TOP_BIT: number;
// @ts-ignore
public static DOOR_HINGE_BIT: number;
// @ts-ignore
public static DOOR_POWERED_BIT: number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public isSolid(): boolean;
// @ts-ignore
public getFullDamage(): number;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public toggle(player: cn.nukkit.Player): boolean;
// @ts-ignore
public isOpen(): boolean;
// @ts-ignore
public isTop(): boolean;
// @ts-ignore
public isTop(meta: number): boolean;
// @ts-ignore
public isRightHinged(): boolean;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorAcacia extends cn.nukkit.block.BlockDoorWood {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorBirch extends cn.nukkit.block.BlockDoorWood {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorDarkOak extends cn.nukkit.block.BlockDoorWood {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,35 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorIron extends cn.nukkit.block.BlockDoor {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorJungle extends cn.nukkit.block.BlockDoorWood {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorSpruce extends cn.nukkit.block.BlockDoorWood {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoorWood extends cn.nukkit.block.BlockDoor {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoublePlant extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static SUNFLOWER: number;
// @ts-ignore
public static LILAC: number;
// @ts-ignore
public static TALL_GRASS: number;
// @ts-ignore
public static LARGE_FERN: number;
// @ts-ignore
public static ROSE_BUSH: number;
// @ts-ignore
public static PEONY: number;
// @ts-ignore
public static TOP_HALF_BITMASK: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canBeReplaced(): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
}
}
}
}

View File

@ -0,0 +1,41 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoubleSlab extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static STONE: number;
// @ts-ignore
public static SANDSTONE: number;
// @ts-ignore
public static WOODEN: number;
// @ts-ignore
public static COBBLESTONE: number;
// @ts-ignore
public static BRICK: number;
// @ts-ignore
public static STONE_BRICK: number;
// @ts-ignore
public static QUARTZ: number;
// @ts-ignore
public static NETHER_BRICK: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoubleSlabRedSandstone extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoubleSlabStone extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static STONE: number;
// @ts-ignore
public static SANDSTONE: number;
// @ts-ignore
public static WOODEN: number;
// @ts-ignore
public static COBBLESTONE: number;
// @ts-ignore
public static BRICK: number;
// @ts-ignore
public static STONE_BRICK: number;
// @ts-ignore
public static QUARTZ: number;
// @ts-ignore
public static NETHER_BRICK: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,29 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDoubleSlabWood extends cn.nukkit.block.BlockSolidMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,29 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockDragonEgg extends cn.nukkit.block.BlockFallable {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public isTransparent(): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public teleport(): void;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEmerald extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,35 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEnchantingTable extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEndGateway extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public hasEntityCollision(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,37 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEndPortal extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public hasEntityCollision(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEndPortalFrame extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,41 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEndRod extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEndStone extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,57 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockEnderChest extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getViewers(): java.util.Set;
// @ts-ignore
public canBePushed(): boolean;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public canSilkTouch(): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,13 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class BlockFallable extends cn.nukkit.block.BlockSolid {
// @ts-ignore
constructor()
// @ts-ignore
public onUpdate(type: number): number;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFarmland extends cn.nukkit.block.BlockTransparentMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFence extends cn.nukkit.block.BlockTransparentMeta {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static FENCE_OAK: number;
// @ts-ignore
public static FENCE_SPRUCE: number;
// @ts-ignore
public static FENCE_BIRCH: number;
// @ts-ignore
public static FENCE_JUNGLE: number;
// @ts-ignore
public static FENCE_ACACIA: number;
// @ts-ignore
public static FENCE_DARK_OAK: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getBurnChance(): number;
// @ts-ignore
public getBurnAbility(): number;
// @ts-ignore
public canConnect(block: cn.nukkit.block.Block): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,49 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGate extends cn.nukkit.block.BlockTransparentMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public toggle(player: cn.nukkit.Player): boolean;
// @ts-ignore
public isOpen(): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGateAcacia extends cn.nukkit.block.BlockFenceGate {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGateBirch extends cn.nukkit.block.BlockFenceGate {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGateDarkOak extends cn.nukkit.block.BlockFenceGate {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGateJungle extends cn.nukkit.block.BlockFenceGate {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceGateSpruce extends cn.nukkit.block.BlockFenceGate {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,31 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFenceNetherBrick extends cn.nukkit.block.BlockFence {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canConnect(block: cn.nukkit.block.Block): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,43 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFire extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public hasEntityCollision(): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public isBreakable(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public canBeReplaced(): boolean;
// @ts-ignore
public onEntityCollide(entity: cn.nukkit.entity.Entity): void;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public canNeighborBurn(): boolean;
// @ts-ignore
public isBlockTopFacingSurfaceSolid(block: cn.nukkit.block.Block): boolean;
// @ts-ignore
public tickRate(): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
protected recalculateCollisionBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,23 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
abstract class BlockFlowable extends cn.nukkit.block.BlockTransparentMeta {
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public canBeFlowedInto(): boolean;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public isSolid(): boolean;
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
}
}
}
}

View File

@ -0,0 +1,47 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFlower extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public static TYPE_POPPY: number;
// @ts-ignore
public static TYPE_BLUE_ORCHID: number;
// @ts-ignore
public static TYPE_ALLIUM: number;
// @ts-ignore
public static TYPE_AZURE_BLUET: number;
// @ts-ignore
public static TYPE_RED_TULIP: number;
// @ts-ignore
public static TYPE_ORANGE_TULIP: number;
// @ts-ignore
public static TYPE_WHITE_TULIP: number;
// @ts-ignore
public static TYPE_PINK_TULIP: number;
// @ts-ignore
public static TYPE_OXEYE_DAISY: number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onUpdate(type: number): number;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
protected getUncommonFlower(): cn.nukkit.block.Block;
}
}
}
}

View File

@ -0,0 +1,49 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFlowerPot extends cn.nukkit.block.BlockFlowable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
protected static canPlaceIntoFlowerPot(id: number): boolean;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
protected recalculateBoundingBox(): cn.nukkit.math.AxisAlignedBB;
// @ts-ignore
public getMinX(): number;
// @ts-ignore
public getMinZ(): number;
// @ts-ignore
public getMaxX(): number;
// @ts-ignore
public getMaxY(): number;
// @ts-ignore
public getMaxZ(): number;
// @ts-ignore
public canPassThrough(): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
}
}
}
}

View File

@ -0,0 +1,21 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFurnace extends cn.nukkit.block.BlockFurnaceBurning {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
}
}
}
}

View File

@ -0,0 +1,45 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockFurnaceBurning extends cn.nukkit.block.BlockSolidMeta implements cn.nukkit.utils.Faceable {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public canBeActivated(): boolean;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getToolType(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public place(item: cn.nukkit.item.Item, block: cn.nukkit.block.Block, target: cn.nukkit.block.Block, face: cn.nukkit.math.BlockFace, fx: number, fy: number, fz: number, player: cn.nukkit.Player): boolean;
// @ts-ignore
public onBreak(item: cn.nukkit.item.Item): boolean;
// @ts-ignore
public onActivate(item: cn.nukkit.item.Item, player: cn.nukkit.Player): boolean;
// @ts-ignore
public toItem(): cn.nukkit.item.Item;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public hasComparatorInputOverride(): boolean;
// @ts-ignore
public getComparatorInputOverride(): number;
// @ts-ignore
public canHarvestWithHand(): boolean;
// @ts-ignore
public getBlockFace(): cn.nukkit.math.BlockFace;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockGlass extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public canSilkTouch(): boolean;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
}
}
}
}

View File

@ -0,0 +1,25 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockGlassPane extends cn.nukkit.block.BlockThin {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,29 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockGlassPaneStained extends cn.nukkit.block.BlockGlassPane {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getFullId(): number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
// @ts-ignore
public getDamage(): number;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,29 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockGlassStained extends cn.nukkit.block.BlockGlass {
// @ts-ignore
constructor()
// @ts-ignore
constructor(meta: number)
// @ts-ignore
public getFullId(): number;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getName(): string;
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public getDyeColor(): cn.nukkit.utils.DyeColor;
// @ts-ignore
public getDamage(): number;
// @ts-ignore
public setDamage(meta: number): void;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

View File

@ -0,0 +1,27 @@
declare namespace cn {
namespace nukkit {
namespace block {
// @ts-ignore
class BlockGlowstone extends cn.nukkit.block.BlockTransparent {
// @ts-ignore
constructor()
// @ts-ignore
public getName(): string;
// @ts-ignore
public getId(): number;
// @ts-ignore
public getResistance(): number;
// @ts-ignore
public getHardness(): number;
// @ts-ignore
public getLightLevel(): number;
// @ts-ignore
public getDrops(item: cn.nukkit.item.Item): cn.nukkit.item.Item[];
// @ts-ignore
public getColor(): cn.nukkit.utils.BlockColor;
// @ts-ignore
public canSilkTouch(): boolean;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More