Skip to content

Instantly share code, notes, and snippets.

View CodecExample.java
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(
View Connectome.java
import java.util.Random;
public class Connectome {
private final int width, height;
private final byte[] mapping;
public Connectome(int width, int height) {
this.width = width;
this.height = height;
View BasicDeferredRegistry.java
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.GlazedTerracottaBlock;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
import net.minecraftforge.eventbus.api.IEventBus;
View GalleryComponent.java
package twilightforest.compat.patchouli;
import com.google.gson.annotations.SerializedName;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import twilightforest.TwilightForestMod;
import vazkii.patchouli.api.ICustomComponent;
import vazkii.patchouli.api.VariableHolder;
import vazkii.patchouli.common.util.ItemStackUtil;
View stair_states.json
{
"forge_marker": 1,
"defaults": {
"model": "stairs",
"textures": {
"end": "twilightforest:blocks/stone_tiles",
"half": "twilightforest:blocks/nagastone_bare",
"particle": "#side"
},
"uvlock": true