    001package net.minecraft.world.gen.structure;
    002
    003public class StructureVillagePieceWeight
    004{
    005    /** The Class object for the represantation of this village piece. */
    006    public Class villagePieceClass;
    007    public final int villagePieceWeight;
    008    public int villagePiecesSpawned;
    009    public int villagePiecesLimit;
    010
    011    public StructureVillagePieceWeight(Class par1Class, int par2, int par3)
    012    {
    013        this.villagePieceClass = par1Class;
    014        this.villagePieceWeight = par2;
    015        this.villagePiecesLimit = par3;
    016    }
    017
    018    public boolean canSpawnMoreVillagePiecesOfType(int par1)
    019    {
    020        return this.villagePiecesLimit == 0 || this.villagePiecesSpawned < this.villagePiecesLimit;
    021    }
    022
    023    public boolean canSpawnMoreVillagePieces()
    024    {
    025        return this.villagePiecesLimit == 0 || this.villagePiecesSpawned < this.villagePiecesLimit;
    026    }
    027}