Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ServerEvents.recipes((event) => {
- // 實際上用來將石頭轉換成黑曜石的配方
- event
- .custom({
- type: "lychee:lightning_channeling",
- hide_in_viewer: true,
- post: {
- type: "if",
- contextual: {
- type: "location",
- offsetY: -1,
- predicate: {
- block: {
- blocks: ["minecraft:stone"],
- },
- },
- },
- then: {
- type: "place",
- offsetY: -1,
- block: "minecraft:obsidian",
- },
- else: { // 閃電打在避雷針上時實際上是在上面一格產生實體
- type: "if",
- contextual: {
- type: "location",
- offsetY: -2,
- predicate: {
- block: {
- blocks: ["minecraft:stone"],
- },
- },
- },
- then: {
- type: "place",
- offsetY: -2,
- block: "minecraft:obsidian",
- },
- },
- },
- })
- .id("kubejs:lychee-lightning_channeling/change_stone_to_obsidian_actually");
- // 僅用來在 JEI/REI 中完整顯示石頭,不會有實際作用的配方
- event
- .custom({
- type: "lychee:lightning_channeling",
- ghost: true,
- item_in: [{ item: "stone" }],
- comment: "將石頭電擊後轉換成黑曜石",
- post: {
- type: "place",
- offsetY: -1,
- block: "minecraft:obsidian",
- },
- })
- .id("kubejs:lychee-lightning_channeling/change_stone_to_obsidian-view_only");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement