This file contains hidden or 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
public static List<BPos> getLootUntil(RegionStructure<?,?> structure, BPos center, TerrainGenerator terrainGenerator, ChunkRand chunkRand, Predicate<Item> itemPredicate, int limit){ | |
Generator.GeneratorFactory<?> factory = Generators.get(structure.getClass()); | |
Generator structureGenerator = factory.create(terrainGenerator.getVersion()); | |
if(structureGenerator.getPossibleLootItems().stream().noneMatch(itemPredicate)) { | |
return null; | |
} | |
int chunkInRegion = structure.getSpacing(); | |
int regionSize = chunkInRegion * 16; | |
SpiralIterator<RPos> spiralIterator = new SpiralIterator<>( | |
new RPos(center.toRegionPos(regionSize).getX(), center.toRegionPos(regionSize).getZ(), regionSize), |
This file contains hidden or 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
Bootstrap.register(); | |
Registry.BIOME.stream().forEach( | |
biome -> { | |
System.out.printf("__________________________________\n"); | |
System.out.printf("BIOME: " + Registry.BIOME.getKey(biome).getPath() + "\n"); | |
for (GenerationStage.Decoration stage : GenerationStage.Decoration.values()) { | |
System.out.printf("STAGE: " + stage.name() + "\n"); | |
int i = 0; | |
if (stage==GenerationStage.Decoration.SURFACE_STRUCTURES){ | |
for (Structure<?> s:biome.structures.keySet()){ |
This file contains hidden or 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
public static void main(String[] args) { | |
Bootstrap.register(); | |
Registry.BIOME.stream().forEach( | |
biome -> { | |
System.out.printf("__________________________________\n"); | |
System.out.printf("BIOME: " + Registry.BIOME.getKey(biome).getPath() + "\n"); | |
for (GenerationStage.Decoration stage : GenerationStage.Decoration.values()) { | |
System.out.printf("STAGE: " + stage.name() + "\n"); | |
int i = 0; | |
for (ConfiguredFeature<?, ?> configuredfeature : biome.features.get(stage)) { |
This file contains hidden or 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
public static void main(String[] args) { | |
Bootstrap.register(); | |
Registry.BIOME.stream().forEach( | |
biome -> { | |
System.out.printf("__________________________________\n"); | |
System.out.printf("BIOME: " + Registry.BIOME.getKey(biome).getPath() + "\n"); | |
for (GenerationStage.Decoration stage : GenerationStage.Decoration.values()) { | |
System.out.printf("STAGE: " + stage.name() + "\n"); | |
int i = 0; | |
for (ConfiguredFeature<?> configuredfeature : biome.features.get(stage)) { |
This file contains hidden or 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
public static void main(String[] args) { | |
Bootstrap.register(); | |
IRegistry.BIOME.stream().forEach( | |
biome -> { | |
System.out.printf("__________________________________\n"); | |
System.out.printf("BIOME: "+IRegistry.BIOME.getKey(biome).getPath()+"\n"); | |
for(GenerationStage.Decoration stage : GenerationStage.Decoration.values()) { | |
System.out.printf("STAGE: "+stage.name()+"\n"); | |
int i = 0; | |
for(CompositeFeature<?, ?> compositefeature : biome.features.get(stage)) { |
This file contains hidden or 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
package kaptainwutax.featureutils; | |
import kaptainwutax.biomeutils.source.BiomeSource; | |
import kaptainwutax.featureutils.loot.ILoot; | |
import kaptainwutax.featureutils.loot.item.Item; | |
import kaptainwutax.featureutils.loot.item.Items; | |
import kaptainwutax.featureutils.structure.BuriedTreasure; | |
import kaptainwutax.featureutils.structure.DesertPyramid; | |
import kaptainwutax.featureutils.structure.RegionStructure; | |
import kaptainwutax.featureutils.structure.Shipwreck; |
This file contains hidden or 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
package net.fabricmc.example.mixin; | |
import net.minecraft.util.math.BlockPos; | |
import net.minecraft.util.registry.BuiltinRegistries; | |
import net.minecraft.util.registry.Registry; | |
import net.minecraft.world.ChunkRegion; | |
import net.minecraft.world.biome.Biome; | |
import net.minecraft.world.gen.ChunkRandom; | |
import net.minecraft.world.gen.GenerationStep; | |
import net.minecraft.world.gen.StructureAccessor; |
This file contains hidden or 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
import json | |
import sys | |
import urllib.request as req | |
from pathlib import Path | |
from urllib.error import HTTPError, URLError | |
import hashlib | |
import shutil | |
assert sys.version_info >= (3, 7) |
This file contains hidden or 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
// [dependencies] | |
// ron = "0.6.4" | |
// serde = { version = "1.0.60", features = ["serde_derive"] } | |
use serde::{Serialize, Serializer, Deserialize, Deserializer}; | |
use std::collections::HashMap; | |
fn option_remove_serialize<S,T:Serialize>(x: &Option<T>, s: S) -> Result<S::Ok, S::Error> where S: Serializer { | |
x.as_ref().unwrap().serialize(s) | |
} |
This file contains hidden or 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
package com.seedfinding.neil.mixin; | |
import net.minecraft.client.gui.screen.PresetsScreen; | |
import net.minecraft.text.Text; | |
import org.spongepowered.asm.mixin.Final; | |
import org.spongepowered.asm.mixin.Mixin; | |
import org.spongepowered.asm.mixin.Shadow; | |
import org.spongepowered.asm.mixin.injection.At; | |
import org.spongepowered.asm.mixin.injection.Inject; | |
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |