Skip to content

Commit

Permalink
Added custom components
Browse files Browse the repository at this point in the history
  • Loading branch information
legopitstop committed Jun 8, 2024
1 parent b8f45e6 commit 68275b0
Show file tree
Hide file tree
Showing 31 changed files with 1,803 additions and 1,729 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/bandage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"links":[{"namespace":"bandage","pattern":"/bandage/recipes#:ref"}],"items":[{"id":"bandage:bandage","name":"Bandage","texture":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAjpQTFRFAAAA/////////////////////////////////////////////////////////v7++Pj49vb2/f39////////////////////////////9fX17Ozs5+fn5ubm6urq8/Pz/Pz8////////////////////////////9PT06+vr6enp8fHx+vr6////////////////9fX16Ojo9/f3////9PT03Nzc8vLy7u7uw8PDzMzM19fX7+/v+fn5tra2mpqamZmZy8vL09PT8PDw7e3tsLCwubm5wcHBycnJ0dHR+/v71tbWqqqqmJiYk5OTjIyMuLi4vLy8xMTEysrKzc3N2dnZ5OTknp6elZWVjo6Oi4uLioqKu7u7wsLCs7OzyMjIoKCgl5eXjY2NkZGRlpaWvb29ubKyurq6wMDAx8fHn5+fkpKSwlxcua2tkJCQpqamtbW1xsPDzAAAywwMw6eno6OjuFhYzE1NzKamxcXFuFJSv2dnzAUFzFBQzKOjzMnJzMHBzIiIzDg4zBAQyWxsxsbGzMfHzAoKxUVFvr6+lJSUzIODzFtbxVhYj4+Pv7+/yK+vvJaWxjo6m5ubzMzMzMzMzMzMmZmZmZmZzMzMzMzMzMzMzMzMmZmZmZmZmZmZmZmZzMzMzMzMzMzMzMzMzMzMmZmZmZmZmZmZmZmZzMzMzMzMzMzMzMzMnZ2dmZmZmZmZmZmZmZmZzMzMzMzMmZmZmZmZmZmZzMzMzMzMzMzMoKCgmZmZmZmZ0mGcVQAAAL50Uk5TAAZIt8tcC1jR/+BsQqTo//////C2URFNsfX/////////+sBeGBRdxv///////dNuHnj//92M/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5rk/vO3Aid82+ubPAgBIG3L/d+PNAQRXsL0//vXgCAU6fefMBJs2O+QKBG54xgAAAJ4SURBVHicbZPLaxNRFMa/U3HSxExraB6dLmJDU2u7aYuhhIKIFAUfSKGLLlR0Je5c9U/QnQiiC0EUQV0ILsSNoGi1C6kPKqgl2kq0r8yYhMQmnZgp5npudGbS4F3M3Dnnd+8933fnEBoH1Ye1JdQ4V4jq1Kb1P4B2cIYRqviIflrNQJgzRW/r3zOMTn4sNgK9fLAeaaUyVFEGqfQ1zsh7Bxj+XdIR2FlCKE/rsaxAqLpixT30xgZGKGVhwCxzYqOgmQJqLWNhkF7ZwChX/sFCYnMVgiN+vWah3080bQMHqkCrrlfQE/lMfYV5KH3tFmcc4BDROtD+sfstvMnnSLRxtVCJHtrAuLQwgy5a1g1ERooBAyq7Qndt4CQv8JPJSCXt31PltHQN4p4NTKx1CkaynQvA7m+I5YNcVDlIN1wVmuigH4gQpforvhU/4PGaabfIiQygabQMRMylHl6NDlM67QDniWaRJNK5lmgewltLb1UxhfpfoMwmUyKaCyyVOB0tEBwVB4e2/+KX8hIYnJeRmJrnp+emDZxWwmQCLO2Jq4LLvOWqYC+LQIBWHRU5UXKLvPC0imM5hLLhZ2MLWU7Xhme4jrjjwzjpXZkkNKIZViESrzdKUPfNkePkOLD/ixeKJ/ApG/0ueHPEWioNKi6/kHdOa6yi7egDnscH3m1RMaqVhY8vwyxUpYojcy0c3Du/OO2qgObzGdJpM9KdYo0iKL12gKtEd9A7lDJg7iq10D8Vk3TOBq5LpxnRuw1HxSmOnXEb57bsl2toC4n2bXLzs/w52dR69zl2CdqJK/Jy6Xhz68nxSNcusooposNusBEAHtdbc6wx9Ac7Heghhv61sQAAAABJRU5ErkJggg=="},{"id":"bandage:nether_bandage","name":"Nether Bandage","texture":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAlhQTFRFAAAAhUJChUJChUJChUJChUJChUJChUJChUJChUJChUJChUJChUJChUJChUJChEFBfj8/fD4+g0FBhUJChUJChUJChUJChUJChUJChUJCez09cTk5bDY2azY2bzg4eDw8gkBAhUJChUJChUJChUJChUJChUJChUJCgkFBej09cDg4bjg4dzs7gEBAhUJChUJChUJChUJCfz8/bTc3eTw8fT4+djs7hUJCfz8/czk5fT8/cDk5bjc3hEJCZjMzajU1czo6bDc3ez4+XzAwUSgoUCgoaTU1dTs7cjk5XC4uVywsZzQ0bTY2eDs7WS0tTygoSSUlQiEhVisrWi0tYjExaDQ0azU1cTg4YTAwUyoqSyYmRSMjQSAgQCAgWSwsYDAwbzc3XS8vUykpSiUlRCIiQSEhYTExVCoqTicnQyIiRyQkTScnWy4uWioqWCwsXi8vZTMzSCQkQyEhkRYWXigoRiMjaTMzzAAAxQMDbykpjhcXqBQUfSsrYzIyXS4uYzExjhsbygEBphUVfioqbDQ0bzIyiyMjsQ8PxAQEkxwcSSQkZDIyaTQ0yAMDoBAQSyUlTycnTCYmjiIioBgYlxUVZTIycy0tbCMjpw4OZzMzTSYmajU1ajU1ajU1VysrWy0tUCgoUCgoazU1ajU1ajU1ajU1UCgoUCgoUCgoUCgoazU1ajU1ajU1ajU1ajU1RSIiUCgoUCgoUCgoUCgoajU1ajU1ajU1ajU1USkpUCgoUCgoUCgoUCgoajU1ajU1UCgoUCgoUCgoajU1ajU1ajU1VCoqUCgoUCgotcre4AAAAMh0Uk5TAAZIt8tcC1jR/+BsQqTo//////C2URFNsfX/////////+sBeGBRdxv////////3Tbh54/////92M//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+a5P7///O3Aid82+ubPAgBIG3L/f/fjzQEEV7C9P/714AgFOn3nzASbNjvkCgkp2stAAACdUlEQVR4nG2TP0wTcRTHvw+59notYBHuaGkgWGuIxQQ1QZhgEAaDi4kxwURDHB1cnBxM3EyMg4PRhA2ddHCwLqIMmBA1TUgM1Khto1ikVIFSav8B/fmu5K7X6g2/3L33eff7fd7dI1gvqlylmpD13kZUoXZK/wPIyRlGKK8QbZXqAZUzaYe8v8daBy9RKxDgjZPdRNtoFtugZopyhBZM4OReJgm3O8Pvyab8awLqgc+lgIPeGcDQpyJwgpahFrOb3j8C3ettYcjH5wxgGL+ci4C9PwYRiKLLvhNGsIVoxgDG+AV7BUcYR7ylaDDDe/cf3OGMCZwtylmgib5+h6MzCq3cnwdY9rkBnNdbmIJGrygPh7ePfkPhrtBjA7jM9bvuHCPKotRLP6C0UYEgTxnABfe6AFwr+r69cfiTHq7IeuhB1UIVHbQCH1HkUKvtmwtoF/kYaizULooDvi1XmavRkfuCGotT7zFItNQIaFnIUjlWb9HLXxLSh9MRoe264jlOH84WYFrcWuzhWkhvueEFLoa/Kcmr66FpcYyIq5x6c00LPuajqsUY/w2Am1YNC1dP3GJxl15gdBtqSnst7MRpe5BeAuPXzUOStJcaRCfRLFsIMTCbgzKyVHhStUCftgxJbo381JJC8Hn8DRmyWvAySgm2mFjQLY6mG2oshtUNu8yBXKaoW7Qr3FmUB0IzVQuoSktC73SuUbGxo/AEnllaPUU0DTGSTmCcPnIH9y0u0RUDmOafo8CIFEyYFpMcu1gdnKf6vNzHxPzm5LwvBFzjx3N1oxfi2B2oV+/hBt+d+Xc2gTer3ttscZNouBq0AsBcZTSHrKG/gGDgIaypFCsAAAAASUVORK5CYII="},{"id":"bandage:end_bandage","name":"End Bandage","texture":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAApRQTFRFAAAA1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1dqU1NmTztKPzNCN09eS1dqU1dqU1dqU1dqU1dqU1dqU1dqU09iTy8+NwcWGvMCDu7+Cv8OFyM2L0taS1dqU1dqU1dqU1dqU1dqU1dqU1dqU0teSys6MwMWGvsKEwMSFv8OEx8uK0NWR1dqU1dqU1dqU1dqUzNGOvcGDyc2MzdGOxsuK1dqUzNGOuLyAys+M1NmUzdKO1NiTo6Zxqq52s7d8yMyLztOPw8iIu8CCvMCCy9CNwcaGmJxqgYRagINZqa11sLV6wseH0NWQxcmJwsaHzdKPk5Zml5ppn6Jup6t0rrN509iSsrd8jpFjf4JYeXxUcnVQlplomp1roqZxqKx1q693tbl9vsOEm55shYhcf4JZe35WdXhRcXRPcHNOmZxqoKRvqKt0lZlohIdcen1VdHdRoaVwpqpzholdfoFYc3ZQd3pTfYBXm55rmJRlmJtpnqFupalzqa12hYhdeHtUsU00mpBimJtqdnlSqKhyzAAAyQoHpo1gdXhSsFI4wEItsY5gnaBssl0/ywQDv0QusYteq6t0foFXrKRwtXNOwzAgyQ4Jtlw/pKdyq6pzywgGuDonnJ9scnVPfH9Xt3BMvU00tUoyfH9We35VnaBtq5RloH1VuzAhp6pzqKx0oqVwqq52qq52qq52pqlzl5pogINZgINZqq51qq52qq52qq52n6NugINZgINZgINZgINZqq51qq52qq52qq52qq52gINZgINZgINZgINZqq52qq52qq52qq52g4ZbgINZgINZgINZgINZqq52qq52gINZgINZgINZqq52qq52qq52holdgINZgINZwCQb2QAAANx0Uk5TAAZIt8tcC1jR/+BsQqTo//////C2URFNsfX///////////rAXhgUXcb///////////3Tbh54/////92M/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////5rk/v//87cCJ3zb/+ubPAgBIG3L/d+PNAQRXsL0//vXgCAU6fefMBJs2O+QKA7K64YAAAJ4SURBVHicbZNfSFNRHMe/v8SVc87NbOpduU1qSK4oaEVQURIoBlGEvQQR9BApiG8+Vg/Va5KPPdSTEESQVFAPRn+gXEJpW60i/22u2ZDturntRt5+Z3X/bHUfzj3ndz6c8/v8zjkE80elTykLmfsWohL1U/kfQLU8wwjlrUQZpRJw8Uza+WcL+t7CzRcz4OeNE16iFdgpAwdRtJ2RtzoQ/JVOoMEpo5nkTGtCRXNVRGmvoVcacIAohL3LGTQXZc9SToV9La7A3zCuAZ2cuRIS3MftYUJday6EI7zHmAYczwJ1NK6gm0IUpIcIrrXkeUYHThMtAU0fqqI4GYmi28qZilTvaMA5UcIZtNGEMgvvQaI4NgvdmxowIIP9aApt+VwqyBVwuKhAUEc0YLA6pTKS9LB5MIKORTcnJbvpqmHhUyVaQKtYt7jhqx2wWXNhlFn4fKK4/qTi4AGk7BTKLHY/QRfRAucSmINqXwtXWuwQt8AiP/Oqgdmmz2me9icJusWNd1ur+WfhJQ9NikBH/SK3tusacP7bCcoDfA/uGRY268Y+w6KXbwPgpLhuEZdMFrceZHEmhU0/XI97JvZxMdavrjDfe1ZPkhqXZ7ogET1lC9UrvYjB0TNZGDEs0P2pBhZL43QsMK3WxjjNdXKZBTc9FOM9+4Q7djrnyiw6+++qVj6Mw7ezwmKLtchBjzQ6Zlig/3n9vKh01pOxsKPqFrXWgftEwxhcjczj1Jt8kf5aXKBjGvCID7EwjD1HX87rFgMc6zQezrg46EtwNam2Os8oMMTD/RVP7zXHhuC7eAWXubfr37cJvE9Ig2xxjajDCJoBIFJ6mtvMod963t0hjqxE5wAAAABJRU5ErkJggg=="},{"id":"bandage:water_bandage","name":"Water Bandage","texture":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAqBQTFRFAAAAWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoLzWoHyV37sV33qWYHxWoLzWoLzWoLzWoLzWoLzWoLzWoLzVn3pU3jfUHXaUHXZUnfdVXzmWYDwWoLzWoLzWoLzWoLzWoLzWoLzWoLzVnzoUnjeUXfcUnfeUXfdVXvlWIDuWoLzWoLzWoLzWoLzV33pUXbbVnznV37rVXvkWoLzVn3pTnDSWoLyUXbcVn3oVHrjRWS6SGjCTG7MVXrkV3/sU3nhUXbaUnbdQV2uN0+TNk6SSGjBS2zJWoHxWH/uUHbaU3jgTnHSPlqoQV+vRGO3R2e/SmvHUXXbWH/tTG3MPFeiNk6RNEuLMUeEQF6uQmCyR2fASGnDTG/OVHniUXXZQl+wOFGXNEyNMkmHMEaDMEaCQV+xQWCxRGO4S23LP1uqNEuMMkiGMUeDRWS5Rma+OVKZNU2QM0uLMUiFM0qJNU2PQmGzRFupQV+wQ2K2Rma9OVKYM0qKMUeFhi9XSVijNk+SM0mISWW8zAAAwwYLV1WeMkmIgjJdmydJYVWeRWW7Q2G1RWS7fjhoyQIFmClMY1ObSma/T2K3dUWBqBw1wggPgzhnM0qLRWW8R2fBS2a+xgUJmCRCQF+vQmG0NUyONEuNNk2RRGO5eEN9kS5Xiy1UNEyORmW9V1mmW0yNoR02R2a/MUiGOFGYNUyPSGjCSGjCSGjCQF6vQmCzMEeDNk6SNk6SSGjCSGjCSGjCSGjCNk6SNk6SNk6SNk6SSGjCSGjCSGjCSGjCSGjCNk6SNk6SNk6SNk6SSGjCSGjCSGjCSGjCOFCVNk6SNk6SNk6SNk6SSGjCSGjCNk6SNk6SNk6SSGjCSGjCSGjCOVKYNk6SNk6S6uqhZAAAAOB0Uk5TAAZIt8tcC1jR/+BsQqTo//////C2URFNsfX/////////+sBeGBRdxv/////////9024eeP/////djP////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+a5P7////ztwInfNvrmzwIASBty/3fjzQEEV7C9P/714AgFOn3nzASbNjvkCjjqq4FAAACdUlEQVR4nG2TX0hTcRTHv9+kOdPpZqxtsJiWroQtauqLlQlKxh4kfAgKrHdfzJfApx4rhHy0oLfClx76YyBWChERhN2kHNgUdCa4kTXnnU4nejvXvNud9Xv47bdzPnfn9zm7hzAv7q5sQch8tpC71Fb2fwBLJSMIM4fIVHY/cEQyKyXWvzUSbtlmzUCtFI67rEzDxlVUkDN+QZQcUL+disNhV+Hiz9WauAZX0XTWX8KPBtC0ZVEQVNNwbapJz7oGH3cUNPKdAbTIzTcVNPE7tLpplKWqFZyXGiMGEF4HSuerx9CWsn8JLX1DyMmMZHJAJ7kMOMmXKPHOoEOEAAf5xAC6wFhVDFXkeAKuVnIRjjIpMWgA3SpQTlUQ23hFQ0bSTm4Q1gEDuHF4WQNsiarPQEMEAUozoHp5J2/hmz/LBbHjRGO2eNYGuLW1KRRY+I4zKvuKW5Wn4U1PosCi/jXayQXJBedgLd6e2m9xSn8LLGNtk1pwqSKalLQ/tYGcxYBSe1A+LMNAs+WDnAL2RdnL7+UszpBrgKg/xYVPexZyzf68xRVSfreSi4ZFeU3UZPGIj3E9AXfcI+0blXRxg37Ba125S/LSaKxdb/UrsdC01udJOMITGw/yFgh5Z2GxupQfwa+aJtUCRSs0W8h2mXNi0fNQj5z+faDAosWX7ngrf0akdF23OBoeleDOuaGRvAV8NntM77TaOW4VR+3YyUFTq4fJftR7f8Vwlc86X+xZ3ORFA3ijj4sg83WxnMUtiTXnB+e9Pi996BnTbJWeIeC2fG3cN3oTEuuFr7cPd+UU+Hc2gUjc0y0W98kT+aAZAKK7o1ltDv0BkovYIQhR55kAAAAASUVORK5CYII="}]}
1 change: 1 addition & 0 deletions docs/.vitepress/breaker.json

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions docs/.vitepress/classes/BedrockGeoLoader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import * as THREE from "three";

export class BedrockGeoLoader extends THREE.Loader {
constructor(manager) {
super(manager);
}

load(url) {
const onError = () => {};
const onProgress = () => {};
const scope = this;
const loader = new THREE.FileLoader(scope.manager);
loader.setPath(scope.path);
loader.setRequestHeader(scope.requestHeader);
loader.setWithCredentials(scope.withCredentials);
loader.load(
url,
function (text) {
try {
console.log(text);
scope.parse(JSON.parse(text));
} catch (e) {
if (onError) {
onError(e);
} else {
console.error(e);
}

scope.manager.itemError(url);
}
},
onError,
onProgress
);
}

parse(json) {
console.log(json);

return undefined;
}
}
31 changes: 31 additions & 0 deletions docs/.vitepress/classes/Identifier.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

export class Identifier {
constructor(namespace, path) {
this.namespace = namespace;
this.path = path;
}

static fromString(namespace, path) {
if (path == undefined) {
if (namespace instanceof Identifier) {return namespace}
var namespace2, path2;
[namespace2, path2] = namespace.toString().split(":");
if (!path2) {
return new Identifier("minecraft", namespace);
}
return new Identifier(namespace2, path2);
}
return new Identifier(namespace, path2);
}

match(other) {
if (other instanceof Identifier) {
return this.namespace === other.namespace && this.path === other.path;
}
return this.match(Identifier.fromString(other));
}

toString() {
return this.namespace + ":" + this.path;
}
}
90 changes: 90 additions & 0 deletions docs/.vitepress/classes/Item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import { Identifier } from "./Identifier";
import { renderFormatting, getLink } from "../theme/mcui";

export class Item {
constructor(id, name, texture, link, lore = []) {
this.id = id;
this.name = name;
this.link = link;
this.texture = texture
? texture
: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAt1BMVEX/AP//AP//AP/9AP0fAB8AAAABAAEAAAD/AP/9AP0fAB8BAAH/AP/+AP4YABgBAAH/AP/+AP4WABYBAAH+AP4XABcBAAH+AP4XABf/AP//AP/+AP4YABgBAAEAAAD/AP/+AP4ZABkDAAP+AP4SABL+AP4UABT+AP7+AP7+AP7+AP7+AP70APRXAFcUABQYABgXABcXABcXABceAB4VABUXABcSABJYAFj0APT+AP7+AP7+AP79AP2J1Tm8AAAAAWJLR0QF+G/pxwAAAAd0SU1FB+EJDhcOFGEzO8MAAAAJdnBBZwAAACIAAAAiAPgEXxQAAADzSURBVDjL1dDZkoIwEAXQy3IBBQVFUVHcd8d9G5f//64pCy0yqQrv3n5LnaTTDWTRdMAwSctmFojAAQpF0lUCDyiVSV8JAqBSJcM8UKuTUR5oNL8SaFlaMdDukEnXzgLd8YJ34h7QH5DDJEoT+q4FKaMx/0cGk6kMjMKsMm8sXtVejlY/681429k1X7WvHoomzGP5VE8PzoPL9Po7ufXv6YXao/Q0IL24WclNJXC5ycBy/fA9VTIkt0ugF38G9xwdwk66CXm+A3FL2J7Ywo7I3QIINMUfvgbs53kgJE+PPOCThxngKYFLHp+AowQWaRqALoI/Q50gLzlZBxIAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMDktMTVUMDE6MTQ6MjArMDI6MDDBw4POAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTA5LTE1VDAxOjE0OjIwKzAyOjAwsJ47cgAAAABJRU5ErkJggg==";
this.lore = lore;
}
static unknown() {
return new Item(
Identifier.fromString("unknown"),
"Unknown",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAACdQTFRFuYVclmxKeVU6WT0pRywbQDcwKxkPOiMVWDYhbGxsMywnh4eHdFhECa/XGwAAAL9JREFUeJxtkWEVgzAMhA8JZ+Es1AIWNguVABKYhCEBLGChFmIhFpbwcyF9zev72l56zQTGsEx0mGwqQC6HGHGZUagAAseCvHASQxVw68twT1m1D/kA6IvF4dDexi6vQLQQFOCYecIqiLL4dhhkm+/0ChTrtOYvG5FRASPTmbqWBiq47RMzTqTyI2CWnLWjGY5eQYrezlaQdtv/A2GOSXCH4QE4cby9tWu0/MgKokND9FlrbvkjyA58e74/Jgv4AT2kq1H8sjU9AAAAAElFTkSuQmCC"
);
}

// parse item
static fromJson(data) {
return new Item(
Identifier.fromString(data.id),
data.name,
data.texture,
data.link,
data.lore
);
}

match(other) {
if (other instanceof Item) {
return this.id.match(other.id);
}
return false;
}

toString() {
return this.id.toString();
}

cleanName() {
if (!this._cleanName) {
this._cleanName = this.name.replace(/§./g, '');
}
return this._cleanName;
}

getDisplayName() {
if (!this.displayName) {
this.displayName = renderFormatting(this.name);
}
return this.displayName;
}

getMinetip() {
if (!this.minetip) {
// Name
this.minetip = this.getDisplayName() + "<br>";
// Lore
var htmlLore = [];
if (this.lore) {
for (const ln of this.lore) {
htmlLore.push(renderFormatting(ln));
}
}
// Advanced Tooltips
htmlLore.push('<span class="format-8">' + this.id.toString() + "</span>");
this.minetip += htmlLore.join("<br>");
}
return this.minetip;
}

getLink() {
if (!this.link) {
var link = getLink(this);
this.link = link ? link : "#" + this.id.path;
}
return this.link;
}

getLinkTarget() {
if (!this.linkTarget) {
this.linkTarget = this.getLink().startsWith("http") ? "_blank" : "_self";
}
return this.linkTarget;
}
}
148 changes: 148 additions & 0 deletions docs/.vitepress/components/ArmorStandGenerator.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<!-- WARN: Not ready for production!! -->

<template>
<div id="renderer"></div>
</template>

<script>
import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
import { GUI } from "three/addons/libs/lil-gui.module.min.js";
import { BedrockGeoLoader } from "../classes/BedrockGeoLoader.js";
// https://threejs.org/docs/#manual/en/introduction/Installation
export default {
name: "ArmorStandGenerator",
data() {
return {};
},
methods: {
init: function () {
const armorStand = new BedrockGeoLoader().load(
"../theme/models/armor_stand.geo.json",
"geometry.armor_stand"
);
let container = document.getElementById("renderer");
this.scene = new THREE.Scene();
this.camera = new THREE.PerspectiveCamera(
75,
container.clientWidth / container.clientHeight,
0.1,
1000
);
this.renderer = new THREE.WebGLRenderer();
this.renderer.setSize(container.clientWidth, container.clientHeight);
container.appendChild(this.renderer.domElement);
// Cube
const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshLambertMaterial({ color: 0xff0000 });
this.cube = new THREE.Mesh(geometry, material);
this.scene.add(this.cube);
// Light
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
const light = new THREE.SpotLight(0xffffff, 200);
light.position.set(0, 0, 1);
this.scene.add(ambientLight, light);
this.lightHolder = new THREE.Group();
this.lightHolder.add(light);
this.scene.add(this.lightHolder);
// Controls
this.camera.position.set(0, 0, 5);
const controls = new OrbitControls(this.camera, this.renderer.domElement);
controls.enablePan = false;
controls.enableZoom = false;
this.createPanel();
},
createPanel() {
const gui = new GUI({ container: document.getElementById("renderer") });
const head = {
x: 0,
y: 0,
z: 0,
};
const body = {
x: 0,
y: 0,
z: 0,
};
const leftArm = {
x: 0,
y: 0,
z: 0,
};
const rightArm = {
x: 0,
y: 0,
z: 0,
};
const leftLeg = {
x: 0,
y: 0,
z: 0,
};
const rightLeg = {
x: 0,
y: 0,
z: 0,
};
const headFolder = gui.addFolder("Head");
headFolder.add(head, "x", 0, 360, 1);
headFolder.add(head, "y", 0, 360, 1);
headFolder.add(head, "z", 0, 360, 1);
const bodyFolder = gui.addFolder("Body");
bodyFolder.add(body, "x", 0, 360, 1);
bodyFolder.add(body, "y", 0, 360, 1);
bodyFolder.add(body, "z", 0, 360, 1);
const leftArmFolder = gui.addFolder("Left Arm");
leftArmFolder.add(leftArm, "x", 0, 360, 1);
leftArmFolder.add(leftArm, "y", 0, 360, 1);
leftArmFolder.add(leftArm, "z", 0, 360, 1);
const rightArmFolder = gui.addFolder("Right Arm");
rightArmFolder.add(rightArm, "x", 0, 360, 1);
rightArmFolder.add(rightArm, "y", 0, 360, 1);
rightArmFolder.add(rightArm, "z", 0, 360, 1);
const leftLegFolder = gui.addFolder("Left Leg");
leftLegFolder.add(leftLeg, "x", 0, 360, 1);
leftLegFolder.add(leftLeg, "y", 0, 360, 1);
leftLegFolder.add(leftLeg, "z", 0, 360, 1);
const rightLegFolder = gui.addFolder("Right Leg");
rightLegFolder.add(rightLeg, "x", 0, 360, 1);
rightLegFolder.add(rightLeg, "y", 0, 360, 1);
rightLegFolder.add(rightLeg, "z", 0, 360, 1);
gui.onChange((event) => {
console.log(event.property);
});
gui.open();
},
animate: function () {
requestAnimationFrame(this.animate);
// this.cube.rotation.x += 0.01;
// this.cube.rotation.y += 0.01;
this.lightHolder.quaternion.copy(this.camera.quaternion);
this.renderer.render(this.scene, this.camera);
},
},
mounted() {
this.init();
this.animate();
},
};
</script>

<style scoped>
#renderer {
display: block;
width: 500px;
height: 500px;
cursor: move;
}
</style>
25 changes: 25 additions & 0 deletions docs/.vitepress/components/BisectHostingAds.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div class="BisectHostingAds">ADVERT</div>
</template>

<script>
export default {
name: "BisectHostingAds",
};
</script>

<style scoped>
.BisectHostingAds {
display: flex;
justify-content: center;
align-items: center;
padding: 24px;
border-radius: 12px;
min-height: 256px;
text-align: center;
line-height: 18px;
font-size: 12px;
font-weight: 500;
background-color: var(--vp-carbon-ads-bg-color);
}
</style>
26 changes: 26 additions & 0 deletions docs/.vitepress/components/BrewingRecipe.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<div>
<span class="mcui mcui-Brewing pixel-image">
<span class="mcui-input">
<InvSlot :id="input" />
</span>
<span class="mcui-output">
<InvSlot />
<InvSlot :id="output" />
<InvSlot />
</span>
</span>
</div>
</template>

<script>
export default {
name: "BrewingRecipe",
props: {
input: String,
output: String,
},
};
</script>

<style scoped></style>
Loading

0 comments on commit 68275b0

Please sign in to comment.