ModPE函数表是一份适用于ModPE的变量、函数和方法的清单。
使用方法[编辑]
跟随函数表的参数说明即可运行函数或实现方法。
函数概述[编辑]
顶级命名空间[编辑]
ModPE类[编辑]
Level类[编辑]
Player类[编辑]
Entity类[编辑]
Item类[编辑]
Block类[编辑]
Server类[编辑]
Renderer类[编辑]
- renderer对象的方法与属性
renderer.renderType
一个只读的保存这个渲染器类型ID的属性
renderer.model
一个只读的保存model对象的属性
- model对象的方法与属性
- modelPart对象的方法与属性
Hook函数[编辑]
常量表[编辑]
- 颜色表
ChatColor.AQUA;
ChatColor.BEGIN;
ChatColor.BLACK;
ChatColor.BLUE;
ChatColor.BOLD;
ChatColor.DARK_AQUA;
ChatColor.DARK_BLUE;
ChatColor.DARK_GRAY;
ChatColor.DARK_GREEN;
ChatColor.DARK_PURPLE;
ChatColor.DARK_RED;
ChatColor.GOLD;
ChatColor.GRAY;
ChatColor.GREEN;
ChatColor.LIGHT_PURPLE;
ChatColor.RED;
ChatColor.RESET;
ChatColor.WHITE;
ChatColor.YELLOW;
const BLACK = "§0"; //黑色
const DARK_BLUE = "§1"; //深蓝色
const DARK_GREEN = "§2"; //深绿色
const DARK_AQUA = "§3"; //湖蓝色
const DARK_RED = "§4"; //深红色
const DARK_PURPLE = "§5"; //紫色
const GOLD = "§6"; //金色
const GRAY = "§7"; //灰色
const DARK_GRAY = "§8"; //深灰色
const BLUE = "§9"; //蓝色
const GREEN = "§a"; //绿色
const AQUA = "§b"; //天蓝色
const RED = "§c"; //红色
const LIGHT_PURPLE = "§d"; //粉红色
const YELLOW = "§e"; //黄色
const WHITE = "§f"; //白色
const OBFUSCATED = "§k"; //随机字符
const BOLD = "§l"; //粗体
const STRIKETHROUGH = "§m";//删除线
const UNDERLINE = "§n"; //下划线
const ITALIC = "§o"; //斜体
const RESET = "§r"; //重置文本样式
- 物品类型表
ItemCategory.DECORATION;
ItemCategory.FOOD;
ItemCategory.INTERNAL;
ItemCategory.MATERIAL;
ItemCategory.TOOL;
- 粒子效果表
ParticleType.angryVillager;
ParticleType.bubble;
ParticleType.carrotboost;
ParticleType.cloud;
ParticleType.crit;
ParticleType.dripLava;
ParticleType.dripWater;
ParticleType.enchantmenttable;
ParticleType.fallingDust;
ParticleType.flame;
ParticleType.happyVillager;
ParticleType.heart;
ParticleType.hugeexplosion;
ParticleType.hugeexplosionSeed;
ParticleType.ink;
ParticleType.itemBreak;
ParticleType.largeexplode;
ParticleType.lava;
ParticleType.mobFlame;
ParticleType.note;
ParticleType.portal;
ParticleType.rainSplash;
ParticleType.redstone;
ParticleType.slime;
ParticleType.smoke;
ParticleType.smoke2;
ParticleType.snowballpoof;
ParticleType.spell;
ParticleType.spell2;
ParticleType.spell3;
ParticleType.splash;
ParticleType.suspendedTown;
ParticleType.terrain;
ParticleType.waterWake;
ParticleType.witchspell;
- 实体类型表
EntityType.ARROW;
EntityType.BAT;
EntityType.BLAZE;
EntityType.BOAT;
EntityType.CAVE_SPIDER;
EntityType.CHICKEN;
EntityType.COW;
EntityType.CREEPER;
EntityType.EGG;
EntityType.ENDERMAN;
EntityType.EXPERIENCE_ORB;
EntityType.EXPERIENCE_POTION;
EntityType.FALLING_BLOCK;
EntityType.FIREBALL;
EntityType.FISHING_HOOK;
EntityType.GHAST;
EntityType.IRON_GOLEM;
EntityType.ITEM;
EntityType.LAVA_SLIME;
EntityType.LIGHTNING_BOLT;
EntityType.MINECART;
EntityType.MUSHROOM_COW;
EntityType.OCELOT;
EntityType.PAINTING;
EntityType.PIG;
EntityType.PIG_ZOMBIE;
EntityType.PLAYER;
EntityType.PRIMED_TNT;
EntityType.RABBIT;
EntityType.SHEEP;
EntityType.SILVERFISH;
EntityType.SKELETON;
EntityType.SLIME;
EntityType.SMALL_FIREBALL;
EntityType.SNOWBALL;
EntityType.SNOW_GOLEM;
EntityType.SPIDER;
EntityType.SQUID;
EntityType.THROWN_POTION;
EntityType.VILLAGER;
EntityType.WOLF;
EntityType.ZOMBIE;
EntityType.ZOMBIE_VILLAGER;
- 实体模型表
EntityRenderType.arrow;
EntityRenderType.bat;
EntityRenderType.blaze;
EntityRenderType.boat;
EntityRenderType.camera;
EntityRenderType.chicken;
EntityRenderType.cow;
EntityRenderType.creeper;
EntityRenderType.egg;
EntityRenderType.enderman;
EntityRenderType.expPotion;
EntityRenderType.experienceOrb;
EntityRenderType.fallingTile;
EntityRenderType.fireball;
EntityRenderType.fishHook;
EntityRenderType.ghast;
EntityRenderType.human;
EntityRenderType.ironGolem;
EntityRenderType.item;
EntityRenderType.lavaSlime;
EntityRenderType.lightningBolt;
EntityRenderType.map;
EntityRenderType.minecart;
EntityRenderType.mushroomCow;
EntityRenderType.ocelot;
EntityRenderType.painting;
EntityRenderType.pig;
EntityRenderType.player;
EntityRenderType.rabbit;
EntityRenderType.sheep;
EntityRenderType.silverfish;
EntityRenderType.skeleton;
EntityRenderType.slime;
EntityRenderType.smallFireball;
EntityRenderType.snowGolem;
EntityRenderType.snowball;
EntityRenderType.spider;
EntityRenderType.squid;
EntityRenderType.thrownPotion;
EntityRenderType.tnt;
EntityRenderType.unknownItem;
EntityRenderType.villager;
EntityRenderType.villagerZombie;
EntityRenderType.witch;
EntityRenderType.wolf;
EntityRenderType.zombie;
EntityRenderType.zombiePigman;
- 盔甲类型表
ArmorType.boots;
ArmorType.chestplate;
ArmorType.helmet;
ArmorType.leggings;
- 状态效果表
MobEffect.absorption;
MobEffect.blindness;
MobEffect.confusion;
MobEffect.damageBoost;
MobEffect.damageResistance;
MobEffect.digSlowdown;
MobEffect.digSpeed;
MobEffect.effectIds;
MobEffect.fireResistance;
MobEffect.harm;
MobEffect.heal;
MobEffect.healthBoost;
MobEffect.hunger;
MobEffect.invisibility;
MobEffect.jump;
MobEffect.movementSlowdown;
MobEffect.movementSpeed;
MobEffect.nightVision;
MobEffect.poison;
MobEffect.regeneration;
MobEffect.saturation;
MobEffect.waterBreathing;
MobEffect.weakness;
MobEffect.wither;
- 世界维度表
DimensionId.NETHER; 地狱
DimensionId.NORMAL; 主世界
- 方块面id表
BlockFace.DOWN;
BlockFace.EAST;
BlockFace.NORTH;
BlockFace.SOUTH;
BlockFace.UP;
BlockFace.WEST;
- 使用动画表
UseAnimation.bow;
UseAnimation.normal;
- 附魔id表
Enchantment.AQUA_AFFINITY;
Enchantment.BANE_OF_ARTHROPODS;
Enchantment.BLAST_PROTECTION;
Enchantment.DEPTH_STRIDER;
Enchantment.EFFICIENCY;
Enchantment.FEATHER_FALLING;
Enchantment.FIRE_ASPECT;
Enchantment.FIRE_PROTECTION;
Enchantment.FLAME;
Enchantment.FORTUNE;
Enchantment.INFINITY;
Enchantment.KNOCKBACK;
Enchantment.LOOTING;
Enchantment.LUCK_OF_THE_SEA;
Enchantment.LURE;
Enchantment.POWER;
Enchantment.PROJECTILE_PROTECTION;
Enchantment.PROTECTION;
Enchantment.PUNCH;
Enchantment.RESPIRATION;
Enchantment.SHARPNESS;
Enchantment.SILK_TOUCH;
Enchantment.SMITE;
Enchantment.THORNS;
Enchantment.UNBREAKING;
- 附魔类型表
EnchantType.all;
EnchantType.axe;
EnchantType.book;
EnchantType.bow;
EnchantType.fishingRod;
EnchantType.flintAndSteel;
EnchantType.hoe;
EnchantType.pickaxe;
EnchantType.shears;
EnchantType.shovel;
EnchantType.weapon;
- 方块渲染类型表
BlockRenderLayer.alpha;
BlockRenderLayer.alpha_seasons;
BlockRenderLayer.alpha_single_side;
BlockRenderLayer.blend;
BlockRenderLayer.doubleside;
BlockRenderLayer.far;
BlockRenderLayer.opaque;
BlockRenderLayer.opaque_seasons;
BlockRenderLayer.seasons_far;
BlockRenderLayer.seasons_far_alpha;
BlockRenderLayer.water;
Template:ModFormat
Template:ModPE