Skip to content

Commit

Permalink
New scripts: display names, scoreboard, sleep and timing (#298)
Browse files Browse the repository at this point in the history
* fix

* Update index.js

* new scripts

* rena

* j

* Update index.js
  • Loading branch information
bot174 authored Jul 30, 2023
1 parent 15f58a0 commit dd06489
Show file tree
Hide file tree
Showing 21 changed files with 3,577 additions and 28 deletions.
17 changes: 17 additions & 0 deletions scripts/display-names/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# display-names

## Description

Library for enum mapping to Minecraft internal translation keys.

```js
import { MinecraftBlocks, MinecraftItems } from "display-blocks";
player.sendMessage("10x " + MinecraftBlocks.EndRod);
// 10x End Rod
player.sendMessage("20x " + MinecraftItems.Slimeball);
// 20x Slimeball
```

## Credits

These scripts were written by [bot174](https://github.com/bot174)
872 changes: 872 additions & 0 deletions scripts/display-names/blocks.js

Large diffs are not rendered by default.

871 changes: 871 additions & 0 deletions scripts/display-names/blocks.ts

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions scripts/display-names/dimensions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* All possible MinecraftDimensions
*/
export var MinecraftDimensions;
(function (MinecraftDimensions) {
MinecraftDimensions["Nether"] = "%dimension.dimensionName1";
MinecraftDimensions["Overworld"] = "%dimension.dimensionName0";
MinecraftDimensions["TheEnd"] = "%dimension.dimensionName2";
})(MinecraftDimensions || (MinecraftDimensions = {}));
8 changes: 8 additions & 0 deletions scripts/display-names/dimensions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* All possible MinecraftDimensions
*/
export enum MinecraftDimensions {
Nether = "%dimension.dimensionName1",
Overworld = "%dimension.dimensionName0",
TheEnd = "%dimension.dimensionName2"
}
37 changes: 37 additions & 0 deletions scripts/display-names/effects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* All possible MinecraftEffects
*/
export var MinecraftEffects;
(function (MinecraftEffects) {
MinecraftEffects["Absorption"] = "%potion.absorption";
MinecraftEffects["BadOmen"] = "%effect.badOmen";
MinecraftEffects["Blindness"] = "%potion.blindness";
MinecraftEffects["ConduitPower"] = "%potion.conduitPower";
MinecraftEffects["Darkness"] = "%effect.darkness";
MinecraftEffects["Empty"] = "%potion.empty";
MinecraftEffects["FatalPoison"] = "%potion.poison";
MinecraftEffects["FireResistance"] = "%potion.fireResistance";
MinecraftEffects["Haste"] = "%potion.digSpeed";
MinecraftEffects["HealthBoost"] = "%potion.healthBoost";
MinecraftEffects["Hunger"] = "%potion.hunger";
MinecraftEffects["InstantDamage"] = "%potion.harm";
MinecraftEffects["InstantHealth"] = "%potion.heal";
MinecraftEffects["Invisibility"] = "%potion.invisibility";
MinecraftEffects["JumpBoost"] = "%potion.jump";
MinecraftEffects["Levitation"] = "%potion.levitation";
MinecraftEffects["MiningFatigue"] = "%potion.digSlowDown";
MinecraftEffects["Nausea"] = "%potion.confusion";
MinecraftEffects["NightVision"] = "%potion.nightVision";
MinecraftEffects["Poison"] = "%potion.poison";
MinecraftEffects["Regeneration"] = "%potion.regeneration";
MinecraftEffects["Resistance"] = "%potion.resistance";
MinecraftEffects["Saturation"] = "%potion.saturation";
MinecraftEffects["SlowFalling"] = "%potion.slowFalling";
MinecraftEffects["Slowness"] = "%potion.slowness";
MinecraftEffects["Speed"] = "%potion.speed";
MinecraftEffects["Strength"] = "%potion.damageBoost";
MinecraftEffects["VillageHero"] = "%effect.villageHero";
MinecraftEffects["WaterBreathing"] = "%potion.waterBreathing";
MinecraftEffects["Weakness"] = "%potion.weakness";
MinecraftEffects["Wither"] = "%potion.wither";
})(MinecraftEffects || (MinecraftEffects = {}));
36 changes: 36 additions & 0 deletions scripts/display-names/effects.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* All possible MinecraftEffects
*/
export enum MinecraftEffects {
Absorption = "%potion.absorption",
BadOmen = "%effect.badOmen",
Blindness = "%potion.blindness",
ConduitPower = "%potion.conduitPower",
Darkness = "%effect.darkness",
Empty = "%potion.empty",
FatalPoison = "%potion.poison",
FireResistance = "%potion.fireResistance",
Haste = "%potion.digSpeed",
HealthBoost = "%potion.healthBoost",
Hunger = "%potion.hunger",
InstantDamage = "%potion.harm",
InstantHealth = "%potion.heal",
Invisibility = "%potion.invisibility",
JumpBoost = "%potion.jump",
Levitation = "%potion.levitation",
MiningFatigue = "%potion.digSlowDown",
Nausea = "%potion.confusion",
NightVision = "%potion.nightVision",
Poison = "%potion.poison",
Regeneration = "%potion.regeneration",
Resistance = "%potion.resistance",
Saturation = "%potion.saturation",
SlowFalling = "%potion.slowFalling",
Slowness = "%potion.slowness",
Speed = "%potion.speed",
Strength = "%potion.damageBoost",
VillageHero = "%effect.villageHero",
WaterBreathing = "%potion.waterBreathing",
Weakness = "%potion.weakness",
Wither = "%potion.wither"
}
44 changes: 44 additions & 0 deletions scripts/display-names/enchantments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* All possible MinecraftEnchantmentTypes
*/
export var MinecraftEnchantmentTypes;
(function (MinecraftEnchantmentTypes) {
MinecraftEnchantmentTypes["Power"] = "%enchantment.arrowDamage";
MinecraftEnchantmentTypes["Flame"] = "%enchantment.arrowFire";
MinecraftEnchantmentTypes["Infinity"] = "%enchantment.arrowInfinite";
MinecraftEnchantmentTypes["Punch"] = "%enchantment.arrowKnockback";
MinecraftEnchantmentTypes["Multishot"] = "%enchantment.crossbowMultishot";
MinecraftEnchantmentTypes["Piercing"] = "%enchantment.crossbowPiercing";
MinecraftEnchantmentTypes["QuickCharge"] = "%enchantment.crossbowQuickCharge";
MinecraftEnchantmentTypes["CurseofBinding"] = "%enchantment.curse.binding";
MinecraftEnchantmentTypes["CurseofVanishing"] = "%enchantment.curse.vanishing";
MinecraftEnchantmentTypes["Sharpness"] = "%enchantment.damage.all";
MinecraftEnchantmentTypes["BaneofArthropods"] = "%enchantment.damage.arthropods";
MinecraftEnchantmentTypes["Smite"] = "%enchantment.damage.undead";
MinecraftEnchantmentTypes["Efficiency"] = "%enchantment.digging";
MinecraftEnchantmentTypes["Unbreaking"] = "%enchantment.durability";
MinecraftEnchantmentTypes["FireAspect"] = "%enchantment.fire";
MinecraftEnchantmentTypes["Lure"] = "%enchantment.fishingSpeed";
MinecraftEnchantmentTypes["FrostWalker"] = "%enchantment.frostwalker";
MinecraftEnchantmentTypes["Knockback"] = "%enchantment.knockback";
MinecraftEnchantmentTypes["Looting"] = "%enchantment.lootBonus";
MinecraftEnchantmentTypes["Fortune"] = "%enchantment.lootBonusDigger";
MinecraftEnchantmentTypes["LuckoftheSea"] = "%enchantment.lootBonusFishing";
MinecraftEnchantmentTypes["Mending"] = "%enchantment.mending";
MinecraftEnchantmentTypes["Respiration"] = "%enchantment.oxygen";
MinecraftEnchantmentTypes["Protection"] = "%enchantment.protect.all";
MinecraftEnchantmentTypes["BlastProtection"] = "%enchantment.protect.explosion";
MinecraftEnchantmentTypes["FeatherFalling"] = "%enchantment.protect.fall";
MinecraftEnchantmentTypes["FireProtection"] = "%enchantment.protect.fire";
MinecraftEnchantmentTypes["ProjectileProtection"] = "%enchantment.protect.projectile";
MinecraftEnchantmentTypes["SoulSpeed"] = "%enchantment.soul_speed";
MinecraftEnchantmentTypes["SwiftSneak"] = "%enchantment.swift_sneak";
MinecraftEnchantmentTypes["Thorns"] = "%enchantment.thorns";
MinecraftEnchantmentTypes["SilkTouch"] = "%enchantment.untouching";
MinecraftEnchantmentTypes["DepthStrider"] = "%enchantment.waterWalker";
MinecraftEnchantmentTypes["AquaAffinity"] = "%enchantment.waterWorker";
MinecraftEnchantmentTypes["Channeling"] = "%enchantment.tridentChanneling";
MinecraftEnchantmentTypes["Loyalty"] = "%enchantment.tridentLoyalty";
MinecraftEnchantmentTypes["Riptide"] = "%enchantment.tridentRiptide";
MinecraftEnchantmentTypes["Impaling"] = "%enchantment.tridentImpaling";
})(MinecraftEnchantmentTypes || (MinecraftEnchantmentTypes = {}));
43 changes: 43 additions & 0 deletions scripts/display-names/enchantments.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* All possible MinecraftEnchantmentTypes
*/
export enum MinecraftEnchantmentTypes {
Power = "%enchantment.arrowDamage",
Flame = "%enchantment.arrowFire",
Infinity = "%enchantment.arrowInfinite",
Punch = "%enchantment.arrowKnockback",
Multishot = "%enchantment.crossbowMultishot",
Piercing = "%enchantment.crossbowPiercing",
QuickCharge = "%enchantment.crossbowQuickCharge",
CurseofBinding = "%enchantment.curse.binding",
CurseofVanishing = "%enchantment.curse.vanishing",
Sharpness = "%enchantment.damage.all",
BaneofArthropods = "%enchantment.damage.arthropods",
Smite = "%enchantment.damage.undead",
Efficiency = "%enchantment.digging",
Unbreaking = "%enchantment.durability",
FireAspect = "%enchantment.fire",
Lure = "%enchantment.fishingSpeed",
FrostWalker = "%enchantment.frostwalker",
Knockback = "%enchantment.knockback",
Looting = "%enchantment.lootBonus",
Fortune = "%enchantment.lootBonusDigger",
LuckoftheSea = "%enchantment.lootBonusFishing",
Mending = "%enchantment.mending",
Respiration = "%enchantment.oxygen",
Protection = "%enchantment.protect.all",
BlastProtection = "%enchantment.protect.explosion",
FeatherFalling = "%enchantment.protect.fall",
FireProtection = "%enchantment.protect.fire",
ProjectileProtection = "%enchantment.protect.projectile",
SoulSpeed = "%enchantment.soul_speed",
SwiftSneak = "%enchantment.swift_sneak",
Thorns = "%enchantment.thorns",
SilkTouch = "%enchantment.untouching",
DepthStrider = "%enchantment.waterWalker",
AquaAffinity = "%enchantment.waterWorker",
Channeling = "%enchantment.tridentChanneling",
Loyalty = "%enchantment.tridentLoyalty",
Riptide = "%enchantment.tridentRiptide",
Impaling = "%enchantment.tridentImpaling",
}
138 changes: 138 additions & 0 deletions scripts/display-names/entities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
/**
* All possible MinecraftEntities
*/
export var MinecraftEntities;
(function (MinecraftEntities) {
MinecraftEntities["AreaEffectCloud"] = "%entity.area_effect_cloud.name";
MinecraftEntities["ArmorStand"] = "%entity.armor_stand.name";
MinecraftEntities["Arrow"] = "%entity.arrow.name";
MinecraftEntities["Bat"] = "%entity.bat.name";
MinecraftEntities["Bee"] = "%entity.bee.name";
MinecraftEntities["Blaze"] = "%entity.blaze.name";
MinecraftEntities["Boat"] = "%entity.boat.name";
MinecraftEntities["Cat"] = "%entity.cat.name";
MinecraftEntities["CaveSpider"] = "%entity.cave_spider.name";
MinecraftEntities["Chicken"] = "%entity.chicken.name";
MinecraftEntities["Cow"] = "%entity.cow.name";
MinecraftEntities["Creeper"] = "%entity.creeper.name";
MinecraftEntities["Dolphin"] = "%entity.dolphin.name";
MinecraftEntities["Goat"] = "%entity.goat.name";
MinecraftEntities["Panda"] = "%entity.panda.name";
MinecraftEntities["Donkey"] = "%entity.donkey.name";
MinecraftEntities["DragonFireball"] = "%entity.dragon_fireball.name";
MinecraftEntities["Drowned"] = "%entity.drowned.name";
MinecraftEntities["Egg"] = "%entity.egg.name";
MinecraftEntities["ElderGuardian"] = "%entity.elder_guardian.name";
MinecraftEntities["EnderCrystal"] = "%entity.ender_crystal.name";
MinecraftEntities["EnderDragon"] = "%entity.ender_dragon.name";
MinecraftEntities["Enderman"] = "%entity.enderman.name";
MinecraftEntities["Endermite"] = "%entity.endermite.name";
MinecraftEntities["EnderPearl"] = "%entity.ender_pearl.name";
MinecraftEntities["Evoker"] = "%entity.evocation_illager.name";
MinecraftEntities["EvokerFang"] = "%entity.evocation_fang.name";
MinecraftEntities["EyeofEnder"] = "%entity.eye_of_ender_signal.name";
MinecraftEntities["FallingBlock"] = "%entity.falling_block.name";
MinecraftEntities["Fireball"] = "%entity.fireball.name";
MinecraftEntities["FireworkRocket"] = "%entity.fireworks_rocket.name";
MinecraftEntities["FishingHook"] = "%entity.fishing_hook.name";
MinecraftEntities["Clownfish"] = "entity.%fish.clownfish.name";
MinecraftEntities["Fox"] = "%entity.fox.name";
MinecraftEntities["Cod"] = "%entity.cod.name";
MinecraftEntities["Pufferfish"] = "%entity.pufferfish.name";
MinecraftEntities["Salmon"] = "%entity.salmon.name";
MinecraftEntities["TropicalFish"] = "%entity.tropicalfish.name";
MinecraftEntities["Axolotl"] = "%entity.axolotl.name";
MinecraftEntities["Ghast"] = "%entity.ghast.name";
MinecraftEntities["GlowSquid"] = "%entity.glow_squid.name";
MinecraftEntities["PiglinBrute"] = "%entity.piglin_brute.name";
MinecraftEntities["Guardian"] = "%entity.guardian.name";
MinecraftEntities["Hoglin"] = "%entity.hoglin.name";
MinecraftEntities["Horse"] = "%entity.horse.name";
MinecraftEntities["Husk"] = "%entity.husk.name";
MinecraftEntities["Ravager"] = "%entity.ravager.name";
MinecraftEntities["IronGolem"] = "%entity.iron_golem.name";
MinecraftEntities["Item"] = "%entity.item.name";
MinecraftEntities["LeashKnot"] = "%entity.leash_knot.name";
MinecraftEntities["LightningBolt"] = "%entity.lightning_bolt.name";
MinecraftEntities["LingeringPotion"] = "%entity.lingering_potion.name";
MinecraftEntities["Llama"] = "%entity.llama.name";
MinecraftEntities["TraderLlama"] = "%entity.trader_llama.name";
MinecraftEntities["LlamaSpit"] = "%entity.llama_spit.name";
MinecraftEntities["MagmaCube"] = "%entity.magma_cube.name";
MinecraftEntities["Minecart"] = "%entity.minecart.name";
MinecraftEntities["MinecartwithChest"] = "%entity.chest_minecart.name";
MinecraftEntities["MinecartwithCommandBlock"] = "%entity.command_block_minecart.name";
MinecraftEntities["MinecartwithFurnace"] = "%entity.furnace_minecart.name";
MinecraftEntities["MinecartwithHopper"] = "%entity.hopper_minecart.name";
MinecraftEntities["MinecartwithTNT"] = "%entity.tnt_minecart.name";
MinecraftEntities["Mule"] = "%entity.mule.name";
MinecraftEntities["Mooshroom"] = "%entity.mooshroom.name";
MinecraftEntities["MovingBlock"] = "%entity.moving_block.name";
MinecraftEntities["Ocelot"] = "%entity.ocelot.name";
MinecraftEntities["Painting"] = "%entity.painting.name";
MinecraftEntities["Parrot"] = "%entity.parrot.name";
MinecraftEntities["Phantom"] = "%entity.phantom.name";
MinecraftEntities["Pig"] = "%entity.pig.name";
MinecraftEntities["Piglin"] = "%entity.piglin.name";
MinecraftEntities["Pillager"] = "%entity.pillager.name";
MinecraftEntities["PolarBear"] = "%entity.polar_bear.name";
MinecraftEntities["Rabbit"] = "%entity.rabbit.name";
MinecraftEntities["Sheep"] = "%entity.sheep.name";
MinecraftEntities["Shulker"] = "%entity.shulker.name";
MinecraftEntities["ShulkerBullet"] = "%entity.shulker_bullet.name";
MinecraftEntities["Silverfish"] = "%entity.silverfish.name";
MinecraftEntities["Skeleton"] = "%entity.skeleton.name";
MinecraftEntities["SkeletonHorse"] = "%entity.skeleton_horse.name";
MinecraftEntities["Stray"] = "%entity.stray.name";
MinecraftEntities["Slime"] = "%entity.slime.name";
MinecraftEntities["SmallFireball"] = "%entity.small_fireball.name";
MinecraftEntities["Sniffer"] = "%entity.sniffer.name";
MinecraftEntities["Snowball"] = "%entity.snowball.name";
MinecraftEntities["SnowGolem"] = "%entity.snow_golem.name";
MinecraftEntities["Spider"] = "%entity.spider.name";
MinecraftEntities["Potion"] = "%entity.splash_potion.name";
MinecraftEntities["Squid"] = "%entity.squid.name";
MinecraftEntities["Strider"] = "%entity.strider.name";
MinecraftEntities["BlockofTNT"] = "%entity.tnt.name";
MinecraftEntities["Trident"] = "%entity.thrown_trident.name";
MinecraftEntities["TripodCamera"] = "%entity.tripod_camera.name";
MinecraftEntities["Turtle"] = "%entity.turtle.name";
MinecraftEntities["Unknown"] = "%entity.unknown.name";
MinecraftEntities["Vex"] = "%entity.vex.name";
MinecraftEntities["Villager"] = "%entity.villager.name";
MinecraftEntities["Armorer"] = "%entity.villager.armor";
MinecraftEntities["Butcher"] = "%entity.villager.butcher";
MinecraftEntities["Cartographer"] = "%entity.villager.cartographer";
MinecraftEntities["Cleric"] = "%entity.villager.cleric";
MinecraftEntities["Farmer"] = "%entity.villager.farmer";
MinecraftEntities["Fisherman"] = "%entity.villager.fisherman";
MinecraftEntities["Fletcher"] = "%entity.villager.fletcher";
MinecraftEntities["Leatherworker"] = "%entity.villager.leather";
MinecraftEntities["Librarian"] = "%entity.villager.librarian";
MinecraftEntities["Shepherd"] = "%entity.villager.shepherd";
MinecraftEntities["ToolSmith"] = "%entity.villager.tool";
MinecraftEntities["WeaponSmith"] = "%entity.villager.weapon";
MinecraftEntities["StoneMason"] = "%entity.villager.mason";
MinecraftEntities["UnskilledVillager"] = "%entity.villager.unskilled";
MinecraftEntities["Vindicator"] = "%entity.vindicator.name";
MinecraftEntities["WanderingTrader"] = "%entity.wandering_trader.name";
MinecraftEntities["Witch"] = "%entity.witch.name";
MinecraftEntities["Wither"] = "%entity.wither.name";
MinecraftEntities["WitherSkeleton"] = "%entity.wither_skeleton.name";
MinecraftEntities["WitherSkull"] = "%entity.wither_skull.name";
MinecraftEntities["Wolf"] = "%entity.wolf.name";
MinecraftEntities["ExperienceOrb"] = "%entity.xp_orb.name";
MinecraftEntities["BottleEnchanting"] = "%entity.xp_bottle.name";
MinecraftEntities["Zoglin"] = "%entity.zoglin.name";
MinecraftEntities["Zombie"] = "%entity.zombie.name";
MinecraftEntities["ZombieHorse"] = "%entity.zombie_horse.name";
MinecraftEntities["ZombifiedPiglin"] = "%entity.zombie_pigman.name";
MinecraftEntities["ZombieVillager"] = "%entity.zombie_villager.name";
MinecraftEntities["Frog"] = "%entity.frog.name";
MinecraftEntities["Tadpole"] = "%entity.tadpole.name";
MinecraftEntities["Warden"] = "%entity.warden.name";
MinecraftEntities["Allay"] = "%entity.allay.name";
MinecraftEntities["BoatwithChest"] = "%entity.chest_boat.name";
MinecraftEntities["Camel"] = "%entity.camel.name";
MinecraftEntities["RaftwithChest"] = "%entity.chest_raft.name";
})(MinecraftEntities || (MinecraftEntities = {}));
Loading

0 comments on commit dd06489

Please sign in to comment.