Skip to content

Instantly share code, notes, and snippets.

View Drullkus's full-sized avatar
🧮
Hacking Minecrafts

Drullkus

🧮
Hacking Minecrafts
  • Drullkus Industries
View GitHub Profile
@Drullkus
Drullkus / example.json
Last active August 11, 2021 17:16
NBT Ingredient Predicate Example
{
"type": "minecraft:crafting_shapeless",
"ingredients": [{
"item": "minecraft:amethyst_block",
"type": "nbt_ingredient_predicate:nbt_includes",
"nbt": {
"display": {"Name":"{\"text\":\"I've got NBT!\"}"}
}
}],
"result": {
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(
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;
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;
@Drullkus
Drullkus / GalleryComponent.java
Created November 12, 2018 18:50
Item Gallery
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;
{
"forge_marker": 1,
"defaults": {
"model": "stairs",
"textures": {
"end": "twilightforest:blocks/stone_tiles",
"half": "twilightforest:blocks/nagastone_bare",
"particle": "#side"
},
"uvlock": true