// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.hytalegenerator.chunkgenerator;

import javax.annotation.Nullable;
import java.util.function.LongPredicate;
import java.util.Objects;
import javax.annotation.Nonnull;

record ChunkRequest(@Nonnull GeneratorProfile generatorProfile, @Nonnull Arguments arguments) {
    @Nonnull
    public GeneratorProfile generatorProfile() {
        return this.generatorProfile;
    }
    
    @Nonnull
    public Arguments arguments() {
        return this.arguments;
    }
    
    public static final class GeneratorProfile
    {
        @Nonnull
        private final String worldStructureName;
        private int seed;
        
        public GeneratorProfile(@Nonnull final String worldStructureName, final int seed) {
            this.worldStructureName = worldStructureName;
            this.seed = seed;
        }
        
        @Nonnull
        public String worldStructureName() {
            return this.worldStructureName;
        }
        
        public int seed() {
            return this.seed;
        }
        
        public void setSeed(final int seed) {
            this.seed = seed;
        }
        
        @Override
        public boolean equals(final Object obj) {
            if (obj == this) {
                return true;
            }
            if (obj == null || obj.getClass() != this.getClass()) {
                return false;
            }
            final GeneratorProfile that = (GeneratorProfile)obj;
            return Objects.equals(this.worldStructureName, that.worldStructureName) && this.seed == that.seed;
        }
        
        @Override
        public int hashCode() {
            return Objects.hash(this.worldStructureName, this.seed);
        }
        
        @Override
        public String toString() {
            return "GeneratorProfile[worldStructureName=" + this.worldStructureName + ", seed=" + this.seed;
        }
    }
    
    record Arguments(int seed, long index, int x, int z, @Nullable LongPredicate stillNeeded) {
        @Nullable
        public LongPredicate stillNeeded() {
            return this.stillNeeded;
        }
    }
}
