use of com.wuest.prefab.StructureGen.CustomStructures.StructureVillagerHouses in project MC-Prefab by Brian-Wuest.
the class VillagerHouseConfiguration method ConfigurationSpecificBuildStructure.
/**
* This is used to actually build the structure as it creates the structure instance and calls build structure.
* @param player The player which requested the build.
* @param world The world instance where the build will occur.
* @param hitBlockPos This hit block position.
*/
@Override
protected void ConfigurationSpecificBuildStructure(EntityPlayer player, World world, BlockPos hitBlockPos) {
StructureVillagerHouses structure = StructureVillagerHouses.CreateInstance(this.houseStyle.getStructureLocation(), StructureVillagerHouses.class);
if (structure.BuildStructure(this, world, hitBlockPos, EnumFacing.NORTH, player)) {
ItemStack stack = player.getHeldItemMainhand().getItem() instanceof ItemVillagerHouses ? player.getHeldItemMainhand() : player.getHeldItemOffhand();
stack.damageItem(1, player);
player.inventoryContainer.detectAndSendChanges();
}
}
Aggregations