From 1d891a0172aa0d66bf76c6cc4bdf0aad7373ec28 Mon Sep 17 00:00:00 2001 From: WakelessSloth56 Date: Thu, 19 Nov 2020 17:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8"v3"=E4=B8=8A=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + scripts/crafttweaker.zs | 205 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) create mode 100644 .gitignore create mode 100644 scripts/crafttweaker.zs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1bb4614 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.code-workspace \ No newline at end of file diff --git a/scripts/crafttweaker.zs b/scripts/crafttweaker.zs new file mode 100644 index 0000000..48a43b6 --- /dev/null +++ b/scripts/crafttweaker.zs @@ -0,0 +1,205 @@ +import crafttweaker.player.IPlayer; +import crafttweaker.entity.IEntity; +import crafttweaker.entity.IEntityLiving; +import crafttweaker.entity.IEntityLivingBase; +import crafttweaker.events.IEventManager; +import crafttweaker.event.PlayerTickEvent; +import crafttweaker.event.PlayerLoggedInEvent; +import crafttweaker.server.IServer; +import crafttweaker.game.IGame; +import crafttweaker.data.IData; +import crafttweaker.item.IIngredient; +import crafttweaker.item.IItemStack; +import crafttweaker.item.IItemCondition; +import crafttweaker.command.ICommandManager; +import crafttweaker.command.ICommand; +import crafttweaker.command.ICommandSender; + +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +mods.jei.JEI.addDescription(, "?你在想甚?"); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); +recipes.remove(); + +recipes.addShaped(, [[null, , null], [null, , ], [, null, null]]); +recipes.addShaped(, [[null, , null], [, , ], [null, , null]]); +recipes.addShaped(, [[null, , null], [null, , null], [, , ]]); +recipes.addShaped(, [[null, , null], [, , ]]); +recipes.addShaped(, [[null, null, ], [null, , ], [, , ]]); +recipes.addShaped(, [[, , ], [null, , ], [null, null, ]]); +recipes.addShaped(, [[, , ], [, , ], [, , ]]); +recipes.addShaped(, [[null, , null], [, , ], [null, , null]]); +recipes.addShaped(, [[, , ]]); +recipes.addShaped(, [[, null, ], [null, , null], [, null, ]]); +recipes.addShaped(, [[null, , null], [, , ], [null, , null]]); + +recipes.addShaped( + , + [ + [, , ], + [, , ], + [, , ] + ] +); + + +recipes.remove(); +recipes.addShaped( + , + [ + [,,], + [,,], + [,,] // 铱矿石 + ] +); + +recipes.remove(); +.displayName = "采 矿 镭 射 枪"; +recipes.remove(); +recipes.addShaped( + , + [ + [, , ], + [, , ], + [null, , ] + ] +); +mods.jei.JEI.addDescription(, "采矿镭射枪的合成用替代品"); +mods.jei.JEI.addDescription(, "不会吧不会吧,不会真有人以为服务器里给用这玩意吧?"); + +recipes.remove(); +recipes.addShaped( + , + [ + [, , ], + [, , ], + [, , ] + ] +); + +recipes.remove(); +recipes.addShaped( + , + [ + [, , ], + [, , ], + [, , ] + ] +); + +recipes.remove(); +recipes.addShaped( + , + [ + [, , ], + [, , ], + [, , ] + ] +); + +recipes.addShaped( + , + [ + [, , ], + [, , ], + [, , ] + ] +); + + +mods.ic2.Macerator.addRecipe(, ); +mods.ic2.Macerator.addRecipe(, ); +mods.ic2.Macerator.addRecipe(, ); +mods.ic2.Macerator.addRecipe(, ); + +mods.botania.Apothecary.removeRecipe("loonium"); + +mods.touhoulittlemaid.Altar.removeRecipe("touhou_little_maid:craft_gashapon_machines"); + + +function BuildTellraw (target as string, raw_json_text as string[]) { + var c = ""; + for item in raw_json_text { + c += ("," + item); + } + return "tellraw "+ target + " [\"\"" + c + "]"; +} + +function RunCmd (c as string) { + server.commandManager.executeCommand(server,c); +} + + +events.onPlayerLoggedIn(function(event as PlayerLoggedInEvent) { + if (!event.player.world.remote) { + var player = event.player; + var name = player.name; + RunCmd("scoreboard players add " + name + " loggedIn 1"); + // RunCmd( + // "execute @a[name=" + name + ",score_loggedIn=1] ~ ~ ~ " + BuildServerChan( + // "@a", + // [ + // "{\"translate\":\"message.shw.login.newplayer.1\"}", + // "{\"selector\": \"@a[name=" + name + "]\"}" + // ] as string[] + // ) + // ); + // RunCmd( + // "execute @a[name=" + name + "] ~ ~ ~ " + BuildTellraw( + // name, + // [ + // "{\"translate\":\"message.shw.login.player.1\",\"with\":[\"" + name + "\"]}", + // "{\"selector\": \"@a[name=" + name + "]\"}" + // ] as string[] + // ) + // ); + // RunCmd( + // "execute @a[name=" + name + "] ~ ~ ~ " + BuildTellraw( + // name, + // [ + // "{\"translate\":\"message.shw.login.player.2\"}", + // "{\"score\":{\"name\":\"" + name + "\",\"objective\":\"loggedIn\"},\"color\":\"gray\"}" + // ] as string[] + // ) + // ); + } +}); \ No newline at end of file