Jump to content

[1.15.2] Structure Gen - Filling air/water blocks underneath structure + other questions


Recommended Posts

Posted (edited)

Hey all,

 

I'm currently playing with structure generation in MC 1.15.2 and have largely gotten everything working. My custom structures generate and I can control how they're placed which is cool. However, there are some quirks I'd like to fix but I'm struggling to find answers.

 

The big one is when the structure overhangs surface elevation changes or water (so there are air or water blocks below part of the structure. I've got a method that checks chunk elevation and will only spawn if the elevation is changes within certain bounds, but this still allows for air or water below parts of the structure (unless I tell it to only spawn on a completely flat chunk, which limits spawn possibilities on larger structures). What I would like to do is to fill any air or water blocks underneath the custom structure with a solid block, which I've found code for within some of the vanilla structures, however I cannot get these functions to work within my custom structure piece.

 

When I implement them, they appeared to do nothing, outputting to the console it appears all blocks in the vertical column are air and if I try to replace an air block with sandstone, the generator hangs.

 

public class TestStructurePieces
{
    private static final Logger LOGGER = LogManager.getLogger();

    private static String pathIn = "test_structure";
    private static String pieceLocation = "test/test_structure";
    private static IStructurePieceType pieceStructureIn = CeStructurePieces.TEST_STRUCTURE;
    private static IWorld iWorldIn;
    private static int size = 3;

    public static void register()
    {


        JigsawManager.REGISTRY.register(new JigsawPattern(
                new ResourceLocation(
                        CE.MODID,
                        pathIn
                ),
                new ResourceLocation("empty"),
                ImmutableList.of(
                                Pair.of(new SingleJigsawPiece(CE.MODID + ":" + pieceLocation), 1)
                                ),
                JigsawPattern.PlacementBehaviour.RIGID)
        );




    }

    public static void create(ChunkGenerator<?> generator, TemplateManager templateManager, BlockPos position, List<StructurePiece> pieces, SharedSeedRandom random) {

        // Set the world from chunk generator (not sure how else to get world from here)
        iWorldIn = ObfuscationReflectionHelper.getPrivateValue(ChunkGenerator.class, generator, "field_222540_a");

        LOGGER.info("Adding Pieces: " + position);
       
        JigsawManager.addPieces(new ResourceLocation(CE.MODID, pathIn), 7, Piece::new, generator, templateManager, position, pieces, random);
    }




    public static class Piece extends AbstractVillagePiece {
    
        public Piece(TemplateManager templateManager, JigsawPiece jigsawPiece, BlockPos position, int groundLevelDelta, Rotation rotation, MutableBoundingBox bounds) {

            super(pieceStructureIn, templateManager, jigsawPiece, position, groundLevelDelta, rotation, bounds);

                      
            // Fill underside
          	int yStart = 100;
          	int xPos = position.getX();            
            int zPos = position.getZ();            
          
          	int xPosMax = xPos + bounds.getXSize();
            int zPosMax = zPos + bounds.getZSize();
		
            // Tried various ways of getting yStart here, the bounding box returns 0, I fixed to 100 for testing
          
            for(int x = xPos; x < xPosMax; ++x) {
                for(int z = zPos; z < zPosMax; ++z) {
                    //int k = -5;
                    this.replaceAirAndLiquidDownwards(iWorldIn, Blocks.SANDSTONE.getDefaultState(), x,  yStart, z, bounds);
                }
            }


        }

        public Piece(TemplateManager templateManager, CompoundNBT compoundNBT) {
            super(templateManager, compoundNBT, pieceStructureIn);
        }


        /**
         * Replaces air and liquid from given position downwards. Stops when hitting anything else than air or liquid
         */
        protected void replaceAirAndLiquidDownwards(IWorld worldIn, BlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
        {            
           int i = this.getXWithOffset(x, z);
           int j = this.getYWithOffset(y);
      		int k = this.getZWithOffset(x, z);
          
          // If I output data to console here, I get 4 blocks inside the bounding box (the structure is 7 high), and everything is air. It appears like the blocks arent set yet???
      		if (boundingboxIn.isVecInside(new BlockPos(i, j, k))) {
         while((worldIn.isAirBlock(new BlockPos(i, j, k)) || worldIn.getBlockState(new BlockPos(i, j, k)).getMaterial().isLiquid()) && j > 1) {
            worldIn.setBlockState(new BlockPos(i, j, k), blockstateIn, 2);
            --j;
         }

      }
        }
     }
  }
}

 

 

Anyone have any idea whats going on and how to get this working?

 

 

My other question is, is it possible to have a structure generate partially underground, for example a house with a basement?

 

 

 

Edited by FizixRichard
Posted

I thought I'd add the full source.

 

Registries:

 

SetupWorldGen

public class setupWorldGen
{
    private static final Logger LOGGER = LogManager.getLogger();


    public static void setupWorldGen()
    {
        for (Biome biome : ForgeRegistries.BIOMES)
        {
            // Add structures ignoring Oceans
            if (!biome.getCategory() == Biome.Category.OCEAN)
            {
                addSurfaceStructure(biome, CeStructures.TEST_STRUCTURE);
            }
        }
    }




    private static void addSurfaceStructure(Biome biome, Structure<NoFeatureConfig> structure) {
        biome.addStructure(structure.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG));
        biome.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES, structure.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG).withPlacement(Placement.NOPE.configure(IPlacementConfig.NO_PLACEMENT_CONFIG)));
    }


}

 

 

CEStructures

public class CeStructures
{
    private static final Logger LOGGER = LogManager.getLogger();


    // Declare structures
    public static final Structure<NoFeatureConfig> TEST_STRUCTURE = create(TestStructure.SHORT_NAME, new TestStructure(NoFeatureConfig::deserialize));


    @SubscribeEvent
    public static void createStructures(RegistryEvent.Register<Feature<?>> event)
    {
        // Register Structure Pieces
        CeStructurePieces.registerPieces();


        // Register Structures
        IForgeRegistry<Feature<?>> registry = event.getRegistry();

        registry.register(TEST_STRUCTURE);

    }


    private static @Nonnull
    <T extends Feature<?>> T create(String name, T feature) {
        feature.setRegistryName(CE.MODID, name.toLowerCase(Locale.ROOT));
        return feature;
    }


}

 

 

CeStructurePieces

public class CeStructurePieces
{

    private static final Logger LOGGER = LogManager.getLogger();


    // Declare Structure Pieces
    public static final IStructurePieceType TEST_STRUCTURE = TestStructurePieces.Piece::new;



    public static void registerPieces()
    {
        // Register The Jigsaw Pieces
        TestStructurePieces.register();



        // Register Structure Pieces
        register(TestStructure.SHORT_NAME, TEST_STRUCTURE);

    }


    @SuppressWarnings("UnusedReturnValue")
    private static @Nonnull
    IStructurePieceType register(String name, IStructurePieceType type) {
        return Registry.register(Registry.STRUCTURE_PIECE, new ResourceLocation(CE.MODID, name.toLowerCase(Locale.ROOT)), type);
    }


}

 

 

Structure and Structure Piece Classes:

 

TestStructure

public class TestStructure extends AbstractStructure
{
    private static final Logger LOGGER = LogManager.getLogger();

    // Properties
    public static final String SHORT_NAME = "test_structure";
    public static final String LONG_NAME = CE.MODID + ":" + SHORT_NAME;
    private static final int SEED_MODIFIER = 165745296;
    private static final int STRUCTURE_SIZE = 3;
    private static final int STRUCTURE_DISTANCE = 10;
    private static final int STRUCTURE_SEPARATION = 5;
    private static final int HEIGHT_DELTA = 3;
    private static final double SPAWN_CHANCE = 0.7;



    public TestStructure(Function<Dynamic<?>, ? extends NoFeatureConfig> configFactoryIn) {
        super(configFactoryIn, SHORT_NAME, STRUCTURE_SIZE, HEIGHT_DELTA);        
    }


    @Override
    protected int getSeedModifier() {
        return SEED_MODIFIER;
    }

    @Override
    public @Nonnull
    String getStructureName() {
        return LONG_NAME;
    }

    @Override
    public int getSize() {
        return STRUCTURE_SIZE;
    }

    @Override
    public int getHeightDelta() {
        return HEIGHT_DELTA;
    }

    @Override
    protected int getFeatureDistance(ChunkGenerator<?> generator) { return STRUCTURE_DISTANCE; }

    @Override
    protected int getFeatureSeparation(ChunkGenerator<?> generator) { return STRUCTURE_SEPARATION; }

    @Override
    protected double getSpawnChance() { return SPAWN_CHANCE; }



    @Override
    public @Nonnull
    IStartFactory getStartFactory() {
        return Start::new;
    }


    public static class Start extends MarginedStructureStart {

        public Start(Structure<?> structure, int chunkX, int chunkZ, MutableBoundingBox bounds, int reference, long seed) {
            super(structure, chunkX, chunkZ, bounds, reference, seed);
        }

        @Override
        public void init(@Nonnull ChunkGenerator<?> chunkGenerator, @Nonnull TemplateManager templateManager, int chunkX, int chunkZ, @Nonnull Biome biome) {
            Rotation rotation = Rotation.values()[this.rand.nextInt(Rotation.values().length)];
            BlockPos position = getSurfaceStructurePosition(chunkGenerator, 3, rotation, chunkX, chunkZ);

            
            TestStructurePieces.create(chunkGenerator, templateManager, position, this.components, this.rand);

            this.recalculateStructureSize();
        }
      
      
      public BlockPos getSurfaceStructurePosition(@Nonnull ChunkGenerator generator, int size, Rotation rotation, int chunkX, int chunkZ) {
            int xOffset = size * 16;
            int zOffset = size * 16;

            int x = (chunkX << 4);
            int z = (chunkZ << 4);

           
            BlockPos adjustedPos = new BlockPos(x, 0, z);

            return adjustedPos;            
        }
    }

}

 

AbstractStruture

public abstract class AbstractStructure extends ScatteredStructure<NoFeatureConfig> {
    private static final Logger LOGGER = LogManager.getLogger();
  
    private final String name;
    private final int size;
    private final int heightdelta;


    public AbstractStructure(Function<Dynamic<?>, ? extends NoFeatureConfig> configFactoryIn, String name, int size, int heightdelta) {
        super(configFactoryIn);
        this.name = name;
        this.size = size;
        this.heightdelta = heightdelta;
    }

    protected abstract double getSpawnChance();

    @Override
    public int getSize() {
        return this.size;
    }


    public int getHeightDelta() {
        return this.heightdelta;
    }

    @Override
    protected int getBiomeFeatureDistance(ChunkGenerator<?> chunkGenerator) {
        return getFeatureDistance(chunkGenerator);
    }

    protected abstract int getFeatureDistance(ChunkGenerator<?> chunkGenerator);

    @Override
    protected int getBiomeFeatureSeparation(ChunkGenerator<?> chunkGenerator) {
        return getFeatureSeparation(chunkGenerator);
    }

    protected abstract int getFeatureSeparation(ChunkGenerator<?> chunkGenerator);


    @Override
    @Nonnull
    public String getStructureName() {
        return new ResourceLocation(CE.MODID, name).toString();
    }


    @Override
    public boolean canBeGenerated(BiomeManager biomeManager, @Nonnull ChunkGenerator<?> chunkGenerator, @Nonnull Random randIn, int chunkX, int chunkZ, @Nonnull Biome biomeIn)
    {

        /* original
        ChunkPos chunkpos = this.getStartPositionForPosition(generatorIn, randIn, chunkX, chunkZ, 0, 0);
      return chunkX == chunkpos.x && chunkZ == chunkpos.z && generatorIn.hasStructure(biomeIn, this);
         */
        

        ChunkPos chunkpos = getStartPositionForPosition(chunkGenerator, randIn, chunkX, chunkZ, 0, 0);

        
        if (chunkX == chunkpos.x && chunkZ == chunkpos.z)
        {
            // Is the surface where we want to generate flat enough
            if (surfaceCheck(chunkGenerator, chunkX, chunkZ))
            {

                
                for (int x = chunkX - getSize(); x <= chunkX + getSize(); x++) {
                    for (int z = chunkZ - getSize(); z <= chunkZ + getSize(); z++)
                    {
                        if (!chunkGenerator.hasStructure(biomeIn, this)) {

                            return false;
                        }
                    }
                }
              

                // Check how far from villages we are            
                for (int x2 = chunkX - 5; x2 <= chunkX + 5; ++x2) {
                    for (int z2 = chunkZ - 5; z2 <= chunkZ + 5; ++z2) {
                        BlockPos position = new BlockPos((x2 << 4) + 9, 0, (z2 << 4) + 9);
                        if (Feature.VILLAGE.canBeGenerated(biomeManager, chunkGenerator, randIn, x2, z2, biomeManager.getBiome(position))) {
                            
                            return false;
                        }
                    }
                }

                // Apply spawn chance               
                int x3 = chunkX >> 4;
                int z3 = chunkZ >> 4;
                randIn.setSeed((long) (x3 ^ z3 << 4) ^ chunkGenerator.getSeed());
                randIn.nextInt();

                Double randVal = randIn.nextDouble();
                boolean chanceCheck = randVal < getSpawnChance();               

                return chanceCheck;

            }
        }

        return false;
    }



    @Override
    @Nonnull
    protected ChunkPos getStartPositionForPosition(ChunkGenerator<?> chunkGenerator, Random random, int x, int z, int spacingOffsetsX, int spacingOffsetsZ)
    {
        
        int featureDistance = this.getBiomeFeatureDistance(chunkGenerator);
        int featureSeparation = this.getBiomeFeatureSeparation(chunkGenerator);
        int xPos = x + featureDistance * spacingOffsetsX;
        int zPos = z + featureDistance * spacingOffsetsZ;
        int i1 = xPos < 0 ? xPos - featureDistance + 1 : xPos;
        int j1 = zPos < 0 ? zPos - featureDistance + 1 : zPos;
        int validChunkX = i1 / featureDistance;
        int validChunkZ = j1 / featureDistance;

        ((SharedSeedRandom) random).setLargeFeatureSeedWithSalt(chunkGenerator.getSeed(), validChunkX, validChunkZ, getSeedModifier());

        validChunkX = validChunkX * featureDistance;
        validChunkZ = validChunkZ * featureDistance;
        validChunkX = validChunkX + random.nextInt(featureDistance - featureSeparation);
        validChunkZ = validChunkZ + random.nextInt(featureDistance - featureSeparation);
        return new ChunkPos(validChunkX, validChunkZ);
    }




    protected boolean surfaceCheck(@Nonnull ChunkGenerator<?> chunkGenerator, int chunkX, int chunkZ)
    {      

        int offset = getSize() * 16;
        int xStart = (chunkX << 4);
        int zStart = (chunkZ << 4);

        
        int c1 = chunkGenerator.func_222531_c(xStart, zStart, Heightmap.Type.WORLD_SURFACE_WG);
        int c2 = chunkGenerator.func_222531_c(xStart, zStart + offset, Heightmap.Type.WORLD_SURFACE_WG);
        int c3 = chunkGenerator.func_222531_c(xStart + offset, zStart, Heightmap.Type.WORLD_SURFACE_WG);
        int c4 = chunkGenerator.func_222531_c(xStart + offset, zStart + offset, Heightmap.Type.WORLD_SURFACE_WG);


        int lowerHeight = Math.min(Math.min(c1, c2), Math.min(c3, c4));
        int upperHeight = Math.max(Math.max(c1, c2), Math.max(c3, c4));

        //LOGGER.info("Area Height Range: " + lowerHeight + " to " + upperHeight);

        boolean isFlat = Math.abs(upperHeight - lowerHeight) <= getHeightDelta();      

        return isFlat;
    }
}

 

 

TestStructurePiece

public class TestStructurePieces
{
    private static final Logger LOGGER = LogManager.getLogger();

    private static String pathIn = "test_structure";
    private static String pieceLocation = "test/test_structure";
    private static IStructurePieceType pieceStructureIn = CeStructurePieces.TEST_STRUCTURE;
    private static IWorld iWorldIn;
    private static int size = 3;

    public static void register()
    {


        JigsawManager.REGISTRY.register(new JigsawPattern(
                new ResourceLocation(
                        CE.MODID,
                        pathIn
                ),
                new ResourceLocation("empty"),
                ImmutableList.of(
                                Pair.of(new SingleJigsawPiece(CE.MODID + ":" + pieceLocation), 1)
                                ),
                JigsawPattern.PlacementBehaviour.RIGID)
        );




    }

    public static void create(ChunkGenerator<?> generator, TemplateManager templateManager, BlockPos position, List<StructurePiece> pieces, SharedSeedRandom random) {

        // Set the world from chunk generator (not sure how else to get world from here)
        iWorldIn = ObfuscationReflectionHelper.getPrivateValue(ChunkGenerator.class, generator, "field_222540_a");

        LOGGER.info("Adding Pieces: " + position);
       
        JigsawManager.addPieces(new ResourceLocation(CE.MODID, pathIn), 7, Piece::new, generator, templateManager, position, pieces, random);
    }




    public static class Piece extends AbstractVillagePiece {
    
        public Piece(TemplateManager templateManager, JigsawPiece jigsawPiece, BlockPos position, int groundLevelDelta, Rotation rotation, MutableBoundingBox bounds) {

            super(pieceStructureIn, templateManager, jigsawPiece, position, groundLevelDelta, rotation, bounds);

                      
            // Fill underside
          	int yStart = 100;
          	int xPos = position.getX();            
            int zPos = position.getZ();            
          
          	int xPosMax = xPos + bounds.getXSize();
            int zPosMax = zPos + bounds.getZSize();
		
            // Tried various ways of getting yStart here, the bounding box returns 0, I fixed to 100 for testing
          
            for(int x = xPos; x < xPosMax; ++x) {
                for(int z = zPos; z < zPosMax; ++z) {
                    //int k = -5;
                    this.replaceAirAndLiquidDownwards(iWorldIn, Blocks.SANDSTONE.getDefaultState(), x,  yStart, z, bounds);
                }
            }


        }

        public Piece(TemplateManager templateManager, CompoundNBT compoundNBT) {
            super(templateManager, compoundNBT, pieceStructureIn);
        }


        /**
         * Replaces air and liquid from given position downwards. Stops when hitting anything else than air or liquid
         */
        protected void replaceAirAndLiquidDownwards(IWorld worldIn, BlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
        {            
           int i = this.getXWithOffset(x, z);
           int j = this.getYWithOffset(y);
      		int k = this.getZWithOffset(x, z);
          
          // If I output data to console here, I get 4 blocks inside the bounding box (the structure is 7 high), and everything is air. It appears like the blocks arent set yet???
      		if (boundingboxIn.isVecInside(new BlockPos(i, j, k))) {
         while((worldIn.isAirBlock(new BlockPos(i, j, k)) || worldIn.getBlockState(new BlockPos(i, j, k)).getMaterial().isLiquid()) && j > 1) {
            worldIn.setBlockState(new BlockPos(i, j, k), blockstateIn, 2);
            --j;
         }

      }
        }
     }
  }
}

 

 

 

 

 

Posted

Figured this out and I thought I'd update this in case anyone else is trying to figure structure generation stuff out.

 

 

public class TestStructurePieces
{
    private static final Logger LOGGER = LogManager.getLogger();

    private static String pathIn = "test_structure";
    private static String pieceLocation = "test/test_structure";
    private static IStructurePieceType pieceStructureIn = CeStructurePieces.TEST_STRUCTURE;


    public static void register()
    {
        JigsawManager.REGISTRY.register(new JigsawPattern(
                new ResourceLocation(
                        Ce.MODID,
                        pathIn
                ),
                new ResourceLocation("empty"),
                ImmutableList.of(
                                Pair.of(new SingleJigsawPiece(Ce.MODID + ":" + pieceLocation), 1)                         
                                ),
                JigsawPattern.PlacementBehaviour.RIGID)
        );
    }

    public static void create(ChunkGenerator<?> generator, TemplateManager templateManager, BlockPos position, List<StructurePiece> pieces, SharedSeedRandom random) {

        JigsawManager.addPieces(new ResourceLocation(Ce.MODID, pathIn), 7, Piece::new, generator, templateManager, position, pieces, random);
    }




    public static class Piece extends AbstractVillagePiece
    {
        private TemplateManager templateManager;

        public Piece(TemplateManager templateManager, JigsawPiece jigsawPiece, BlockPos position, int groundLevelDelta, Rotation rotation, MutableBoundingBox bounds) {

            super(pieceStructureIn, templateManager, jigsawPiece, position, groundLevelDelta, rotation, bounds);
            this.templateManager = templateManager;
        }

        public Piece(TemplateManager templateManager, CompoundNBT compoundNBT) {
            super(templateManager, compoundNBT, pieceStructureIn);

            this.templateManager = templateManager;
        }


        @Override
        public boolean create(IWorld worldIn, ChunkGenerator<?> chunkGeneratorIn, Random randomIn, MutableBoundingBox mutableBoundingBoxIn, ChunkPos chunkPosIn) {

            BlockPos position = this.getPos();

            

            // Foundation Fill Process
            for(int x = this.boundingBox.minX; x < this.boundingBox.maxX; ++x) {
                for(int z = this.boundingBox.minZ; z < this.boundingBox.maxZ; ++z) {
                    this.replaceAirAndLiquidDownwards(worldIn, Blocks.SANDSTONE.getDefaultState(), x, position.getY() - 1, z, mutableBoundingBoxIn);
                }
            }

            return this.jigsawPiece.place(this.templateManager, worldIn, chunkGeneratorIn, this.pos, this.rotation, mutableBoundingBoxIn, randomIn);
        }


        protected void replaceAirAndLiquidDownwards(IWorld worldIn, BlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn) {

            int j = y;

            if (boundingboxIn.isVecInside(new BlockPos(x, j, z)))
            {
                while((worldIn.isAirBlock(new BlockPos(x, j, z)) || worldIn.getBlockState(new BlockPos(x, j, z)).getMaterial().isLiquid()) && j > 1) {
                    worldIn.setBlockState(new BlockPos(x, j, z), blockstateIn, 2);
                    --j;
                }
           }
        }

    }
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It is a rendering issue with embeddium/oculus
    • So, I have a minecraft world hosted with essential on forge 1.20.1, there's 149 mods, and the forge version is 47.3.0, and it's been like that for a good 2-3 weeks, and all of a sudden, it stopped loading, and I have 0 clue as to why, and this world means A LOT to me, so if anyone out there is able to help, I would GLADLY appreciate it. here's the link if ya wanna help:   [04Dec2024 22:42:24.552] [Worker-ResourceReload-3/ERROR][net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener/]: Couldn't parse data file slabsexpanded:snow_blockblocktoslab from slabsexpanded:recipes/snow_blockblocktoslab.json com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:526) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_263475_(GsonHelper.java:531) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_13776_(GsonHelper.java:581) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_278771_(SimpleJsonResourceReloadListener.java:41) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:29) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:17) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10786_(SimplePreparableReloadListener.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:514) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007) ~[gson-2.10.jar%23107!/:?] at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:524) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?]
    • Hello! I have been having a problem with Forgematica, Embeddium, Oculus, and create. I wanted to download litematica so I could see which blocks are in my creative mode build, so that I could collect them all in survival. However, litematica is a fabric mod. I found a port called forgematica, which I added (along with it's dependency) to my mods folder. I loaded into a new world, and built a structure. Then, I added a part from the create mod, and the game crashed instantly, with exit code -1. Thanks for any help! Crash Report and mods list: https://pastebin.com/rtzh6LAi
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.