Skip to content

Instantly share code, notes, and snippets.

View hube12's full-sized avatar
💭
Currently working and handling side projects, contact me on Discord Neil#4879

Neil hube12

💭
Currently working and handling side projects, contact me on Discord Neil#4879
View GitHub Profile
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)
@hube12
hube12 / SaltMixin.java
Created June 9, 2021 00:23
1.17 decorators, features and structures salts
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;
@hube12
hube12 / LootHelperFunction.java
Last active July 16, 2021 19:57
simple Loot search function in java use hube12:SEED:master-snapshot
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;
@hube12
hube12 / 1.13.java
Last active July 17, 2021 15:48
1.13 salts
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)) {
@hube12
hube12 / 1.14.java
Last active July 17, 2021 16:13
1.14 salts
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)) {
@hube12
hube12 / 1.15.java
Last active July 17, 2021 16:14
1.15 salts
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)) {
@hube12
hube12 / 1.16.java
Last active August 17, 2022 20:54
1.16 salts
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()){
@hube12
hube12 / getLootUntil.java
Created July 23, 2021 16:29
Get Loot until limit
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),
@hube12
hube12 / Dean.java
Last active July 26, 2021 07:53
FastRuinedPortal
package com.seedfinding.neil;
import kaptainwutax.biomeutils.source.OverworldBiomeSource;
import kaptainwutax.featureutils.loot.ChestContent;
import kaptainwutax.featureutils.loot.item.Items;
import kaptainwutax.featureutils.structure.RuinedPortal;
import kaptainwutax.featureutils.structure.generator.structure.RuinedPortalGenerator;
import kaptainwutax.mcutils.rand.ChunkRand;
import kaptainwutax.mcutils.rand.seed.StructureSeed;
import kaptainwutax.mcutils.state.Dimension;
@hube12
hube12 / LootCrackerLatticg.java
Created July 29, 2021 19:02
BuriedTreasure 16 tnt
public static void main(String[] args) {
MCVersion version = MCVersion.v1_16_5;
// DynamicProgram dynamicProgram=DynamicProgram.create(LCG.JAVA);
// // Nothing on First Roll (heart of sea)
// // Second roll should be 8 on nextInt(8-5+1=4)+5
// dynamicProgram.add(JavaCalls.nextInt(4).equalTo(3));
// for (int i = 0; i < 8; i++) {
// dynamicProgram.add(JavaCalls.nextInt(35).betweenII(30,34));
// dynamicProgram.add(JavaCalls.nextInt(2).equalTo(1));
// }