Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Crack3dC0d3

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by Crack3dC0d3

  1. So i need some help with models. I'm trying to create an item that has multiple models at once. I know i have to do something with baked models and stuff but i cant figure it out. Some help would be appreciated.

    To clearify my problem: Say i got model A a stick, model B a log and model C a chicken, I want to be able to combine model A and C and A and B from code

  2. 11 hours ago, Animefan8888 said:

    Where are they located?


    Thats not the problem since saplings work with the same files. But they are located in resources/data/arcana/structures.. Oh wait thats not right


    EDIT: It is right, Nevermind. But still, they dont spawn in the world. The saplings do work though

     

     

    11 hours ago, Animefan8888 said:

    You may want to set the chunk to the chunk you are in.You can get it from the IWorld parameter using the BlockPos parameter you were given.

    Tried that, Doesnt change anything.

    I got no errors in the console

  3. Alright, I''m trying to spawn trees in my normal world. I already got the nbt files but i cant seem to fix how the "Feature" class works. (If i'm actually supposed to use that one) heres my code now

     

    public class SilverwoodFeature extends Feature<NoFeatureConfig> {
        public SilverwoodFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> configFactoryIn) {
            super(configFactoryIn);
        }
    
        @Override
        public boolean place(IWorld world, ChunkGenerator<? extends GenerationSettings> generator, Random random, BlockPos spawnPos, NoFeatureConfig config) {
            ServerWorld worldserver = (ServerWorld) world;
            TemplateManager templatemanager = worldserver.getStructureTemplateManager();
            Template template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/greatwoodtree"));
            int h = ThreadLocalRandom.current().nextInt(0, 7);
            switch(h) {
                case 1: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood1")); break;
                case 2: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood2")); break;
                case 3: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood3")); break;
                case 4: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood4")); break;
                case 5: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood5")); break;
                case 6: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood6")); break;
                case 7: template = templatemanager.getTemplate(new ResourceLocation("arcana", "trees/silverwood/silverwood7")); break;
            }
    
            if(random.nextInt(1) != 0 || world.getBiome(spawnPos) != Biomes.PLAINS) {
                return false;
            }
    
            if(template == null) {
                Constants.LOGGER.error("Could not find structure at " + new ResourceLocation("arcana:structures/trees/greatwood"));
                return false;
            }
            PlacementSettings placementsettings = (new PlacementSettings()).setMirror(Mirror.NONE)
                    .setRotation(Rotation.NONE).setIgnoreEntities(false).setChunk(null);
    
            template.addBlocksToWorld(world, spawnPos.add(-4, 0, -4), placementsettings);
            return true;
        }
  4. I'm trying to let some structures spawn via vanilla worldgen. I have a class implementing IWorldGenerator and added stuff to generate the structure. I think i have to register it somewhere but i dont know where and how. Can someone help?

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.