This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def intersects(a;b): any(a[]; . as $x | any(b[]; . == $x)); | |
def mapatlas(set): | |
(set | unique) as $unique_set | |
| (map(if intersects(.; $unique_set) then . else empty end) | add + $unique_set | unique) as $new_set | |
| map(if intersects(.; $new_set) then empty else . end) + [$new_set]; | |
reduce .[] as $entry ([]; mapatlas($entry)) | |
# | to_entries | .[]? | select(any(.value[]; . == "red")) | .key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"format_version": "1.10.0", | |
"particle_effect": { | |
"description": { | |
"identifier": "geyseropt:test_particle", | |
"basic_render_parameters": { | |
"material": "particles_alpha", | |
"texture": "textures/blocks/wool_colored_white" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
: ${1?'Please specify a player name (e.g. ./book_head.sh _Kastle)'} | |
# Config | |
title='My Cool Title' | |
author='_Kastle' | |
# Get player UUID | |
uuid=$(curl -s https://api.mojang.com/users/profiles/minecraft/${1} | jq -r .id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#XYZ -> ZYX | |
# Make pi available as constant | |
def pi: 1 | atan *4; | |
# Convert degrees to radians | |
def deg2rad($deg): $deg*(pi/180); | |
# Convert radians to degrees | |
def rad2deg($rad): $rad*(180/pi); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: ${1?'Please specify an input resource pack in the same directory as the script (e.g. ./merge.sh MyResourcePack.zip)'} | |
# ensure jq is installed | |
if command jq --version 2>/dev/null | grep -q "1.6"; then | |
printf "\e[32m[+]\e[m \e[37mDependency jq satisfied\e[m\n" | |
echo | |
else | |
echo "Dependency jq-1.6 is not satisfied" | |
echo "You must install jq-1.6 before proceeding" | |
echo "See https://stedolan.github.io/jq/download/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
: ${1?'Please specify an input resource pack in the same directory as the script (e.g. ./converter.sh MyResourcePack.zip)'} | |
# define color placeholders | |
C_RED='\e[31m' | |
C_GREEN='\e[32m' | |
C_YELLOW='\e[33m' | |
C_BLUE='\e[36m' | |
C_GRAY='\e[37m' | |
C_CLOSE='\e[m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
: ${1?'Please specify an input resource pack in the same directory as the script (e.g. ./converter.sh MyResourcePack.zip)'} | |
# ensure input pack exists | |
if ! test -f "${1}"; then | |
echo "Input resource pack ${1} is not in this directory" | |
echo "Please ensure you have entered the filename correctly" | |
exit 1 | |
else | |
printf "\e[33m[•]\e[m \e[37mInput file ${1} detected\e[m\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// mappings reference java_model.json below | |
// note that 2 in the UV mapping multiplcation is derived from dividing .texture_size[0] by 16 for x and .texture_size[1] by 16 for y | |
{ | |
"format_version": "1.12.0", // arbitrary | |
"minecraft:geometry": [{ | |
"description": { | |
"identifier": "geometry.geometry.armor_stand", // arbitrary | |
"texture_width": 32, // '.texture_size[0]' | |
"texture_height": 32, // '.texture_size[1]' |
NewerOlder