diff --git a/forge111/src/main/java/com/boydti/fawe/forge/MutableGenLayer.java b/forge111/src/main/java/com/boydti/fawe/forge/MutableGenLayer.java new file mode 100644 index 00000000..70b06c13 --- /dev/null +++ b/forge111/src/main/java/com/boydti/fawe/forge/MutableGenLayer.java @@ -0,0 +1,26 @@ +package com.boydti.fawe.forge; + +import java.util.Arrays; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + +public class MutableGenLayer extends GenLayer { + + private int biome; + + public MutableGenLayer(long seed) { + super(seed); + } + + public MutableGenLayer set(int biome) { + this.biome = biome; + return this; + } + + @Override + public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight) { + int[] biomes = IntCache.getIntCache(areaWidth * areaHeight); + Arrays.fill(biomes, biome); + return biomes; + } +} diff --git a/forge111/src/main/java/com/boydti/fawe/forge/v0/ForgeQueue_All.java b/forge111/src/main/java/com/boydti/fawe/forge/v0/ForgeQueue_All.java index 4314cdb0..1ea5f764 100644 --- a/forge111/src/main/java/com/boydti/fawe/forge/v0/ForgeQueue_All.java +++ b/forge111/src/main/java/com/boydti/fawe/forge/v0/ForgeQueue_All.java @@ -4,6 +4,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.example.NMSMappedFaweQueue; import com.boydti.fawe.forge.ForgePlayer; +import com.boydti.fawe.forge.MutableGenLayer; import com.boydti.fawe.object.FaweChunk; import com.boydti.fawe.object.FawePlayer; import com.boydti.fawe.util.MainUtil; @@ -26,6 +27,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; import net.minecraft.block.Block; +import net.minecraft.block.BlockFalling; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; @@ -46,13 +48,17 @@ import net.minecraft.util.math.ChunkPos; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import net.minecraft.world.biome.BiomeCache; +import net.minecraft.world.biome.BiomeProvider; import net.minecraft.world.chunk.BlockStateContainer; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.NibbleArray; import net.minecraft.world.chunk.storage.ExtendedBlockStorage; +import net.minecraft.world.gen.ChunkProviderOverworld; import net.minecraft.world.gen.ChunkProviderServer; +import net.minecraft.world.storage.WorldInfo; import net.minecraftforge.common.DimensionManager; public class ForgeQueue_All extends NMSMappedFaweQueue { @@ -62,6 +68,16 @@ public class ForgeQueue_All extends NMSMappedFaweQueue converter = Class.forName("com.sk89q.worldedit.forge.NBTConverter"); @@ -70,6 +86,21 @@ public class ForgeQueue_All extends NMSMappedFaweQueue { @@ -66,6 +71,15 @@ public class SpongeQueue_1_11 extends NMSMappedFaweQueue converter = Class.forName("com.sk89q.worldedit.sponge.nms.NBTConverter"); @@ -79,6 +93,19 @@ public class SpongeQueue_1_11 extends NMSMappedFaweQueue