From 6dc4be45b0be06d821f61ad648ee33d54bc4d9e0 Mon Sep 17 00:00:00 2001
From: tigereye504 <dvdtroyer351@gmail.com>
Date: Wed, 23 Mar 2022 18:24:09 -0500
Subject: [PATCH] version update

---
 build.gradle                                  |  10 +-
 gradle.properties                             |  10 +-
 .../java/net/tigereye/lavajava/LavaJava.java  |  32 +---
 .../mixin/NoiseChunkGeneratorMixin.java       |  56 ------
 .../lavajava/mob/WitherBaristaEntity.java     |   9 +-
 .../register/LJConfiguredStructures.java      |  33 ----
 .../lavajava/register/LJStructures.java       |  48 -----
 .../structure/LavaJavaCafeStructure.java      | 177 ------------------
 .../entity_assignment/wither_barista.json     |   6 +
 .../lava_java_cafe.json                       |  40 ++++
 .../structure_set/lava_java_cafe.json         |  14 ++
 .../start_pool.json => lava_java_cafe.json}   |   1 -
 src/main/resources/lavajava.mixins.json       |   1 -
 13 files changed, 78 insertions(+), 359 deletions(-)
 delete mode 100644 src/main/java/net/tigereye/lavajava/mixin/NoiseChunkGeneratorMixin.java
 delete mode 100644 src/main/java/net/tigereye/lavajava/register/LJConfiguredStructures.java
 delete mode 100644 src/main/java/net/tigereye/lavajava/register/LJStructures.java
 delete mode 100644 src/main/java/net/tigereye/lavajava/structure/LavaJavaCafeStructure.java
 create mode 100644 src/main/resources/data/chestcavity/entity_assignment/wither_barista.json
 create mode 100644 src/main/resources/data/lavajava/worldgen/configured_structure_feature/lava_java_cafe.json
 create mode 100644 src/main/resources/data/lavajava/worldgen/structure_set/lava_java_cafe.json
 rename src/main/resources/data/lavajava/worldgen/template_pool/{lava_java_cafe/start_pool.json => lava_java_cafe.json} (99%)

diff --git a/build.gradle b/build.gradle
index 25f0aee..1afdb2d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
 plugins {
-	id 'fabric-loom' version '0.10-SNAPSHOT'
+	id 'fabric-loom' version '0.11-SNAPSHOT'
 	id 'maven-publish'
 }
 
@@ -38,7 +38,9 @@ dependencies {
 	modApi("me.shedaniel.cloth:cloth-config-fabric:5.0.38") {
 		exclude(group: "net.fabricmc.fabric-api")
 	}
-	modImplementation "com.terraformersmc:modmenu:2.0.4"
+	modImplementation ("com.terraformersmc:modmenu:2.0.4"){
+		exclude(group: "net.fabricmc.fabric-api")
+	}
 }
 
 processResources {
@@ -50,7 +52,7 @@ processResources {
 }
 
 tasks.withType(JavaCompile).configureEach {
-	// Minecraft 1.17 (21w19a) upwards uses Java 16.
+	// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
 	it.options.release = 17
 }
 
@@ -82,4 +84,4 @@ publishing {
 		// The repositories here will be used for publishing your artifact, not for
 		// retrieving dependencies.
 	}
-}
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 2ed47df..40eec89 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
 
 # Fabric Properties
 	# check these on https://fabricmc.net/versions.html
-	minecraft_version=1.18.1
-	yarn_mappings=1.18.1+build.7
-	loader_version=0.12.12
+	minecraft_version=1.18.2
+	yarn_mappings=1.18.2+build.2
+	loader_version=0.13.3
 
 # Mod Properties
-	mod_version = 0.3.0
+	mod_version = 0.4.0
 	maven_group = net.tigereye.lava-java
 	archives_base_name = lava-java
 
 # Dependencies
-	fabric_version=0.44.0+1.18
+	fabric_version=0.48.0+1.18.2
 	bannerspp_version=2.0.4+mc.1.17-rc1
diff --git a/src/main/java/net/tigereye/lavajava/LavaJava.java b/src/main/java/net/tigereye/lavajava/LavaJava.java
index 4488534..4906530 100644
--- a/src/main/java/net/tigereye/lavajava/LavaJava.java
+++ b/src/main/java/net/tigereye/lavajava/LavaJava.java
@@ -5,31 +5,12 @@
 import me.shedaniel.autoconfig.AutoConfig;
 import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
 import net.fabricmc.api.ModInitializer;
-import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
-import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
-import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry;
-import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder;
 import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
-import net.minecraft.entity.EntityDimensions;
-import net.minecraft.entity.EntityType;
-import net.minecraft.entity.SpawnGroup;
-import net.minecraft.item.FoodComponent;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemGroup;
 import net.minecraft.resource.ResourceType;
-import net.minecraft.util.Identifier;
-import net.minecraft.util.registry.BuiltinRegistries;
-import net.minecraft.util.registry.Registry;
-import net.minecraft.util.registry.RegistryKey;
-import net.minecraft.world.biome.Biome;
 import net.tigereye.lavajava.config.LJConfig;
 import net.tigereye.lavajava.flavor.*;
-import net.tigereye.lavajava.item.LavaJavaItem;
-import net.tigereye.lavajava.mob.WitherBaristaEntity;
-import net.tigereye.lavajava.register.LJConfiguredStructures;
 import net.tigereye.lavajava.register.LJEntities;
 import net.tigereye.lavajava.register.LJItems;
-import net.tigereye.lavajava.register.LJStructures;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -49,20 +30,13 @@ public void onInitialize() {
 		ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(new FlavorManager());
 		LJItems.register();
 		LJEntities.register();
-		LJStructures.setupAndRegisterStructureFeatures();
-		LJConfiguredStructures.registerConfiguredStructures();
-		addStructureSpawningToDimensionsAndBiomes();
+		//addStructureSpawningToDimensionsAndBiomes();
 		//TODO: once Banners++ updates to 1.18, unlock glorious banners
 		//Registry.register(LoomPatterns.REGISTRY, new Identifier("lavajava", "lava_java_banner"), new LoomPattern(false));
 	}
 
-
+	/*
 	private void addStructureSpawningToDimensionsAndBiomes(){
-		/*
-		 * This is the API you will use to add anything to any biome.
-		 * This includes spawns, changing the biome's looks, messing with its temperature,
-		 * adding carvers, spawning new features... etc
-		 */
 		BiomeModifications.addStructure(
 				BiomeSelectors.categories(Biome.Category.NETHER),
 				RegistryKey.of(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY,
@@ -70,5 +44,5 @@ private void addStructureSpawningToDimensionsAndBiomes(){
 		);
 
 	}
-
+	*/
 }
diff --git a/src/main/java/net/tigereye/lavajava/mixin/NoiseChunkGeneratorMixin.java b/src/main/java/net/tigereye/lavajava/mixin/NoiseChunkGeneratorMixin.java
deleted file mode 100644
index b0abea2..0000000
--- a/src/main/java/net/tigereye/lavajava/mixin/NoiseChunkGeneratorMixin.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package net.tigereye.lavajava.mixin;
-
-import net.minecraft.entity.SpawnGroup;
-import net.minecraft.util.collection.Pool;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.world.biome.Biome;
-import net.minecraft.world.biome.SpawnSettings;
-import net.minecraft.world.gen.StructureAccessor;
-import net.minecraft.world.gen.chunk.NoiseChunkGenerator;
-import net.tigereye.lavajava.register.LJStructures;
-import net.tigereye.lavajava.structure.LavaJavaCafeStructure;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
-
-@Mixin(NoiseChunkGenerator.class)
-public class NoiseChunkGeneratorMixin {
-
-    @Inject(
-            method = "getEntitySpawnList(Lnet/minecraft/world/biome/Biome;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/collection/Pool;",
-            at = @At(value = "HEAD"),
-            cancellable = true
-    )
-    private void structureMobs(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos, CallbackInfoReturnable<Pool<SpawnSettings.SpawnEntry>> cir) {
-
-        // Check if in our structure and grab mob list if so
-        Pool<SpawnSettings.SpawnEntry> pool = getStructureSpawns(biome, accessor, group, pos);
-
-        // If not null, it was in our structure. Return the mob list and exit the method now.
-        if(pool != null) cir.setReturnValue(pool);
-    }
-
-    /**
-     * This mixin hooks into NoiseChunkGenerator's getEntitySpawnList which is where vanilla does the
-     * mob spawning in structures over time. We have to check what the spawn group is for the structure
-     * and then see if it is inside the structure. Then we grab the list of mobs from the structure that can spawn.
-     *
-     * This way of doing structure mob spawning will prevent biome's mobs from spawning in the structure.
-     */
-    private static Pool<SpawnSettings.SpawnEntry> getStructureSpawns(Biome biome, StructureAccessor accessor, SpawnGroup group, BlockPos pos){
-
-        if (group == SpawnGroup.MONSTER) {
-            if (accessor.getStructureAt(pos, LJStructures.LAVA_JAVA_CAFE).hasChildren()) {
-                return LavaJavaCafeStructure.STRUCTURE_MONSTERS;
-            }
-        }
-        else if (group == SpawnGroup.CREATURE) {
-            if (accessor.getStructureAt(pos, LJStructures.LAVA_JAVA_CAFE).hasChildren()) {
-                return LavaJavaCafeStructure.STRUCTURE_CREATURES;
-            }
-        }
-
-        return null;
-    }
-}
\ No newline at end of file
diff --git a/src/main/java/net/tigereye/lavajava/mob/WitherBaristaEntity.java b/src/main/java/net/tigereye/lavajava/mob/WitherBaristaEntity.java
index 3b61161..df8d875 100644
--- a/src/main/java/net/tigereye/lavajava/mob/WitherBaristaEntity.java
+++ b/src/main/java/net/tigereye/lavajava/mob/WitherBaristaEntity.java
@@ -100,13 +100,13 @@ public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) {
     }
 
     @Override
-    public void setCurrentCustomer(@Nullable PlayerEntity customer) {
+    public void setCustomer(@Nullable PlayerEntity customer) {
         this.customer = customer;
     }
 
     @Nullable
     @Override
-    public PlayerEntity getCurrentCustomer() {
+    public PlayerEntity getCustomer() {
         return this.customer;
     }
 
@@ -204,7 +204,7 @@ public ActionResult interactMob(PlayerEntity player, Hand hand) {
                 return ActionResult.success(this.world.isClient);
             } else {
                 if (!this.world.isClient) {
-                    this.setCurrentCustomer(player);
+                    this.setCustomer(player);
                     this.sendOffers(player, this.getDisplayName(), this.getLevel());
                 }
 
@@ -368,8 +368,7 @@ public TradeOffer create(Entity entity, Random random) {
             for (int i = 0; i < rolls; i++) {
                 Pair<Identifier, FlavorData> flavor = FlavorManager.getWeightedRandomFlavor(random);
                 if(flavor != null){
-                    boolean badResult = false;
-                    if(flavors.containsKey(flavor.getLeft())) badResult = true;
+                    boolean badResult = flavors.containsKey(flavor.getLeft());
                     if(!badResult) {
                         //if any existing flavors are excluded by this flavor, it is no good
                         for (Identifier excludedFlavor :
diff --git a/src/main/java/net/tigereye/lavajava/register/LJConfiguredStructures.java b/src/main/java/net/tigereye/lavajava/register/LJConfiguredStructures.java
deleted file mode 100644
index 76d6939..0000000
--- a/src/main/java/net/tigereye/lavajava/register/LJConfiguredStructures.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package net.tigereye.lavajava.register;
-
-import net.minecraft.structure.PlainsVillageData;
-import net.minecraft.util.Identifier;
-import net.minecraft.util.registry.BuiltinRegistries;
-import net.minecraft.util.registry.Registry;
-import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
-import net.minecraft.world.gen.feature.StructurePoolFeatureConfig;
-import net.tigereye.lavajava.LavaJava;
-
-public class LJConfiguredStructures {
-    /**
-     * Static instance of our configured structure so we can reference it and add it to biomes easily.
-     */
-    public static ConfiguredStructureFeature<?, ?> CONFIGURED_LAVA_JAVA_CAFE = LJStructures.LAVA_JAVA_CAFE
-            .configure(new StructurePoolFeatureConfig(() -> PlainsVillageData.STRUCTURE_POOLS, 0));
-    // Dummy StructurePoolFeatureConfig values for now. We will modify the pool at runtime since we cannot get json pool files here at mod init.
-    // You can create and register your pools in code, pass in the code create pool here, and delete both newConfig and newContext in RunDownHouseStructure's createPiecesGenerator.
-    // Note: StructurePoolFeatureConfig only takes 0 - 7 size so that's another reason why we are going to bypass that "codec" by changing size at runtime to get higher sizes.
-
-    /**
-     * Registers the configured structure which is what gets added to the biomes.
-     * You can use the same identifier for the configured structure as the regular structure
-     * because the two fo them are registered to different registries.
-     *
-     * We can register configured structures at any time before a world is clicked on and made.
-     * But the best time to register configured features by code is honestly to do it in onInitialize.
-     */
-    public static void registerConfiguredStructures() {
-        Registry<ConfiguredStructureFeature<?, ?>> registry = BuiltinRegistries.CONFIGURED_STRUCTURE_FEATURE;
-        Registry.register(registry, new Identifier(LavaJava.MODID, "configured_lava_java_cafe"), CONFIGURED_LAVA_JAVA_CAFE);
-    }
-}
diff --git a/src/main/java/net/tigereye/lavajava/register/LJStructures.java b/src/main/java/net/tigereye/lavajava/register/LJStructures.java
deleted file mode 100644
index 53866de..0000000
--- a/src/main/java/net/tigereye/lavajava/register/LJStructures.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package net.tigereye.lavajava.register;
-
-import net.fabricmc.fabric.api.structure.v1.FabricStructureBuilder;
-import net.minecraft.util.Identifier;
-import net.minecraft.world.gen.GenerationStep;
-import net.minecraft.world.gen.chunk.StructureConfig;
-import net.minecraft.world.gen.feature.StructureFeature;
-import net.minecraft.world.gen.feature.StructurePoolFeatureConfig;
-import net.tigereye.lavajava.LavaJava;
-import net.tigereye.lavajava.structure.LavaJavaCafeStructure;
-
-public class LJStructures {
-
-    /**
-     /**
-     * Registers the structure itself and sets what its path is. In this case, the
-     * structure will have the Identifier of structure_tutorial:run_down_house.
-     *
-     * It is always a good idea to register your Structures so that other mods and datapacks can
-     * use them too directly from the registries. It great for mod/datapacks compatibility.
-     */
-    public static StructureFeature<StructurePoolFeatureConfig> LAVA_JAVA_CAFE = new LavaJavaCafeStructure(StructurePoolFeatureConfig.CODEC);
-
-    /**
-     * This is where we use Fabric API's structure API to setup the StructureFeature
-     * See the comments in below for more details.
-     */
-    public static void setupAndRegisterStructureFeatures() {
-
-        // This is Fabric API's builder for structures.
-        // It has many options to make sure your structure will spawn and work properly.
-        // Give it your structure and the identifier you want for it.
-        FabricStructureBuilder.create(new Identifier(LavaJava.MODID, "lava_java_cafe"), LAVA_JAVA_CAFE)
-                .step(GenerationStep.Feature.SURFACE_STRUCTURES)
-                .defaultConfig(new StructureConfig(
-                        LavaJava.config.CAFE_AVERAGE_DISTANCE_CHUNKS, /* average distance apart in chunks between spawn attempts */
-                        LavaJava.config.CAFE_MINIMUM_DISTANCE_CHUNKS, /* minimum distance apart in chunks between spawn attempts. MUST BE LESS THAN ABOVE VALUE */
-                        225170915 /* this modifies the seed of the structure so no two structures always spawn over each-other. Make this large and unique. */))
-                .adjustsSurface()
-                .register();
-
-
-
-        // Add more structures here and so on
-    }
-
-
-}
\ No newline at end of file
diff --git a/src/main/java/net/tigereye/lavajava/structure/LavaJavaCafeStructure.java b/src/main/java/net/tigereye/lavajava/structure/LavaJavaCafeStructure.java
deleted file mode 100644
index 9135bed..0000000
--- a/src/main/java/net/tigereye/lavajava/structure/LavaJavaCafeStructure.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package net.tigereye.lavajava.structure;
-
-import com.mojang.serialization.Codec;
-import net.minecraft.block.BlockState;
-import net.minecraft.entity.EntityType;
-import net.minecraft.structure.PoolStructurePiece;
-import net.minecraft.structure.PostPlacementProcessor;
-import net.minecraft.structure.StructureGeneratorFactory;
-import net.minecraft.structure.StructurePiecesGenerator;
-import net.minecraft.structure.pool.StructurePoolBasedGenerator;
-import net.minecraft.util.Identifier;
-import net.minecraft.util.collection.Pool;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.util.registry.Registry;
-import net.minecraft.world.Heightmap;
-import net.minecraft.world.biome.SpawnSettings;
-import net.minecraft.world.gen.chunk.VerticalBlockSample;
-import net.minecraft.world.gen.feature.StructureFeature;
-import net.minecraft.world.gen.feature.StructurePoolFeatureConfig;
-import net.tigereye.lavajava.LavaJava;
-import net.tigereye.lavajava.register.LJEntities;
-import org.apache.logging.log4j.Level;
-
-import java.util.Optional;
-
-public class LavaJavaCafeStructure extends StructureFeature<StructurePoolFeatureConfig>    {
-    //when designing variants of this structure, use the following (with proper position and facing) to set up the loot barrels
-    //setblock 30 -60 -37 minecraft:barrel[facing=east]{LootTable:"lavajava:chests/lava_java_cafe_barrel"} replace
-
-    public LavaJavaCafeStructure(Codec<StructurePoolFeatureConfig> codec) {
-        super(codec, (context) -> {
-                    // Check if the spot is valid for structure gen. If false, return nothing to signal to the game to skip this spawn attempt.
-                    if (!LavaJavaCafeStructure.canGenerate(context)) {
-                        return Optional.empty();
-                    }
-                    // Create the pieces layout of the structure and give it to
-                    else {
-                        return LavaJavaCafeStructure.createPiecesGenerator(context);
-                    }
-                },
-                PostPlacementProcessor.EMPTY);
-    }
-
-    /**
-     * These fields + NoiseChunkGeneratorMixin allows us to have mobs that spawn naturally over time in our structure.
-     * No other mobs will spawn in the structure of the same entity classification.
-     * The reason you want to match the classifications is so that your structure's mob
-     * will contribute to that classification's cap. Otherwise, it may cause a runaway
-     * spawning of the mob that will never stop.
-     */
-    public static final Pool<SpawnSettings.SpawnEntry> STRUCTURE_MONSTERS = Pool.of(
-            new SpawnSettings.SpawnEntry(EntityType.ZOMBIFIED_PIGLIN, 90, 1, 3),
-            new SpawnSettings.SpawnEntry(LJEntities.WITHER_BARISTA, 10,1,1),
-            new SpawnSettings.SpawnEntry(EntityType.WITHER_SKELETON, 1,1,3)
-    );
-
-    public static final Pool<SpawnSettings.SpawnEntry> STRUCTURE_CREATURES = Pool.of(
-            new SpawnSettings.SpawnEntry(EntityType.CAT, 5, 1, 1)
-    );
-
-    /*
-     * This is where extra checks can be done to determine if the structure can spawn here.
-     * This only needs to be overridden if you're adding additional spawn conditions.
-     *
-     * Fun fact, if you set your structure separation/spacing to be 0/1, you can use
-     * canGenerate to return true only if certain chunk coordinates are passed in
-     * which allows you to spawn structures only at certain coordinates in the world.
-     *
-     * Basically, this method is used for determining if the land is at a suitable height,
-     * if certain other structures are too close or not, or some other restrictive condition.
-     *
-     * For example, Pillager Outposts added a check to make sure it cannot spawn within 10 chunk of a Village.
-     * (Bedrock Edition seems to not have the same check)
-     *
-     *
-     * Also, please for the love of god, do not do dimension checking here.
-     * If you do and another mod's dimension is trying to spawn your structure,
-     * the locate command will make minecraft hang forever and break the game.
-     *
-     * Instead, use the removeStructureSpawningFromSelectedDimension method in
-     * StructureTutorialMain class. If you check for the dimension there and do not add your
-     * structure's spacing into the chunk generator, the structure will not spawn in that dimension!
-     */
-    private static boolean canGenerate(StructureGeneratorFactory.Context<StructurePoolFeatureConfig> context) {
-        BlockPos spawnXZPosition = context.chunkPos().getCenterAtY(0);
-
-
-        // Grab height of land. Will stop at first non-air block.
-        int landHeight = context.chunkGenerator().getHeightInGround(spawnXZPosition.getX(), spawnXZPosition.getZ(), Heightmap.Type.WORLD_SURFACE_WG, context.world());
-
-        // Grabs column of blocks at given position. In overworld, this column will be made of stone, water, and air.
-        // In nether, it will be netherrack, lava, and air. End will only be endstone and air. It depends on what block
-        // the chunk generator will place for that dimension.
-        VerticalBlockSample columnOfBlocks = context.chunkGenerator().getColumnSample(spawnXZPosition.getX(), spawnXZPosition.getZ(), context.world());
-        //Cafes want to be as close to the lava lakes as they can be. Find the lowest platform that a Lava Java Cafe can be built upon
-        BlockPos blockpos = context.chunkPos().getCenterAtY(31);
-        for(int i = 31; i < context.world().getHeight();++i){
-            if(columnOfBlocks.getState(i).isAir() && columnOfBlocks.getState(i-1).isOpaque()){
-                blockpos = context.chunkPos().getCenterAtY(i-1);
-                break;
-            }
-        }
-        //Check that our chosen position is below the land height. If it is not, then we have violated the bedrock ceiling.
-        if(blockpos.getY() >= landHeight) return false;
-
-
-        // Combine the column of blocks with land height and you get the top block itself which you can test.
-        // For the cafe, I'm instead grabbing the block at my chosen height
-        BlockState chosenBlock = columnOfBlocks.getState(blockpos.getY());
-
-        // Now we test to make sure our structure is not spawning on water or other fluids.
-        // You can do height check instead too to make it spawn at high elevations.
-        return chosenBlock.getFluidState().isEmpty() && columnOfBlocks.getState(blockpos.up().getY()).getFluidState().isEmpty(); //landHeight > 100;
-    }
-
-    public static Optional<StructurePiecesGenerator<StructurePoolFeatureConfig>> createPiecesGenerator(StructureGeneratorFactory.Context<StructurePoolFeatureConfig> context) {
-        BlockPos blockpos = context.chunkPos().getCenterAtY(31);
-        VerticalBlockSample blockView = context.chunkGenerator().getColumnSample(blockpos.getX(), blockpos.getZ(), context.world());
-
-        //First, find the lowest platform that a Lava Java Cafe can be built upon
-        for(int i = 1; i < context.world().getHeight();++i){
-            if(blockView.getState(i).isAir() && blockView.getState(i-1).isOpaque()){
-                blockpos = context.chunkPos().getCenterAtY(i-1);
-                break;
-            }
-        }
-
-        StructurePoolFeatureConfig newConfig = new StructurePoolFeatureConfig(
-                () -> context.registryManager().get(Registry.STRUCTURE_POOL_KEY)
-                        .get(new Identifier(LavaJava.MODID, "lava_java_cafe/start_pool")),
-                // How many pieces outward from center can a recursive jigsaw structure spawn.
-                // Our structure is only 1 piece outward and isn't recursive so any value of 1 or more doesn't change anything.
-                10
-        );
-
-        // Create a new context with the new config that has our json pool. We will pass this into JigsawPlacement.addPieces
-        StructureGeneratorFactory.Context<StructurePoolFeatureConfig> newContext = new StructureGeneratorFactory.Context<>(
-                context.chunkGenerator(),
-                context.biomeSource(),
-                context.seed(),
-                context.chunkPos(),
-                newConfig,
-                context.world(),
-                context.validBiome(),
-                context.structureManager(),
-                context.registryManager()
-        );
-
-        Optional<StructurePiecesGenerator<StructurePoolFeatureConfig>> structurePiecesGenerator =
-                StructurePoolBasedGenerator.generate(
-                        newContext, // Used for StructurePoolBasedGenerator to get all the proper behaviors done.
-                        PoolStructurePiece::new, // Needed in order to create a list of jigsaw pieces when making the structure's layout.
-                        blockpos, // Position of the structure. Y value is ignored if last parameter is set to true.
-                        false,  // Special boundary adjustments for villages. It's... hard to explain. Keep this false and make your pieces not be partially intersecting.
-                        // Either not intersecting or fully contained will make children pieces spawn just fine. It's easier that way.
-                        false // Place at heightmap (top land). Set this to false for structure to be place at the passed in blockpos's Y value instead.
-                        // Definitely keep this false when placing structures in the nether as otherwise, heightmap placing will put the structure on the Bedrock roof.
-                );
-        /*
-         * Note, you are always free to make your own StructurePoolBasedGenerator class and implementation of how the structure
-         * should generate. It is tricky but extremely powerful if you are doing something that vanilla's jigsaw system cannot do.
-         * Such as for example, forcing 3 pieces to always spawn every time, limiting how often a piece spawns, or remove the intersection limitation of pieces.
-         *
-         * An example of a custom StructurePoolBasedGenerator.generate in action can be found here (warning, it is using Mojmap mappings):
-         * https://github.com/TelepathicGrunt/RepurposedStructures-Fabric/blob/1.18/src/main/java/com/telepathicgrunt/repurposedstructures/world/structures/pieces/PieceLimitedJigsawManager.java
-         */
-
-        if(structurePiecesGenerator.isPresent()) {
-            // I use to debug and quickly find out if the structure is spawning or not and where it is.
-            // This is returning the coordinates of the center starting piece.
-            LavaJava.LOGGER.log(Level.DEBUG, "Lava Java cafe at " + blockpos);
-        }
-
-        // Return the pieces generator that is now set up so that the game runs it when it needs to create the layout of structure pieces.
-        return structurePiecesGenerator;
-    }
-}
diff --git a/src/main/resources/data/chestcavity/entity_assignment/wither_barista.json b/src/main/resources/data/chestcavity/entity_assignment/wither_barista.json
new file mode 100644
index 0000000..455fb9a
--- /dev/null
+++ b/src/main/resources/data/chestcavity/entity_assignment/wither_barista.json
@@ -0,0 +1,6 @@
+{
+  "chestcavity": "chestcavity:types/undead/wither_skeleton.json",
+  "entities": [
+    "lavajava:wither_barista"
+  ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/lavajava/worldgen/configured_structure_feature/lava_java_cafe.json b/src/main/resources/data/lavajava/worldgen/configured_structure_feature/lava_java_cafe.json
new file mode 100644
index 0000000..4fed713
--- /dev/null
+++ b/src/main/resources/data/lavajava/worldgen/configured_structure_feature/lava_java_cafe.json
@@ -0,0 +1,40 @@
+{
+  "type": "minecraft:bastion_remnant",
+  "biomes": "#minecraft:is_nether",
+  "adapt_noise": true,
+  "spawn_overrides": {
+    "monster": {
+      "bounding_box": "full",
+      "spawns": [
+        {
+          "type": "minecraft:zombified_piglin",
+          "weight": 900,
+          "minCount": 1,
+          "maxCount": 3
+        },
+        {
+          "type": "lavajava:wither_barista",
+          "weight": 100,
+          "minCount": 1,
+          "maxCount": 1
+        },
+        {
+          "type": "minecraft:wither_skeleton",
+          "weight": 10,
+          "minCount": 1,
+          "maxCount": 3
+        },
+        {
+          "type": "minecraft:skeleton",
+          "weight": 1,
+          "minCount": 15,
+          "maxCount": 50
+        }
+      ]
+    }
+  },
+  "config": {
+    "start_pool": "lavajava:lava_java_cafe",
+    "size": 1
+  }
+}
diff --git a/src/main/resources/data/lavajava/worldgen/structure_set/lava_java_cafe.json b/src/main/resources/data/lavajava/worldgen/structure_set/lava_java_cafe.json
new file mode 100644
index 0000000..02607a7
--- /dev/null
+++ b/src/main/resources/data/lavajava/worldgen/structure_set/lava_java_cafe.json
@@ -0,0 +1,14 @@
+{
+  "structures": [
+    {
+      "structure": "lavajava:lava_java_cafe",
+      "weight": 1
+    }
+  ],
+  "placement": {
+    "type": "minecraft:random_spread",
+    "spacing": 10,
+    "separation": 4,
+    "salt": 225170915
+  }
+}
diff --git a/src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe/start_pool.json b/src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe.json
similarity index 99%
rename from src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe/start_pool.json
rename to src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe.json
index f44415e..9134efc 100644
--- a/src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe/start_pool.json
+++ b/src/main/resources/data/lavajava/worldgen/template_pool/lava_java_cafe.json
@@ -1,7 +1,6 @@
 {
   "name": "lavajava:lava_java_cafe/start_pool",
   "fallback": "minecraft:empty",
-
   "elements": [
     {
       "weight": 8,
diff --git a/src/main/resources/lavajava.mixins.json b/src/main/resources/lavajava.mixins.json
index f189682..d7b350e 100644
--- a/src/main/resources/lavajava.mixins.json
+++ b/src/main/resources/lavajava.mixins.json
@@ -4,7 +4,6 @@
   "package": "net.tigereye.lavajava.mixin",
   "compatibilityLevel": "JAVA_17",
   "mixins": [
-    "NoiseChunkGeneratorMixin"
   ],
   "client": [
   ],