Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
Co-authored-by: ZZZank <3410764033@qq.com>
  • Loading branch information
github-actions[bot] and ZZZank committed May 26, 2024
1 parent a1b02a2 commit 949c865
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ onEvent('item.entity_interact', (event) => {
//other name -> target name
!(!dinnerboneVillager && dinnerboneNameTag)
) {
return;//skip if no condition matches
return; //skip if no condition matches
}

//flipping trades(sound like swearing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ onEvent('recipes', (event) => {
*/
const recipes = [
{
output: "redstone_arsenal:flux_gem_block",
output: 'redstone_arsenal:flux_gem_block',
pattern: ['AA', 'AA'],
key: {
A: "redstone_arsenal:flux_gem"
A: 'redstone_arsenal:flux_gem'
},
id: "redstone_arsenal:storage/flux_gem_block"
id: 'redstone_arsenal:storage/flux_gem_block'
},
{
output: 'redstone_arsenal:obsidian_rod',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ onEvent('recipes', (event) => {
*/
const recipes = [
{
output: "4x redstone_arsenal:flux_gem",
inputs: [
"redstone_arsenal:flux_gem_block"
],
id: "redstone_arsenal:storage/flux_gem_from_block"
output: '4x redstone_arsenal:flux_gem',
inputs: ['redstone_arsenal:flux_gem_block'],
id: 'redstone_arsenal:storage/flux_gem_from_block'
}
];

Expand Down
2 changes: 1 addition & 1 deletion kubejs/startup_scripts/mek.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const $GasDeferredRegister = java('mekanism.common.registration.impl.GasDeferredRegister');
const $SlurryDeferredRegister = java('mekanism.common.registration.impl.SlurryDeferredRegister');
const $InfuseTypeDeferredRegister = java('mekanism.common.registration.impl.InfuseTypeDeferredRegister');
const $MinecraftForge = java("net.minecraftforge.common.MinecraftForge")
const $MinecraftForge = java('net.minecraftforge.common.MinecraftForge');

const GASES = new $GasDeferredRegister('kubejs');
const SLURRY = new $SlurryDeferredRegister('kubejs');
Expand Down
11 changes: 6 additions & 5 deletions kubejs/startup_scripts/multiblock/arrow_hit.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict';


onForgeEvent('net.minecraftforge.event.entity.ProjectileImpactEvent$Arrow', ((event) => {
onForgeEvent('net.minecraftforge.event.entity.ProjectileImpactEvent$Arrow', (event) => {
const arrow = event.arrow;
const rayTraceResult = event.rayTraceResult;
console.log(arrow.type.getRegistryName());
if (arrow.type.getRegistryName().toString() != 'archers_paradox:challenge_arrow' ||
rayTraceResult.type.name() != 'block') {
if (
arrow.type.getRegistryName().toString() != 'archers_paradox:challenge_arrow' ||
rayTraceResult.type.name() != 'block'
) {
return;
}
/**
Expand All @@ -19,4 +20,4 @@ onForgeEvent('net.minecraftforge.event.entity.ProjectileImpactEvent$Arrow', ((ev
console.log('hit type: ' + event.getRayTraceResult().getType());
arrow.setVelocity(0, 1, 0);
const kjsed = arrow.asKJS();
}));
});
36 changes: 18 additions & 18 deletions kubejs/startup_scripts/multiblock/patchouli.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";
'use strict';

const PatchouliAPI = java("vazkii.patchouli.api.PatchouliAPI");
const PatchouliAPI = java('vazkii.patchouli.api.PatchouliAPI');
// @ts-ignore
const Character = java("java.lang.Character");
const Rotation = java("net.minecraft.util.Rotation");
const Character = java('java.lang.Character');
const Rotation = java('net.minecraft.util.Rotation');

/**
* @param {ResourceLocation_} id
Expand All @@ -28,37 +28,37 @@ PatchouliMultiblick.prototype = {
/**
* the `event` param is only used for informing users that registering should only happens in such event
* and the event will not be used
*
*
* note that `$PatchouliAPI.instance.showMultiblock(...)` does not need registering
* @param {Internal.StartupEventJS} event
*/
register: function (event) {
PatchouliAPI.instance.registerMultiblock(this.id, this.makePatchouliMultiblock());
},
}
};

global.tMulti = new PatchouliMultiblick(
"kubejs:try_multiblock",
'kubejs:try_multiblock',
[
[" ", " ", " "],
[" ", " 0 ", " "],
["GGG", "GGG", "GGG"],
[' ', ' ', ' '],
[' ', ' 0 ', ' '],
['GGG', 'GGG', 'GGG']
],
{
G: Block.getBlock("minecraft:obsidian"),
O: Block.getBlock("minecraft:sculk_shrieker"),
0: Block.getBlock("mekanism:block_steel"),
G: Block.getBlock('minecraft:obsidian'),
O: Block.getBlock('minecraft:sculk_shrieker'),
0: Block.getBlock('mekanism:block_steel')
}
);

onEvent("init", (event) => {
onEvent('init', (event) => {
//在游戏初始化时注册其结构
global.tMulti.register(event)
global.tMulti.register(event);
});

onEvent("block.right_click", (event) => {
onEvent('block.right_click', (event) => {
const { block, player, item } = event;
if (item.id.toString() != "mekanism:energy_tablet" || !player.isCreativeMode()) {
if (item.id.toString() != 'mekanism:energy_tablet' || !player.isCreativeMode()) {
return;
}
if (event.hand == OFF_HAND) {
Expand All @@ -67,7 +67,7 @@ onEvent("block.right_click", (event) => {
}
PatchouliAPI.instance.showMultiblock(
global.tMulti.makePatchouliMultiblock(),
Text.of("sure"),
Text.of('sure'),
block.pos.up(),
Rotation.NONE
);
Expand Down

0 comments on commit 949c865

Please sign in to comment.