Skip to content

Instantly share code, notes, and snippets.

View rikka0w0's full-sized avatar

Rikka0_0小六花 rikka0w0

  • UNSW
  • Sydney
View GitHub Profile

Biome Tags are awesome!

As a result of 1.18.2 changes, all worldgen registries can now have tags. Including biomes! As a result of this, Mojang has deprecated the biome category which means that sooner or later, this enum will be deleted. To better protect yourself and your mod/datapack from relying on these categories, you should instead, switch to using biome tags.

The existing biome tags from vanilla do not cover all usecases which means that many modders have started banding together to decide on common biome tags to use. These common biome tags are under the forge: namespace and the c: namespace.

For best compatibility with any mod or datapack, you should have a custom tag that pulls entries from minecraft:, forge:, and c: tags. Yes, datapacks too should be adding their biomes to the forge: and c: namespaced tags. And mods can "datagen" the tag json files automatically but that is outside the scope of this gist. See the Fabric wiki or [Forge Comm

import com.mojang.datafixers.util.Function3;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.block.BlockState;
import java.util.List;
public class CodecExample {
public static final Codec<CodecExample> CODEC = RecordCodecBuilder.create(
instance -> instance.group(
@robinsmidsrod
robinsmidsrod / ubuntu_1804.ipxe
Last active July 4, 2023 09:11
iPXE script entries for booting Ubuntu 18.04 in different ways
# boot-url points to an nfs URL
# sanboot-url points to an http URL
# ubuntu-version contains 18.04.3
# ubuntu-release contains bionic
:ubuntu
echo Booting Ubuntu from iSCSI for ${initiator-iqn}
set root-path ${base-iscsi}:${hostname}.boot.ubuntu
sanboot ${root-path} || goto failed
goto start
@tautologico
tautologico / buildcrossgcc.sh
Last active March 18, 2024 11:43
Build gcc cross-compiler for armv7-a (Cortex-A)
#!/bin/sh
# Download binutils, gcc, the linux kernel, glibc
# define the prefix
export PREFIX=/opt/armhf
# change PATH to include the target directory
export PATH=$PREFIX/bin:$PATH
@Xachman
Xachman / gtk.css
Created May 8, 2017 00:43
gtk.css for smaller flat title bar on gnome 3
/* shrink headerbars */
headerbar {
min-height: 0px;
padding-left: 2px; /* same as childrens vertical margins for nicer proportions */
padding-right: 2px;
background-color: #2d2d2d;
border-radius: 0;
border:0;
}
@franckhlmartin
franckhlmartin / gist:9b9fec4b118b6ca3226687df5a24318d
Created October 25, 2016 09:41
Grub IPv6 UEFI memdisk: create the image
# grub2-mkimage --directory '/usr/lib/grub/x86_64-efi' --prefix '(memdisk)/boot/grub' --output 'bootx64.efi' --format 'x86_64-efi' --compression 'auto' --memdisk 'memdisk/memdisk.tar' 'memdisk' 'tar'
@DraTeots
DraTeots / ComPort over Network.md
Last active April 20, 2024 02:17
ComPort over Network
@hgomez
hgomez / download-java8.sh
Created March 19, 2014 20:39
wget to download Java 8
wget --continue --no-check-certificate -O jdk-8-linux-x64.tar.gz --header Cookie: oraclelicense=a http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz