Skip to content

Instantly share code, notes, and snippets.

@codetaylor
codetaylor / 1.18.2-custom_structures_with_jigsaws.md
Created May 17, 2022 19:20 — forked from GentlemanRevvnar/1.18.2-custom_structures_with_jigsaws.md
Simple guide for using jigsaws in custom structures in 1.18.2

Custom data pack structures with jigsaws in 1.18.2

(Last updated: 1.18.2)

This is technically a shameless rip/edit of misode's guide that shows the traditional use of newly implemented custom structure system. I myself want to tackle the jigsaw aspect a bit, hence i'm making my own guice based on his. I will show how to create a data pack that adds custom structures to the world that also utilize jigsaw blocks. So treat this as a basic jigsaw guide in world generation. There is also a data pack download of this first example.

Always leave the world and rejoin to apply the new changes! Because traditional /reload or /datapack disable & enable do not refresh changes in worldgen files!

EXAMPLE 1 - Creating a structure that uses jigsaws

Let's make a simple house with a basement and a road that will lead away from the h

@codetaylor
codetaylor / pt8211-dac.ino
Created November 10, 2020 01:09 — forked from dilshan/pt8211-dac.ino
PT8211 DAC verification script for Arduino
#include <limits.h>
#ifndef PIN_BCK
#define PIN_BCK 22
#endif
#ifndef PIN_WS
#define PIN_WS 23
#endif
Artisan Automation Contributor License Agreement
Version 1.0.0 April 10, 2020
This is a reference copy of the terms of the Artisan Automation Contributor License Agreement. To actually complete and submit a CLA, please go to the CLA form.
Thank you for your interest in the Artisan Automation project. In order for You (as defined below) to make intellectual property Contributions (as defined below) now or in the future to the Artisan Automation project, You must agree to this Contributor License Agreement ("CLA").
Please read this CLA carefully before accepting its terms. By accepting the CLA, You are agreeing to be bound by its terms. If You want to accept this CLA, complete the form completely, print a copy for Your records, and when ready, press the “Accept” button at the end of this form.
---- Minecraft Crash Report ----
// You're mean.
Time: 2020-01-02 12:56:40 GMT
Description: Initializing game
java.lang.NullPointerException
at net.minecraft.tileentity.TileEntityFurnace.getItemBurnTime(TileEntityFurnace.java:342)
at com.codetaylor.mc.athenaeum.util.StackHelper.getItemBurnTime(StackHelper.java:36)
at com.codetaylor.mc.pyrotech.modules.core.event.TooltipEventHandler$BurnTime.on(TooltipEventHandler.java:18)

1.22.0

  • Note:

    • Config files have been renamed, see below
  • API:

    • Bumped version to 8
    • Added new default interface methods to IRequirement:
      • shouldJEIHideOnLoad
  • shouldJEIHideOnUpdate

just looking through the leaf drops, is it possible to make it a chance to drop sticks would i just add "quantity": { "min": 0, "max": 2} ? will it still drop 1 sometimes? using json

There are a number of ways you could achieve that depending on how much control you want.

I've modified the leaf example from the docs in different ways below.

Example #1

{

Goal: Match against held item NBT and replace block drops with items that have NBT.

Dropt supports NBT matching on held items and also supports dropping items with NBT.

Warning: If the player renames an item, enchants an item, or if the item's NBT is altered in any way, its NBT will no longer match.

In the example below, we've set up the rule to match a held item, specifically a Diamond Pickaxe with some NBT.

"minecraft:diamond_pickaxe:*#{RepairCost:0,display:{Name:\"Pick Astley\"}}"

Goal: Replace cobblestone drops with dirt blocks if broken within 32 block radius of world spawn.

ZenScript

import mods.dropt.Dropt;

Dropt.list("list_name")

  .add(Dropt.rule()

Goal: Replace any Redstone drops with the same number of Dirt.

ZenScript

import mods.dropt.Dropt;

Dropt.list("list_name")

  .add(Dropt.rule()

Recipes

The Pyrotech Worktable inherits recipes from the vanilla Crafting Table, but does so on-demand. This means that the recipes aren't actually created until the last possible moment. This dramatically reduces the memory overhead required by the Worktable recipes.

Remove Exclusive Worktable Recipe

Worktable.removeRecipes(IIngredient) removes any Worktable exclusive recipes that are added by the mod -- of which there are currently none. This method exists to remove recipes that might be explicitly added to Pyrotech's Worktable in the future.

Remove Crafting Table and Worktable Recipe