Skip to content

Instantly share code, notes, and snippets.

View ryuuta0217's full-sized avatar
🤿
Dive into the Code.

Ryuta Iwakura ryuuta0217

🤿
Dive into the Code.
View GitHub Profile
@ryuuta0217
ryuuta0217 / h264_h265.ps1
Last active September 26, 2025 13:13
動画ファイルを NVEncC を使用して(許容できる範囲で高画質なまま) H.265/HEVC に一括変換するPowerShell 5.1スクリプト
# 設定
$TARGET_DIR = "." # 再エンコード対象となる動画ファイルがあるディレクトリ。デフォルトではカレントディレクトリ
$OUTPUT_DIR = "." # 出力先ディレクトリ。デフォルトではカレントディレクトリ (入力と同じ)
$TARGET_FILE_SUFFIX = "mp4" # 再エンコード対象となる動画ファイルの接尾辞。多くの場合は拡張子。
$OUTPUT_FILE_PREFIX = "cmp" # 再エンコード後の動画ファイルの接頭辞。
$PROFILE = "main10" # エンコーダープロファイル。H.265/HEVCで利用可能なプロファイル(NVEncCのヘルプを参照): auto, main, main10, main444
$PRESET = "P7" # エンコーダープリセット。利用可能なプリセット(NVEncCのヘルプを参照): default, performance, quality, P1 (= performance), P2, P3, P4 (= default), P5, P6, P7 (= quality)
$MAX_BITRATE = 15000 # 最大ビットレート。kbps表記。1080pなら15Mbpsあれば大体OK。15000 = 15Mbps, 1000 = 1Mbps
$ADDITIONAL_ARGUMENTS = "" # 追加のエンコーダーコマンドライン。NVEncCのヘルプを参照: https://github.com/rigaya/NVEnc/blob/master/NVEncC_Options.ja.md
@ryuuta0217
ryuuta0217 / waydroid.cfg
Created September 18, 2025 05:13
Waydroid dummy device properties configuration for Android 13 (Lineage 20)
[properties]
ro.product.board = redfin
ro.product.bootimage.brand = google
ro.product.bootimage.device = redfin
ro.product.bootimage.manufacturer = Google
ro.product.bootimage.model = Pixel 5
ro.product.bootimage.name = redfin
ro.product.brand = google

Schedule I 日本語化

このテキストの内容は、2025/04/04 22時時点の情報です。

完全日本語化

Caution

完全日本語化を行うには、ゲームのバージョンをv0.3.3f14にダウングレードする必要があります。

このセクションでは、ダウングレードの方法についても説明します。

@ryuuta0217
ryuuta0217 / Asset.java
Created April 21, 2024 15:51
Get Minecraft assets. Requires gson.
/*
* Copyright (C) 2023 Ryuta Iwakura (ryuuta0217)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@ryuuta0217
ryuuta0217 / screen_capture.js
Created September 3, 2023 01:23
Capture screen with Nashorn (or Rhino)
var Robot = java.awt.Robot;
var Rectangle = java.awt.Rectangle;
var Toolkit = java.awt.Toolkit;
var ByteArrayOutputStream = java.io.ByteArrayOutputStream;
var Base64 = java.util.Base64;
var ImageIO = javax.imageio.ImageIO;
var a = new ByteArrayOutputStream();
var b = new Robot().createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));
Add-Type -AssemblyName System.Windows.Forms,System.Drawing
$screens = [Windows.Forms.Screen]::AllScreens
$top = ($screens.Bounds.Top | Measure-Object -Minimum).Minimum
$left = ($screens.Bounds.Left | Measure-Object -Minimum).Minimum
$width = ($screens.Bounds.Right | Measure-Object -Maximum).Maximum
$height = ($screens.Bounds.Bottom | Measure-Object -Maximum).Maximum
$bounds = [Drawing.Rectangle]::FromLTRB($left, $top, $width, $height)
$bmp = New-Object System.Drawing.Bitmap ([int]$bounds.width), ([int]$bounds.height)
$graphics = [Drawing.Graphics]::FromImage($bmp)
$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size)
@ryuuta0217
ryuuta0217 / BigBucketPlugin.java
Created May 23, 2023 23:03
/give @s bucket{display: {Name: '{"text":"でっかいバケツ", "color":"aqua", "italic":"false"}', Lore: ['{"text":"貯蔵量: 0mB"}', '{"text":"モード: 回収"}']}}
package com.ryuuta0217.bigbucketplugin;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextColor;
import net.kyori.adventure.text.format.TextDecoration;
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ryuuta0217
ryuuta0217 / CustomChatTypes.java
Last active August 23, 2022 11:12
ChatTypes register - Minecraft 1.19.2 @ mojang mapping enviroinment (runMojangMappedServer)
import com.mojang.serialization.Lifecycle;
import net.minecraft.core.MappedRegistry;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
import net.minecraft.core.WritableRegistry;
import net.minecraft.network.chat.ChatType;
import net.minecraft.network.chat.ChatTypeDecoration;
import net.minecraft.network.chat.Style;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
@ryuuta0217
ryuuta0217 / C2SModListReply.java
Last active June 6, 2023 09:56
Server -> Client handshake ModList Packet and Client -> Server Reply Packet, for Spigot/Bukkit API implemented Servers
import io.netty.buffer.ByteBuf;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.IntStream;
public class C2SModListReply {
private static final byte MAGIC = 2;
@ryuuta0217
ryuuta0217 / ExampleForgeModDetectionPlugin.java
Created September 9, 2021 03:17
A sort of memo on a solution to getting installed mods of Forge players in Bungeecord/Waterfall.
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.event.ClientConnectEvent;
import net.md_5.bungee.api.event.PreLoginEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.plugin.Plugin;