Skip to content

Instantly share code, notes, and snippets.

View DevBobcorn's full-sized avatar

Tasuku Bobcorn DevBobcorn

View GitHub Profile
import os
import json
def print_json_files(directory):
numId = 0
lines = []
for filename in os.listdir(directory):
@DevBobcorn
DevBobcorn / gen_biomes.py
Created June 7, 2025 11:36
Biome listing generator
import os
import json
def get_or_default(obj, key, defVal):
return obj[key] if key in obj.keys() else defVal
def print_json_files(directory):
numId = 0
===============================================================================
[Dandelion/Torchflower/Poppy/Blue Orchid/Allium/Azure Bluet/Red Tulip/Orange Tulip/White Tulip/Pink Tulip/Oxeye Daisy/Cornflower/Wither Rose/Lily of the Valley]
0.0625 0.0 0.0625 0.4375 0.625 0.4375 (x14)
+0.25 => [0.3125, 0.6875]
0.3125 0.0 0.3125 0.6875 0.625 0.6875
===============================================================================
[Bamboo]
-0.0625 0.0 -0.0625 0.5625 1.0 0.5625 ([leaves=large] x4)
+0.25 => [0.1875, 0.8125]
@DevBobcorn
DevBobcorn / converted.srt
Created April 13, 2025 12:29
歌词坏苹果
1
00:00:00,000 --> 00:00:00,950
BadApple!! 演唱:nomico 填词:Haruka
2
00:00:01,000 --> 00:00:29,120
BadApple!! 作曲:ZUN 编曲:Masayoshi Minoshima
3
00:00:29,170 --> 00:00:32,120
{
"parent": "item/template_banner",
"textures": {
"colour": "minecraft:block/banner/banner_COLOR"
}
}
@DevBobcorn
DevBobcorn / BlockDataExporter.java
Last active June 3, 2025 06:59
Vanilla Data Exporters (For Fabric 1.20.2 using official mappings, minor edits are required for use with other versions. 1.20.5+ uses ItemComponentDataExporter instead of ItemDataExporter.)
package com.example;
import com.google.gson.*;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
@DevBobcorn
DevBobcorn / fix_animclip_path.py
Created September 18, 2024 14:11
Unity animation clip data fixers
import os
import re
import pandas as pd
class Counter:
def __init__(self):
self.success = 0
self.failure = 0
# Function to replace patterns in the text
@DevBobcorn
DevBobcorn / TMPro UGUI GUIDs.txt
Last active September 24, 2024 06:49
HS2 <-> KKS Animation Bone Mapping
TextMeshProUGUI
m_Script: {fileID: 1453722849, guid: 67dfb1fdfb2b407222eda8e23ac8b724, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
TMP_SubMeshUI
m_Script: {fileID: 1908110080, guid: 67dfb1fdfb2b407222eda8e23ac8b724, type: 3}
m_Script: {fileID: 11500000, guid: 058cba836c1846c3aa1c5fd2e28aea77, type: 3}
TMP_Dropdown
m_Script: {fileID: 1148083418, guid: 67dfb1fdfb2b407222eda8e23ac8b724, type: 3}
@DevBobcorn
DevBobcorn / yaml_field_batch_replace.py
Last active September 18, 2024 14:08
Script for replacing YAML(Unity scene/prefab) fields with a given name from a reference file. Used for restoring previously saved fields in some cases.
af = "Path/to/reference.unity"
bf = "Path/to/target.unity"
import yaml
# Load the YAML files, handling multiple documents
a_yamls = {}
target_field = "m_text"
@DevBobcorn
DevBobcorn / ExportUtil_VerSpec_1_16_5.java
Last active August 14, 2024 04:51
Entity data exporter as a 1.16.5 Forge Mod
package com.example.examplemod;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.lang.reflect.Field;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;